	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function slot_reset
_slot_reset:                            ## @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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.1:
	movl	16(%r15), %edx
	xorl	%ecx, %ecx
	callq	_read_data
LBB0_2:
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_cam_mode
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$33, %edx
	callq	_write_reg
	movq	%r15, %rdi
	movl	$6, %esi
	movl	$31, %edx
	callq	_write_reg
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$49, %edx
	callq	_write_reg
	movq	%r15, %rdi
	movl	$32, %esi
	movl	$128, %edx
	movl	$128, %ecx
	callq	_write_regm
	movq	%r15, %rdi
	movl	$3, %esi
	movl	$2, %edx
	callq	_write_reg
	movq	$0, 8(%r15)
	movl	$-1, (%r15)
	movl	$99, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	subl	$1, %ebx
	setb	%al
	cmpq	$0, 8(%r15)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	%al, %al
	je	LBB0_3
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_slot_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function slot_reset
_slot_reset:                            ; @slot_reset
	.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
	ldr	x19, [x0]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w2, [x19, #16]
	mov	w3, #0
	bl	_read_data
LBB0_2:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #0
	bl	_cam_mode
	mov	x0, x19
	mov	w1, #0
	mov	w2, #33
	bl	_write_reg
	mov	x0, x19
	mov	w1, #6
	mov	w2, #31
	bl	_write_reg
	mov	x0, x19
	mov	w1, #0
	mov	w2, #49
	bl	_write_reg
	mov	x0, x19
	mov	w1, #32
	mov	w2, #128
	mov	w3, #128
	bl	_write_regm
	mov	x0, x19
	mov	w1, #3
	mov	w2, #2
	bl	_write_reg
	str	xzr, [x19, #8]
	mov	w8, #-1
	str	w8, [x19]
	mov	w21, #99
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	cmp	x8, #0
	ccmp	w21, #0, #4, eq
	sub	w21, w21, #1
	b.ne	LBB0_3
; %bb.4:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_slot_reset
.subsections_via_symbols
