	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a10hdmi_ddc_read
_a10hdmi_ddc_read:                      ## @a10hdmi_ddc_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.1:
	movq	%rdx, %r13
	movq	%rdi, %r12
	movl	%esi, %r15d
	andl	$1, %r15d
	negl	%r15d
	andl	%ebx, %r15d
	sarl	%esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DDC_BLKLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_min
	movl	%eax, %r14d
	movq	_DDC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_a10hdmi_ddc_xfer
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	movq	_DDC_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	callq	_bus_read_multi_1
	movslq	%r14d, %rax
	leaq	(%r13,%rax,4), %r13
	addl	%r14d, %r15d
	subl	%r14d, %ebx
	jg	LBB0_2
## %bb.4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EDID_LENGTH,4,2                ## @EDID_LENGTH
	.comm	_DDC_BLKLEN,4,2                 ## @DDC_BLKLEN
	.comm	_DDC_ADDR,4,2                   ## @DDC_ADDR
	.comm	_DDC_FIFO,4,2                   ## @DDC_FIFO
	.no_dead_strip	_a10hdmi_ddc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a10hdmi_ddc_read
_a10hdmi_ddc_read:                      ; @a10hdmi_ddc_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _EDID_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EDID_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	sbfx	w8, w1, #0, #1
	and	w22, w8, w21
	asr	w23, w1, #1
Lloh3:
	adrp	x25, _DDC_BLKLEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DDC_BLKLEN@GOTPAGEOFF]
Lloh5:
	adrp	x26, _DDC_ADDR@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DDC_ADDR@GOTPAGEOFF]
Lloh7:
	adrp	x27, _DDC_FIFO@GOTPAGE
Lloh8:
	ldr	x27, [x27, _DDC_FIFO@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	bl	_min
	mov	x24, x0
	ldr	w1, [x26]
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	mov	x4, x24
	bl	_a10hdmi_ddc_xfer
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20]
	ldr	w1, [x27]
	mov	x2, x19
	mov	x3, x24
	bl	_bus_read_multi_1
	add	x19, x19, w24, sxtw #2
	add	w22, w24, w22
	sub	w21, w21, w24
	cmp	w21, #0
	b.gt	LBB0_2
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EDID_LENGTH,4,2                ; @EDID_LENGTH
	.comm	_DDC_BLKLEN,4,2                 ; @DDC_BLKLEN
	.comm	_DDC_ADDR,4,2                   ; @DDC_ADDR
	.comm	_DDC_FIFO,4,2                   ; @DDC_FIFO
	.no_dead_strip	_a10hdmi_ddc_read
.subsections_via_symbols
