	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwChooseVideoMode           ## -- Begin function _glfwChooseVideoMode
	.p2align	4, 0x90
__glfwChooseVideoMode:                  ## @_glfwChooseVideoMode
	.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	$40, %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, %r15
	movq	_UINT_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	callq	_refreshVideoModes
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.3:
	movq	8(%r15), %rdx
	movq	(%rbx), %r8
	movq	8(%rbx), %r9
	movq	_GLFW_DONT_CARE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	16(%rbx), %r15
	movl	24(%rbx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	28(%rbx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	32(%rbx), %rdi
	movl	(%r12), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r11d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r10d, %r11d
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %r14d
	movq	%rdx, %rax
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$40, %rdx
	decq	%rcx
	je	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, %r12d
	cmpq	%rsi, %r8
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rsi, %r9
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rsi, %r15
	je	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rdx), %ebx
	subl	%r15d, %ebx
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	addl	%eax, %r12d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	24(%rdx), %eax
	subl	-68(%rbp), %eax                 ## 4-byte Folded Reload
	movl	28(%rdx), %r10d
	subl	-64(%rbp), %r10d                ## 4-byte Folded Reload
	imull	%eax, %eax
	imull	%r10d, %r10d
	addl	%eax, %r10d
	movl	32(%rdx), %eax
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	subl	%eax, %ebx
	subl	%edi, %eax
	movl	%eax, %r13d
	negl	%r13d
	cmovsl	%eax, %r13d
	cmpq	%rsi, %rdi
	cmovel	%ebx, %r13d
	cmpl	%r14d, %r12d
	jb	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r11d, %r10d
	jb	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r14d, %r12d
	jne	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r11d, %r10d
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	jb	LBB0_16
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rdx), %ebx
	subl	%r8d, %ebx
	movl	%ebx, %r12d
	negl	%r12d
	cmovsl	%ebx, %r12d
	cmpq	%rsi, %r9
	je	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rdx), %eax
	subl	%r9d, %eax
	movl	%eax, %ebx
	negl	%ebx
	cmovsl	%eax, %ebx
	addl	%ebx, %r12d
	cmpq	%rsi, %r15
	jne	LBB0_9
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.comm	_GLFW_DONT_CARE,8,3             ## @GLFW_DONT_CARE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwChooseVideoMode           ; -- Begin function _glfwChooseVideoMode
	.p2align	2
__glfwChooseVideoMode:                  ; @_glfwChooseVideoMode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _UINT_MAX@GOTPAGEOFF]
	ldr	w21, [x22]
	bl	_refreshVideoModes
	cbz	w0, LBB0_16
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.2:
	mov	x0, #0
	ldr	x9, [x20, #8]
Lloh2:
	adrp	x10, _GLFW_DONT_CARE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GLFW_DONT_CARE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	ldp	x11, x12, [x19]
	ldr	x13, [x19, #16]
	ldp	w14, w15, [x19, #24]
	ldr	x16, [x19, #32]
	ldr	w17, [x22]
	mov	x2, x21
	mov	x1, x21
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x4
	mov	x2, x5
	mov	x21, x3
	mov	x0, x9
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #40
	subs	x8, x8, #1
	b.eq	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x10
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w3, #0
	cmp	x12, x10
	b.ne	LBB0_8
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w3, [x9]
	subs	w3, w3, w11
	cneg	w3, w3, mi
	cmp	x12, x10
	b.eq	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w4, [x9, #8]
	subs	w4, w4, w12
	cneg	w4, w4, mi
	add	w3, w4, w3
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	x13, x10
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w4, [x9, #16]
	subs	w4, w4, w13
	cneg	w4, w4, mi
	add	w3, w4, w3
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w4, w5, [x9, #24]
	sub	w4, w4, w14
	mul	w4, w4, w4
	sub	w5, w5, w15
	madd	w4, w5, w5, w4
	ldr	x5, [x9, #32]
	sub	w6, w17, w5
	sub	w5, w5, w16
	cmp	w5, #0
	cneg	w5, w5, mi
	cmp	x16, x10
	csel	w5, w6, w5, eq
	cmp	w3, w21
	b.lo	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w4, w1
	b.lo	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w3, w21
	b.ne	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w4, w1
	ccmp	w5, w2, #2, eq
	b.lo	LBB0_3
	b	LBB0_4
LBB0_16:
	mov	x0, #0
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.comm	_GLFW_DONT_CARE,8,3             ; @GLFW_DONT_CARE
.subsections_via_symbols
