	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mci_reset
_mci_reset:                             ## @mci_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	_MCI_CONTROL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MCI_CONTROL@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movq	%r12, %rdi
	callq	_ddblwritel
	movq	(%r14), %rdx
	addq	$4, %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ddblwritel
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	movq	(%r14), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ddblwritel
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ddblreadl
	movq	_MCI_CONTROL_READY@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	notq	%rax
	testq	%rax, %rcx
	je	LBB0_4
## %bb.1:
	movq	$-39, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_msleep
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ddblreadl
	movq	(%r15), %rcx
	andq	%rcx, %rax
	cmpq	%rcx, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rcx
	incq	%rbx
	jne	LBB0_3
LBB0_4:
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.6:
	xorl	%r14d, %r14d
	cmpl	$9, (%r12)
	jne	LBB0_8
## %bb.7:
	movq	_SX8_TSCONFIG_MODE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SX8_TSCONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	callq	_ddblwritel
	jmp	LBB0_8
LBB0_5:
	movl	$-1, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCI_CONTROL_RESET,4,2          ## @MCI_CONTROL_RESET
	.comm	_MCI_CONTROL,8,3                ## @MCI_CONTROL
	.comm	_MCI_CONTROL_READY,8,3          ## @MCI_CONTROL_READY
	.comm	_SX8_TSCONFIG_MODE_NORMAL,4,2   ## @SX8_TSCONFIG_MODE_NORMAL
	.comm	_SX8_TSCONFIG,8,3               ## @SX8_TSCONFIG
	.no_dead_strip	_mci_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mci_reset
_mci_reset:                             ; @mci_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	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _MCI_CONTROL_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCI_CONTROL_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x20, _MCI_CONTROL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _MCI_CONTROL@GOTPAGEOFF]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_ddblwritel
	ldr	x8, [x20]
	add	x2, x8, #4
	mov	x0, x19
	mov	w1, #0
	bl	_ddblwritel
	mov	w0, #300
	bl	_msleep
	ldr	x2, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_ddblwritel
	ldr	x1, [x20]
	mov	x0, x19
	bl	_ddblreadl
Lloh5:
	adrp	x21, _MCI_CONTROL_READY@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MCI_CONTROL_READY@GOTPAGEOFF]
	ldr	x8, [x21]
	bics	xzr, x8, x0
	b.eq	LBB0_4
; %bb.1:
	mov	x22, #-39
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x19
	bl	_ddblreadl
	ldr	x9, [x21]
	and	x8, x9, x0
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	adds	x22, x22, #1
	b.lo	LBB0_2
LBB0_4:
	cbz	x8, LBB0_9
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #9
	b.ne	LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _SX8_TSCONFIG_MODE_NORMAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SX8_TSCONFIG_MODE_NORMAL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _SX8_TSCONFIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SX8_TSCONFIG@GOTPAGEOFF]
Lloh12:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_ddblwritel
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x8, x9
	cbnz	x8, LBB0_5
LBB0_9:
	mov	w0, #-1
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MCI_CONTROL_RESET,4,2          ; @MCI_CONTROL_RESET
	.comm	_MCI_CONTROL,8,3                ; @MCI_CONTROL
	.comm	_MCI_CONTROL_READY,8,3          ; @MCI_CONTROL_READY
	.comm	_SX8_TSCONFIG_MODE_NORMAL,4,2   ; @SX8_TSCONFIG_MODE_NORMAL
	.comm	_SX8_TSCONFIG,8,3               ; @SX8_TSCONFIG
	.no_dead_strip	_mci_reset
.subsections_via_symbols
