	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UpdateVideoWindowed
_UpdateVideoWindowed:                   ## @UpdateVideoWindowed
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_CurrentDisplayMode
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_PLATFORM_DesktopResolution
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	_window_resolution@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	callq	_PLATFORM_WindowMaximised
	movl	%eax, %r12d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	leaq	-56(%rbp), %rdi
	callq	_RotateResolution
LBB0_2:
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_GetOutArea
	xorl	%eax, %eax
	callq	_UpdateCustomStretch
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	leaq	-88(%rbp), %rax
	leaq	-56(%rbp), %r13
	leaq	-80(%rbp), %r14
	leaq	-96(%rbp), %r9
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	callq	_ComputeVideoArea
	addq	$16, %rsp
	movl	%r15d, %eax
	orl	%r12d, %eax
	cmovneq	%r13, %r14
	movsd	-96(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	-88(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_CropVideoArea
	orl	%r12d, %r15d
	jne	LBB0_4
## %bb.3:
	movq	_VIDEOMODE_dest_width@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_VIDEOMODE_dest_height@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
LBB0_4:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	_TRUE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	leaq	-56(%rbp), %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	-72(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_SetVideoMode
	movl	(%rbx), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_window_resolution,8,2          ## @window_resolution
	.comm	_VIDEOMODE_dest_width,4,2       ## @VIDEOMODE_dest_width
	.comm	_VIDEOMODE_dest_height,4,2      ## @VIDEOMODE_dest_height
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_VIDEOMODE_rotate90,8,3         ## @VIDEOMODE_rotate90
	.no_dead_strip	_UpdateVideoWindowed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UpdateVideoWindowed
_UpdateVideoWindowed:                   ; @UpdateVideoWindowed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x0
	bl	_CurrentDisplayMode
	mov	x20, x0
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_PLATFORM_DesktopResolution
	ldr	x8, [x0]
	str	x8, [sp, #16]
Lloh3:
	adrp	x8, _window_resolution@GOTPAGE
Lloh4:
	ldr	x8, [x8, _window_resolution@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_PLATFORM_WindowMaximised
	mov	x22, x0
	cbz	w19, LBB0_2
; %bb.1:
	add	x0, sp, #8
	bl	_RotateResolution
LBB0_2:
	add	x0, sp, #44
	add	x1, sp, #40
	mov	x2, x20
	bl	_GetOutArea
	bl	_UpdateCustomStretch
	ldp	w4, w3, [sp, #40]
	add	x23, sp, #8
	add	x24, sp, #16
	add	x0, sp, #8
	add	x1, sp, #16
	add	x5, sp, #32
	add	x6, sp, #24
	mov	x2, x20
	mov	x7, x19
	bl	_ComputeVideoArea
	orr	w21, w21, w22
	cmp	w21, #0
	csel	x0, x23, x24, ne
	ldp	d1, d0, [sp, #24]
	add	x1, sp, #44
	add	x2, sp, #40
	bl	_CropVideoArea
	cbnz	w21, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _VIDEOMODE_dest_width@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDEOMODE_dest_width@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _VIDEOMODE_dest_height@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VIDEOMODE_dest_height@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
LBB0_4:
	ldp	w3, w2, [sp, #40]
Lloh12:
	adrp	x21, _TRUE@GOTPAGE
Lloh13:
	ldr	x21, [x21, _TRUE@GOTPAGEOFF]
	ldr	w4, [x21]
	add	x0, sp, #8
	mov	x1, x20
	mov	x5, x19
	bl	_SetVideoMode
	ldr	w0, [x21]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_window_resolution,8,2          ; @window_resolution
	.comm	_VIDEOMODE_dest_width,4,2       ; @VIDEOMODE_dest_width
	.comm	_VIDEOMODE_dest_height,4,2      ; @VIDEOMODE_dest_height
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_VIDEOMODE_rotate90,8,3         ; @VIDEOMODE_rotate90
	.no_dead_strip	_UpdateVideoWindowed
.subsections_via_symbols
