	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_flash_write_send
_bfa_flash_write_send:                  ## @bfa_flash_write_send
	.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	%rdi, %rbx
	leaq	40(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rdi
	movq	40(%rbx), %r12
	callq	_be32_to_cpu
	movq	%rax, 40(%r12)
	movl	60(%rbx), %eax
	movl	%eax, 32(%r12)
	movq	16(%rbx), %rdi
	addq	8(%rbx), %rdi
	callq	_be32_to_cpu
	movq	%rax, 24(%r12)
	movq	24(%rbx), %rax
	movq	_BFA_FLASH_DMA_BUF_SZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	cmpq	%r15, %rax
	cmovlq	%rax, %r15
	movq	%r15, %rdi
	callq	_be32_to_cpu
	movq	%rax, 16(%r12)
	xorl	%eax, %eax
	cmpq	24(%rbx), %r15
	sete	%al
	movl	%eax, (%r12)
	movl	8(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_BFI_MC_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_BFI_FLASH_H2I_WRITE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	48(%rbx), %edi
	callq	_bfa_ioc_portid
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_bfi_h2i_set
	addq	$4, %r12
	movl	56(%rbx), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_bfa_alen_set
	movl	52(%rbx), %edi
	movq	16(%rbx), %rsi
	addq	32(%rbx), %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movl	48(%rbx), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bfa_nw_ioc_mbox_queue
	subq	%r15, 24(%rbx)
	addq	%r15, 16(%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BFA_FLASH_DMA_BUF_SZ,8,3       ## @BFA_FLASH_DMA_BUF_SZ
	.comm	_BFI_MC_FLASH,4,2               ## @BFI_MC_FLASH
	.comm	_BFI_FLASH_H2I_WRITE_REQ,4,2    ## @BFI_FLASH_H2I_WRITE_REQ
	.no_dead_strip	_bfa_flash_write_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_flash_write_send
_bfa_flash_write_send:                  ; @bfa_flash_write_send
	.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	x19, x0
	mov	x20, x0
	ldr	x25, [x20, #40]!
	ldr	x0, [x0]
	bl	_be32_to_cpu
	str	x0, [x25, #40]
	ldr	w8, [x19, #60]
	str	w8, [x25, #32]
	ldp	x8, x9, [x19, #8]
	add	x0, x9, x8
	bl	_be32_to_cpu
	str	x0, [x25, #24]
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x9, _BFA_FLASH_DMA_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BFA_FLASH_DMA_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x21, x8, x9, lt
	mov	x0, x21
	bl	_be32_to_cpu
	str	x0, [x25, #16]
	ldr	x8, [x19, #24]
	cmp	x21, x8
	cset	w8, eq
	str	w8, [x25]
Lloh3:
	adrp	x8, _BFI_MC_FLASH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BFI_MC_FLASH@GOTPAGEOFF]
	ldr	w22, [x25, #8]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _BFI_FLASH_H2I_WRITE_REQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BFI_FLASH_H2I_WRITE_REQ@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	ldr	w0, [x19, #48]
	bl	_bfa_ioc_portid
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_bfi_h2i_set
	add	x0, x25, #4
	ldr	w2, [x19, #56]
	mov	x1, x21
	bl	_bfa_alen_set
	ldr	w0, [x19, #52]
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #16]
	add	x1, x9, x8
	mov	x2, x21
	bl	_memcpy
	ldr	w0, [x19, #48]
	mov	x1, x20
	mov	x2, #0
	mov	x3, #0
	bl	_bfa_nw_ioc_mbox_queue
	ldp	x9, x8, [x19, #16]
	sub	x8, x8, x21
	add	x9, x9, x21
	stp	x9, x8, [x19, #16]
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BFA_FLASH_DMA_BUF_SZ,8,3       ; @BFA_FLASH_DMA_BUF_SZ
	.comm	_BFI_MC_FLASH,4,2               ; @BFI_MC_FLASH
	.comm	_BFI_FLASH_H2I_WRITE_REQ,4,2    ; @BFI_FLASH_H2I_WRITE_REQ
	.no_dead_strip	_bfa_flash_write_send
.subsections_via_symbols
