	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbp2scsi_queuecommand
_sbp2scsi_queuecommand:                 ## @sbp2scsi_queuecommand
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_DID_NO_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_sbp2util_node_is_available
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_SBP2_ERR
	jmp	LBB0_9
LBB0_3:
	movq	16(%r12), %rax
	movl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movl	(%r15), %edi
	callq	_hpsb_node_entry_valid
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_SBP2_ERR
	movq	_DID_BUS_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	(%r12), %rax
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_SBP2_ERR
	movq	_DID_ERROR@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	shll	$16, %ebx
	movl	%ebx, 8(%r12)
	movq	%r12, %rdi
	callq	*%r14
LBB0_10:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_sbp2_send_command
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	leaq	L_.str.3(%rip), %rdi
	callq	_SBP2_ERR
	movq	_SBP2_SCSI_STATUS_SELECTION_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_sbp2scsi_complete_command
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DID_NO_CONNECT,4,2             ## @DID_NO_CONNECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sbp2_fwhost_info is NULL - this is bad!"

L_.str.1:                               ## @.str.1
	.asciz	"Bus reset in progress - rejecting command"

	.comm	_DID_BUS_BUSY,4,2               ## @DID_BUS_BUSY
	.comm	_DMA_BIDIRECTIONAL,8,3          ## @DMA_BIDIRECTIONAL
L_.str.2:                               ## @.str.2
	.asciz	"Cannot handle DMA_BIDIRECTIONAL - rejecting command"

	.comm	_DID_ERROR,4,2                  ## @DID_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"Error sending SCSI command"

	.comm	_SBP2_SCSI_STATUS_SELECTION_TIMEOUT,4,2 ## @SBP2_SCSI_STATUS_SELECTION_TIMEOUT
	.no_dead_strip	_sbp2scsi_queuecommand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbp2scsi_queuecommand
_sbp2scsi_queuecommand:                 ; @sbp2scsi_queuecommand
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _DID_NO_CONNECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DID_NO_CONNECT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_sbp2util_node_is_available
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.1:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SBP2_ERR
	b	LBB0_9
LBB0_3:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.4:
	ldr	w0, [x21]
	bl	_hpsb_node_entry_valid
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SBP2_ERR
Lloh7:
	adrp	x8, _DID_BUS_BUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DID_BUS_BUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x20]
Lloh9:
	adrp	x9, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.7:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_SBP2_ERR
Lloh14:
	adrp	x8, _DID_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DID_ERROR@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
LBB0_9:
	lsl	w8, w22, #16
	str	w8, [x20, #8]
	mov	x0, x20
	blr	x19
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_sbp2_send_command
	cbz	x0, LBB0_10
; %bb.12:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_SBP2_ERR
Lloh18:
	adrp	x8, _SBP2_SCSI_STATUS_SELECTION_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SBP2_SCSI_STATUS_SELECTION_TIMEOUT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_sbp2scsi_complete_command
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DID_NO_CONNECT,4,2             ; @DID_NO_CONNECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sbp2_fwhost_info is NULL - this is bad!"

l_.str.1:                               ; @.str.1
	.asciz	"Bus reset in progress - rejecting command"

	.comm	_DID_BUS_BUSY,4,2               ; @DID_BUS_BUSY
	.comm	_DMA_BIDIRECTIONAL,8,3          ; @DMA_BIDIRECTIONAL
l_.str.2:                               ; @.str.2
	.asciz	"Cannot handle DMA_BIDIRECTIONAL - rejecting command"

	.comm	_DID_ERROR,4,2                  ; @DID_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"Error sending SCSI command"

	.comm	_SBP2_SCSI_STATUS_SELECTION_TIMEOUT,4,2 ; @SBP2_SCSI_STATUS_SELECTION_TIMEOUT
	.no_dead_strip	_sbp2scsi_queuecommand
.subsections_via_symbols
