	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7511_get_edid_block
_adv7511_get_edid_block:                ## @adv7511_get_edid_block
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$129, %rcx
	jb	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_3:
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	%edx, %r15d
	shrl	%r15d
	cmpl	%r15d, (%rdi)
	jne	LBB0_4
LBB0_17:
	movq	8(%r13), %rsi
	testb	$1, %r14b
	je	LBB0_19
## %bb.18:
	addq	$1024, %rsi                     ## imm = 0x400
LBB0_19:
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_4:
	movl	24(%r13), %edi
	movq	_ADV7511_REG_DDC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-124(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_20
## %bb.5:
	cmpl	$2, -124(%rbp)
	je	LBB0_7
## %bb.6:
	movl	$0, 4(%r13)
	movl	24(%r13), %edi
	movq	_ADV7511_REG_EDID_SEGMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_regmap_write
	movq	%r13, %rdi
	movl	$200, %esi
	callq	_adv7511_wait_for_edid
	testl	%eax, %eax
	js	LBB0_20
LBB0_7:
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	movq	16(%r13), %rax
	movl	4(%rax), %ecx
	movl	%ecx, -88(%rbp)
	movq	$0, -96(%rbp)
	movl	$1, -112(%rbp)
	leaq	-120(%rbp), %rdx
	movq	%rdx, -104(%rbp)
	movl	%ecx, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -64(%rbp)
	movl	$64, -80(%rbp)
	movq	8(%r13), %rcx
	movq	%rcx, -72(%rbp)
	movq	$0, -120(%rbp)
	movl	(%rax), %ebx
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	leaq	-112(%rbp), %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_20
## %bb.8:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.10:
	addq	$512, -72(%rbp)                 ## imm = 0x200
	addq	$64, -120(%rbp)
	movq	16(%r13), %rax
	movl	(%rax), %ebx
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	leaq	-112(%rbp), %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_20
## %bb.11:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.12:
	addq	$512, -72(%rbp)                 ## imm = 0x200
	addq	$64, -120(%rbp)
	movq	16(%r13), %rax
	movl	(%rax), %ebx
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	leaq	-112(%rbp), %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_20
## %bb.13:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.14:
	addq	$512, -72(%rbp)                 ## imm = 0x200
	addq	$64, -120(%rbp)
	movq	16(%r13), %rax
	movl	(%rax), %ebx
	leaq	-112(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	leaq	-112(%rbp), %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_20
## %bb.15:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.16:
	addq	$512, -72(%rbp)                 ## imm = 0x200
	addq	$64, -120(%rbp)
	movl	%r15d, (%r13)
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_17
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_22
## %bb.21:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADV7511_REG_DDC_STATUS,4,2     ## @ADV7511_REG_DDC_STATUS
	.comm	_ADV7511_REG_EDID_SEGMENT,4,2   ## @ADV7511_REG_EDID_SEGMENT
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_adv7511_get_edid_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7511_get_edid_block
_adv7511_get_edid_block:                ; @adv7511_get_edid_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cmp	x3, #129
	b.lo	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_3:
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w8, [x0]
	lsr	w24, w2, #1
	cmp	w8, w24
	b.ne	LBB0_7
; %bb.4:
	ldr	x1, [x22, #8]
	tbz	w21, #0, LBB0_6
LBB0_5:
	add	x1, x1, #1024
LBB0_6:
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
	mov	w0, #0
	b	LBB0_19
LBB0_7:
	ldr	w0, [x22, #24]
Lloh5:
	adrp	x8, _ADV7511_REG_DDC_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADV7511_REG_DDC_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_19
; %bb.8:
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.eq	LBB0_10
; %bb.9:
	str	wzr, [x22, #4]
	ldr	w0, [x22, #24]
Lloh8:
	adrp	x8, _ADV7511_REG_EDID_SEGMENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ADV7511_REG_EDID_SEGMENT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_regmap_write
	mov	x0, x22
	mov	w1, #200
	bl	_adv7511_wait_for_edid
	tbnz	w0, #31, LBB0_19
LBB0_10:
	ldp	x9, x8, [x22, #8]
	ldr	w10, [x8, #4]
	mov	w11, #1
	str	w11, [sp, #24]
	add	x11, sp, #16
	stp	x11, xzr, [sp, #32]
	str	w10, [sp, #80]
Lloh11:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh12:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
	mov	w12, #64
	str	w10, [sp, #48]
	str	w12, [sp, #56]
Lloh13:
	ldr	x10, [x11]
	stp	x9, x10, [sp, #64]
	str	xzr, [sp, #16]
	ldr	w23, [x8]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x23
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_19
; %bb.11:
	cmp	w0, #2
	b.ne	LBB0_21
; %bb.12:
	ldr	x8, [sp, #64]
	add	x8, x8, #512
	str	x8, [sp, #64]
	ldr	x8, [sp, #16]
	add	x8, x8, #64
	str	x8, [sp, #16]
	ldr	x8, [x22, #16]
	ldr	w23, [x8]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x23
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_19
; %bb.13:
	cmp	w0, #2
	b.ne	LBB0_21
; %bb.14:
	ldr	x8, [sp, #64]
	add	x8, x8, #512
	str	x8, [sp, #64]
	ldr	x8, [sp, #16]
	add	x8, x8, #64
	str	x8, [sp, #16]
	ldr	x8, [x22, #16]
	ldr	w23, [x8]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x23
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_19
; %bb.15:
	cmp	w0, #2
	b.ne	LBB0_21
; %bb.16:
	ldr	x8, [sp, #64]
	add	x8, x8, #512
	str	x8, [sp, #64]
	ldr	x8, [sp, #16]
	add	x8, x8, #64
	str	x8, [sp, #16]
	ldr	x8, [x22, #16]
	ldr	w23, [x8]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x23
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_19
; %bb.17:
	cmp	w0, #2
	b.ne	LBB0_21
; %bb.18:
	ldr	x8, [sp, #64]
	add	x8, x8, #512
	str	x8, [sp, #64]
	ldr	x8, [sp, #16]
	add	x8, x8, #64
	str	x8, [sp, #16]
	str	w24, [x22]
	ldr	x1, [x22, #8]
	tbnz	w21, #0, LBB0_5
	b	LBB0_6
LBB0_19:
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.20:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_21:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADV7511_REG_DDC_STATUS,4,2     ; @ADV7511_REG_DDC_STATUS
	.comm	_ADV7511_REG_EDID_SEGMENT,4,2   ; @ADV7511_REG_EDID_SEGMENT
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_adv7511_get_edid_block
.subsections_via_symbols
