	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_handle_cmd
_srpt_handle_cmd:                       ## @srpt_handle_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
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	$0, -80(%rbp)
	movl	$0, -44(%rbp)
	xorl	%edi, %edi
	testq	%rdx, %rdx
	sete	%dil
	callq	_BUG_ON
	movq	8(%r12), %r13
	movslq	(%r12), %r14
	shlq	$4, %r14
	leaq	(%r14,%r13), %rdx
	movl	4(%r13,%r14), %eax
	movl	%eax, 12(%rbx)
	movl	(%r13,%r14), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.srpt_handle_cmd(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TCM_ORDERED_TAG@GOTPCREL(%rip), %rax
LBB0_3:
	leaq	8(%rbx), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r13), %rcx
	addq	$4, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	4(%r15), %eax
	leaq	-52(%rbp), %r10
	leaq	-48(%rbp), %rcx
	leaq	-80(%rbp), %r8
	leaq	-44(%rbp), %r9
	movq	%r12, %rdi
	movq	%rbx, %rsi
	pushq	%rax
	pushq	%r10
	callq	_srpt_get_desc_tbl
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_8
LBB0_6:
	movl	(%r15), %r15d
	movl	12(%r13,%r14), %r12d
	movq	(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r13), %rdi
	addq	$8, %rdi
	callq	_scsilun_to_int
	movl	-52(%rbp), %r9d
	movq	_TCM_SIMPLE_TAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movl	-48(%rbp), %r11d
	movq	_TARGET_SCF_ACK_KREF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	-44(%rbp), %r13d
	subq	$8, %rsp
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, %r8d
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%r13
	pushq	-80(%rbp)
	pushq	%r14
	pushq	%r11
	pushq	%r10
	callq	_target_submit_cmd_map_sgls
	addq	$80, %rsp
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
LBB0_8:
	movq	%rbx, %rdi
	callq	_target_send_busy
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCM_SIMPLE_TAG,4,2             ## @TCM_SIMPLE_TAG
	.comm	_TCM_ORDERED_TAG,4,2            ## @TCM_ORDERED_TAG
	.comm	_TCM_HEAD_TAG,4,2               ## @TCM_HEAD_TAG
	.comm	_TCM_ACA_TAG,4,2                ## @TCM_ACA_TAG
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%llx: parsing SRP descriptor table failed.\n"

	.comm	_TARGET_SCF_ACK_KREF,4,2        ## @TARGET_SCF_ACK_KREF
L_.str.1:                               ## @.str.1
	.asciz	"target_submit_cmd() returned %d for tag %#llx\n"

	.no_dead_strip	_srpt_handle_cmd
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.srpt_handle_cmd
l_switch.table.srpt_handle_cmd:
	.quad	_TCM_SIMPLE_TAG
	.quad	_TCM_ORDERED_TAG
	.quad	_TCM_HEAD_TAG
	.quad	_TCM_ACA_TAG

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_handle_cmd
_srpt_handle_cmd:                       ; @srpt_handle_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	str	xzr, [sp, #72]
	str	wzr, [sp, #68]
	cmp	x2, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x24, [x22, #8]
	ldrsw	x25, [x22]
	add	x2, x24, x25, lsl #4
	add	x19, x20, #8
	mov	x23, x2
	ldr	w8, [x23, #4]!
	str	w8, [x20, #12]
	ldr	w8, [x2]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.srpt_handle_cmd@PAGE
Lloh1:
	add	x9, x9, l_switch.table.srpt_handle_cmd@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _TCM_ORDERED_TAG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TCM_ORDERED_TAG@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldr	w7, [x21, #4]
	add	x3, sp, #60
	add	x4, sp, #72
	add	x5, sp, #68
	add	x6, sp, #64
	mov	x0, x22
	mov	x1, x20
	bl	_srpt_get_desc_tbl
	cbz	w0, LBB0_6
; %bb.4:
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_8
; %bb.5:
	ldr	w1, [x23]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_8
LBB0_6:
	ldr	w21, [x21]
	add	x8, x24, x25, lsl #4
	ldr	w22, [x8, #12]
	ldr	x20, [x20]
	add	x0, x8, #8
	bl	_scsilun_to_int
	mov	x4, x0
	ldp	w7, w5, [sp, #60]
Lloh9:
	adrp	x8, _TCM_SIMPLE_TAG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TCM_SIMPLE_TAG@GOTPAGEOFF]
Lloh11:
	ldr	w6, [x8]
Lloh12:
	adrp	x8, _TARGET_SCF_ACK_KREF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TARGET_SCF_ACK_KREF@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [sp, #72]
	ldr	w10, [sp, #68]
	str	wzr, [sp, #48]
	str	xzr, [sp, #40]
	str	wzr, [sp, #32]
	str	xzr, [sp, #24]
	str	w10, [sp, #16]
	str	x9, [sp, #8]
	str	w8, [sp]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_target_submit_cmd_map_sgls
	cbz	w0, LBB0_9
; %bb.7:
	mov	x1, x0
	ldr	w2, [x23]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
LBB0_8:
	mov	x0, x19
	bl	_target_send_busy
LBB0_9:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TCM_SIMPLE_TAG,4,2             ; @TCM_SIMPLE_TAG
	.comm	_TCM_ORDERED_TAG,4,2            ; @TCM_ORDERED_TAG
	.comm	_TCM_HEAD_TAG,4,2               ; @TCM_HEAD_TAG
	.comm	_TCM_ACA_TAG,4,2                ; @TCM_ACA_TAG
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%llx: parsing SRP descriptor table failed.\n"

	.comm	_TARGET_SCF_ACK_KREF,4,2        ; @TARGET_SCF_ACK_KREF
l_.str.1:                               ; @.str.1
	.asciz	"target_submit_cmd() returned %d for tag %#llx\n"

	.no_dead_strip	_srpt_handle_cmd
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.srpt_handle_cmd
l_switch.table.srpt_handle_cmd:
	.quad	_TCM_SIMPLE_TAG
	.quad	_TCM_ORDERED_TAG
	.quad	_TCM_HEAD_TAG
	.quad	_TCM_ACA_TAG

.subsections_via_symbols
