	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function testunitready
_testunitready:                         ## @testunitready
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_cam_getccb
	movq	%rax, %r13
	movq	_SSD_FULL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%ebx, %ebx
	movl	$5000, %r9d                     ## imm = 0x1388
	cmovnel	%ebx, %r9d
	movq	%r13, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_scsi_test_unit_ready
	movq	_CAM_DEV_QFRZDIS@GOTPCREL(%rip), %rcx
	movl	4(%r13), %eax
	orl	(%rcx), %eax
	movl	%eax, 4(%r13)
	movq	_arglist@GOTPCREL(%rip), %rbx
	movq	_CAM_ARG_ERR_RECOVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_CAM_PASS_ERR_RECOVER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%r13)
LBB0_2:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.6:
	xorl	%r12d, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.7:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	jmp	LBB0_12
LBB0_3:
	movl	$1, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	jmp	LBB0_12
LBB0_8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.9:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_fprintf
LBB0_10:
	movq	_CAM_ARG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r12d
	testl	%eax, (%rbx)
	je	LBB0_12
## %bb.11:
	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	%r13, %rsi
	callq	_cam_error_print
LBB0_12:
	movq	%r13, %rdi
	callq	_cam_freeccb
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSD_FULL_SIZE,4,2              ## @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ## @CAM_DEV_QFRZDIS
	.comm	_arglist,4,2                    ## @arglist
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ## @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ## @CAM_PASS_ERR_RECOVER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error sending TEST UNIT READY command"

	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_stdout,4,2                     ## @stdout
L_.str.1:                               ## @.str.1
	.asciz	"Unit is ready\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unit is not ready\n"

	.comm	_CAM_ARG_VERBOSE,4,2            ## @CAM_ARG_VERBOSE
	.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	_testunitready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function testunitready
_testunitready:                         ; @testunitready
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	bl	_cam_getccb
	mov	x19, x0
Lloh0:
	adrp	x8, _SSD_FULL_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSD_FULL_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	w8, #5000
	cmp	w22, #0
	csel	w5, w8, w22, eq
	mov	x1, x23
	mov	x2, #0
	mov	x3, x24
	bl	_scsi_test_unit_ready
Lloh3:
	adrp	x8, _CAM_DEV_QFRZDIS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAM_DEV_QFRZDIS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
Lloh6:
	adrp	x22, _arglist@GOTPAGE
Lloh7:
	ldr	x22, [x22, _arglist@GOTPAGEOFF]
	str	w8, [x19, #4]
	ldr	w9, [x22]
Lloh8:
	adrp	x10, _CAM_ARG_ERR_RECOVER@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CAM_ARG_ERR_RECOVER@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x9, _CAM_PASS_ERR_RECOVER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CAM_PASS_ERR_RECOVER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_6
; %bb.3:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh17:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.4:
	cbz	w21, LBB0_14
; %bb.5:
	mov	w20, #0
	b	LBB0_13
LBB0_6:
	cbnz	w21, LBB0_12
; %bb.7:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_12
LBB0_8:
	cbnz	w21, LBB0_10
; %bb.9:
Lloh22:
	adrp	x8, _stdout@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_10:
	ldr	w8, [x22]
Lloh27:
	adrp	x9, _CAM_ARG_VERBOSE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _CAM_ARG_VERBOSE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
Lloh30:
	adrp	x8, _CAM_ESF_ALL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CAM_ESF_ALL@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x8, _CAM_EPF_ALL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CAM_EPF_ALL@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
Lloh36:
	adrp	x8, _stderr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_cam_error_print
LBB0_12:
	mov	w20, #1
LBB0_13:
	mov	x0, x19
	bl	_cam_freeccb
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh39:
	adrp	x8, _stdout@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str.1@PAGE
Lloh43:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w20, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_SSD_FULL_SIZE,4,2              ; @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ; @CAM_DEV_QFRZDIS
	.comm	_arglist,4,2                    ; @arglist
	.comm	_CAM_ARG_ERR_RECOVER,4,2        ; @CAM_ARG_ERR_RECOVER
	.comm	_CAM_PASS_ERR_RECOVER,4,2       ; @CAM_PASS_ERR_RECOVER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error sending TEST UNIT READY command"

	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_stdout,4,2                     ; @stdout
l_.str.1:                               ; @.str.1
	.asciz	"Unit is ready\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unit is not ready\n"

	.comm	_CAM_ARG_VERBOSE,4,2            ; @CAM_ARG_VERBOSE
	.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	_testunitready
.subsections_via_symbols
