	.file	"extr_ir.c_ir_correct_for_bounds.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ir_correct_for_bounds, @function
ir_correct_for_bounds:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR WIIUSE_ASPECT_16_9[rip], edx
	je	.L22
	mov	r9d, DWORD PTR WM_ASPECT_4_3_X[rip]
	mov	r10d, DWORD PTR WM_ASPECT_4_3_Y[rip]
.L3:
	mov	eax, 1024
	pxor	xmm0, xmm0
	movss	xmm2, DWORD PTR [rdi]
	sub	eax, r9d
	mov	edx, eax
	shr	eax, 31
	add	eax, edx
	sar	eax
	add	eax, ecx
	cvtsi2ss	xmm0, eax
	comiss	xmm2, xmm0
	jb	.L20
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, r9d
	addss	xmm0, xmm1
	comiss	xmm0, xmm2
	jb	.L20
	mov	eax, 768
	pxor	xmm0, xmm0
	movss	xmm3, DWORD PTR [rsi]
	sub	eax, r10d
	mov	edx, eax
	shr	eax, 31
	add	eax, edx
	sar	eax
	add	eax, r8d
	cvtsi2ss	xmm0, eax
	comiss	xmm3, xmm0
	jb	.L20
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, r10d
	addss	xmm0, xmm1
	comiss	xmm0, xmm3
	jnb	.L23
.L20:
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	mov	r9d, DWORD PTR WM_ASPECT_16_9_X[rip]
	mov	r10d, DWORD PTR WM_ASPECT_16_9_Y[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	pxor	xmm0, xmm0
	mov	eax, 1
	cvtsi2ss	xmm0, ecx
	subss	xmm2, xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, r8d
	movss	DWORD PTR [rdi], xmm2
	movss	xmm1, DWORD PTR [rsi]
	subss	xmm1, xmm0
	movss	DWORD PTR [rsi], xmm1
	ret
	.cfi_endproc
.LFE0:
	.size	ir_correct_for_bounds, .-ir_correct_for_bounds
	.comm	WM_ASPECT_4_3_Y,4,4
	.comm	WM_ASPECT_4_3_X,4,4
	.comm	WM_ASPECT_16_9_Y,4,4
	.comm	WM_ASPECT_16_9_X,4,4
	.comm	WIIUSE_ASPECT_16_9,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_ir.c_ir_correct_for_bounds.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fcmpge
	.global	__aeabi_fadd
	.global	__aeabi_fcmple
	.global	__aeabi_fsub
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ir_correct_for_bounds, %function
ir_correct_for_bounds:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r3
	ldr	ip, .L23
	mov	r4, r0
	ldr	r0, [ip]
	mov	r5, r1
	cmp	r0, r2
	ldreq	r2, .L23+4
	ldrne	r2, .L23+8
	ldreq	r3, .L23+12
	ldr	r10, [r2]
	ldrne	r3, .L23+16
	rsb	r2, r10, #1024
	add	r2, r2, r2, lsr #31
	add	r0, r6, r2, asr #1
	ldr	r7, [r3]
	bl	__aeabi_i2f
	ldr	r8, [r4]	@ float
	mov	r1, r0
	mov	r9, r0
	mov	r0, r8
	bl	__aeabi_fcmpge
	cmp	r0, #0
	beq	.L19
	mov	r0, r10
	bl	__aeabi_i2f
	mov	r1, r9
	bl	__aeabi_fadd
	mov	r1, r0
	mov	r0, r8
	bl	__aeabi_fcmple
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, [sp, #32]
	rsb	r0, r7, #768
	add	r0, r0, r0, lsr #31
	add	r0, r3, r0, asr #1
	bl	__aeabi_i2f
	ldr	r10, [r5]	@ float
	mov	r1, r0
	mov	r9, r0
	mov	r0, r10
	bl	__aeabi_fcmpge
	cmp	r0, #0
	beq	.L19
	mov	r0, r7
	bl	__aeabi_i2f
	mov	r1, r9
	bl	__aeabi_fadd
	mov	r1, r0
	mov	r0, r10
	bl	__aeabi_fcmple
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r6
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r8
	bl	__aeabi_fsub
	mov	r3, r0
	ldr	r0, [sp, #32]
	str	r3, [r4]	@ float
	bl	__aeabi_i2f
	mov	r1, r0
	ldr	r0, [r5]	@ float
	bl	__aeabi_fsub
	mov	r3, r0
	mov	r0, #1
	str	r3, [r5]	@ float
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	.align	2
.L23:
	.word	WIIUSE_ASPECT_16_9
	.word	WM_ASPECT_16_9_X
	.word	WM_ASPECT_4_3_X
	.word	WM_ASPECT_16_9_Y
	.word	WM_ASPECT_4_3_Y
	.size	ir_correct_for_bounds, .-ir_correct_for_bounds
	.comm	WM_ASPECT_4_3_Y,4,4
	.comm	WM_ASPECT_4_3_X,4,4
	.comm	WM_ASPECT_16_9_Y,4,4
	.comm	WM_ASPECT_16_9_X,4,4
	.comm	WIIUSE_ASPECT_16_9,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
