	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a10hdmi_get_edid
_a10hdmi_get_edid:                      ## @a10hdmi_get_edid
	.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
	movq	%rsi, %r12
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %r13
	movq	_DDC_READ_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
                                        ## implicit-def: $eax
	cmpl	$2, %ebx
	jl	LBB0_7
## %bb.1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	incl	%ebx
	movq	_DDC_CTRL@GOTPCREL(%rip), %r12
	movq	_CTRL_DDC_SWRST@GOTPCREL(%rip), %r14
	movq	_DDC_LINE_SDA_ENABLE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DDC_FIFO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_HDMI_WRITE
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	_CTRL_DDC_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_HDMI_WRITE
	movq	_SWRST_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DELAY
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_HDMI_READ
	testl	%eax, (%r14)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DDC_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DDC_CLOCK_N@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DDC_CLOCK_M@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_HDMI_WRITE
	movq	_DDC_CTRL_LINE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	_DDC_LINE_SCL_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_HDMI_WRITE
	movq	16(%r13), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_a10hdmi_ddc_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	cmpl	$3, %ebx
	jge	LBB0_3
LBB0_7:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r13)
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_6:
	movq	16(%r13), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$8, (%rax)
	movq	%r13, %rsi
	addq	$8, %rsi
	movq	%r13, %rdi
	movq	%r13, %rdx
	callq	_a10hdmi_detect_hdmi
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDC_READ_RETRY,4,2             ## @DDC_READ_RETRY
	.comm	_DDC_FIFO_CTRL,4,2              ## @DDC_FIFO_CTRL
	.comm	_DDC_CTRL,4,2                   ## @DDC_CTRL
	.comm	_CTRL_DDC_EN,4,2                ## @CTRL_DDC_EN
	.comm	_CTRL_DDC_SWRST,4,2             ## @CTRL_DDC_SWRST
	.comm	_SWRST_DELAY,4,2                ## @SWRST_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DDC software reset failed\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_DDC_CLOCK,4,2                  ## @DDC_CLOCK
	.comm	_DDC_CLOCK_M,4,2                ## @DDC_CLOCK_M
	.comm	_DDC_CLOCK_N,4,2                ## @DDC_CLOCK_N
	.comm	_DDC_CTRL_LINE,4,2              ## @DDC_CTRL_LINE
	.comm	_DDC_LINE_SCL_ENABLE,4,2        ## @DDC_LINE_SCL_ENABLE
	.comm	_DDC_LINE_SDA_ENABLE,4,2        ## @DDC_LINE_SDA_ENABLE
	.no_dead_strip	_a10hdmi_get_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a10hdmi_get_edid
_a10hdmi_get_edid:                      ; @a10hdmi_get_edid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x8, _DDC_READ_RETRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DDC_READ_RETRY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
                                        ; implicit-def: $w0
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.1:
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	str	w21, [sp, #20]                  ; 4-byte Folded Spill
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	add	w24, w8, #1
Lloh3:
	adrp	x25, _DDC_CTRL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DDC_CTRL@GOTPAGEOFF]
Lloh5:
	adrp	x27, _CTRL_DDC_SWRST@GOTPAGE
Lloh6:
	ldr	x27, [x27, _CTRL_DDC_SWRST@GOTPAGEOFF]
Lloh7:
	adrp	x28, _SWRST_DELAY@GOTPAGE
Lloh8:
	ldr	x28, [x28, _SWRST_DELAY@GOTPAGEOFF]
Lloh9:
	adrp	x22, _DDC_CLOCK_M@GOTPAGE
Lloh10:
	ldr	x22, [x22, _DDC_CLOCK_M@GOTPAGEOFF]
Lloh11:
	adrp	x21, _DDC_CLOCK_N@GOTPAGE
Lloh12:
	ldr	x21, [x21, _DDC_CLOCK_N@GOTPAGEOFF]
Lloh13:
	adrp	x23, _DDC_CTRL_LINE@GOTPAGE
Lloh14:
	ldr	x23, [x23, _DDC_CTRL_LINE@GOTPAGEOFF]
Lloh15:
	adrp	x26, _DDC_LINE_SCL_ENABLE@GOTPAGE
Lloh16:
	ldr	x26, [x26, _DDC_LINE_SCL_ENABLE@GOTPAGEOFF]
Lloh17:
	adrp	x20, _DDC_LINE_SDA_ENABLE@GOTPAGE
Lloh18:
	ldr	x20, [x20, _DDC_LINE_SDA_ENABLE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
Lloh19:
	adrp	x8, _DDC_FIFO_CTRL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DDC_FIFO_CTRL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_HDMI_WRITE
	ldr	w1, [x25]
Lloh22:
	adrp	x8, _CTRL_DDC_EN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CTRL_DDC_EN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_HDMI_WRITE
	ldr	w0, [x28]
	bl	_DELAY
	ldr	w1, [x25]
	mov	x0, x19
	bl	_HDMI_READ
	ldr	w8, [x27]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh25:
	adrp	x8, _DDC_CLOCK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DDC_CLOCK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w8, [x22]
	ldr	w9, [x21]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_HDMI_WRITE
	ldr	w1, [x23]
	ldr	w8, [x26]
	ldr	w9, [x20]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_HDMI_WRITE
	ldr	x2, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_a10hdmi_ddc_read
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w24, w24, #1
	cmp	w24, #3
	b.ge	LBB0_2
LBB0_5:
	stp	xzr, xzr, [x19]
	b	LBB0_8
LBB0_6:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w0, [sp, #20]                   ; 4-byte Folded Reload
	bl	_device_printf
Lloh30:
	adrp	x8, _ENXIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x9]
	mov	w8, #8
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x9]
	add	x1, x19, #8
	mov	x0, x19
	mov	x2, x19
	bl	_a10hdmi_detect_hdmi
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DDC_READ_RETRY,4,2             ; @DDC_READ_RETRY
	.comm	_DDC_FIFO_CTRL,4,2              ; @DDC_FIFO_CTRL
	.comm	_DDC_CTRL,4,2                   ; @DDC_CTRL
	.comm	_CTRL_DDC_EN,4,2                ; @CTRL_DDC_EN
	.comm	_CTRL_DDC_SWRST,4,2             ; @CTRL_DDC_SWRST
	.comm	_SWRST_DELAY,4,2                ; @SWRST_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DDC software reset failed\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_DDC_CLOCK,4,2                  ; @DDC_CLOCK
	.comm	_DDC_CLOCK_M,4,2                ; @DDC_CLOCK_M
	.comm	_DDC_CLOCK_N,4,2                ; @DDC_CLOCK_N
	.comm	_DDC_CTRL_LINE,4,2              ; @DDC_CTRL_LINE
	.comm	_DDC_LINE_SCL_ENABLE,4,2        ; @DDC_LINE_SCL_ENABLE
	.comm	_DDC_LINE_SDA_ENABLE,4,2        ; @DDC_LINE_SDA_ENABLE
	.no_dead_strip	_a10hdmi_get_edid
.subsections_via_symbols
