	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcde_dsi_wait_for_command_mode_stop
_mcde_dsi_wait_for_command_mode_stop:   ## @mcde_dsi_wait_for_command_mode_stop
	.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, %r14
	movq	_DSI_CMD_MODE_STS_CSM_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$101, %ebx
	movq	_DSI_CMD_MODE_STS@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	notl	%eax
	testl	%eax, %r15d
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_1
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSI_CMD_MODE_STS_CSM_RUNNING,4,2 ## @DSI_CMD_MODE_STS_CSM_RUNNING
	.comm	_DSI_CMD_MODE_STS,8,3           ## @DSI_CMD_MODE_STS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get out of command mode\n"

	.no_dead_strip	_mcde_dsi_wait_for_command_mode_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcde_dsi_wait_for_command_mode_stop
_mcde_dsi_wait_for_command_mode_stop:   ; @mcde_dsi_wait_for_command_mode_stop
	.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	x8, _DSI_CMD_MODE_STS_CSM_RUNNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSI_CMD_MODE_STS_CSM_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	w21, #101
Lloh3:
	adrp	x22, _DSI_CMD_MODE_STS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DSI_CMD_MODE_STS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	bics	wzr, w20, w0
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.3:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_warn
LBB0_4:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DSI_CMD_MODE_STS_CSM_RUNNING,4,2 ; @DSI_CMD_MODE_STS_CSM_RUNNING
	.comm	_DSI_CMD_MODE_STS,8,3           ; @DSI_CMD_MODE_STS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get out of command mode\n"

	.no_dead_strip	_mcde_dsi_wait_for_command_mode_stop
.subsections_via_symbols
