	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_load_fw                     ## -- Begin function be_load_fw
	.p2align	4, 0x90
_be_load_fw:                            ## @be_load_fw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_netif_running
	movq	8(%r14), %rdx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	-32(%rbp), %rdi
	movq	%r15, %rsi
	callq	_request_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_dev_info
	movq	%r14, %rdi
	callq	_lancer_chip
	movq	-32(%rbp), %rsi
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	_lancer_fw_download
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rdx, %rdi
	callq	_dev_err
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_5:
	callq	_be_fw_download
LBB0_6:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%r14, %rdi
	callq	_be_cmd_get_fw_ver
	xorl	%ebx, %ebx
LBB0_8:
	movq	-32(%rbp), %rdi
	callq	_release_firmware
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware load not allowed (interface is down)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Flashing firmware file %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_load_fw                     ; -- Begin function be_load_fw
	.p2align	2
_be_load_fw:                            ; @be_load_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_netif_running
	ldr	x2, [x19, #8]
	cbz	w0, LBB0_6
; %bb.1:
	add	x0, sp, #8
	mov	x1, x21
	bl	_request_firmware
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_info
	mov	x0, x19
	bl	_lancer_chip
	ldr	x1, [sp, #8]
	cbz	x0, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_lancer_fw_download
	mov	x20, x0
	cbnz	w0, LBB0_5
LBB0_4:
	ldp	w2, w1, [x19]
	mov	x0, x19
	bl	_be_cmd_get_fw_ver
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_release_firmware
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x2
	bl	_dev_err
	mov	w20, #-1
LBB0_7:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_8:
	mov	x0, x19
	bl	_be_fw_download
	mov	x20, x0
	cbnz	w0, LBB0_5
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware load not allowed (interface is down)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Flashing firmware file %s\n"

.subsections_via_symbols
