	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_image
_gen_image:                             ## @gen_image
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jle	LBB0_6
## %bb.1:
	movq	_h_cos@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	imulq	$-1240768329, %rcx, %rdx        ## imm = 0xB60B60B7
	shrq	$32, %rdx
	addl	%ecx, %edx
	movl	%edx, %edi
	shrl	$31, %edi
	sarl	$8, %edx
	addl	%edi, %edx
	imull	$360, %edx, %edx                ## imm = 0x168
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_h_sin@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %r9d
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	shrl	%r8d
	leal	-1(%rax), %ebx
	imull	%r9d, %ebx
	movl	%edi, %edx
	imull	%r8d, %edx
	subl	%edx, %ebx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	$1, %edx
	subl	%eax, %edx
	imull	%edi, %edx
	imull	%r9d, %r8d
	subl	%r8d, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	_tab_r@GOTPCREL(%rip), %rcx
	movq	_tab_g@GOTPCREL(%rip), %r15
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movl	%edi, -64(%rbp)                 ## 4-byte Spill
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addl	%edi, -52(%rbp)                 ## 4-byte Folded Spill
	addl	%r9d, -48(%rbp)                 ## 4-byte Folded Spill
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FIXP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	imull	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, %r13d
	shrl	$31, %r13d
	addl	%edx, %r13d
	sarl	%r13d
	imull	%esi, %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	addl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	addl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rcx), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_ipol
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_ipol
	movl	%eax, %r12d
	movq	_tab_b@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_ipol
	movl	%r14d, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_put_pixel
	movq	_tab_r@GOTPCREL(%rip), %rcx
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	incl	%r14d
	subl	%r9d, %r13d
	addl	%edi, %ebx
	cmpl	%r14d, %esi
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h_cos,8,3                      ## @h_cos
	.comm	_h_sin,8,3                      ## @h_sin
	.comm	_FIXP,4,2                       ## @FIXP
	.comm	_tab_r,4,2                      ## @tab_r
	.comm	_tab_g,4,2                      ## @tab_g
	.comm	_tab_b,4,2                      ## @tab_b
	.no_dead_strip	_gen_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_image
_gen_image:                             ; @gen_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cmp	w1, #0
	cinc	w8, w1, lt
	str	w2, [sp]                        ; 4-byte Folded Spill
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x27, x1
	mov	w14, #0
Lloh0:
	adrp	x9, _h_cos@GOTPAGE
Lloh1:
	ldr	x9, [x9, _h_cos@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	w10, #24759
	movk	w10, #46603, lsl #16
	smull	x10, w0, w10
	lsr	x10, x10, #32
	add	w10, w10, w0
	asr	w11, w10, #8
	add	w10, w11, w10, lsr #31
	mov	w11, #360
	msub	w10, w10, w11, w0
	sbfiz	x10, x10, #2, #32
	ldr	w28, [x9, x10]
Lloh3:
	adrp	x9, _h_sin@GOTPAGE
Lloh4:
	ldr	x9, [x9, _h_sin@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w21, [x9, x10]
	asr	w8, w8, #1
	ldr	w9, [sp]                        ; 4-byte Folded Reload
	lsr	w9, w9, #1
	sub	w10, w8, #1
	mul	w11, w28, w9
	neg	w11, w11
	madd	w10, w21, w10, w11
	msub	w8, w28, w8, w28
	msub	w8, w21, w9, w8
	stp	w8, w10, [sp, #4]               ; 8-byte Folded Spill
Lloh6:
	adrp	x19, _tab_r@GOTPAGE
Lloh7:
	ldr	x19, [x19, _tab_r@GOTPAGEOFF]
Lloh8:
	adrp	x20, _tab_g@GOTPAGE
Lloh9:
	ldr	x20, [x20, _tab_g@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w9, [sp, #8]                ; 8-byte Folded Reload
	add	w9, w9, #1
	add	w8, w8, w28
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	add	w8, w8, w21
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	ldr	w8, [sp]                        ; 4-byte Folded Reload
	cmp	w9, w8
	mov	x14, x9
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	str	w14, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w27, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w22, #0
Lloh10:
	adrp	x8, _FIXP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FIXP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [sp]                        ; 4-byte Folded Reload
	mul	w9, w8, w9
	cmp	w9, #0
	cinc	w9, w9, lt
	mul	w8, w8, w27
	cmp	w8, #0
	cinc	w8, w8, lt
	ldr	w10, [sp, #8]                   ; 4-byte Folded Reload
	add	w23, w10, w9, asr #1
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	add	w24, w9, w8, asr #1
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x19]
	mov	x1, x24
	mov	x2, x23
	bl	_ipol
	mov	x25, x0
	ldr	w0, [x20]
	mov	x1, x24
	mov	x2, x23
	bl	_ipol
	mov	x26, x0
Lloh13:
	adrp	x8, _tab_b@GOTPAGE
Lloh14:
	ldr	x8, [x8, _tab_b@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x24
	mov	x2, x23
	bl	_ipol
	mov	x4, x0
	mov	x0, x22
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x2, x25
	mov	x3, x26
	bl	_put_pixel
	add	w22, w22, #1
	sub	w23, w23, w21
	add	w24, w24, w28
	cmp	w27, w22
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_h_cos,8,3                      ; @h_cos
	.comm	_h_sin,8,3                      ; @h_sin
	.comm	_FIXP,4,2                       ; @FIXP
	.comm	_tab_r,4,2                      ; @tab_r
	.comm	_tab_g,4,2                      ; @tab_g
	.comm	_tab_b,4,2                      ; @tab_b
	.no_dead_strip	_gen_image
.subsections_via_symbols
