	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_82xx_start_firmware
_qlcnic_82xx_start_firmware:            ## @qlcnic_82xx_start_firmware
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_qlcnic_can_start_firmware
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	je	LBB0_11
## %bb.3:
	movq	_qlcnic_load_fw_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_qlcnic_request_firmware
LBB0_7:
	movq	%r14, %rdi
	callq	_qlcnic_need_fw_reset
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movq	%r14, %rdi
	callq	_qlcnic_pinit_from_rom
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	callq	_qlcnic_load_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	%r14, %rdi
	callq	_qlcnic_release_firmware
	movq	_CRB_DRIVER_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_DRIVER_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_QLCWR32
LBB0_11:
	movq	%r14, %rdi
	callq	_qlcnic_check_fw_status
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_DEV_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_QLC_SHARED_REG_WR32
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_qlcnic_idc_debug_info
	movq	%r14, %rdi
	callq	_qlcnic_check_eswitch_mode
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_5:
	movq	%r14, %rdi
	callq	_qlcnic_check_flash_fw_ver
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	_QLCNIC_FLASH_ROMIMAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r14), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_7
LBB0_15:
	movq	%r14, %rdi
	callq	_qlcnic_set_mgmt_operations
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_16
LBB0_14:
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_DEV_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_QLC_SHARED_REG_WR32
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_17:
	movq	%r14, %rdi
	callq	_qlcnic_release_firmware
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	movq	%r14, %rdi
	callq	_qlcnic_check_options
	movq	$0, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_qlcnic_load_fw_file,8,3        ## @qlcnic_load_fw_file
	.comm	_QLCNIC_FLASH_ROMIMAGE,4,2      ## @QLCNIC_FLASH_ROMIMAGE
	.comm	_CRB_DRIVER_VERSION,4,2         ## @CRB_DRIVER_VERSION
	.comm	_QLCNIC_DRIVER_VERSION,4,2      ## @QLCNIC_DRIVER_VERSION
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ## @QLCNIC_CRB_DEV_STATE
	.comm	_QLCNIC_DEV_READY,4,2           ## @QLCNIC_DEV_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Memory allocation failed for eswitch\n"

	.comm	_QLCNIC_DEV_FAILED,4,2          ## @QLCNIC_DEV_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Device state set to failed\n"

	.no_dead_strip	_qlcnic_82xx_start_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_82xx_start_firmware
_qlcnic_82xx_start_firmware:            ; @qlcnic_82xx_start_firmware
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_qlcnic_can_start_firmware
	mov	x20, x0
	tbnz	w0, #31, LBB0_16
; %bb.1:
Lloh0:
	adrp	x21, _QLCNIC_CRB_DEV_STATE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _QLCNIC_CRB_DEV_STATE@GOTPAGEOFF]
	cbz	w20, LBB0_8
; %bb.2:
Lloh2:
	adrp	x8, _qlcnic_load_fw_file@GOTPAGE
Lloh3:
	ldr	x8, [x8, _qlcnic_load_fw_file@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.3:
	mov	x0, x19
	bl	_qlcnic_request_firmware
LBB0_4:
	mov	x0, x19
	bl	_qlcnic_need_fw_reset
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_qlcnic_pinit_from_rom
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.6:
	mov	x0, x19
	bl	_qlcnic_load_firmware
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.7:
	mov	x0, x19
	bl	_qlcnic_release_firmware
Lloh5:
	adrp	x8, _CRB_DRIVER_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CRB_DRIVER_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _QLCNIC_DRIVER_VERSION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QLCNIC_DRIVER_VERSION@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_QLCWR32
LBB0_8:
	mov	x0, x19
	bl	_qlcnic_check_fw_status
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.9:
	ldr	w1, [x21]
Lloh11:
	adrp	x8, _QLCNIC_DEV_READY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QLCNIC_DEV_READY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_WR32
	mov	x0, x19
	mov	w1, #1
	bl	_qlcnic_idc_debug_info
	mov	x0, x19
	bl	_qlcnic_check_eswitch_mode
	cbz	w0, LBB0_13
; %bb.10:
	mov	x20, x0
	ldr	x0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_qlcnic_check_flash_fw_ver
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.12:
Lloh16:
	adrp	x8, _QLCNIC_FLASH_ROMIMAGE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QLCNIC_FLASH_ROMIMAGE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	str	w8, [x9]
	b	LBB0_4
LBB0_13:
	mov	x0, x19
	bl	_qlcnic_set_mgmt_operations
	mov	x20, x0
	cbz	w0, LBB0_17
LBB0_14:
	ldr	w1, [x21]
Lloh19:
	adrp	x8, _QLCNIC_DEV_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _QLCNIC_DEV_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_WR32
	ldr	x0, [x19]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_15:
	mov	x0, x19
	bl	_qlcnic_release_firmware
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x0, x19
	bl	_qlcnic_check_options
	str	xzr, [x19, #8]
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_qlcnic_load_fw_file,8,3        ; @qlcnic_load_fw_file
	.comm	_QLCNIC_FLASH_ROMIMAGE,4,2      ; @QLCNIC_FLASH_ROMIMAGE
	.comm	_CRB_DRIVER_VERSION,4,2         ; @CRB_DRIVER_VERSION
	.comm	_QLCNIC_DRIVER_VERSION,4,2      ; @QLCNIC_DRIVER_VERSION
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ; @QLCNIC_CRB_DEV_STATE
	.comm	_QLCNIC_DEV_READY,4,2           ; @QLCNIC_DEV_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Memory allocation failed for eswitch\n"

	.comm	_QLCNIC_DEV_FAILED,4,2          ; @QLCNIC_DEV_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Device state set to failed\n"

	.no_dead_strip	_qlcnic_82xx_start_firmware
.subsections_via_symbols
