/
FFT_of_densities.s
1733 lines (1733 loc) · 31 KB
/
FFT_of_densities.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.file "FFT_of_densities.c"
.section .rodata.str1.8,"aMS",@progbits,1
.align 8
.LC0:
.string "grep -v \"#\" %s | grep -v \"^$\" | gawk -F\"=\" '{print $2}' > %s.dump"
.text
.p2align 4,,15
.globl conf2dump
.type conf2dump, @function
conf2dump:
.LFB42:
.cfi_startproc
subq $1016, %rsp
.cfi_def_cfa_offset 1024
movq %rdi, %r8
movq %rdi, %r9
movq %fs:40, %rax
movq %rax, 1000(%rsp)
xorl %eax, %eax
movl $1000, %edx
movl $.LC0, %ecx
movl $1, %esi
movq %rsp, %rdi
call __sprintf_chk
movq %rsp, %rdi
call system
xorl %eax, %eax
movq 1000(%rsp), %rdx
xorq %fs:40, %rdx
jne .L5
addq $1016, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 8
ret
.L5:
.cfi_restore_state
call __stack_chk_fail
.cfi_endproc
.LFE42:
.size conf2dump, .-conf2dump
.section .rodata.str1.1,"aMS",@progbits,1
.LC1:
.string "r"
.section .rodata.str1.8
.align 8
.LC2:
.string " * The file '%s' doesn't exist!\n"
.section .rodata.str1.1
.LC3:
.string "%s.dump"
.LC4:
.string "%d"
.LC5:
.string "%lf"
.LC6:
.string "%s"
.section .rodata.str1.8
.align 8
.LC8:
.string " * The file '%s' has been loaded!\n"
.section .rodata.str1.1
.LC9:
.string "rm -rf %s.dump"
.text
.p2align 4,,15
.globl read_parameters
.type read_parameters, @function
read_parameters:
.LFB43:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movl $.LC1, %esi
movq %rdi, %rbp
pushq %rbx
.cfi_def_cfa_offset 24
.cfi_offset 3, -24
subq $2024, %rsp
.cfi_def_cfa_offset 2048
movq %fs:40, %rax
movq %rax, 2008(%rsp)
xorl %eax, %eax
call fopen
testq %rax, %rax
je .L11
movq %rax, %rdi
call fclose
leaq 1008(%rsp), %rdi
movq %rbp, %r9
movq %rbp, %r8
movl $.LC0, %ecx
movl $1000, %edx
movl $1, %esi
xorl %eax, %eax
call __sprintf_chk
leaq 1008(%rsp), %rdi
call system
leaq 1008(%rsp), %rdi
movq %rbp, %r8
movl $.LC3, %ecx
movl $1000, %edx
movl $1, %esi
xorl %eax, %eax
call __sprintf_chk
leaq 1008(%rsp), %rdi
movl $.LC1, %esi
call fopen
movl $GV+1016, %edx
movq %rax, %rbx
movq %rax, %rdi
movl $.LC4, %esi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV+1008, %edx
movl $.LC5, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV, %edx
movl $.LC6, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV+1096, %edx
movl $.LC5, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV+1104, %edx
movl $.LC5, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV+1072, %edx
movl $.LC5, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movl $GV+1064, %edx
movl $.LC5, %esi
movq %rbx, %rdi
xorl %eax, %eax
call __isoc99_fscanf
movsd .LC7(%rip), %xmm0
movq %rbx, %rdi
movsd GV+1072(%rip), %xmm1
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, GV+1080(%rip)
call fclose
movq %rbp, %rdx
movl $.LC8, %esi
movl $1, %edi
xorl %eax, %eax
call __printf_chk
movq %rbp, %r8
movl $.LC9, %ecx
movl $1000, %edx
movl $1, %esi
movq %rsp, %rdi
xorl %eax, %eax
call __sprintf_chk
movq %rsp, %rdi
call system
xorl %eax, %eax
.L8:
movq 2008(%rsp), %rcx
xorq %fs:40, %rcx
jne .L12
addq $2024, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 24
popq %rbx
.cfi_def_cfa_offset 16
popq %rbp
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L11:
.cfi_restore_state
movq %rbp, %rdx
movl $.LC2, %esi
movl $1, %edi
call __printf_chk
movl $1, %eax
jmp .L8
.L12:
call __stack_chk_fail
.cfi_endproc
.LFE43:
.size read_parameters, .-read_parameters
.section .rodata.str1.8
.align 8
.LC10:
.string "%d %d %lf %lf %lf %lf %lf %lf %lf"
.align 8
.LC11:
.string "%d %lf %lf %lf %lf %lf %lf %lf\n"
.text
.p2align 4,,15
.globl read_data
.type read_data, @function
read_data:
.LFB44:
.cfi_startproc
pushq %r13
.cfi_def_cfa_offset 16
.cfi_offset 13, -16
movl $.LC1, %esi
movl $1125899907, %r13d
pushq %r12
.cfi_def_cfa_offset 24
.cfi_offset 12, -24
pushq %rbp
.cfi_def_cfa_offset 32
.cfi_offset 6, -32
xorl %ebp, %ebp
pushq %rbx
.cfi_def_cfa_offset 40
.cfi_offset 3, -40
xorl %ebx, %ebx
subq $1064, %rsp
.cfi_def_cfa_offset 1104
movq %fs:40, %rax
movq %rax, 1048(%rsp)
xorl %eax, %eax
call fopen
leaq 48(%rsp), %rdi
movq %rax, %rdx
movl $1000, %esi
movq %rax, %r12
call fgets
movl GV+1020(%rip), %eax
testl %eax, %eax
jg .L19
jmp .L16
.p2align 4,,10
.p2align 3
.L15:
addl $1, %ebx
addq $296, %rbp
cmpl %ebx, GV+1020(%rip)
jle .L16
.L19:
movq %rbp, %r8
addq gp(%rip), %r8
movl $.LC10, %esi
movq %r12, %rdi
leaq 32(%r8), %rax
leaq 28(%r8), %rdx
leaq 24(%r8), %rcx
leaq 8(%r8), %r9
movq %rax, 32(%rsp)
leaq 144(%r8), %rax
movq %rax, 24(%rsp)
leaq 136(%r8), %rax
movq %rax, 16(%rsp)
leaq 128(%r8), %rax
movq %rax, 8(%rsp)
leaq 16(%r8), %rax
movq %rax, (%rsp)
xorl %eax, %eax
call __isoc99_fscanf
movl %ebx, %eax
imull %r13d
movl %ebx, %eax
sarl $31, %eax
sarl $18, %edx
subl %eax, %edx
imull $1000000, %edx, %edx
cmpl %edx, %ebx
jne .L15
movq %rbp, %rax
addq gp(%rip), %rax
movl $.LC11, %esi
movl $1, %edi
movl 28(%rax), %edx
movsd 32(%rax), %xmm6
movsd 144(%rax), %xmm5
movsd 136(%rax), %xmm4
movsd 128(%rax), %xmm3
movsd 16(%rax), %xmm2
movsd 8(%rax), %xmm1
movsd (%rax), %xmm0
movl $7, %eax
call __printf_chk
jmp .L15
.p2align 4,,10
.p2align 3
.L16:
movq %r12, %rdi
call fclose
xorl %eax, %eax
movq 1048(%rsp), %rsi
xorq %fs:40, %rsi
jne .L22
addq $1064, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 40
popq %rbx
.cfi_def_cfa_offset 32
popq %rbp
.cfi_def_cfa_offset 24
popq %r12
.cfi_def_cfa_offset 16
popq %r13
.cfi_def_cfa_offset 8
ret
.L22:
.cfi_restore_state
call __stack_chk_fail
.cfi_endproc
.LFE44:
.size read_data, .-read_data
.section .rodata.str1.8
.align 8
.LC12:
.string "-----------------------------------------------"
.section .rodata.str1.1
.LC13:
.string "Cosmological parameters:"
.section .rodata.str1.8
.align 8
.LC14:
.string "OmegaM0=%lf OmegaL0=%lf redshift=%lf HubbleParam=%lf\n"
.section .rodata.str1.1
.LC15:
.string "Simulation parameters:"
.LC16:
.string "L=%lf\n"
.text
.p2align 4,,15
.globl read_binary
.type read_binary, @function
read_binary:
.LFB45:
.cfi_startproc
pushq %r12
.cfi_def_cfa_offset 16
.cfi_offset 12, -16
movl $.LC1, %esi
movl $GV, %edi
pushq %rbp
.cfi_def_cfa_offset 24
.cfi_offset 6, -24
pushq %rbx
.cfi_def_cfa_offset 32
.cfi_offset 3, -32
subq $32, %rsp
.cfi_def_cfa_offset 64
call fopen
movl $1, %edx
movq %rax, %rbp
movq %rax, %rcx
movl $8, %esi
movl $GV+1008, %edi
call fread
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1096, %edi
call fread
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1104, %edi
call fread
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1072, %edi
call fread
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1064, %edi
call fread
movsd .LC7(%rip), %xmm0
movl $.LC12, %edi
movsd GV+1072(%rip), %xmm1
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, GV+1080(%rip)
call puts
movl $.LC13, %edi
call puts
movsd GV+1064(%rip), %xmm3
movl $.LC14, %esi
movsd GV+1072(%rip), %xmm2
movl $1, %edi
movsd GV+1104(%rip), %xmm1
movl $4, %eax
movsd GV+1096(%rip), %xmm0
call __printf_chk
movl $.LC12, %edi
call puts
movl $.LC15, %edi
call puts
movsd GV+1008(%rip), %xmm0
movl $.LC16, %esi
movl $1, %edi
movl $1, %eax
call __printf_chk
movl $.LC12, %edi
call puts
movl GV+1020(%rip), %eax
testl %eax, %eax
jle .L25
xorl %ebx, %ebx
xorl %r12d, %r12d
.p2align 4,,10
.p2align 3
.L26:
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $4, %esi
addl $1, %r12d
addq $28, %rdi
call fread
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $4, %esi
addq $24, %rdi
call fread
movq %rbp, %rcx
movl $3, %edx
movl $8, %esi
movq %rsp, %rdi
call fread
movq %rbx, %rdx
addq gp(%rip), %rdx
movq %rbp, %rcx
movsd (%rsp), %xmm0
movl $8, %esi
addq $296, %rbx
movsd %xmm0, (%rdx)
leaq 32(%rdx), %rdi
movsd 8(%rsp), %xmm0
movsd %xmm0, 8(%rdx)
movsd 16(%rsp), %xmm0
movsd %xmm0, 16(%rdx)
movl $1, %edx
call fread
cmpl %r12d, GV+1020(%rip)
jg .L26
.L25:
movq %rbp, %rdi
call fclose
addq $32, %rsp
.cfi_def_cfa_offset 32
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 24
popq %rbp
.cfi_def_cfa_offset 16
popq %r12
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE45:
.size read_binary, .-read_binary
.section .rodata.str1.1
.LC17:
.string "w"
.section .rodata.str1.8
.align 8
.LC18:
.string "./../Processed_data/DenCon_Pot_PotDot.bin"
.text
.p2align 4,,15
.globl write_binary
.type write_binary, @function
write_binary:
.LFB46:
.cfi_startproc
pushq %r12
.cfi_def_cfa_offset 16
.cfi_offset 12, -16
movl $.LC17, %esi
movl $.LC18, %edi
pushq %rbp
.cfi_def_cfa_offset 24
.cfi_offset 6, -24
pushq %rbx
.cfi_def_cfa_offset 32
.cfi_offset 3, -32
subq $32, %rsp
.cfi_def_cfa_offset 64
call fopen
movl $1, %edx
movq %rax, %rbp
movq %rax, %rcx
movl $8, %esi
movl $GV+1008, %edi
call fwrite
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1096, %edi
call fwrite
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1104, %edi
call fwrite
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1072, %edi
call fwrite
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
movl $GV+1064, %edi
call fwrite
movl GV+1020(%rip), %eax
testl %eax, %eax
jle .L31
xorl %ebx, %ebx
xorl %r12d, %r12d
.p2align 4,,10
.p2align 3
.L32:
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $4, %esi
addl $1, %r12d
addq $28, %rdi
call fwrite
movq %rbx, %rax
addq gp(%rip), %rax
movq %rbp, %rcx
movl $3, %edx
movl $8, %esi
movq %rsp, %rdi
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movsd 8(%rax), %xmm0
movsd %xmm0, 8(%rsp)
movsd 16(%rax), %xmm0
movsd %xmm0, 16(%rsp)
call fwrite
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
addq $32, %rdi
call fwrite
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
addq $216, %rdi
call fwrite
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
addq $248, %rdi
call fwrite
movq %rbx, %rdi
addq gp(%rip), %rdi
movq %rbp, %rcx
movl $1, %edx
movl $8, %esi
addq $296, %rbx
addq $272, %rdi
call fwrite
cmpl %r12d, GV+1020(%rip)
jg .L32
.L31:
movq %rbp, %rdi
call fclose
addq $32, %rsp
.cfi_def_cfa_offset 32
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 24
popq %rbp
.cfi_def_cfa_offset 16
popq %r12
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE46:
.size write_binary, .-write_binary
.section .rodata.str1.8
.align 8
.LC19:
.string "Copy of input of Density Contrast for FFTW finished."
.align 8
.LC20:
.string "-----------------------------------------------------------------"
.align 8
.LC21:
.string "FFT: density contrast r2k out-of-place finished!"
.section .rodata.str1.1
.LC22:
.string "./../DenCon_k_raw.dat"
.LC23:
.string "Im_DenCon"
.LC24:
.string "Re_DenCon"
.LC25:
.string "#"
.LC26:
.string "%s%14s %15s\n"
.section .rodata.str1.8
.align 8
.LC27:
.string "Inverse FFT for contrast density finished!"
.section .rodata.str1.1
.LC28:
.string "./../Testing_c2r.dat"
.LC29:
.string "Reconstruted"
.LC30:
.string "DenCon"
.LC31:
.string "%s%9s %15s\n"
.LC32:
.string "%10d %16.8lf %16.8lf\n"
.LC33:
.string "Freeing up memory!"
.section .rodata.str1.8
.align 8
.LC34:
.string "--------------------------------------------------"
.section .rodata.str1.1
.LC35:
.string "Destroying plans!"
.LC36:
.string "plan_r2k destroyed!"
.LC38:
.string "k vectors computed!"
.section .rodata.str1.8
.align 8
.LC39:
.string "------------------------------------------------"
.align 8
.LC40:
.string "Computing density contrast in k space with CIC weight-function!"
.align 8
.LC41:
.string "Density contrast in k-space with CIC weight fn ready!!"
.section .rodata.str1.1
.LC42:
.string "FFT_transform code finished!"
.section .rodata.str1.8
.align 8
.LC45:
.string "Negative Delta^2=%lf for m=%d\n"
.text
.p2align 4,,15
.globl transform
.type transform, @function
transform:
.LFB47:
.cfi_startproc
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
pushq %r14
.cfi_def_cfa_offset 24
.cfi_offset 14, -24
pushq %r13
.cfi_def_cfa_offset 32
.cfi_offset 13, -32
pushq %r12
.cfi_def_cfa_offset 40
.cfi_offset 12, -40
pushq %rbp
.cfi_def_cfa_offset 48
.cfi_offset 6, -48
pushq %rbx
.cfi_def_cfa_offset 56
.cfi_offset 3, -56
subq $88, %rsp
.cfi_def_cfa_offset 144
movslq GV+1020(%rip), %rdi
salq $3, %rdi
call fftw_malloc
movslq GV+1040(%rip), %rdi
movq %rax, %rbp
salq $4, %rdi
call fftw_malloc
movl GV+1020(%rip), %ecx
movq %rax, %r12
xorl %eax, %eax
movq gp(%rip), %rdx
testl %ecx, %ecx
jle .L39
.L80:
movsd 32(%rdx), %xmm0
addq $296, %rdx
movsd %xmm0, 0(%rbp,%rax,8)
addq $1, %rax
cmpl %eax, %ecx
jg .L80
.L39:
movl $.LC19, %edi
xorl %r14d, %r14d
xorl %r13d, %r13d
call puts
movl $.LC20, %edi
movq %r12, %rbx
call puts
movl GV+1016(%rip), %edi
movl $64, %r9d
movq %r12, %r8
movq %rbp, %rcx
movl %edi, %edx
movl %edi, %esi
call fftw_plan_dft_r2c_3d
movq %rax, %rdi
movq %rax, (%rsp)
call fftw_execute
movl $.LC21, %edi
call puts
movl $.LC20, %edi
call puts
movl $.LC17, %esi
movl $.LC22, %edi
call fopen
movl $.LC26, %edx
movq %rax, %rdi
movq %rax, %r15
movl $.LC23, %r9d
xorl %eax, %eax
movl $.LC24, %r8d
movl $.LC25, %ecx
movl $1, %esi
call __fprintf_chk
movl GV+1040(%rip), %edx
testl %edx, %edx
jle .L38
.L81:
movsd GV+1024(%rip), %xmm1
movq %r14, %rax
addq gp(%rip), %rax
movsd (%rbx), %xmm0
movl %r13d, %ecx
movl $.LC32, %edx
movl $1, %esi
movq %r15, %rdi
divsd %xmm1, %xmm0
addl $1, %r13d
addq $296, %r14
addq $16, %rbx
movsd %xmm0, 40(%rax)
movsd -8(%rbx), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 48(%rax)
movl $2, %eax
movsd -8(%rbx), %xmm1
movsd -16(%rbx), %xmm0
call __fprintf_chk
cmpl %r13d, GV+1040(%rip)
jg .L81
.L38:
movq %r15, %rdi
xorl %r14d, %r14d
xorl %r15d, %r15d
call fclose
movslq GV+1020(%rip), %rdi
salq $3, %rdi
call fftw_malloc
movl GV+1016(%rip), %edi
movl $64, %r9d
movq %rax, %r8
movq %r12, %rcx
movq %rax, %r13
movq %rax, 24(%rsp)
movl %edi, %edx
movl %edi, %esi
call fftw_plan_dft_c2r_3d
movq %rax, %rdi
movq %rax, 32(%rsp)
call fftw_execute
movl $.LC27, %edi
call puts
movl $.LC20, %edi
call puts
movl $.LC17, %esi
movl $.LC28, %edi
call fopen
movl $.LC29, %r9d
movq %rax, %rdi
movq %rax, %rbx
movl $.LC30, %r8d
xorl %eax, %eax
movl $.LC25, %ecx
movl $.LC31, %edx
movl $1, %esi
call __fprintf_chk
movl GV+1020(%rip), %eax
testl %eax, %eax
jle .L42
.L82:
movsd GV+1024(%rip), %xmm2
movq gp(%rip), %rax
movl %r14d, %ecx
movsd 0(%r13), %xmm1
movl $.LC32, %edx
mulsd %xmm2, %xmm2
movl $1, %esi
movq %rbx, %rdi
movsd 32(%rax,%r15), %xmm0
movl $2, %eax
addl $1, %r14d
addq $8, %r13
addq $296, %r15
divsd %xmm2, %xmm1
call __fprintf_chk
cmpl %r14d, GV+1020(%rip)
jg .L82
.L42:
movq %rbx, %rdi
xorl %r13d, %r13d
call fclose
movl $.LC33, %edi
call puts
movl $.LC34, %edi
call puts
movq %rbp, %rdi
call fftw_free
movq 24(%rsp), %rdi
call fftw_free
movq %r12, %rdi
call fftw_free
movl $.LC35, %edi
call puts
movl $.LC34, %edi
call puts
movq (%rsp), %rdi
call fftw_destroy_plan
movl $.LC36, %esi
movl $1, %edi
xorl %eax, %eax
call __printf_chk
movq 32(%rsp), %rdi
call fftw_destroy_plan
xorl %eax, %eax
movl $.LC36, %esi
movl $1, %edi
call __printf_chk
movl GV+1016(%rip), %ecx
movsd .LC37(%rip), %xmm3
movl GV+1032(%rip), %eax
divsd GV+1008(%rip), %xmm3
testl %ecx, %ecx
jle .L45
.L83:
xorl %r12d, %r12d
.p2align 4,,10
.p2align 3
.L57:
testl %eax, %eax
js .L55
xorl %ebx, %ebx
jmp .L56
.p2align 4,,10
.p2align 3
.L91:
cvtsi2sd %r13d, %xmm1
cmpl %eax, %r12d
mulsd %xmm3, %xmm1
movsd %xmm1, 80(%rbp)
jg .L49
.L92:
cvtsi2sd %r12d, %xmm2
.L50:
cvtsi2sd %ebx, %xmm0
mulsd %xmm3, %xmm2
mulsd %xmm1, %xmm1
movsd %xmm2, 88(%rbp)
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm0
movsd %xmm0, 96(%rbp)
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
ucomisd %xmm0, %xmm0
jp .L90
.L51:
addl $1, %ebx
movsd %xmm0, 104(%rbp)
cmpl %ebx, %eax
jl .L55
.L56:
movl %r13d, %esi
leal 1(%rax), %edx
imull %ecx, %esi
addl %r12d, %esi
imull %esi, %edx
addl %ebx, %edx
cmpl %r13d, %eax
movslq %edx, %rdx
leaq (%rdx,%rdx,8), %rsi
leaq (%rdx,%rsi,4), %rsi
movq gp(%rip), %rdx
leaq (%rdx,%rsi,8), %rbp
jge .L91
movl %r13d, %edx
subl %ecx, %edx
cmpl %eax, %r12d
cvtsi2sd %edx, %xmm1
mulsd %xmm3, %xmm1
movsd %xmm1, 80(%rbp)
jle .L92
.L49:
movl %r12d, %edx
subl %ecx, %edx
cvtsi2sd %edx, %xmm2
jmp .L50
.p2align 4,,10
.p2align 3
.L55:
addl $1, %r12d
cmpl %ecx, %r12d
jl .L57
addl $1, %r13d
cmpl %ecx, %r13d
jge .L45
testl %ecx, %ecx
jg .L83
.L45:
movl $.LC38, %edi
call puts
movl $.LC39, %edi
call puts
movl $.LC40, %edi
call puts
movl $.LC39, %edi
call puts
movl GV+1020(%rip), %r13d
testl %r13d, %r13d
jle .L69
xorl %r12d, %r12d
xorl %ebp, %ebp
movsd .LC43(%rip), %xmm4
jmp .L70
.L94:
mulsd GV+1008(%rip), %xmm5
cvtsi2sd GV+1016(%rip), %xmm0
addsd %xmm0, %xmm0
movapd %xmm4, 64(%rsp)
movsd %xmm2, 48(%rsp)
movsd %xmm1, 32(%rsp)
movsd %xmm3, 24(%rsp)
divsd %xmm0, %xmm5
movapd %xmm5, %xmm0
movsd %xmm5, (%rsp)
call sin
movsd (%rsp), %xmm5
movsd 24(%rsp), %xmm3
divsd %xmm5, %xmm0
movapd 64(%rsp), %xmm4
movsd 32(%rsp), %xmm1
movsd 48(%rsp), %xmm2
mulsd %xmm0, %xmm0
.L63:
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm1, 120(%rbx)
andpd %xmm4, %xmm0
ucomisd %xmm2, %xmm0
jbe .L88
movsd 40(%rbx), %xmm2
movsd 48(%rbx), %xmm3
divsd %xmm1, %xmm2
divsd %xmm1, %xmm3
movapd %xmm2, %xmm0
movsd %xmm2, 56(%rbx)
mulsd %xmm2, %xmm0
xorpd %xmm6, %xmm6
movapd %xmm3, %xmm1
movsd %xmm3, 64(%rbx)
mulsd %xmm3, %xmm1
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm6
movsd %xmm0, 72(%rbx)
ja .L93
.L67:
addl $1, %ebp
addq $296, %r12
cmpl %r13d, %ebp