	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_vga_connector_get_modes
_zx_vga_connector_get_modes:            ## @zx_vga_connector_get_modes
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_zx_vga
	movq	%rax, %rbx
	movq	_VGA_AUTO_DETECT_SEL@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rax), %rdi
	xorl	%esi, %esi
	callq	_zx_writel
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	callq	_drm_get_edid
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	_VGA_DETECT_SEL_HAS_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_zx_writel
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_connector_update_edid_property
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_add_edid_modes
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %eax
	jmp	LBB0_2
LBB0_1:
	movq	_VGA_DETECT_SEL_NO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_zx_writel
	movl	$0, (%rbx)
	xorl	%eax, %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VGA_AUTO_DETECT_SEL,8,3        ## @VGA_AUTO_DETECT_SEL
	.comm	_VGA_DETECT_SEL_NO_DEVICE,4,2   ## @VGA_DETECT_SEL_NO_DEVICE
	.comm	_VGA_DETECT_SEL_HAS_DEVICE,4,2  ## @VGA_DETECT_SEL_HAS_DEVICE
	.no_dead_strip	_zx_vga_connector_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_vga_connector_get_modes
_zx_vga_connector_get_modes:            ; @zx_vga_connector_get_modes
	.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, x0
	bl	_to_zx_vga
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x22, _VGA_AUTO_DETECT_SEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VGA_AUTO_DETECT_SEL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	mov	w1, #0
	bl	_zx_writel
	ldr	x1, [x20, #16]
	mov	x0, x19
	bl	_drm_get_edid
	mov	x21, x0
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	cbz	x21, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _VGA_DETECT_SEL_HAS_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VGA_DETECT_SEL_HAS_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_zx_writel
	mov	x0, x19
	mov	x1, x21
	bl	_drm_connector_update_edid_property
	mov	x0, x19
	mov	x1, x21
	bl	_drm_add_edid_modes
	mov	x19, x0
	mov	x0, x21
	bl	_kfree
	mov	x0, x19
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _VGA_DETECT_SEL_NO_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VGA_DETECT_SEL_NO_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_zx_writel
	str	wzr, [x20]
	mov	w0, #0
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VGA_AUTO_DETECT_SEL,8,3        ; @VGA_AUTO_DETECT_SEL
	.comm	_VGA_DETECT_SEL_NO_DEVICE,4,2   ; @VGA_DETECT_SEL_NO_DEVICE
	.comm	_VGA_DETECT_SEL_HAS_DEVICE,4,2  ; @VGA_DETECT_SEL_HAS_DEVICE
	.no_dead_strip	_zx_vga_connector_get_modes
.subsections_via_symbols
