	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ub_rw_cmd_done
_ub_rw_cmd_done:                        ## @ub_rw_cmd_done
	.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	40(%rsi), %r14
	movq	32(%rsi), %r12
	movq	(%r12), %r15
	movl	24(%rsi), %eax
	movq	(%r15), %rcx
	movq	_REQ_TYPE_BLOCK_PC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	%rdi, %r13
	cmpq	%rdx, %rcx
	jne	LBB0_7
## %bb.5:
	movl	20(%r15), %edi
	movq	(%r13), %rsi
	movq	_UB_SENSE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	_UB_SENSE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.6:
	movq	_DID_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	shll	$16, %r13d
	jmp	LBB0_13
LBB0_1:
	movq	(%rbx), %rax
	cmpq	%rdx, %rcx
	jne	LBB0_3
## %bb.2:
	movq	8(%r15), %rcx
	xorl	%r13d, %r13d
	subq	%rax, %rcx
	cmovleq	%r13, %rcx
	movq	%rcx, 8(%r15)
	jmp	LBB0_13
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_12
## %bb.8:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	_MEDIUM_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	_UNIT_ATTENTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_11:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_ub_rw_cmd_retry
	testq	%rax, %rax
	jne	LBB0_12
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%r13d, %r13d
	cmpq	8(%rbx), %rax
	je	LBB0_13
LBB0_12:
	movq	_SAM_STAT_CHECK_CONDITION@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_13:
	movq	$0, (%r12)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ub_put_cmd
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_ub_end_rq
	movq	(%r14), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_blk_start_queue                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REQ_TYPE_BLOCK_PC,8,3          ## @REQ_TYPE_BLOCK_PC
	.comm	_SAM_STAT_CHECK_CONDITION,4,2   ## @SAM_STAT_CHECK_CONDITION
	.comm	_UB_SENSE_SIZE,4,2              ## @UB_SENSE_SIZE
	.comm	_DID_ERROR,4,2                  ## @DID_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MEDIUM_ERROR,8,3               ## @MEDIUM_ERROR
	.comm	_UNIT_ATTENTION,8,3             ## @UNIT_ATTENTION
	.no_dead_strip	_ub_rw_cmd_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ub_rw_cmd_done
_ub_rw_cmd_done:                        ; @ub_rw_cmd_done
	.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	x20, x1
	ldp	x22, x19, [x1, #32]
	ldr	x21, [x22]
	ldr	w8, [x1, #24]
	ldr	x9, [x21]
Lloh0:
	adrp	x10, _REQ_TYPE_BLOCK_PC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _REQ_TYPE_BLOCK_PC@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x23, x0
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x21, #20]
	ldr	x1, [x23]
Lloh3:
	adrp	x24, _UB_SENSE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _UB_SENSE_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_memcpy
	ldr	w8, [x24]
	str	w8, [x21, #16]
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbnz	x8, LBB0_10
; %bb.3:
Lloh5:
	adrp	x8, _DID_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DID_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsl	w23, w8, #16
	b	LBB0_12
LBB0_4:
	ldr	x8, [x20]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.5:
	mov	w23, #0
	ldr	x9, [x21, #8]
	subs	x8, x9, x8
	csel	x8, x8, xzr, gt
	str	x8, [x21, #8]
	b	LBB0_12
LBB0_6:
Lloh8:
	adrp	x9, _EIO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmn	w8, w9
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.8:
Lloh11:
	adrp	x9, _MEDIUM_ERROR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MEDIUM_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x10, _UNIT_ATTENTION@GOTPAGE
Lloh15:
	ldr	x10, [x10, _UNIT_ATTENTION@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_10
LBB0_9:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x22
	mov	x3, x20
	bl	_ub_rw_cmd_retry
	cbz	x0, LBB0_13
LBB0_10:
Lloh17:
	adrp	x8, _SAM_STAT_CHECK_CONDITION@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SAM_STAT_CHECK_CONDITION@GOTPAGEOFF]
Lloh19:
	ldr	w23, [x8]
	b	LBB0_12
LBB0_11:
	ldr	x9, [x20, #8]
Lloh20:
	adrp	x10, _SAM_STAT_CHECK_CONDITION@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SAM_STAT_CHECK_CONDITION@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w23, wzr, w10, eq
LBB0_12:
	str	xzr, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_ub_put_cmd
	mov	x0, x21
	mov	x1, x23
	bl	_ub_end_rq
	ldr	x8, [x19]
	ldr	w0, [x8]
	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
	b	_blk_start_queue
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_REQ_TYPE_BLOCK_PC,8,3          ; @REQ_TYPE_BLOCK_PC
	.comm	_SAM_STAT_CHECK_CONDITION,4,2   ; @SAM_STAT_CHECK_CONDITION
	.comm	_UB_SENSE_SIZE,4,2              ; @UB_SENSE_SIZE
	.comm	_DID_ERROR,4,2                  ; @DID_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MEDIUM_ERROR,8,3               ; @MEDIUM_ERROR
	.comm	_UNIT_ATTENTION,8,3             ; @UNIT_ATTENTION
	.no_dead_strip	_ub_rw_cmd_done
.subsections_via_symbols
