	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function power_up_device
_power_up_device:                       ## @power_up_device
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	_DRXJ_WAKE_UP_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	4(%r15), %eax
	movl	%eax, -52(%rbp)
	movl	(%r15), %eax
	movl	%eax, -56(%rbp)
	movl	$1, %r12d
	leaq	-56(%rbp), %r14
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -64(%rbp)
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_drxbsp_i2c_write_read
	movl	$10, %edi
	callq	_msleep
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	movl	$1, %r8d
	movq	%r13, %r9
	callq	_drxbsp_i2c_write_read
	leaq	1(%r12), %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_DRXJ_MAX_RETRIES_POWERUP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	movq	%rbx, %r12
	jl	LBB0_1
LBB0_3:
	movl	$10, %edi
	callq	_msleep
	movq	_DRXJ_MAX_RETRIES_POWERUP@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	cmpq	$1, %rbx
	cmovnel	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRXJ_WAKE_UP_KEY,4,2           ## @DRXJ_WAKE_UP_KEY
	.comm	_DRXJ_MAX_RETRIES_POWERUP,8,3   ## @DRXJ_MAX_RETRIES_POWERUP
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_power_up_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function power_up_device
_power_up_device:                       ; @power_up_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, #0
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _DRXJ_WAKE_UP_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRXJ_WAKE_UP_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	d0, [x19]
	str	d0, [sp, #8]
Lloh3:
	adrp	x21, _DRXJ_MAX_RETRIES_POWERUP@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DRXJ_MAX_RETRIES_POWERUP@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #24]
	add	x0, sp, #8
	add	x2, sp, #24
	mov	w1, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_drxbsp_i2c_write_read
	mov	w0, #10
	bl	_msleep
	add	x20, x20, #1
	add	x5, sp, #24
	mov	x0, #0
	mov	w1, #0
	mov	x2, #0
	mov	x3, x19
	mov	w4, #1
	bl	_drxbsp_i2c_write_read
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	cmp	x20, x8
	b.lt	LBB0_1
LBB0_3:
	mov	w0, #10
	bl	_msleep
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _EIO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	x8, x20
	csneg	w0, wzr, w9, ne
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DRXJ_WAKE_UP_KEY,4,2           ; @DRXJ_WAKE_UP_KEY
	.comm	_DRXJ_MAX_RETRIES_POWERUP,8,3   ; @DRXJ_MAX_RETRIES_POWERUP
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_power_up_device
.subsections_via_symbols
