	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function az6007_ci_slot_reset
_az6007_ci_slot_reset:                  ## @az6007_ci_slot_reset
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movq	%r13, %rdi
	callq	_d_to_priv
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	$198, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_az6007_write
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movq	%r13, %rdi
	movl	$198, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_az6007_write
	testl	%eax, %eax
	je	LBB0_3
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_20:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.4:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.5:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.6:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.7:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.8:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.9:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.10:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.11:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.12:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.13:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.14:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_CI_CamReady
	testq	%rax, %rax
	je	LBB0_19
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
LBB0_19:
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_msleep
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb out operation failed. (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"CAM Ready\n"

	.no_dead_strip	_az6007_ci_slot_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function az6007_ci_slot_reset
_az6007_ci_slot_reset:                  ; @az6007_ci_slot_reset
	.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	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	mov	x0, x22
	bl	_d_to_priv
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x22
	mov	w1, #198
	mov	w2, #1
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_az6007_write
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w0, #500
	bl	_msleep
	mov	x0, x22
	mov	w1, #198
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_az6007_write
	cbz	w0, LBB0_4
LBB0_2:
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_pr_warn
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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
LBB0_4:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.5:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.6:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.7:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.8:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.9:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.10:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.11:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.12:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.13:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.14:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.15:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.16:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.17:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbnz	x0, LBB0_19
; %bb.18:
	mov	w0, #100
	bl	_msleep
	mov	x0, x21
	mov	x1, x20
	bl	_CI_CamReady
	cbz	x0, LBB0_20
LBB0_19:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
LBB0_20:
	mov	w0, #5000
	bl	_msleep
	mov	w23, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb out operation failed. (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"CAM Ready\n"

	.no_dead_strip	_az6007_ci_slot_reset
.subsections_via_symbols
