	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applyAspectRatio
_applyAspectRatio:                      ## @applyAspectRatio
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_USER_DEFAULT_SCREEN_DPI@GOTPCREL(%rip), %rax
	cvtsi2ssq	16(%rdi), %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movl	(%rax), %r12d
	xorps	%xmm0, %xmm0
	cvtsi2ssq	8(%rdi), %xmm0
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	xorl	%eax, %eax
	callq	__glfwIsWindows10AnniversaryUpdateOrGreaterWin32
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_GetDpiForWindow
	movl	%eax, %r12d
LBB0_2:
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	divss	-56(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_getWindowStyle
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_getWindowExStyle
	movl	%r12d, (%rsp)
	leaq	-52(%rbp), %r8
	leaq	-48(%rbp), %r9
	movl	%r13d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_getFullWindowSize
	movq	_WMSZ_LEFT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_WMSZ_BOTTOMLEFT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_6
## %bb.4:
	movq	_WMSZ_RIGHT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_WMSZ_BOTTOMRIGHT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_6
## %bb.7:
	movq	_WMSZ_TOPLEFT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_WMSZ_TOPRIGHT@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_9
## %bb.10:
	movq	_WMSZ_TOP@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_WMSZ_BOTTOM@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_13
LBB0_12:
	movl	-52(%rbp), %eax
	addl	12(%r14), %eax
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	addl	-48(%rbp), %edx
	subl	%edx, %ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %ecx
	addl	%eax, %ecx
	movl	%ecx, 8(%r14)
	jmp	LBB0_13
LBB0_6:
	movl	-48(%rbp), %eax
	addl	4(%r14), %eax
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
	addl	-52(%rbp), %edx
	subl	%edx, %ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	divss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cvttss2si	%xmm0, %ecx
	addl	%eax, %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_13
LBB0_9:
	movl	8(%r14), %eax
	movl	12(%r14), %ecx
	addl	-52(%rbp), %ecx
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movl	(%r14), %eax
	divss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cvttss2si	%xmm0, %ecx
	addl	-48(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, 4(%r14)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USER_DEFAULT_SCREEN_DPI,4,2    ## @USER_DEFAULT_SCREEN_DPI
	.comm	_WMSZ_LEFT,4,2                  ## @WMSZ_LEFT
	.comm	_WMSZ_BOTTOMLEFT,4,2            ## @WMSZ_BOTTOMLEFT
	.comm	_WMSZ_RIGHT,4,2                 ## @WMSZ_RIGHT
	.comm	_WMSZ_BOTTOMRIGHT,4,2           ## @WMSZ_BOTTOMRIGHT
	.comm	_WMSZ_TOPLEFT,4,2               ## @WMSZ_TOPLEFT
	.comm	_WMSZ_TOPRIGHT,4,2              ## @WMSZ_TOPRIGHT
	.comm	_WMSZ_TOP,4,2                   ## @WMSZ_TOP
	.comm	_WMSZ_BOTTOM,4,2                ## @WMSZ_BOTTOM
	.no_dead_strip	_applyAspectRatio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applyAspectRatio
_applyAspectRatio:                      ; @applyAspectRatio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _USER_DEFAULT_SCREEN_DPI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USER_DEFAULT_SCREEN_DPI@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldp	x9, x8, [x0, #8]
	scvtf	s8, x8
	scvtf	s9, x9
	bl	__glfwIsWindows10AnniversaryUpdateOrGreaterWin32
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	bl	_GetDpiForWindow
	mov	x21, x0
LBB0_2:
	fdiv	s8, s8, s9
	mov	x0, x22
	bl	_getWindowStyle
	mov	x23, x0
	mov	x0, x22
	bl	_getWindowExStyle
	mov	x1, x0
	add	x4, sp, #12
	add	x5, sp, #8
	mov	x0, x23
	mov	w2, #0
	mov	w3, #0
	mov	x6, x21
	bl	_getFullWindowSize
Lloh3:
	adrp	x8, _WMSZ_LEFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WMSZ_LEFT@GOTPAGEOFF]
Lloh5:
	adrp	x9, _WMSZ_BOTTOMLEFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WMSZ_BOTTOMLEFT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _WMSZ_RIGHT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WMSZ_RIGHT@GOTPAGEOFF]
Lloh11:
	adrp	x11, _WMSZ_BOTTOMRIGHT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _WMSZ_BOTTOMRIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	ldr	w11, [x11]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	ccmp	w10, w20, #4, ne
	ccmp	w11, w20, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldp	w8, w12, [sp, #8]
	ldp	w9, w10, [x19, #4]
	ldr	w11, [x19, #12]
	add	w11, w11, w12
	sub	w10, w10, w11
	scvtf	s0, w10
	fdiv	s0, s0, s8
	fcvtzs	w10, s0
	add	w8, w8, w9
	add	w8, w8, w10
	str	w8, [x19]
	b	LBB0_9
LBB0_4:
Lloh15:
	adrp	x8, _WMSZ_TOPLEFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WMSZ_TOPLEFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _WMSZ_TOPRIGHT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WMSZ_TOPRIGHT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x19]
	ldp	w9, w12, [sp, #8]
	ldp	w10, w11, [x19, #8]
	add	w11, w11, w12
	sub	w10, w10, w11
	scvtf	s0, w10
	fdiv	s0, s0, s8
	fcvtzs	w10, s0
	add	w9, w9, w10
	sub	w8, w8, w9
	str	w8, [x19, #4]
	b	LBB0_9
LBB0_6:
Lloh21:
	adrp	x8, _WMSZ_TOP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WMSZ_TOP@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_8
; %bb.7:
Lloh24:
	adrp	x8, _WMSZ_BOTTOM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WMSZ_BOTTOM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_9
LBB0_8:
	ldr	w8, [x19, #12]
	ldp	w12, w9, [sp, #8]
	ldp	w10, w11, [x19]
	add	w11, w11, w12
	sub	w10, w10, w11
	scvtf	s0, w10
	fmul	s0, s8, s0
	fcvtzs	w10, s0
	add	w8, w9, w8
	add	w8, w8, w10
	str	w8, [x19, #8]
LBB0_9:
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_USER_DEFAULT_SCREEN_DPI,4,2    ; @USER_DEFAULT_SCREEN_DPI
	.comm	_WMSZ_LEFT,4,2                  ; @WMSZ_LEFT
	.comm	_WMSZ_BOTTOMLEFT,4,2            ; @WMSZ_BOTTOMLEFT
	.comm	_WMSZ_RIGHT,4,2                 ; @WMSZ_RIGHT
	.comm	_WMSZ_BOTTOMRIGHT,4,2           ; @WMSZ_BOTTOMRIGHT
	.comm	_WMSZ_TOPLEFT,4,2               ; @WMSZ_TOPLEFT
	.comm	_WMSZ_TOPRIGHT,4,2              ; @WMSZ_TOPRIGHT
	.comm	_WMSZ_TOP,4,2                   ; @WMSZ_TOP
	.comm	_WMSZ_BOTTOM,4,2                ; @WMSZ_BOTTOM
	.no_dead_strip	_applyAspectRatio
.subsections_via_symbols
