	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _mci_cmd_unlocked
__mci_cmd_unlocked:                     ## @_mci_cmd_unlocked
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r15
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	8(%rax), %r13
	movq	_MCI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_ddblreadl
	movq	_MCI_CONTROL_RESET@GOTPCREL(%rip), %rcx
	movq	_MCI_CONTROL_START_COMMAND@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%rcx), %ecx
	orl	%esi, %ecx
	testl	%eax, %ecx
	je	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%ebx, %ecx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_3
## %bb.4:
	testl	%ecx, %ecx
	movq	%r15, %r14
	movl	%ebx, %r15d
	jle	LBB0_8
## %bb.5:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %ebx
	shlq	$2, %rbx
	xorl	%r15d, %r15d
	movq	_MCI_COMMAND@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r15), %esi
	movq	(%r14), %rdx
	addq	%r15, %rdx
	movq	%r13, %rdi
	callq	_ddblwritel
	addq	$4, %r15
	cmpq	%r15, %rbx
	jne	LBB0_6
## %bb.7:
	movq	_MCI_CONTROL_START_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_8
LBB0_3:
	movq	%r15, %r14
	movl	%ebx, %r15d
LBB0_8:
	movq	_MCI_CONTROL_ENABLE_DONE_INTERRUPT@GOTPCREL(%rip), %rcx
	orl	%eax, %esi
	orl	(%rcx), %esi
	movq	_MCI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	callq	_ddblwritel
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdi
	addq	$4, %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	%r15d, %eax
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_14
## %bb.11:
	testl	%eax, %eax
	jle	LBB0_14
## %bb.12:
	movl	%eax, %r12d
	shlq	$2, %r12
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	_MCI_RESULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_ddblreadl
	movl	%eax, (%r14,%rbx)
	addq	$4, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_13
	jmp	LBB0_14
LBB0_9:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_MCI_CONTROL,8,3                ## @MCI_CONTROL
	.comm	_MCI_CONTROL_RESET,4,2          ## @MCI_CONTROL_RESET
	.comm	_MCI_CONTROL_START_COMMAND,4,2  ## @MCI_CONTROL_START_COMMAND
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MCI_COMMAND,8,3                ## @MCI_COMMAND
	.comm	_MCI_CONTROL_ENABLE_DONE_INTERRUPT,4,2 ## @MCI_CONTROL_ENABLE_DONE_INTERRUPT
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MCI-%d: MCI timeout\n"

	.comm	_MCI_RESULT,8,3                 ## @MCI_RESULT
	.no_dead_strip	__mci_cmd_unlocked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _mci_cmd_unlocked
__mci_cmd_unlocked:                     ; @_mci_cmd_unlocked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x19, x3
	mov	x25, x2
	mov	x24, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8, #8]
Lloh0:
	adrp	x26, _MCI_CONTROL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MCI_CONTROL@GOTPAGEOFF]
	ldr	x1, [x26]
	mov	x0, x20
	bl	_ddblreadl
Lloh2:
	adrp	x8, _MCI_CONTROL_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MCI_CONTROL_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
Lloh5:
	adrp	x27, _MCI_CONTROL_START_COMMAND@GOTPAGE
Lloh6:
	ldr	x27, [x27, _MCI_CONTROL_START_COMMAND@GOTPAGEOFF]
	ldr	w8, [x27]
	orr	w9, w8, w9
	tst	w9, w0
	b.eq	LBB0_3
LBB0_1:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x23, x0
	cbz	x24, LBB0_8
; %bb.4:
	cmp	w25, #1
	b.lt	LBB0_8
; %bb.5:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	mov	x28, #0
	mov	w8, w25
	lsl	x25, x8, #2
Lloh10:
	adrp	x21, _MCI_COMMAND@GOTPAGE
Lloh11:
	ldr	x21, [x21, _MCI_COMMAND@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24, x28]
	ldr	x8, [x21]
	add	x2, x28, x8
	mov	x0, x20
	bl	_ddblwritel
	add	x28, x28, #4
	cmp	x25, x28
	b.ne	LBB0_6
; %bb.7:
	ldr	w8, [x27]
	ldr	w21, [sp, #12]                  ; 4-byte Folded Reload
LBB0_8:
Lloh12:
	adrp	x9, _MCI_CONTROL_ENABLE_DONE_INTERRUPT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MCI_CONTROL_ENABLE_DONE_INTERRUPT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w23
	orr	w1, w8, w9
	ldr	x2, [x26]
	mov	x0, x20
	bl	_ddblwritel
	ldr	x8, [x22, #8]
	add	x0, x8, #4
Lloh15:
	adrp	x8, _HZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_14
; %bb.9:
	mov	w0, #0
	cbz	x19, LBB0_2
; %bb.10:
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.11:
	mov	x22, #0
	mov	w8, w21
	lsl	x21, x8, #2
Lloh18:
	adrp	x23, _MCI_RESULT@GOTPAGE
Lloh19:
	ldr	x23, [x23, _MCI_RESULT@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x22, x8
	mov	x0, x20
	bl	_ddblreadl
	str	w0, [x19, x22]
	add	x22, x22, #4
	cmp	x21, x22
	b.ne	LBB0_12
; %bb.13:
	mov	w0, #0
	b	LBB0_2
LBB0_14:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	ldr	w2, [x22]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MCI_CONTROL,8,3                ; @MCI_CONTROL
	.comm	_MCI_CONTROL_RESET,4,2          ; @MCI_CONTROL_RESET
	.comm	_MCI_CONTROL_START_COMMAND,4,2  ; @MCI_CONTROL_START_COMMAND
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MCI_COMMAND,8,3                ; @MCI_COMMAND
	.comm	_MCI_CONTROL_ENABLE_DONE_INTERRUPT,4,2 ; @MCI_CONTROL_ENABLE_DONE_INTERRUPT
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MCI-%d: MCI timeout\n"

	.comm	_MCI_RESULT,8,3                 ; @MCI_RESULT
	.no_dead_strip	__mci_cmd_unlocked
.subsections_via_symbols
