	.file	"extr_rotozoom.c_init_demo.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"rb"
	.text
	.p2align 4
	.type	init_demo, @function
init_demo:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR W[rip]
	mov	rbx, rsp
	lea	eax, [rax+rax*2]
	cdqe
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L22:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L22
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L23
.L4:
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	mov	rbx, rsp
	call	fopen@PLT
	mov	r13, rax
	test	rax, rax
	je	.L24
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	mov	rdi, rsp
	call	fread@PLT
	cmp	eax, 15
	jne	.L7
	mov	eax, DWORD PTR H[rip]
	test	eax, eax
	jle	.L8
	mov	eax, DWORD PTR W[rip]
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L11:
	lea	edx, [rax+rax*2]
	mov	rcx, r13
	mov	esi, 1
	mov	rdi, rbx
	call	fread@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR W[rip]
	lea	edx, [rax+rax*2]
	cmp	r8d, edx
	jne	.L7
	test	eax, eax
	jle	.L9
	mov	rcx, rbx
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L10:
	imul	eax, r12d
	movzx	edi, BYTE PTR [rcx]
	mov	rsi, QWORD PTR tab_r[rip]
	add	rcx, 3
	add	eax, edx
	cdqe
	mov	BYTE PTR [rsi+rax], dil
	mov	eax, DWORD PTR W[rip]
	movzx	edi, BYTE PTR -2[rcx]
	mov	rsi, QWORD PTR tab_g[rip]
	imul	eax, r12d
	add	eax, edx
	cdqe
	mov	BYTE PTR [rsi+rax], dil
	mov	eax, DWORD PTR W[rip]
	movzx	edi, BYTE PTR -1[rcx]
	mov	rsi, QWORD PTR tab_b[rip]
	imul	eax, r12d
	add	eax, edx
	add	edx, 1
	cdqe
	mov	BYTE PTR [rsi+rax], dil
	mov	eax, DWORD PTR W[rip]
	cmp	eax, edx
	jg	.L10
.L9:
	add	r12d, 1
	cmp	DWORD PTR H[rip], r12d
	jg	.L11
.L8:
	mov	rdi, r13
	xor	ebx, ebx
	call	fclose@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR MY_PI[rip]
	imul	eax, ebx
	movsx	r12, eax
	imul	r12, r12, -1240768329
	shr	r12, 32
	add	r12d, eax
	sar	eax, 31
	sar	r12d, 7
	sub	r12d, eax
	mov	eax, DWORD PTR FIXP[rip]
	mov	edi, r12d
	lea	r13d, [rax+rax]
	call	int_sin@PLT
	add	r13d, eax
	mov	eax, DWORD PTR MY_PI[rip]
	mov	edi, eax
	shr	edi, 31
	add	edi, eax
	sar	edi
	add	edi, r12d
	call	int_sin@PLT
	mov	edi, r12d
	imul	eax, r13d
	mov	edx, eax
	shr	eax, 31
	add	eax, edx
	sar	eax
	cdq
	idiv	DWORD PTR FIXP[rip]
	mov	rdx, QWORD PTR h_cos[rip]
	mov	DWORD PTR [rdx+rbx*4], eax
	call	int_sin@PLT
	imul	r13d, eax
	mov	eax, r13d
	shr	eax, 31
	add	eax, r13d
	sar	eax
	cdq
	idiv	DWORD PTR FIXP[rip]
	mov	rdx, QWORD PTR h_sin[rip]
	mov	DWORD PTR [rdx+rbx*4], eax
	add	rbx, 1
	cmp	rbx, 360
	jne	.L12
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	eax, 1
	jmp	.L1
.L23:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L24:
	mov	rdi, r12
	call	perror@PLT
	mov	eax, 1
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	init_demo, .-init_demo
	.comm	tab_r,8,8
	.comm	tab_g,8,8
	.comm	tab_b,8,8
	.comm	h_sin,8,8
	.comm	h_cos,8,8
	.comm	W,4,4
	.comm	MY_PI,4,4
	.comm	H,4,4
	.comm	FIXP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_rotozoom.c_init_demo.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rb\000"
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_demo, %function
init_demo:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r5, .L18
	ldr	r2, .L18+4
	ldr	r3, [r5]
	ldr	r1, .L18+8
	add	r3, r3, r3, lsl #1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r2, [r2]
	str	r2, [fp, #-40]
	mov	r2,#0
	mov	r4, r0
	bl	fopen
	subs	r3, r0, #0
	beq	.L16
	mov	r2, #15
	mov	r1, #1
	mov	r0, sp
	str	r3, [fp, #-48]
	bl	fread
	cmp	r0, #15
	bne	.L4
	ldr	r10, .L18+12
	ldr	r3, [fp, #-48]
	ldr	r2, [r10]
	cmp	r2, #0
	ble	.L5
	mov	r9, sp
	mov	r4, #0
	ldr	r8, .L18+16
	ldr	r7, .L18+20
	ldr	r6, .L18+24
.L8:
	ldr	r2, [r5]
	mov	r1, #1
	add	r2, r2, r2, lsl #1
	mov	r0, r9
	str	r3, [fp, #-48]
	bl	fread
	ldr	lr, [r5]
	add	r2, lr, lr, lsl #1
	cmp	r0, r2
	bne	.L4
	cmp	lr, #0
	ldr	r3, [fp, #-48]
	ble	.L6
	mov	r1, r9
	mov	r2, #0
.L7:
	ldr	r0, [r8]
	ldrb	ip, [r1]	@ zero_extendqisi2
	mla	r0, lr, r4, r0
	strb	ip, [r0, r2]
	ldr	lr, [r7]
	ldr	r0, [r5]
	ldrb	ip, [r1, #1]	@ zero_extendqisi2
	mla	r0, r4, r0, lr
	strb	ip, [r0, r2]
	ldr	lr, [r6]
	ldr	r0, [r5]
	ldrb	ip, [r1, #2]	@ zero_extendqisi2
	mla	r0, r4, r0, lr
	strb	ip, [r0, r2]
	ldr	lr, [r5]
	add	r2, r2, #1
	cmp	lr, r2
	add	r1, r1, #3
	bgt	.L7
.L6:
	ldr	r2, [r10]
	add	r4, r4, #1
	cmp	r2, r4
	bgt	.L8
.L5:
	mov	r0, r3
	bl	fclose
	mov	r5, #0
	ldr	r9, .L18+28
	ldr	r6, .L18+32
	ldr	r8, .L18+36
	ldr	r10, .L18+40
.L9:
	ldr	r2, [r9]
	ldr	r3, .L18+44
	mul	r2, r5, r2
	smull	r1, r3, r2, r3
	asr	r1, r2, #31
	add	r2, r3, r2
	rsb	r7, r1, r2, asr #7
	mov	r0, r7
	ldr	r4, [r6]
	bl	int_sin
	ldr	r2, [r9]
	lsl	r4, r4, #1
	add	r2, r2, r2, lsr #31
	add	r4, r4, r0
	add	r0, r7, r2, asr #1
	bl	int_sin
	mul	r0, r4, r0
	add	r0, r0, r0, lsr #31
	ldr	r1, [r6]
	asr	r0, r0, #1
	bl	__aeabi_idiv
	mov	r1, r0
	ldr	r2, [r8]
	mov	r0, r7
	str	r1, [r2, r5, lsl #2]
	bl	int_sin
	mul	r0, r4, r0
	add	r0, r0, r0, lsr #31
	ldr	r1, [r6]
	asr	r0, r0, #1
	bl	__aeabi_idiv
	ldr	r3, [r10]
	str	r0, [r3, r5, lsl #2]
	add	r5, r5, #1
	cmp	r5, #360
	bne	.L9
	mov	r0, #0
	b	.L1
.L4:
	mov	r0, #1
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r0, r4
	bl	perror
	mov	r0, #1
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	W
	.word	.LC1
	.word	.LC0
	.word	H
	.word	tab_r
	.word	tab_g
	.word	tab_b
	.word	MY_PI
	.word	FIXP
	.word	h_cos
	.word	h_sin
	.word	-1240768329
	.size	init_demo, .-init_demo
	.comm	tab_r,4,4
	.comm	tab_g,4,4
	.comm	tab_b,4,4
	.comm	h_sin,4,4
	.comm	h_cos,4,4
	.comm	W,4,4
	.comm	MY_PI,4,4
	.comm	H,4,4
	.comm	FIXP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
