	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_msgq_cmdq_copy_rsp
_bfa_msgq_cmdq_copy_rsp:                ## @bfa_msgq_cmdq_copy_rsp
	.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	%rdi, %r12
	leaq	8(%rdi), %r14
	movq	8(%rdi), %r15
	movq	40(%rdi), %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_BFI_MC_MSGQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BFI_MSGQ_H2I_CMDQ_COPY_RSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r15), %edi
	xorl	%ecx, %ecx
	callq	_bfi_h2i_set
	movl	32(%r12), %edi
	callq	_htons
	movl	%eax, 4(%r15)
	movl	(%r12), %eax
	movq	_BFI_CMD_COPY_SZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	24(%r12), %rax
	leaq	(,%rax,4), %rsi
	addq	%r13, %rsi
	movl	(%r15), %edi
	movl	%ebx, %edx
	callq	_memcpy
	incl	32(%r12)
	movslq	%ebx, %rax
	addq	%rax, 24(%r12)
	subl	%eax, (%r12)
	movq	16(%r12), %rax
	movl	(%rax), %edi
	movq	_bfa_msgq_cmdq_copy_next@GOTPCREL(%rip), %rdx
	movq	%r14, %rsi
	movq	%r12, %rcx
	callq	_bfa_nw_ioc_mbox_queue
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bfa_msgq_cmdq_copy_next        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BFI_MC_MSGQ,4,2                ## @BFI_MC_MSGQ
	.comm	_BFI_MSGQ_H2I_CMDQ_COPY_RSP,4,2 ## @BFI_MSGQ_H2I_CMDQ_COPY_RSP
	.comm	_BFI_CMD_COPY_SZ,4,2            ## @BFI_CMD_COPY_SZ
	.no_dead_strip	_bfa_msgq_cmdq_copy_rsp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_msgq_cmdq_copy_rsp
_bfa_msgq_cmdq_copy_rsp:                ; @bfa_msgq_cmdq_copy_rsp
	.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	x19, x0
	mov	x20, x0
	ldr	x21, [x20, #8]!
	ldr	x23, [x0, #40]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _BFI_MC_MSGQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BFI_MC_MSGQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BFI_MSGQ_H2I_CMDQ_COPY_RSP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BFI_MSGQ_H2I_CMDQ_COPY_RSP@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w0, [x21, #4]
	mov	w3, #0
	bl	_bfi_h2i_set
	ldr	w0, [x19, #32]
	bl	_htons
	str	w0, [x21, #4]
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _BFI_CMD_COPY_SZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BFI_CMD_COPY_SZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w22, w8, w9, lt
	ldr	x8, [x19, #24]
	add	x1, x23, x8, lsl #2
	ldr	w0, [x21]
	mov	x2, x22
	bl	_memcpy
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	ldp	x9, x8, [x19, #16]
	add	x8, x8, w22, sxtw
	str	x8, [x19, #24]
	ldr	w8, [x19]
	sub	w8, w8, w22
	str	w8, [x19]
	ldr	w0, [x9]
Lloh9:
	adrp	x2, _bfa_msgq_cmdq_copy_next@GOTPAGE
Lloh10:
	ldr	x2, [x2, _bfa_msgq_cmdq_copy_next@GOTPAGEOFF]
	mov	x1, x20
	mov	x3, x19
	bl	_bfa_nw_ioc_mbox_queue
	cbz	w0, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x0, x19
	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	_bfa_msgq_cmdq_copy_next
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BFI_MC_MSGQ,4,2                ; @BFI_MC_MSGQ
	.comm	_BFI_MSGQ_H2I_CMDQ_COPY_RSP,4,2 ; @BFI_MSGQ_H2I_CMDQ_COPY_RSP
	.comm	_BFI_CMD_COPY_SZ,4,2            ; @BFI_CMD_COPY_SZ
	.no_dead_strip	_bfa_msgq_cmdq_copy_rsp
.subsections_via_symbols
