	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octnic_alloc_ctrl_pkt_sc
_octnic_alloc_ctrl_pkt_sc:              ## @octnic_alloc_ctrl_pkt_sc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	16(%rsi), %r14d
	leal	(,%r14,8), %r12d
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r12d, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_octeon_alloc_soft_command
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%r15), %rsi
	movq	16(%rax), %r13
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_memcpy
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$3, %esi
	movq	%r13, %rdi
	callq	_octeon_swap_8B_data
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(,%rax,4), %rdi
	addq	%r13, %rdi
	movq	8(%r15), %rsi
	movl	%r12d, %edx
	callq	_memcpy
LBB0_4:
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	movq	_OPCODE_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPCODE_NIC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_octeon_prepare_soft_command
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_init_completion
	movq	_OCTEON_REQUEST_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ## @OCTNET_CMD_SIZE
	.comm	_OPCODE_NIC,4,2                 ## @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ## @OPCODE_NIC_CMD
	.comm	_OCTEON_REQUEST_PENDING,4,2     ## @OCTEON_REQUEST_PENDING
	.no_dead_strip	_octnic_alloc_ctrl_pkt_sc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octnic_alloc_ctrl_pkt_sc
_octnic_alloc_ctrl_pkt_sc:              ; @octnic_alloc_ctrl_pkt_sc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x20, x0
	mov	x23, x1
	ldr	w26, [x23, #16]!
	lsl	w22, w26, #3
Lloh0:
	adrp	x25, _OCTNET_CMD_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _OCTNET_CMD_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	add	w1, w8, w22
	mov	w2, #16
	mov	w3, #0
	bl	_octeon_alloc_soft_command
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x24, [x19, #16]
	ldr	w2, [x25]
	mov	x0, x24
	mov	x1, x23
	bl	_memcpy
	ldr	w8, [x25]
	asr	w1, w8, #3
	mov	x0, x24
	bl	_octeon_swap_8B_data
	cbz	w26, LBB0_3
; %bb.2:
	ldrsw	x8, [x25]
	add	x0, x24, x8, lsl #2
	ldr	x1, [x21, #8]
	mov	x2, x22
	bl	_memcpy
LBB0_3:
	ldr	x8, [x21]
	str	w8, [x19]
Lloh2:
	adrp	x8, _OPCODE_NIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OPCODE_NIC@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _OPCODE_NIC_CMD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OPCODE_NIC_CMD@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_octeon_prepare_soft_command
	add	x0, x19, #8
	bl	_init_completion
Lloh8:
	adrp	x8, _OCTEON_REQUEST_PENDING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OCTEON_REQUEST_PENDING@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ; @OCTNET_CMD_SIZE
	.comm	_OPCODE_NIC,4,2                 ; @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ; @OPCODE_NIC_CMD
	.comm	_OCTEON_REQUEST_PENDING,4,2     ; @OCTEON_REQUEST_PENDING
	.no_dead_strip	_octnic_alloc_ctrl_pkt_sc
.subsections_via_symbols
