	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7511_detect
_adv7511_detect:                        ## @adv7511_detect
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	movq	_ADV7511_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_ADV7511_STATUS_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_connector_status_connected@GOTPCREL(%rip), %r12
	movq	%r12, %rax
	andl	-36(%rbp), %ecx
	jne	LBB0_4
## %bb.3:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_adv7511_hpd
	cmpl	(%r12), %r14d
	jne	LBB0_9
## %bb.5:
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	cmpq	$0, 8(%rbx)
	je	LBB0_9
## %bb.7:
	movl	4(%rbx), %edi
	callq	_regcache_mark_dirty
	movq	%rbx, %rdi
	callq	_adv7511_power_on
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_adv7511_get_modes
	movl	(%rbx), %eax
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.8:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	movl	4(%rbx), %edi
	movq	_ADV7511_REG_POWER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADV7511_REG_POWER2_HPD_SRC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ADV7511_REG_POWER2_HPD_SRC_BOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
LBB0_10:
	movl	%r14d, (%rbx)
	jmp	LBB0_11
LBB0_1:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7511_REG_STATUS,4,2         ## @ADV7511_REG_STATUS
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.comm	_ADV7511_STATUS_HPD,4,2         ## @ADV7511_STATUS_HPD
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_ADV7511_REG_POWER2,4,2         ## @ADV7511_REG_POWER2
	.comm	_ADV7511_REG_POWER2_HPD_SRC_MASK,4,2 ## @ADV7511_REG_POWER2_HPD_SRC_MASK
	.comm	_ADV7511_REG_POWER2_HPD_SRC_BOTH,4,2 ## @ADV7511_REG_POWER2_HPD_SRC_BOTH
	.no_dead_strip	_adv7511_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7511_detect
_adv7511_detect:                        ; @adv7511_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _ADV7511_REG_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADV7511_REG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _ADV7511_STATUS_HPD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADV7511_STATUS_HPD@GOTPAGEOFF]
Lloh5:
	adrp	x22, _connector_status_disconnected@GOTPAGE
Lloh6:
	ldr	x22, [x22, _connector_status_disconnected@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x23, _connector_status_connected@GOTPAGE
Lloh9:
	ldr	x23, [x23, _connector_status_connected@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x22, x23, eq
	ldr	w20, [x8]
	mov	x0, x19
	bl	_adv7511_hpd
	ldr	w8, [x23]
	cmp	w20, w8
	ccmp	w0, #0, #4, eq
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_regcache_mark_dirty
	mov	x0, x19
	bl	_adv7511_power_on
	mov	x0, x19
	mov	x1, x21
	bl	_adv7511_get_modes
	ldr	w8, [x19]
	ldr	w9, [x23]
	ldr	w10, [x22]
	cmp	w8, w9
	csel	w20, w10, w20, eq
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x8, _ADV7511_REG_POWER2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ADV7511_REG_POWER2@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _ADV7511_REG_POWER2_HPD_SRC_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ADV7511_REG_POWER2_HPD_SRC_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _ADV7511_REG_POWER2_HPD_SRC_BOTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ADV7511_REG_POWER2_HPD_SRC_BOTH@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	bl	_regmap_update_bits
LBB0_5:
	str	w20, [x19]
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh20:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7511_REG_STATUS,4,2         ; @ADV7511_REG_STATUS
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.comm	_ADV7511_STATUS_HPD,4,2         ; @ADV7511_STATUS_HPD
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_ADV7511_REG_POWER2,4,2         ; @ADV7511_REG_POWER2
	.comm	_ADV7511_REG_POWER2_HPD_SRC_MASK,4,2 ; @ADV7511_REG_POWER2_HPD_SRC_MASK
	.comm	_ADV7511_REG_POWER2_HPD_SRC_BOTH,4,2 ; @ADV7511_REG_POWER2_HPD_SRC_BOTH
	.no_dead_strip	_adv7511_detect
.subsections_via_symbols
