	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_do_cmd
_ata_do_cmd:                            ## @ata_do_cmd
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	80(%rbp), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	72(%rbp), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	64(%rbp), %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	56(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	48(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	40(%rbp), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	32(%rbp), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %r13d
	callq	_ata_try_pass_16
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.10:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_do_pass_16                 ## TAILCALL
LBB0_9:
	movl	$1, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_CCB_CLEAR_ALL_EXCEPT_HDR
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	callq	_cam_fill_ataio
	addq	$16, %rsp
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_4
## %bb.3:
	movq	_ATA_MAX_28BIT_LBA@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	jl	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_ata_28bit_cmd
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_ata_48bit_cmd
LBB0_6:
	movq	_AP_FLAG_CHK_COND@GOTPCREL(%rip), %rax
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_CAM_ATAIO_NEEDRESULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_cam_send                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_MAX_28BIT_LBA,8,3          ## @ATA_MAX_28BIT_LBA
	.comm	_AP_FLAG_CHK_COND,4,2           ## @AP_FLAG_CHK_COND
	.comm	_CAM_ATAIO_NEEDRESULT,4,2       ## @CAM_ATAIO_NEEDRESULT
	.no_dead_strip	_ata_do_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_do_cmd
_ata_do_cmd:                            ; @ata_do_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	stp	w7, w5, [sp, #24]               ; 8-byte Folded Spill
	mov	x26, x6
	mov	x21, x4
	mov	x27, x3
	mov	x28, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x29, #56]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldp	w23, w22, [x29, #48]
	ldr	x25, [x29, #40]
	ldr	w8, [x29, #32]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	ldr	x24, [x29, #24]
	ldr	w8, [x29, #16]
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	bl	_ata_try_pass_16
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.2:
	stp	w23, w22, [x29, #48]
	str	x25, [x29, #40]
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	str	w8, [x29, #32]
	str	x24, [x29, #24]
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	str	w8, [x29, #16]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x28
	mov	x3, x27
	mov	x4, x21
	ldp	w7, w5, [sp, #24]               ; 8-byte Folded Reload
	mov	x6, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ata_do_pass_16
LBB0_3:
	mov	w0, #1
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	mov	x0, x19
	bl	_CCB_CLEAR_ALL_EXCEPT_HDR
	mov	x0, x19
	mov	x1, x28
	mov	x2, #0
	mov	x3, x27
	mov	x4, x26
	mov	x5, x25
	mov	x6, x23
	mov	x7, x22
	bl	_cam_fill_ataio
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_7
; %bb.5:
Lloh0:
	adrp	x8, _ATA_MAX_28BIT_LBA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_MAX_28BIT_LBA@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x24
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	w4, w1, [sp, #20]               ; 8-byte Folded Reload
	ldr	w2, [sp, #16]                   ; 4-byte Folded Reload
	mov	x3, x24
	bl	_ata_28bit_cmd
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	ldp	w4, w1, [sp, #20]               ; 8-byte Folded Reload
	ldr	w2, [sp, #16]                   ; 4-byte Folded Reload
	mov	x3, x24
	bl	_ata_48bit_cmd
LBB0_8:
Lloh3:
	adrp	x8, _AP_FLAG_CHK_COND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AP_FLAG_CHK_COND@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	tst	w8, w9
	b.eq	LBB0_10
; %bb.9:
Lloh6:
	adrp	x8, _CAM_ATAIO_NEEDRESULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAM_ATAIO_NEEDRESULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ata_cam_send
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_MAX_28BIT_LBA,8,3          ; @ATA_MAX_28BIT_LBA
	.comm	_AP_FLAG_CHK_COND,4,2           ; @AP_FLAG_CHK_COND
	.comm	_CAM_ATAIO_NEEDRESULT,4,2       ; @CAM_ATAIO_NEEDRESULT
	.no_dead_strip	_ata_do_cmd
.subsections_via_symbols
