	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_mbox_open
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	-168(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$36, %edx
	callq	_memset
	movl	$19778, -168(%rbp)              ## imm = 0x4D42
	movq	_N@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	imull	%eax, %eax
	leal	(%rax,%rax,2), %eax
	movl	%eax, -164(%rbp)
	movl	$72, -160(%rbp)
	movq	%r14, %rdi
	movl	$36, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fwrite
	leaq	-128(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$36, %edx
	callq	_memset
	movl	$36, -116(%rbp)
	movl	(%r13), %eax
	movl	%eax, -112(%rbp)
	movl	%eax, -108(%rbp)
	movabsq	$103079215105, %rax             ## imm = 0x1800000001
	movq	%rax, -104(%rbp)
	movq	_BI_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r14, %rdi
	movl	$36, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fwrite
	movq	_log2_N@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_GPU_FFT_REV@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	(%r13), %ecx
	leaq	-64(%rbp), %r8
	movl	%r15d, %edi
	callq	_gpu_fft_prepare
	testl	%eax, %eax
	jne	LBB0_20
## %bb.3:
	movl	(%r14), %esi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	leaq	-56(%rbp), %r8
	movl	%r15d, %edi
	callq	_gpu_fft_prepare
	movq	-64(%rbp), %rsi
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	%rsi, %rdi
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_1:
	movl	$-666, %eax                     ## imm = 0xFD66
	jmp	LBB0_20
LBB0_6:
	movq	-56(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	movl	%r15d, %edi
	callq	_gpu_fft_trans_prepare
	testl	%eax, %eax
	je	LBB0_7
## %bb.22:
	movq	-64(%rbp), %rdi
	movl	%eax, %ebx
	callq	_gpu_fft_release
	movq	-56(%rbp), %rdi
LBB0_5:
	callq	_gpu_fft_release
	movl	%ebx, %eax
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_23
## %bb.21:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$0, (%r13)
	jle	LBB0_13
## %bb.8:
	xorl	%r14d, %r14d
	movq	_in@GOTPCREL(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r14d
	cmpl	%ecx, %r14d
	jge	LBB0_13
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	-64(%rbp), %rdi
	movl	(%r15), %esi
	movl	%r14d, %edx
	callq	_GPU_FFT_ROW
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	$0, (%rax,%rdx,8)
	incq	%rdx
	movslq	(%r13), %rcx
	cmpq	%rcx, %rdx
	jl	LBB0_11
	jmp	LBB0_12
LBB0_13:
	movq	-64(%rbp), %rdi
	movq	_in@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$2, %edx
	callq	_GPU_FFT_ROW
	movl	$60, 16(%rax)
	movq	-64(%rbp), %rdi
	movl	(%r14), %esi
	movl	(%r13), %edx
	addl	$-2, %edx
	callq	_GPU_FFT_ROW
	movslq	(%r13), %rcx
	movl	$60, -16(%rax,%rcx,8)
	movl	$1, %edi
	callq	_usleep
	xorl	%eax, %eax
	callq	_Microseconds
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi
	callq	_gpu_fft_execute
	xorl	%eax, %eax
	callq	_Microseconds
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rdi
	callq	_gpu_fft_trans_execute
	xorl	%eax, %eax
	callq	_Microseconds
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi
	callq	_gpu_fft_execute
	xorl	%eax, %eax
	callq	_Microseconds
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.14:
	xorl	%r15d, %r15d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	incl	%r15d
	cmpl	%eax, %r15d
	jge	LBB0_19
LBB0_15:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	-56(%rbp), %rdi
	movq	_out@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_GPU_FFT_ROW
	movq	%rax, %r12
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%r14,8), %edi
	subl	$-128, %edi
	movq	%rbx, %rsi
	callq	_fputc
	movl	(%r12,%r14,8), %edi
	subl	$-128, %edi
	movq	%rbx, %rsi
	callq	_fputc
	movl	(%r12,%r14,8), %edi
	subl	$-128, %edi
	movq	%rbx, %rsi
	callq	_fputc
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_17
	jmp	LBB0_18
LBB0_19:
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	subl	%edx, %esi
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %edx
	subl	-80(%rbp), %ecx                 ## 4-byte Folded Reload
	leaq	L_.str.2(%rip), %rdi
	callq	_printf
	movq	-64(%rbp), %rdi
	callq	_gpu_fft_release
	movq	-56(%rbp), %rdi
	callq	_gpu_fft_release
	movq	-88(%rbp), %rdi
	callq	_gpu_fft_trans_release
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hello_fft_2d.bmp"

L_.str.1:                               ## @.str.1
	.asciz	"wb"

	.comm	_N,4,2                          ## @N
	.comm	_BI_RGB,4,2                     ## @BI_RGB
	.comm	_log2_N,4,2                     ## @log2_N
	.comm	_GPU_FFT_REV,4,2                ## @GPU_FFT_REV
	.comm	_in,4,2                         ## @in
	.comm	_out,4,2                        ## @out
L_.str.2:                               ## @.str.2
	.asciz	"1st FFT   %6d usecs\nTranspose %6d usecs\n2nd FFT   %6d usecs\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function main
lCPI0_0:
	.long	1                               ; 0x1
	.long	24                              ; 0x18
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_mbox_open
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w21, #36
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #36
	bl	_memset
	mov	w8, #19778
Lloh7:
	adrp	x26, _N@GOTPAGE
Lloh8:
	ldr	x26, [x26, _N@GOTPAGEOFF]
	ldr	w9, [x26]
	mul	w9, w9, w9
	add	w9, w9, w9, lsl #1
	stp	w8, w9, [sp, #40]
	mov	w8, #72
	str	w8, [sp, #48]
	add	x0, sp, #40
	mov	w1, #36
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	mov	x0, sp
	mov	w1, #0
	mov	w2, #36
	bl	_memset
	ldr	w8, [x26]
	stp	w21, w8, [sp, #12]
	str	w8, [sp, #20]
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #24]
Lloh11:
	adrp	x8, _BI_RGB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BI_RGB@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	mov	x0, sp
	mov	w1, #36
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
Lloh14:
	adrp	x22, _log2_N@GOTPAGE
Lloh15:
	ldr	x22, [x22, _log2_N@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh16:
	adrp	x23, _GPU_FFT_REV@GOTPAGE
Lloh17:
	ldr	x23, [x23, _GPU_FFT_REV@GOTPAGEOFF]
	ldr	w2, [x23]
	ldr	w3, [x26]
	add	x24, sp, #88
	add	x4, sp, #88
	mov	x0, x20
	bl	_gpu_fft_prepare
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w1, [x22]
	ldr	w2, [x23]
	add	x4, x24, #8
	ldr	w3, [x26]
	mov	x0, x20
	bl	_gpu_fft_prepare
	ldr	x1, [sp, #88]
	cbz	w0, LBB0_7
; %bb.3:
	mov	x21, x0
	mov	x0, x1
	bl	_gpu_fft_release
	b	LBB0_5
LBB0_4:
	mov	w21, #-666
LBB0_5:
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.6:
	mov	x0, x21
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_7:
	ldr	x2, [sp, #96]
	add	x3, sp, #80
	mov	x0, x20
	bl	_gpu_fft_trans_prepare
	cbz	w0, LBB0_9
; %bb.8:
	mov	x21, x0
	ldr	x0, [sp, #88]
	bl	_gpu_fft_release
	ldr	x0, [sp, #96]
	bl	_gpu_fft_release
	b	LBB0_5
LBB0_9:
	ldr	w8, [x26]
Lloh21:
	adrp	x21, _in@GOTPAGE
Lloh22:
	ldr	x21, [x21, _in@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.10:
	mov	w20, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w20, w20, #1
	cmp	w20, w8
	b.ge	LBB0_15
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x0, [sp, #88]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_GPU_FFT_ROW
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x9, #0
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x0, x9, lsl #3
	str	xzr, [x8]
	add	x9, x9, #1
	ldrsw	x8, [x26]
	cmp	x9, x8
	b.lt	LBB0_14
	b	LBB0_11
LBB0_15:
	ldr	x0, [sp, #88]
	ldr	w1, [x21]
	mov	w2, #2
	bl	_GPU_FFT_ROW
	mov	w20, #60
	str	w20, [x0, #16]
	ldr	x0, [sp, #88]
	ldr	w1, [x21]
	ldr	w8, [x26]
	sub	w2, w8, #2
	bl	_GPU_FFT_ROW
	ldrsw	x8, [x26]
	add	x8, x0, x8, lsl #3
	stur	w20, [x8, #-16]
	mov	w0, #1
	bl	_usleep
	bl	_Microseconds
	mov	x20, x0
	ldr	x0, [sp, #88]
	bl	_gpu_fft_execute
	bl	_Microseconds
	mov	x21, x0
	ldr	x0, [sp, #80]
	bl	_gpu_fft_trans_execute
	bl	_Microseconds
	mov	x22, x0
	ldr	x0, [sp, #96]
	bl	_gpu_fft_execute
	bl	_Microseconds
	mov	x23, x0
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.16:
	mov	w24, #0
Lloh23:
	adrp	x27, _out@GOTPAGE
Lloh24:
	ldr	x27, [x27, _out@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	w24, w24, #1
	cmp	w24, w8
	b.ge	LBB0_21
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	ldr	x0, [sp, #96]
	ldr	w1, [x27]
	mov	x2, x24
	bl	_GPU_FFT_ROW
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x25, x0
	mov	x28, #0
LBB0_20:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x25]
	add	w0, w8, #128
	mov	x1, x19
	bl	_fputc
	ldr	w8, [x25]
	add	w0, w8, #128
	mov	x1, x19
	bl	_fputc
	ldr	w8, [x25], #8
	add	w0, w8, #128
	mov	x1, x19
	bl	_fputc
	add	x28, x28, #1
	ldrsw	x8, [x26]
	cmp	x28, x8
	b.lt	LBB0_20
	b	LBB0_17
LBB0_21:
	sub	w1, w23, w22
	sub	w2, w22, w21
	sub	w3, w21, w20
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	ldr	x0, [sp, #88]
	bl	_gpu_fft_release
	ldr	x0, [sp, #96]
	bl	_gpu_fft_release
	ldr	x0, [sp, #80]
	bl	_gpu_fft_trans_release
	mov	w21, #0
	b	LBB0_5
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdrp	Lloh9, Lloh11
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hello_fft_2d.bmp"

l_.str.1:                               ; @.str.1
	.asciz	"wb"

	.comm	_N,4,2                          ; @N
	.comm	_BI_RGB,4,2                     ; @BI_RGB
	.comm	_log2_N,4,2                     ; @log2_N
	.comm	_GPU_FFT_REV,4,2                ; @GPU_FFT_REV
	.comm	_in,4,2                         ; @in
	.comm	_out,4,2                        ; @out
l_.str.2:                               ; @.str.2
	.asciz	"1st FFT   %6d usecs\nTranspose %6d usecs\n2nd FFT   %6d usecs\n"

.subsections_via_symbols
