	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformGetVideoModes     ## -- Begin function _glfwPlatformGetVideoModes
	.p2align	4, 0x90
__glfwPlatformGetVideoModes:            ## @_glfwPlatformGetVideoModes
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	$0, (%rsi)
	leaq	-72(%rbp), %r15
	movq	%r15, %rdi
	movl	$20, %esi
	callq	_ZeroMemory
	movl	$20, -72(%rbp)
	movl	(%r13), %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_EnumDisplaySettingsW
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %r14
	leaq	-112(%rbp), %r15
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	-72(%rbp), %r14
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	$20, %esi
	callq	_ZeroMemory
	movl	$20, -72(%rbp)
	movl	(%r13), %edi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_EnumDisplaySettingsW
	testl	%eax, %eax
	je	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	incl	%r12d
	movl	-68(%rbp), %edi
	cmpl	$15, %edi
	jl	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-56(%rbp), %eax
	movl	%eax, -92(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -100(%rbp)
	leaq	-104(%rbp), %rsi
	leaq	-108(%rbp), %rdx
	movq	%r15, %rcx
	callq	__glfwSplitBPP
	movl	(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	__glfwCompareVideoModes
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	incq	%r14
	movslq	(%rbx), %rdx
	addq	$24, %r13
	cmpq	%rdx, %r14
	jl	LBB0_7
	jmp	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	cmpl	%edx, %r14d
	jl	LBB0_12
	jmp	LBB0_13
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	cmpl	%edx, %r14d
	jl	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 8(%r13)
	leaq	-72(%rbp), %r14
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	movq	_CDS_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_ChangeDisplaySettingsExW
	movq	_DISP_CHANGE_SUCCESSFUL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edx
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ecx, %edx
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	leal	(%rcx,%rcx), %r14d
	testl	%ecx, %ecx
	movl	$128, %eax
	cmovel	%eax, %r14d
	leal	(,%r14,8), %eax
	leal	(%rax,%rax,2), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_realloc
	movl	(%rbx), %edx
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %r14
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rdx), %ecx
	movl	%ecx, (%rbx)
	movslq	%edx, %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movq	-96(%rbp), %rcx
	movq	%rcx, 16(%rax,%rdx,8)
	movups	-112(%rbp), %xmm0
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movups	%xmm0, (%rax,%rdx,8)
	jmp	LBB0_20
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDS_TEST,4,2                   ## @CDS_TEST
	.comm	_DISP_CHANGE_SUCCESSFUL,8,3     ## @DISP_CHANGE_SUCCESSFUL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformGetVideoModes     ; -- Begin function _glfwPlatformGetVideoModes
	.p2align	2
__glfwPlatformGetVideoModes:            ; @_glfwPlatformGetVideoModes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	str	wzr, [x1]
	mov	w26, #20
	mov	x0, sp
	mov	w1, #20
	bl	_ZeroMemory
	str	w26, [sp]
	ldr	w0, [x20]
	mov	x2, sp
	mov	w1, #0
	bl	_EnumDisplaySettingsW
	mov	x21, #0
	cbz	w0, LBB0_17
; %bb.1:
	mov	w27, #0
	mov	w22, #0
	add	x8, sp, #24
	add	x23, x8, #8
	orr	x24, x8, #0x4
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w8, #1
	str	w9, [x19]
	mov	w9, #24
	smaddl	x8, w8, w9, x21
	ldur	q0, [sp, #24]
	ldr	x9, [sp, #40]
	str	x9, [x8, #16]
	str	q0, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	mov	x0, sp
	mov	w1, #20
	bl	_ZeroMemory
	str	w26, [sp]
	ldr	w0, [x20]
	mov	x2, sp
	mov	x1, x22
	bl	_EnumDisplaySettingsW
	cbz	w0, LBB0_17
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w0, [sp, #4]
	cmp	w0, #15
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #16]
	str	w8, [sp, #44]
	ldr	d0, [sp, #8]
	stur	d0, [sp, #36]
	add	x3, sp, #24
	mov	x1, x23
	mov	x2, x24
	bl	__glfwSplitBPP
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
	mov	x25, x21
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x1, sp, #24
	mov	x0, x25
	bl	__glfwCompareVideoModes
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x28, x28, #1
	ldrsw	x8, [x19]
	add	x25, x25, #24
	cmp	x28, x8
	b.lt	LBB0_7
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w28, w8
	b.lt	LBB0_3
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	cmp	w28, w8
	b.lt	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _CDS_TEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDS_TEST@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, sp
	mov	x2, #0
	mov	x4, #0
	bl	_ChangeDisplaySettingsExW
Lloh3:
	adrp	x8, _DISP_CHANGE_SUCCESSFUL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISP_CHANGE_SUCCESSFUL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, w27
	b.ne	LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	lsl	w8, w27, #1
	cmp	w27, #0
	mov	w9, #128
	csel	w27, w9, w8, eq
	add	w8, w27, w27, lsl #1
	lsl	w1, w8, #3
	mov	x0, x21
	bl	_realloc
	mov	x21, x0
	ldr	w8, [x19]
	b	LBB0_2
LBB0_17:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CDS_TEST,4,2                   ; @CDS_TEST
	.comm	_DISP_CHANGE_SUCCESSFUL,8,3     ; @DISP_CHANGE_SUCCESSFUL
.subsections_via_symbols
