	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ch7xxx_detect
_ch7xxx_detect:                         ## @ch7xxx_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_CH7xxx_PM@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	callq	_ch7xxx_readb
	movq	_CH7xxx_PM_FPD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-20(%rbp), %edx
	movq	_CH7xxx_PM_DVIL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_CH7xxx_PM_DVIP@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ch7xxx_writeb
	movq	_CH7xxx_CONNECTION_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ch7xxx_readb
	movl	(%r14), %esi
	movl	-20(%rbp), %edx
	movq	%rbx, %rdi
	callq	_ch7xxx_writeb
	movq	_CH7xxx_CDET_DVI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-24(%rbp), %eax
	jne	LBB0_1
## %bb.2:
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CH7xxx_PM,4,2                  ## @CH7xxx_PM
	.comm	_CH7xxx_PM_FPD,4,2              ## @CH7xxx_PM_FPD
	.comm	_CH7xxx_PM_DVIL,4,2             ## @CH7xxx_PM_DVIL
	.comm	_CH7xxx_PM_DVIP,4,2             ## @CH7xxx_PM_DVIP
	.comm	_CH7xxx_CONNECTION_DETECT,4,2   ## @CH7xxx_CONNECTION_DETECT
	.comm	_CH7xxx_CDET_DVI,4,2            ## @CH7xxx_CDET_DVI
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.no_dead_strip	_ch7xxx_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ch7xxx_detect
_ch7xxx_detect:                         ; @ch7xxx_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _CH7xxx_PM@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CH7xxx_PM@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #8
	bl	_ch7xxx_readb
Lloh2:
	adrp	x8, _CH7xxx_PM_FPD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CH7xxx_PM_FPD@GOTPAGEOFF]
	ldr	w9, [sp, #8]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w9, w8
Lloh5:
	adrp	x9, _CH7xxx_PM_DVIL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CH7xxx_PM_DVIL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _CH7xxx_PM_DVIP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CH7xxx_PM_DVIP@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ch7xxx_writeb
Lloh11:
	adrp	x8, _CH7xxx_CONNECTION_DETECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CH7xxx_CONNECTION_DETECT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ch7xxx_readb
	ldr	w1, [x20]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_ch7xxx_writeb
	ldr	w8, [sp, #12]
Lloh14:
	adrp	x9, _CH7xxx_CDET_DVI@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CH7xxx_CDET_DVI@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _connector_status_disconnected@GOTPAGE
Lloh18:
	ldr	x10, [x10, _connector_status_disconnected@GOTPAGEOFF]
Lloh19:
	adrp	x11, _connector_status_connected@GOTPAGE
Lloh20:
	ldr	x11, [x11, _connector_status_connected@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CH7xxx_PM,4,2                  ; @CH7xxx_PM
	.comm	_CH7xxx_PM_FPD,4,2              ; @CH7xxx_PM_FPD
	.comm	_CH7xxx_PM_DVIL,4,2             ; @CH7xxx_PM_DVIL
	.comm	_CH7xxx_PM_DVIP,4,2             ; @CH7xxx_PM_DVIP
	.comm	_CH7xxx_CONNECTION_DETECT,4,2   ; @CH7xxx_CONNECTION_DETECT
	.comm	_CH7xxx_CDET_DVI,4,2            ; @CH7xxx_CDET_DVI
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.no_dead_strip	_ch7xxx_detect
.subsections_via_symbols
