	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_demo
_init_demo:                             ## @init_demo
	.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
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_W@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	leal	(%rax,%rax,2), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	$1, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$15, %edx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	callq	_fread
	cmpl	$15, %eax
	jne	LBB0_15
## %bb.3:
	movq	_H@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jle	LBB0_11
## %bb.4:
	movl	(%r14), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_tab_r@GOTPCREL(%rip), %r8
	movq	_tab_g@GOTPCREL(%rip), %r15
	movq	_tab_b@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%r13d
	movq	_H@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_11
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%r8, %rbx
	leal	(%rsi,%rsi,2), %edx
	movl	$1, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_fread
	movl	(%r14), %esi
	leal	(%rsi,%rsi,2), %edx
	cmpl	%edx, %eax
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%esi, %esi
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	xorl	%edx, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-2(%rax), %ebx
	imull	%r13d, %esi
	movslq	%esi, %rsi
	addq	(%r8), %rsi
	movb	%bl, (%rdx,%rsi)
	movslq	(%r14), %rdi
	movslq	%r13d, %rsi
	imulq	%rsi, %rdi
	addq	(%r15), %rdi
	movzbl	-1(%rax), %ebx
	movb	%bl, (%rdx,%rdi)
	movzbl	(%rax), %ebx
	movslq	(%r14), %rdi
	imulq	%rsi, %rdi
	addq	(%r12), %rdi
	movb	%bl, (%rdx,%rdi)
	incq	%rdx
	movslq	(%r14), %rsi
	addq	$3, %rax
	cmpq	%rsi, %rdx
	jl	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movq	%rcx, %rdi
	callq	_fclose
	movq	_MY_PI@GOTPCREL(%rip), %r14
	movq	_FIXP@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	imull	%r13d, %eax
	movslq	%eax, %rbx
	imulq	$-1240768329, %rbx, %rax        ## imm = 0xB60B60B7
	shrq	$32, %rax
	addl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	sarl	$8, %ebx
	addl	%eax, %ebx
	movl	(%r15), %r12d
	movl	%ebx, %edi
	callq	_int_sin
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r12,2), %r12d
	movl	(%r14), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	addl	%ebx, %edi
	callq	_int_sin
	imull	%r12d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cltd
	idivl	(%r15)
	movq	_h_cos@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r13,2)
	movl	%ebx, %edi
	callq	_int_sin
	imull	%r12d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cltd
	idivl	(%r15)
	movq	_h_sin@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r13,2)
	addq	$2, %r13
	cmpq	$720, %r13                      ## imm = 0x2D0
	jne	LBB0_12
## %bb.13:
	xorl	%eax, %eax
LBB0_14:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
                                        ## kill: def $eax killed $eax killed $rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, %rdi
	callq	_perror
	movl	$1, %eax
	jmp	LBB0_14
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_W,4,2                          ## @W
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_H,4,2                          ## @H
	.comm	_tab_r,8,3                      ## @tab_r
	.comm	_tab_g,8,3                      ## @tab_g
	.comm	_tab_b,8,3                      ## @tab_b
	.comm	_MY_PI,4,2                      ## @MY_PI
	.comm	_FIXP,4,2                       ## @FIXP
	.comm	_h_cos,8,3                      ## @h_cos
	.comm	_h_sin,8,3                      ## @h_sin
	.no_dead_strip	_init_demo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_demo
_init_demo:                             ; @init_demo
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x22, _W@GOTPAGE
Lloh4:
	ldr	x22, [x22, _W@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w8, w8, w8, lsl #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	mov	w2, #15
	mov	x3, x20
	bl	_fread
	cmp	w0, #15
	b.ne	LBB0_12
; %bb.2:
Lloh9:
	adrp	x23, _H@GOTPAGE
Lloh10:
	ldr	x23, [x23, _H@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w24, #0
	ldr	w8, [x22]
	add	x25, x19, #2
Lloh11:
	adrp	x26, _tab_r@GOTPAGE
Lloh12:
	ldr	x26, [x26, _tab_r@GOTPAGEOFF]
Lloh13:
	adrp	x27, _tab_g@GOTPAGE
Lloh14:
	ldr	x27, [x27, _tab_g@GOTPAGEOFF]
Lloh15:
	adrp	x28, _tab_b@GOTPAGE
Lloh16:
	ldr	x28, [x28, _tab_b@GOTPAGEOFF]
	mov	w21, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	ldr	w9, [x23]
	cmp	w24, w9
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	add	w2, w8, w8, lsl #1
	mov	x0, x19
	mov	w1, #1
	mov	x3, x20
	bl	_fread
	ldr	w8, [x22]
	add	w9, w8, w8, lsl #1
	cmp	w0, w9
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, #0
	mov	x10, x25
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldurb	w11, [x10, #-2]
	ldr	x12, [x26]
	mul	w8, w24, w8
	add	x8, x12, w8, sxtw
	strb	w11, [x8, x9]
	ldurb	w8, [x10, #-1]
	ldr	x11, [x27]
	ldrsw	x12, [x22]
	sxtw	x13, w24
	madd	x11, x13, x12, x11
	strb	w8, [x11, x9]
	ldrb	w8, [x10], #3
	ldr	x11, [x28]
	ldrsw	x12, [x22]
	madd	x11, x13, x12, x11
	strb	w8, [x11, x9]
	add	x9, x9, #1
	ldrsw	x8, [x22]
	cmp	x9, x8
	b.lt	LBB0_8
	b	LBB0_4
LBB0_9:
	mov	x0, x20
	bl	_fclose
	mov	x20, #0
	mov	x21, #0
Lloh17:
	adrp	x22, _MY_PI@GOTPAGE
Lloh18:
	ldr	x22, [x22, _MY_PI@GOTPAGEOFF]
	mov	w23, #24759
	movk	w23, #46603, lsl #16
Lloh19:
	adrp	x24, _FIXP@GOTPAGE
Lloh20:
	ldr	x24, [x24, _FIXP@GOTPAGEOFF]
Lloh21:
	adrp	x25, _h_cos@GOTPAGE
Lloh22:
	ldr	x25, [x25, _h_cos@GOTPAGEOFF]
Lloh23:
	adrp	x26, _h_sin@GOTPAGE
Lloh24:
	ldr	x26, [x26, _h_sin@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	mul	w8, w21, w8
	smull	x9, w8, w23
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #8
	add	w19, w9, w8, lsr #31
	ldr	w27, [x24]
	mov	x0, x19
	bl	_int_sin
	add	w27, w0, w27, lsl #1
	ldr	w8, [x22]
	cmp	w8, #0
	cinc	w8, w8, lt
	add	w0, w19, w8, asr #1
	bl	_int_sin
	mul	w8, w0, w27
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	ldr	w9, [x24]
	sdiv	w8, w8, w9
	ldr	x9, [x25]
	str	w8, [x9, x20]
	mov	x0, x19
	bl	_int_sin
	mul	w8, w0, w27
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	ldr	w9, [x24]
	sdiv	w8, w8, w9
	ldr	x9, [x26]
	str	w8, [x9, x20]
	add	x21, x21, #2
	add	x20, x20, #4
	cmp	x21, #720
	b.ne	LBB0_10
; %bb.11:
	mov	w21, #0
LBB0_12:
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x21
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x0, x21
	bl	_perror
	mov	w21, #1
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_W,4,2                          ; @W
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_H,4,2                          ; @H
	.comm	_tab_r,8,3                      ; @tab_r
	.comm	_tab_g,8,3                      ; @tab_g
	.comm	_tab_b,8,3                      ; @tab_b
	.comm	_MY_PI,4,2                      ; @MY_PI
	.comm	_FIXP,4,2                       ; @FIXP
	.comm	_h_cos,8,3                      ; @h_cos
	.comm	_h_sin,8,3                      ; @h_sin
	.no_dead_strip	_init_demo
.subsections_via_symbols
