	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnad_flash_device
_bnad_flash_device:                     ## @bnad_flash_device
	.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, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%rbx), %esi
	movq	16(%rax), %rdx
	leaq	-48(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_6
LBB0_2:
	movq	%r14, -56(%rbp)
	movl	$0, -64(%rbp)
	leaq	-60(%rbp), %r15
	movq	%r15, %rdi
	callq	_init_completion
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	addq	$8, %rdi
	movq	_BFA_FLASH_PART_FWIMG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	-48(%rbp), %rax
	movq	8(%rax), %rcx
	movl	(%rax), %r8d
	movq	_bnad_cb_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-64(%rbp), %r10
	xorl	%ebx, %ebx
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	%rax
	callq	_bfa_nw_flash_update_part
	addq	$16, %rsp
	movl	%eax, %r12d
	movq	_BFA_STATUS_OK@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movq	%r15, %rdi
	callq	_wait_for_completion
	movl	-64(%rbp), %esi
	cmpl	(%r13), %esi
	je	LBB0_6
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%ebx, %r12d
LBB0_6:
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BNA: Can't locate firmware %s\n"

	.comm	_BFA_FLASH_PART_FWIMG,4,2       ## @BFA_FLASH_PART_FWIMG
	.comm	_bnad_cb_completion,4,2         ## @bnad_cb_completion
	.comm	_BFA_STATUS_OK,4,2              ## @BFA_STATUS_OK
L_.str.1:                               ## @.str.1
	.asciz	"BNA: Flash update failed with err: %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"BNA: Firmware image update to flash failed with: %d\n"

	.no_dead_strip	_bnad_flash_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnad_flash_device
_bnad_flash_device:                     ; @bnad_flash_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	ldr	w1, [x21]
	ldr	x2, [x0, #16]
	add	x0, sp, #8
	bl	_request_firmware
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w1, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_6
LBB0_2:
	str	x19, [sp, #24]
	str	wzr, [sp, #16]
	add	x8, sp, #16
	orr	x21, x8, #0x4
	mov	x0, x21
	bl	_init_completion
	mov	x0, x19
	bl	_spin_lock_irq
	add	x0, x19, #8
Lloh2:
	adrp	x8, _BFA_FLASH_PART_FWIMG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BFA_FLASH_PART_FWIMG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	ldr	x8, [sp, #8]
	ldr	x3, [x8, #8]
	ldr	w4, [x8]
Lloh5:
	adrp	x8, _bnad_cb_completion@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bnad_cb_completion@GOTPAGEOFF]
Lloh7:
	ldr	w6, [x8]
	add	x7, sp, #16
	mov	w5, #0
	bl	_bfa_nw_flash_update_part
	mov	x20, x0
Lloh8:
	adrp	x22, _BFA_STATUS_OK@GOTPAGE
Lloh9:
	ldr	x22, [x22, _BFA_STATUS_OK@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x21
	bl	_wait_for_completion
	ldr	w1, [sp, #16]
	ldr	w8, [x22]
	cmp	w1, w8
	b.eq	LBB0_6
; %bb.4:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_warn
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_release_firmware
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BNA: Can't locate firmware %s\n"

	.comm	_BFA_FLASH_PART_FWIMG,4,2       ; @BFA_FLASH_PART_FWIMG
	.comm	_bnad_cb_completion,4,2         ; @bnad_cb_completion
	.comm	_BFA_STATUS_OK,4,2              ; @BFA_STATUS_OK
l_.str.1:                               ; @.str.1
	.asciz	"BNA: Flash update failed with err: %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"BNA: Firmware image update to flash failed with: %d\n"

	.no_dead_strip	_bnad_flash_device
.subsections_via_symbols
