	.file	"extr_snes_ntsc_impl.h_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	xmm0, xmm0
	pxor	xmm3, xmm3
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	movss	xmm1, DWORD PTR rgb_unit[rip]
	movss	xmm2, DWORD PTR .LC0[rip]
	cvtsi2ss	xmm0, QWORD PTR 64[rsi]
	cvtsi2ss	xmm3, QWORD PTR rgb_offset[rip]
	mulss	xmm2, xmm1
	mulss	xmm0, xmm2
	addss	xmm0, xmm3
	cvttss2si	rax, xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, QWORD PTR 56[rsi]
	mov	QWORD PTR 24[rdi], rax
	mulss	xmm0, xmm2
	pxor	xmm2, xmm2
	addss	xmm0, xmm1
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR artifacts_mid[rip]
	movss	DWORD PTR [rdi], xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, QWORD PTR 40[rsi]
	comiss	xmm0, xmm2
	jbe	.L2
	movss	xmm3, DWORD PTR artifacts_max[rip]
	subss	xmm3, xmm1
	mulss	xmm0, xmm3
.L2:
	mulss	xmm0, xmm1
	addss	xmm0, xmm1
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR fringing_mid[rip]
	movss	DWORD PTR 4[r13], xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, QWORD PTR 32[r12]
	comiss	xmm0, xmm2
	jbe	.L4
	movss	xmm2, DWORD PTR fringing_max[rip]
	subss	xmm2, xmm1
	mulss	xmm0, xmm2
.L4:
	mulss	xmm0, xmm1
	mov	rsi, r12
	mov	rdi, r13
	addss	xmm0, xmm1
	movss	DWORD PTR 8[r13], xmm0
	call	init_filters@PLT
	mov	eax, DWORD PTR gamma_size[rip]
	cmp	eax, 1
	jle	.L23
	sub	eax, 1
	pxor	xmm0, xmm0
	xor	ebx, ebx
	movss	xmm7, DWORD PTR .LC3[rip]
	cvtsi2ss	xmm0, eax
	movss	xmm1, DWORD PTR .LC4[rip]
	movss	DWORD PTR 12[rsp], xmm7
	divss	xmm7, xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, QWORD PTR 24[r12]
	mulss	xmm0, DWORD PTR .LC0[rip]
	subss	xmm1, xmm0
	movss	DWORD PTR 8[rsp], xmm1
	movss	DWORD PTR 4[rsp], xmm7
	.p2align 4,,10
	.p2align 3
.L9:
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, ebx
	mulss	xmm0, DWORD PTR 4[rsp]
	cvttss2si	edi, xmm0
	movss	xmm0, DWORD PTR 8[rsp]
	call	pow@PLT
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	mov	rdx, QWORD PTR 32[r13]
	cvtsi2ss	xmm0, rax
	mulss	xmm0, DWORD PTR 0[r13]
	cvtsi2ss	xmm1, QWORD PTR 24[r13]
	addss	xmm0, xmm1
	cvttss2si	rax, xmm0
	mov	QWORD PTR [rdx+rbx*8], rax
	add	rbx, 1
	cmp	DWORD PTR gamma_size[rip], ebx
	jg	.L9
.L10:
	pxor	xmm0, xmm0
	movss	xmm1, DWORD PTR PI[rip]
	mov	rbp, QWORD PTR [r12]
	cvtsi2ss	xmm0, QWORD PTR 16[r12]
	mulss	xmm0, xmm1
	divss	xmm1, DWORD PTR .LC2[rip]
	mulss	xmm1, DWORD PTR ext_decoder_hue[rip]
	addss	xmm0, xmm1
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, QWORD PTR 8[r12]
	addss	xmm1, DWORD PTR 12[rsp]
	movss	DWORD PTR 4[rsp], xmm1
	test	rbp, rbp
	je	.L24
.L8:
	movss	DWORD PTR 12[rsp], xmm0
	call	sin@PLT
	pxor	xmm4, xmm4
	movss	xmm0, DWORD PTR 12[rsp]
	cvtsi2ss	xmm4, rax
	mulss	xmm4, DWORD PTR 4[rsp]
	movss	DWORD PTR 8[rsp], xmm4
	call	cos@PLT
	pxor	xmm1, xmm1
	mov	rbx, QWORD PTR 16[r13]
	mov	edx, DWORD PTR burst_count[rip]
	cvtsi2ss	xmm1, rax
	mulss	xmm1, DWORD PTR 4[rsp]
	movss	xmm4, DWORD PTR 8[rsp]
	lea	eax, -1[rdx]
	lea	rax, 3[rax+rax*2]
	lea	r12, [rbx+rax*8]
	.p2align 4,,10
	.p2align 3
.L13:
	xor	eax, eax
.L11:
	movss	xmm0, DWORD PTR 0[rbp+rax]
	movss	xmm2, DWORD PTR 4[rbp+rax]
	movaps	xmm3, xmm1
	movaps	xmm5, xmm4
	mulss	xmm3, xmm0
	mulss	xmm5, xmm2
	mulss	xmm0, xmm4
	mulss	xmm2, xmm1
	subss	xmm3, xmm5
	addss	xmm0, xmm2
	movss	DWORD PTR [rbx+rax], xmm3
	movss	DWORD PTR 4[rbx+rax], xmm0
	add	rax, 8
	cmp	rax, 24
	jne	.L11
	add	rbx, 24
	cmp	edx, 1
	jle	.L1
	movss	xmm3, DWORD PTR .LC5[rip]
	movaps	xmm0, xmm4
	movss	xmm2, DWORD PTR .LC6[rip]
	movss	DWORD PTR 8[rsp], xmm1
	movss	DWORD PTR 4[rsp], xmm4
	call	ROTATE_IQ@PLT
	cmp	rbx, r12
	je	.L1
	mov	edx, DWORD PTR burst_count[rip]
	movss	xmm4, DWORD PTR 4[rsp]
	movss	xmm1, DWORD PTR 8[rsp]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movss	xmm6, DWORD PTR .LC3[rip]
	movss	DWORD PTR 12[rsp], xmm6
	jmp	.L10
.L24:
	mov	rdi, r12
	movss	DWORD PTR 8[rsp], xmm0
	mov	rbp, QWORD PTR default_decoder[rip]
	call	STD_HUE_CONDITION@PLT
	movss	xmm0, DWORD PTR 8[rsp]
	test	rax, rax
	je	.L8
	movss	xmm1, DWORD PTR std_decoder_hue[rip]
	subss	xmm1, DWORD PTR ext_decoder_hue[rip]
	movss	xmm2, DWORD PTR PI[rip]
	divss	xmm2, DWORD PTR .LC2[rip]
	mulss	xmm1, xmm2
	addss	xmm0, xmm1
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.comm	std_decoder_hue,4,4
	.comm	rgb_unit,4,4
	.comm	rgb_offset,8,8
	.comm	gamma_size,4,4
	.comm	fringing_mid,4,4
	.comm	fringing_max,4,4
	.comm	ext_decoder_hue,4,4
	.comm	default_palette_contrast,4,4
	.comm	default_decoder,8,8
	.comm	burst_count,4,4
	.comm	artifacts_mid,4,4
	.comm	artifacts_max,4,4
	.comm	PI,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1056964608
	.align 4
.LC2:
	.long	1127481344
	.align 4
.LC3:
	.long	1065353216
	.align 4
.LC4:
	.long	1066471417
	.align 4
.LC5:
	.long	3204448256
	.align 4
.LC6:
	.long	1063105488
	.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_snes_ntsc_impl.h_init.c"
	.text
	.global	__aeabi_fmul
	.global	__aeabi_i2f
	.global	__aeabi_fadd
	.global	__aeabi_f2iz
	.global	__aeabi_fcmpgt
	.global	__aeabi_fsub
	.global	__aeabi_fdiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init, %function
init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L27
	sub	sp, sp, #20
	ldr	r8, [r3]	@ float
	mov	r7, r1
	mov	r5, r0
	mov	r1, #1056964608
	mov	r0, r8
	bl	__aeabi_fmul
	mov	r4, r0
	ldr	r0, [r7, #32]
	bl	__aeabi_i2f
	mov	r1, r4
	bl	__aeabi_fmul
	ldr	r3, .L27+4
	mov	r6, r0
	ldr	r0, [r3]
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fadd
	bl	__aeabi_f2iz
	mov	r3, r0
	ldr	r0, [r7, #28]
	str	r3, [r5, #16]
	bl	__aeabi_i2f
	mov	r1, r4
	bl	__aeabi_fmul
	mov	r1, r8
	bl	__aeabi_fadd
	mov	r3, r0
	ldr	r0, [r7, #20]
	str	r3, [r5]	@ float
	bl	__aeabi_i2f
	ldr	r3, .L27+8
	mov	r4, r0
	ldr	r0, [r3]
	bl	__aeabi_i2f
	mov	r1, #0
	mov	r6, r0
	mov	r0, r4
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L27+12
	mov	r1, r6
	ldr	r0, [r3]	@ float
	bl	__aeabi_fsub
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_fmul
	mov	r4, r0
.L2:
	mov	r1, r4
	mov	r0, r6
	bl	__aeabi_fmul
	mov	r1, r6
	bl	__aeabi_fadd
	mov	r3, r0
	ldr	r0, [r7, #16]
	str	r3, [r5, #4]	@ float
	bl	__aeabi_i2f
	ldr	r3, .L27+16
	mov	r4, r0
	ldr	r0, [r3]
	bl	__aeabi_i2f
	mov	r1, #0
	mov	r6, r0
	mov	r0, r4
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L27+20
	mov	r1, r6
	ldr	r0, [r3]	@ float
	bl	__aeabi_fsub
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_fmul
	mov	r4, r0
.L4:
	mov	r1, r4
	mov	r0, r6
	bl	__aeabi_fmul
	mov	r1, r6
	bl	__aeabi_fadd
	ldr	r8, .L27+24
	str	r0, [r5, #8]	@ float
	mov	r1, r7
	mov	r0, r5
	bl	init_filters
	ldr	r0, [r8]
	cmp	r0, #1
	ble	.L10
	sub	r0, r0, #1
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, #1065353216
	bl	__aeabi_fdiv
	mov	r10, r0
	ldr	r0, [r7, #12]
	bl	__aeabi_i2f
	mov	r1, #1056964608
	bl	__aeabi_fmul
	mov	r1, r0
	ldr	r0, .L27+28
	bl	__aeabi_fsub
	mov	r4, #0
	mov	r9, r0
.L9:
	mov	r0, r4
	bl	__aeabi_i2f
	mov	r1, r10
	bl	__aeabi_fmul
	bl	__aeabi_f2iz
	mov	r1, r9
	bl	pow
	bl	__aeabi_i2f
	ldr	r1, [r5]	@ float
	bl	__aeabi_fmul
	mov	r6, r0
	ldr	r0, [r5, #16]
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fadd
	bl	__aeabi_f2iz
	ldr	r2, [r5, #20]
	ldr	r3, [r8]
	str	r0, [r2, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L9
.L10:
	ldr	r8, .L27+32
	ldr	r0, [r7, #8]
	ldr	r6, [r8]	@ float
	bl	__aeabi_i2f
	mov	r1, r6
	bl	__aeabi_fmul
	ldr	r10, .L27+36
	mov	r4, r0
	ldr	r1, .L27+40
	mov	r0, r6
	bl	__aeabi_fdiv
	ldr	r1, [r10]	@ float
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r4, r0
	ldr	r0, [r7, #4]
	bl	__aeabi_i2f
	mov	r1, #1065353216
	bl	__aeabi_fadd
	ldr	r9, [r7]
	mov	r6, r0
	cmp	r9, #0
	beq	.L26
.L8:
	mov	r0, r4
	bl	sin
	bl	__aeabi_i2f
	mov	r1, r6
	bl	__aeabi_fmul
	mov	r8, r0
	mov	r0, r4
	bl	cos
	bl	__aeabi_i2f
	mov	r1, r6
	bl	__aeabi_fmul
	mov	r7, r0
	ldr	r3, .L27+44
	ldr	r2, [r5, #12]
	ldr	r3, [r3]
	str	r2, [sp]
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	add	r3, r9, #8
	str	r3, [sp, #12]
	add	r9, r9, #32
.L13:
	ldr	r3, [sp]
	ldr	r4, [sp, #12]
	add	r5, r3, #8
.L11:
	ldr	fp, [r4, #-8]	@ float
	mov	r0, r7
	mov	r1, fp
	bl	__aeabi_fmul
	ldr	r10, [r4, #-4]	@ float
	mov	r6, r0
	mov	r1, r10
	mov	r0, r8
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fsub
	mov	r1, fp
	str	r0, [r5, #-8]	@ float
	mov	r0, r8
	bl	__aeabi_fmul
	mov	r1, r10
	mov	r6, r0
	mov	r0, r7
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fadd
	add	r4, r4, #8
	cmp	r9, r4
	str	r0, [r5, #-4]	@ float
	add	r5, r5, #8
	bne	.L11
	ldr	r3, [sp, #8]
	cmp	r3, #1
	ldr	r3, [sp]
	add	r3, r3, #24
	str	r3, [sp]
	ble	.L1
	mov	r3, #-1090519040
	mov	r1, r7
	mov	r0, r8
	ldr	r2, .L27+48
	bl	ROTATE_IQ
	ldr	r3, [sp, #4]
	subs	r3, r3, #1
	str	r3, [sp, #4]
	ldrne	r3, .L27+44
	ldrne	r3, [r3]
	strne	r3, [sp, #8]
	bne	.L13
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r3, .L27+52
	mov	r0, r7
	ldr	r9, [r3]
	bl	STD_HUE_CONDITION
	cmp	r0, #0
	beq	.L8
	ldr	r3, .L27+56
	ldr	r1, [r10]	@ float
	ldr	r0, [r3]	@ float
	bl	__aeabi_fsub
	ldr	r1, .L27+40
	mov	r7, r0
	ldr	r0, [r8]	@ float
	bl	__aeabi_fdiv
	mov	r1, r0
	mov	r0, r7
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r4, r0
	b	.L8
.L28:
	.align	2
.L27:
	.word	rgb_unit
	.word	rgb_offset
	.word	artifacts_mid
	.word	artifacts_max
	.word	fringing_mid
	.word	fringing_max
	.word	gamma_size
	.word	1066471417
	.word	PI
	.word	ext_decoder_hue
	.word	1127481344
	.word	burst_count
	.word	1063105488
	.word	default_decoder
	.word	std_decoder_hue
	.size	init, .-init
	.comm	std_decoder_hue,4,4
	.comm	rgb_unit,4,4
	.comm	rgb_offset,4,4
	.comm	gamma_size,4,4
	.comm	fringing_mid,4,4
	.comm	fringing_max,4,4
	.comm	ext_decoder_hue,4,4
	.comm	default_palette_contrast,4,4
	.comm	default_decoder,4,4
	.comm	burst_count,4,4
	.comm	artifacts_mid,4,4
	.comm	artifacts_max,4,4
	.comm	PI,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
