	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_alt_mode              ## -- Begin function wait_for_alt_mode
	.p2align	4, 0x90
_wait_for_alt_mode:                     ## @wait_for_alt_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_DC_LOGGER_INIT
	movq	8(%r13), %rdi
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	movl	$1, %r14d
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.1:
	callq	*%rcx
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DC_LOG_WARNING
	testl	%r15d, %r15d
	jne	LBB0_8
## %bb.2:
	movq	(%r13), %rdi
	callq	_dm_get_timestamp
	movq	%rax, %r12
	movl	$400, %ebx                      ## imm = 0x190
	leaq	L_.str.1(%rip), %r14
	leaq	L_.str.2(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	8(%r13), %rdi
	movq	(%rdi), %rax
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	jne	LBB0_3
## %bb.5:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %r15
	movl	$1, %r14d
LBB0_7:
	movq	(%r13), %rdi
	callq	_dm_get_timestamp
	movq	(%r13), %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
	callq	_dm_get_elapse_time_in_ns
	movq	%rax, %rdi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_div_u64
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_DC_LOG_WARNING
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DP Alt mode state on HPD: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Alt mode entered finished after %llu ms\n"

L_.str.2:                               ## @.str.2
	.asciz	"Alt mode has timed out after %llu ms\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_for_alt_mode              ; -- Begin function wait_for_alt_mode
	.p2align	2
_wait_for_alt_mode:                     ; @wait_for_alt_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_DC_LOGGER_INIT
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	blr	x8
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DC_LOG_WARNING
	cbz	w20, LBB0_3
LBB0_2:
	mov	w22, #1
	b	LBB0_8
LBB0_3:
	ldr	x0, [x19]
	bl	_dm_get_timestamp
	mov	x21, x0
	mov	w22, #400
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh4:
	adrp	x20, l_.str.2@PAGE
Lloh5:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #500
	bl	_udelay
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	blr	x8
	cbnz	w0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w22, #1
	mov	x20, x23
LBB0_7:
	ldr	x0, [x19]
	bl	_dm_get_timestamp
	mov	x1, x0
	ldr	x0, [x19]
	mov	x2, x21
	bl	_dm_get_elapse_time_in_ns
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_div_u64
	mov	x1, x0
	mov	x0, x20
	bl	_DC_LOG_WARNING
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DP Alt mode state on HPD: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Alt mode entered finished after %llu ms\n"

l_.str.2:                               ; @.str.2
	.asciz	"Alt mode has timed out after %llu ms\n"

.subsections_via_symbols
