	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbp2_link_orb_command
_sbp2_link_orb_command:                 ## @sbp2_link_orb_command
	.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	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	40(%rdi), %r12
	movl	32(%rdi), %ebx
	addq	$12, %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	24(%r15), %r14
	testq	%r14, %r14
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	16(%r15), %r13
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_dma_sync_single_for_cpu
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_cpu_to_be32
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	callq	_wmb
	movq	$0, (%r14)
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_dma_sync_single_for_device
	movq	_SBP2_DOORBELL_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	$0, -64(%rbp)
	movl	$4, %r13d
	jmp	LBB0_3
LBB0_1:
	movq	_SBP2_ORB_POINTER_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	(%r12), %rax
	movl	4(%rax), %edi
	callq	_ORB_SET_NODE_ID
	movq	%rax, -64(%rbp)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	leaq	-64(%rbp), %rdi
	movl	$8, %esi
	callq	_sbp2util_cpu_to_be32_buffer
	movl	$8, %r13d
LBB0_3:
	addl	%r14d, %ebx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	8(%rcx), %rax
	movq	%rax, 24(%r15)
	movq	(%rcx), %rax
	movq	%rax, 16(%r15)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	8(%r15), %edi
	leaq	-64(%rbp), %rdx
	movl	%ebx, %esi
	movq	%r13, %rcx
	callq	_sbp2util_node_write_no_wait
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	4(%r15), %edi
	callq	_scsi_block_requests
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.6:
	movq	_sbp2util_write_orb_pointer@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_sbp2util_write_doorbell@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_PREPARE_WORK
	movq	%r15, %rdi
	callq	_schedule_work
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SBP2_ORB_POINTER_OFFSET,8,3    ## @SBP2_ORB_POINTER_OFFSET
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_SBP2_DOORBELL_OFFSET,8,3       ## @SBP2_DOORBELL_OFFSET
	.comm	_sbp2util_write_doorbell,4,2    ## @sbp2util_write_doorbell
	.comm	_sbp2util_write_orb_pointer,4,2 ## @sbp2util_write_orb_pointer
	.no_dead_strip	_sbp2_link_orb_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbp2_link_orb_command
_sbp2_link_orb_command:                 ; @sbp2_link_orb_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x25, [x0, #40]
	ldr	w23, [x0, #32]
	add	x21, x0, #12
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x24, [x19, #24]
	cbz	x24, LBB0_2
; %bb.1:
	ldr	x22, [x19, #16]
	ldr	x8, [x25]
	ldr	w0, [x8]
Lloh3:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x1, x22
	mov	w2, #16
	bl	_dma_sync_single_for_cpu
	ldr	x0, [x20]
	bl	_cpu_to_be32
	str	w0, [x24, #8]
	bl	_wmb
	str	xzr, [x24]
	ldr	x8, [x25]
	ldr	w0, [x8]
	ldr	w3, [x26]
	mov	x1, x22
	mov	w2, #16
	bl	_dma_sync_single_for_device
Lloh5:
	adrp	x8, _SBP2_DOORBELL_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SBP2_DOORBELL_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	x26, [x8]
	str	xzr, [sp, #8]
	mov	w22, #4
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _SBP2_ORB_POINTER_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBP2_ORB_POINTER_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	x26, [x8]
	ldr	x8, [x25]
	ldr	w0, [x8, #4]
	bl	_ORB_SET_NODE_ID
	ldr	x8, [x20]
	stp	x0, x8, [sp, #8]
	mov	w22, #8
	add	x0, sp, #8
	mov	w1, #8
	bl	_sbp2util_cpu_to_be32_buffer
LBB0_3:
	ldr	x8, [x20], #8
	add	w23, w23, w26
	stp	x8, x20, [x19, #16]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #8]
	add	x2, sp, #8
	mov	x1, x23
	mov	x3, x22
	bl	_sbp2util_node_write_no_wait
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
	bl	_scsi_block_requests
Lloh11:
	adrp	x8, _sbp2util_write_doorbell@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sbp2util_write_doorbell@GOTPAGEOFF]
Lloh13:
	adrp	x9, _sbp2util_write_orb_pointer@GOTPAGE
Lloh14:
	ldr	x9, [x9, _sbp2util_write_orb_pointer@GOTPAGEOFF]
	cmp	x24, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_PREPARE_WORK
	mov	x0, x19
	bl	_schedule_work
LBB0_5:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SBP2_ORB_POINTER_OFFSET,8,3    ; @SBP2_ORB_POINTER_OFFSET
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_SBP2_DOORBELL_OFFSET,8,3       ; @SBP2_DOORBELL_OFFSET
	.comm	_sbp2util_write_doorbell,4,2    ; @sbp2util_write_doorbell
	.comm	_sbp2util_write_orb_pointer,4,2 ; @sbp2util_write_orb_pointer
	.no_dead_strip	_sbp2_link_orb_command
.subsections_via_symbols
