	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_cam_send
_ata_cam_send:                          ## @ata_cam_send
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_arglist@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_CAM_ARG_VERBOSE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ata_op_string
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	movl	(%r12), %eax
LBB0_2:
	movq	_CAM_DEV_QFRZDIS@GOTPCREL(%rip), %rdx
	movl	4(%rbx), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rbx)
	movq	_CAM_ARG_ERR_RECOVER@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_4
## %bb.3:
	movq	_CAM_PASS_ERR_RECOVER@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%rbx)
LBB0_4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movl	(%rbx), %eax
	movq	_CAM_ATAIO_NEEDRESULT@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.7:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_ata_op_string
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	movl	(%r13), %eax
	movl	$1, %r15d
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.9:
	movq	_CAM_ESF_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CAM_EPF_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cam_error_print
	jmp	LBB0_10
LBB0_5:
	movq	%rbx, %rdi
	callq	_ata_op_string
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_warn
	movl	$1, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_arglist,4,2                    ## @arglist
	.comm	_CAM_ARG_VERBOSE,4,2            ## @CAM_ARG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending ATA %s with timeout of %u msecs"

	.comm	_CAM_DEV_QFRZDIS,4,2            ## @CAM_DEV_QFRZDIS
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ## @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ## @CAM_PASS_ERR_RECOVER
L_.str.1:                               ## @.str.1
	.asciz	"error sending ATA %s"

	.comm	_CAM_ATAIO_NEEDRESULT,4,2       ## @CAM_ATAIO_NEEDRESULT
	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
L_.str.2:                               ## @.str.2
	.asciz	"ATA %s failed"

	.comm	_CAM_ESF_ALL,4,2                ## @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ## @CAM_EPF_ALL
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_ata_cam_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_cam_send
_ata_cam_send:                          ; @ata_cam_send
	.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
Lloh0:
	adrp	x21, _arglist@GOTPAGE
Lloh1:
	ldr	x21, [x21, _arglist@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _CAM_ARG_VERBOSE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CAM_ARG_VERBOSE@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ata_op_string
	mov	x1, x0
	ldr	w8, [x19, #4]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	ldr	w8, [x21]
LBB0_2:
Lloh6:
	adrp	x9, _CAM_DEV_QFRZDIS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CAM_DEV_QFRZDIS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	w10, [x19, #4]
	orr	w9, w10, w9
	str	w9, [x19, #4]
Lloh9:
	adrp	x10, _CAM_ARG_ERR_RECOVER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CAM_ARG_ERR_RECOVER@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _CAM_PASS_ERR_RECOVER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAM_PASS_ERR_RECOVER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w8, w8, w9
	str	w8, [x19, #4]
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _CAM_ATAIO_NEEDRESULT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CAM_ATAIO_NEEDRESULT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:
Lloh18:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh21:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_ata_op_string
	mov	x1, x0
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
LBB0_9:
	mov	w0, #1
LBB0_10:
	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
LBB0_11:
	mov	x0, x19
	bl	_ata_op_string
	mov	x1, x0
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	ldr	w8, [x21]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.12:
Lloh28:
	adrp	x8, _CAM_ESF_ALL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CAM_ESF_ALL@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x8, _CAM_EPF_ALL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CAM_EPF_ALL@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_cam_error_print
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_arglist,4,2                    ; @arglist
	.comm	_CAM_ARG_VERBOSE,4,2            ; @CAM_ARG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending ATA %s with timeout of %u msecs"

	.comm	_CAM_DEV_QFRZDIS,4,2            ; @CAM_DEV_QFRZDIS
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ; @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ; @CAM_PASS_ERR_RECOVER
l_.str.1:                               ; @.str.1
	.asciz	"error sending ATA %s"

	.comm	_CAM_ATAIO_NEEDRESULT,4,2       ; @CAM_ATAIO_NEEDRESULT
	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
l_.str.2:                               ; @.str.2
	.asciz	"ATA %s failed"

	.comm	_CAM_ESF_ALL,4,2                ; @CAM_ESF_ALL
	.comm	_CAM_EPF_ALL,4,2                ; @CAM_EPF_ALL
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_ata_cam_send
.subsections_via_symbols
