	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad9389b_get_edid
_ad9389b_get_edid:                      ## @ad9389b_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
	movq	%rdi, %rbx
	callq	_get_ad9389b_state
	cmpq	$0, (%r14)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	8(%r14), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.4:
	cmpl	$257, %edx                      ## imm = 0x101
	jge	LBB0_1
## %bb.5:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.7:
	movslq	12(%r14), %rsi
	addl	%ecx, %ecx
	cmpl	%esi, %ecx
	jle	LBB0_8
## %bb.9:
	leal	(%rsi,%rdx), %edi
	cmpl	%ecx, %edi
	jl	LBB0_11
## %bb.10:
	subl	%esi, %ecx
	movl	%ecx, 8(%r14)
	movl	%ecx, %edx
LBB0_11:
	movl	16(%r14), %edi
	shlq	$9, %rsi
	addq	8(%rax), %rsi
	shll	$7, %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_6:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_v4l2_dbg
	movq	_ENODATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_8:
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EDID segment 0 not found\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_E2BIG,4,2                      ## @E2BIG
	.no_dead_strip	_ad9389b_get_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad9389b_get_edid
_ad9389b_get_edid:                      ; @ad9389b_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
	mov	x20, x0
	bl	_get_ad9389b_state
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w9, [x19, #8]
	cbz	w9, LBB0_1
; %bb.5:
	cmp	w9, #257
	b.ge	LBB0_1
; %bb.6:
	ldr	w8, [x0]
	cbz	w8, LBB0_11
; %bb.7:
	ldrsw	x10, [x19, #12]
	lsl	w8, w8, #1
	cmp	w8, w10
	b.le	LBB0_12
; %bb.8:
	add	w11, w10, w9
	cmp	w11, w8
	b.lt	LBB0_10
; %bb.9:
	sub	w9, w8, w10
	str	w9, [x19, #8]
LBB0_10:
	ldr	w8, [x19, #16]
	ldr	x11, [x0, #8]
	add	x1, x11, x10, lsl #9
	lsl	w2, w9, #7
	mov	x0, x8
	bl	_memcpy
	mov	w0, #0
	b	LBB0_3
LBB0_11:
Lloh2:
	adrp	x8, _debug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_v4l2_dbg
Lloh7:
	adrp	x8, _ENODATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
Lloh9:
	adrp	x8, _E2BIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EDID segment 0 not found\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_E2BIG,4,2                      ; @E2BIG
	.no_dead_strip	_ad9389b_get_edid
.subsections_via_symbols
