	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sb1000_reset
_sb1000_reset:                          ## @sb1000_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	%rsi, %r14
	movq	%rdi, %r15
	movl	4(%rdi), %ebx
	addl	$6, %ebx
	movl	$4, %edi
	movl	%ebx, %esi
	callq	_outb
	movl	%ebx, %edi
	callq	_inb
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	_outb
	movl	%ebx, %edi
	callq	_inb
	movl	$1, %edi
	callq	_ssleep
	movl	$4, %edi
	movl	%ebx, %esi
	callq	_outb
	movl	%ebx, %edi
	callq	_inb
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	_outb
	movl	%ebx, %edi
	callq	_inb
	xorl	%edi, %edi
	callq	_udelay
	leaq	_sb1000_reset.Command0(%rip), %rdx
	leaq	-31(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_card_send_command
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	cmpb	$-16, -28(%rbp)
	movl	$0, %eax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_sb1000_reset.Command0:                 ## @sb1000_reset.Command0
	.asciz	"\200\026\000\000\000"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sb1000_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sb1000_reset
_sb1000_reset:                          ; @sb1000_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0, #4]
	add	w21, w8, #6
	mov	w0, #4
	mov	x1, x21
	bl	_outb
	mov	x0, x21
	bl	_inb
	mov	w0, #1000
	bl	_udelay
	mov	w0, #0
	mov	x1, x21
	bl	_outb
	mov	x0, x21
	bl	_inb
	mov	w0, #1
	bl	_ssleep
	mov	w0, #4
	mov	x1, x21
	bl	_outb
	mov	x0, x21
	bl	_inb
	mov	w0, #1000
	bl	_udelay
	mov	w0, #0
	mov	x1, x21
	bl	_outb
	mov	x0, x21
	bl	_inb
	mov	w0, #0
	bl	_udelay
Lloh0:
	adrp	x2, _sb1000_reset.Command0@PAGE
Lloh1:
	add	x2, x2, _sb1000_reset.Command0@PAGEOFF
	add	x3, sp, #9
	mov	x0, x20
	mov	x1, x19
	bl	_card_send_command
	cbnz	w0, LBB0_4
; %bb.1:
	ldrb	w8, [sp, #12]
	cmp	w8, #240
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_sb1000_reset.Command0:                 ; @sb1000_reset.Command0
	.asciz	"\200\026\000\000\000"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sb1000_reset
.subsections_via_symbols
