	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_detect_hpd
_analogix_dp_detect_hpd:                ## @analogix_dp_detect_hpd
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_DP_TIMEOUT_LOOP_COUNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_analogix_dp_get_plug_in_status
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1100, %esi                     ## imm = 0x44C
	callq	_usleep_range
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_4:
	cmpl	$0, 4(%r12)
	je	LBB0_5
## %bb.7:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r12, %rdi
	callq	_analogix_dp_force_hpd
	movq	%r12, %rdi
	callq	_analogix_dp_get_plug_in_status
	movl	(%r12), %edi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TIMEOUT_LOOP_COUNT,4,2      ## @DP_TIMEOUT_LOOP_COUNT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get hpd plug status, try to force hpd\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get hpd plug in status\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"success to get plug in status after force hpd\n"

	.no_dead_strip	_analogix_dp_detect_hpd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_detect_hpd
_analogix_dp_detect_hpd:                ; @analogix_dp_detect_hpd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x20, _DP_TIMEOUT_LOOP_COUNT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DP_TIMEOUT_LOOP_COUNT@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_analogix_dp_get_plug_in_status
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	mov	w0, #1000
	mov	w1, #1100
	bl	_usleep_range
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_2
LBB0_4:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_7
; %bb.5:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_analogix_dp_force_hpd
	mov	x0, x19
	bl	_analogix_dp_get_plug_in_status
	mov	x8, x0
	ldr	w0, [x19]
	cbz	x8, LBB0_9
; %bb.6:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TIMEOUT_LOOP_COUNT,4,2      ; @DP_TIMEOUT_LOOP_COUNT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get hpd plug status, try to force hpd\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get hpd plug in status\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"success to get plug in status after force hpd\n"

	.no_dead_strip	_analogix_dp_detect_hpd
.subsections_via_symbols
