	.file	"extr_win32_window.c_applyAspectRatio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	applyAspectRatio, @function
applyAspectRatio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	xmm1, xmm1
	pxor	xmm0, xmm0
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cvtsi2ss	xmm0, QWORD PTR [rdi]
	cvtsi2ss	xmm1, QWORD PTR 8[rdi]
	divss	xmm1, xmm0
	movss	DWORD PTR 12[rsp], xmm1
	call	getWindowExStyle@PLT
	mov	rdi, rbp
	mov	r13d, eax
	call	getWindowStyle@PLT
	xor	ecx, ecx
	xor	edx, edx
	lea	r9, 20[rsp]
	mov	edi, eax
	lea	r8, 16[rsp]
	mov	esi, r13d
	call	getFullWindowSize@PLT
	cmp	DWORD PTR WMSZ_LEFT[rip], r12d
	je	.L2
	cmp	DWORD PTR WMSZ_BOTTOMLEFT[rip], r12d
	je	.L2
	cmp	DWORD PTR WMSZ_RIGHT[rip], r12d
	je	.L2
	cmp	DWORD PTR WMSZ_BOTTOMRIGHT[rip], r12d
	je	.L2
	cmp	DWORD PTR WMSZ_TOPLEFT[rip], r12d
	je	.L5
	cmp	DWORD PTR WMSZ_TOPRIGHT[rip], r12d
	je	.L5
	cmp	DWORD PTR WMSZ_TOP[rip], r12d
	je	.L7
	cmp	DWORD PTR WMSZ_BOTTOM[rip], r12d
	jne	.L1
.L7:
	mov	eax, DWORD PTR [rbx]
	pxor	xmm0, xmm0
	sub	eax, DWORD PTR 4[rbx]
	sub	eax, DWORD PTR 20[rsp]
	mov	edx, DWORD PTR 16[rsp]
	cvtsi2ss	xmm0, eax
	mulss	xmm0, DWORD PTR 12[rsp]
	add	edx, DWORD PTR 12[rbx]
	cvttss2si	eax, xmm0
	add	eax, edx
	mov	DWORD PTR 8[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 8[rbx]
	pxor	xmm0, xmm0
	sub	eax, DWORD PTR 12[rbx]
	sub	eax, DWORD PTR 16[rsp]
	mov	edx, DWORD PTR 20[rsp]
	cvtsi2ss	xmm0, eax
	divss	xmm0, DWORD PTR 12[rsp]
	add	edx, DWORD PTR 4[rbx]
	cvttss2si	eax, xmm0
	add	eax, edx
	mov	DWORD PTR [rbx], eax
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 40
	.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
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR [rbx]
	sub	eax, DWORD PTR 20[rsp]
	pxor	xmm0, xmm0
	mov	edx, eax
	mov	eax, DWORD PTR 8[rbx]
	sub	eax, DWORD PTR 12[rbx]
	sub	eax, DWORD PTR 16[rsp]
	cvtsi2ss	xmm0, eax
	divss	xmm0, DWORD PTR 12[rsp]
	cvttss2si	eax, xmm0
	sub	edx, eax
	mov	DWORD PTR 4[rbx], edx
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	applyAspectRatio, .-applyAspectRatio
	.comm	WMSZ_TOPRIGHT,4,4
	.comm	WMSZ_TOPLEFT,4,4
	.comm	WMSZ_TOP,4,4
	.comm	WMSZ_RIGHT,4,4
	.comm	WMSZ_LEFT,4,4
	.comm	WMSZ_BOTTOMRIGHT,4,4
	.comm	WMSZ_BOTTOMLEFT,4,4
	.comm	WMSZ_BOTTOM,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_win32_window.c_applyAspectRatio.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_f2iz
	.global	__aeabi_fmul
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	applyAspectRatio, %function
applyAspectRatio:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L12
	sub	sp, sp, #28
	mov	r4, r0
	ldr	r0, [r0, #4]
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r6, r1
	bl	__aeabi_i2f
	mov	r7, r0
	ldr	r0, [r4]
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r7
	bl	__aeabi_fdiv
	mov	r7, r0
	mov	r0, r4
	bl	getWindowStyle
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	getWindowExStyle
	mov	r3, #0
	add	lr, sp, #16
	add	ip, sp, #12
	mov	r1, r0
	mov	r2, r3
	mov	r0, r4
	stm	sp, {ip, lr}
	bl	getFullWindowSize
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L12+16
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L12+20
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L5
	ldr	r3, .L12+24
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L5
	ldr	r3, .L12+28
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L7
	ldr	r3, .L12+32
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L1
.L7:
	ldr	r2, [r5, #4]
	ldr	r3, [r5]
	ldr	r0, [sp, #16]
	sub	r3, r3, r2
	sub	r0, r3, r0
	bl	__aeabi_i2f
	mov	r1, r7
	bl	__aeabi_fmul
	bl	__aeabi_f2iz
	ldr	r3, [r5, #12]
	ldr	r2, [sp, #12]
	add	r3, r3, r2
	add	r0, r0, r3
	str	r0, [r5, #8]
	b	.L1
.L2:
	ldr	r2, [r5, #12]
	ldr	r3, [r5, #8]
	ldr	r0, [sp, #12]
	sub	r3, r3, r2
	sub	r0, r3, r0
	bl	__aeabi_i2f
	mov	r1, r7
	bl	__aeabi_fdiv
	bl	__aeabi_f2iz
	ldr	r3, [r5, #4]
	ldr	r2, [sp, #16]
	add	r3, r3, r2
	add	r0, r0, r3
	str	r0, [r5]
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	ldr	r2, [r5, #12]
	ldr	r3, [r5, #8]
	ldr	r0, [sp, #12]
	sub	r3, r3, r2
	ldr	r4, [r5]
	ldr	r2, [sp, #16]
	sub	r0, r3, r0
	sub	r4, r4, r2
	bl	__aeabi_i2f
	mov	r1, r7
	bl	__aeabi_fdiv
	bl	__aeabi_f2iz
	sub	r4, r4, r0
	str	r4, [r5, #4]
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	WMSZ_LEFT
	.word	WMSZ_BOTTOMLEFT
	.word	WMSZ_RIGHT
	.word	WMSZ_BOTTOMRIGHT
	.word	WMSZ_TOPLEFT
	.word	WMSZ_TOPRIGHT
	.word	WMSZ_TOP
	.word	WMSZ_BOTTOM
	.size	applyAspectRatio, .-applyAspectRatio
	.comm	WMSZ_TOPRIGHT,4,4
	.comm	WMSZ_TOPLEFT,4,4
	.comm	WMSZ_TOP,4,4
	.comm	WMSZ_RIGHT,4,4
	.comm	WMSZ_LEFT,4,4
	.comm	WMSZ_BOTTOMRIGHT,4,4
	.comm	WMSZ_BOTTOMLEFT,4,4
	.comm	WMSZ_BOTTOM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
