	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7842_get_edid
_adv7842_get_edid:                      ## @adv7842_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_to_state
	movq	%rax, %rbx
	movl	16(%r14), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%r14), %ecx
	leal	-129(%rcx), %eax
	cmpl	$2, %eax
	jae	LBB0_3
## %bb.1:
	movl	16(%rbx), %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shrl	%cl, %eax
	testb	$4, %al
	je	LBB0_7
## %bb.2:
	addq	$24, %rbx
	jmp	LBB0_5
LBB0_3:
	cmpl	$128, %ecx
	jne	LBB0_11
## %bb.4:
	cmpl	$0, 8(%rbx)
	je	LBB0_7
LBB0_5:
	movq	(%rbx), %rsi
	jmp	LBB0_8
LBB0_7:
	xorl	%esi, %esi
LBB0_8:
	movslq	4(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.10:
	cmpl	$1, %eax
	jle	LBB0_16
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_12:
	movl	8(%r14), %edx
	testl	%edx, %edx
	je	LBB0_20
## %bb.13:
	testq	%rsi, %rsi
	jne	LBB0_17
LBB0_14:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_16:
	movl	8(%r14), %edx
LBB0_17:
	leal	(%rax,%rdx), %ecx
	cmpl	$3, %ecx
	jl	LBB0_19
## %bb.18:
	movl	$2, %edx
	subl	%eax, %edx
	movl	%edx, 8(%r14)
LBB0_19:
	movl	12(%r14), %edi
	shlq	$9, %rax
	addq	%rax, %rsi
	shll	$7, %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
	testq	%rsi, %rsi
	setne	%al
	addl	%eax, %eax
	movl	%eax, 8(%r14)
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODATA,4,2                    ## @ENODATA
	.no_dead_strip	_adv7842_get_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7842_get_edid
_adv7842_get_edid:                      ; @adv7842_get_edid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_to_state
	mov	x20, x0
	ldr	w0, [x19, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x19]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_3
; %bb.1:
	ldr	w9, [x20, #16]
	lsr	w8, w9, w8
	tbz	w8, #2, LBB0_9
; %bb.2:
	add	x20, x20, #24
	b	LBB0_5
LBB0_3:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.4:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_9
LBB0_5:
	ldr	x8, [x20]
	ldrsw	x9, [x19, #4]
	cbz	w9, LBB0_10
LBB0_6:
	cbz	x8, LBB0_12
; %bb.7:
	cmp	w9, #1
	b.le	LBB0_14
LBB0_8:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	mov	x8, #0
	ldrsw	x9, [x19, #4]
	cbnz	w9, LBB0_6
LBB0_10:
	ldr	w10, [x19, #8]
	cbz	w10, LBB0_18
; %bb.11:
	cbnz	x8, LBB0_15
LBB0_12:
Lloh2:
	adrp	x8, _ENODATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_14:
	ldr	w10, [x19, #8]
LBB0_15:
	add	w11, w10, w9
	cmp	w11, #3
	b.lt	LBB0_17
; %bb.16:
	mov	w10, #2
	sub	w10, w10, w9
	str	w10, [x19, #8]
LBB0_17:
	ldr	w0, [x19, #12]
	lsl	w2, w10, #7
	add	x1, x8, x9, lsl #9
	bl	_memcpy
	mov	w0, #0
	b	LBB0_19
LBB0_18:
	mov	w0, #0
	cmp	x8, #0
	cset	w8, ne
	lsl	w8, w8, #1
	str	w8, [x19, #8]
LBB0_19:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODATA,4,2                    ; @ENODATA
	.no_dead_strip	_adv7842_get_edid
.subsections_via_symbols
