	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sp2_ci_slot_reset              ## -- Begin function sp2_ci_slot_reset
	.p2align	4, 0x90
_sp2_ci_slot_reset:                     ## @sp2_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_SP2_MOD_CTL_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_sp2_write_i2c
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	movl	$0, -20(%rbp)
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_sp2_write_i2c
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	xorl	%eax, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slot: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SP2_MOD_CTL_RST,4,2            ## @SP2_MOD_CTL_RST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sp2_ci_slot_reset              ; -- Begin function sp2_ci_slot_reset
	.p2align	2
_sp2_ci_slot_reset:                     ; @sp2_ci_slot_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	cbz	w20, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x8, _SP2_MOD_CTL_RST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SP2_MOD_CTL_RST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_sp2_write_i2c
	cbnz	w0, LBB0_5
; %bb.3:
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	str	wzr, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_sp2_write_i2c
	cbnz	w0, LBB0_5
; %bb.4:
	mov	w0, #1000
	bl	_msleep
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slot: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SP2_MOD_CTL_RST,4,2            ; @SP2_MOD_CTL_RST
.subsections_via_symbols
