	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_83xx_idc_first_to_load_function_handler
_qlcnic_83xx_idc_first_to_load_function_handler: ## @qlcnic_83xx_idc_first_to_load_function_handler
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_qlcnic_83xx_lock_driver
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	(%r14), %rdi
	movq	_QLC_83XX_RECOVER_DRV_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_QLCWRX
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_qlcnic_83xx_idc_update_major_version
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_qlcnic_83xx_unlock_driver
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_4:
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %rdi
	movq	_QLC_83XX_IDC_DEV_STATE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_QLCRDX
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_qlcnic_83xx_idc_check_state_validity
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_qlcnic_83xx_unlock_driver
	jmp	LBB0_1
LBB0_8:
	movq	_QLC_83XX_IDC_DEV_COLD@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	cmpq	%rdx, %rbx
	je	LBB0_11
## %bb.9:
	movq	_qlcnic_load_fw_file@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	movq	(%r14), %rdi
	movl	(%r15), %esi
	callq	_QLCWRX
	movq	(%r12), %rbx
LBB0_11:
	movq	(%r14), %rax
	movq	%rbx, (%rax)
	cmpq	(%r12), %rbx
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_qlcnic_83xx_idc_cold_state_handler
LBB0_13:
	movq	_qlcnic_auto_fw_reset@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	(%r14), %rdi
	movq	_QLC_83XX_IDC_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_QLCRDX
	movq	_QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	notq	%rdx
	andq	%rax, %rdx
	movq	(%r14), %rdi
	movl	(%rbx), %esi
	callq	_QLCWRX
LBB0_15:
	movq	%r14, %rdi
	callq	_qlcnic_83xx_unlock_driver
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLC_83XX_RECOVER_DRV_LOCK,4,2  ## @QLC_83XX_RECOVER_DRV_LOCK
	.comm	_QLC_83XX_IDC_DEV_STATE,4,2     ## @QLC_83XX_IDC_DEV_STATE
	.comm	_QLC_83XX_IDC_DEV_COLD,8,3      ## @QLC_83XX_IDC_DEV_COLD
	.comm	_qlcnic_load_fw_file,8,3        ## @qlcnic_load_fw_file
	.comm	_qlcnic_auto_fw_reset,8,3       ## @qlcnic_auto_fw_reset
	.comm	_QLC_83XX_IDC_CTRL,4,2          ## @QLC_83XX_IDC_CTRL
	.comm	_QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY,8,3 ## @QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY
	.no_dead_strip	_qlcnic_83xx_idc_first_to_load_function_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_83xx_idc_first_to_load_function_handler
_qlcnic_83xx_idc_first_to_load_function_handler: ; @qlcnic_83xx_idc_first_to_load_function_handler
	.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_83xx_lock_driver
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _QLC_83XX_RECOVER_DRV_LOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLC_83XX_RECOVER_DRV_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_QLCWRX
	mov	x0, x19
	mov	w1, #0
	bl	_qlcnic_83xx_idc_update_major_version
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19]
Lloh3:
	adrp	x21, _QLC_83XX_IDC_DEV_STATE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _QLC_83XX_IDC_DEV_STATE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_QLCRDX
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_qlcnic_83xx_idc_check_state_validity
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_qlcnic_83xx_unlock_driver
LBB0_4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
Lloh8:
	adrp	x22, _QLC_83XX_IDC_DEV_COLD@GOTPAGE
Lloh9:
	ldr	x22, [x22, _QLC_83XX_IDC_DEV_COLD@GOTPAGEOFF]
	ldr	x2, [x22]
Lloh10:
	adrp	x8, _qlcnic_load_fw_file@GOTPAGE
Lloh11:
	ldr	x8, [x8, _qlcnic_load_fw_file@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x20, x2
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_8
; %bb.7:
	ldr	x0, [x19]
	ldr	w1, [x21]
	bl	_QLCWRX
	ldr	x20, [x22]
LBB0_8:
	ldr	x8, [x19]
	str	x20, [x8]
	ldr	x8, [x22]
	cmp	x20, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_qlcnic_83xx_idc_cold_state_handler
LBB0_10:
Lloh13:
	adrp	x8, _qlcnic_auto_fw_reset@GOTPAGE
Lloh14:
	ldr	x8, [x8, _qlcnic_auto_fw_reset@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x0, [x19]
Lloh16:
	adrp	x20, _QLC_83XX_IDC_CTRL@GOTPAGE
Lloh17:
	ldr	x20, [x20, _QLC_83XX_IDC_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_QLCRDX
Lloh18:
	adrp	x8, _QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	bic	x2, x0, x8
	ldr	x0, [x19]
	ldr	w1, [x20]
	bl	_QLCWRX
LBB0_12:
	mov	x0, x19
	bl	_qlcnic_83xx_unlock_driver
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLC_83XX_RECOVER_DRV_LOCK,4,2  ; @QLC_83XX_RECOVER_DRV_LOCK
	.comm	_QLC_83XX_IDC_DEV_STATE,4,2     ; @QLC_83XX_IDC_DEV_STATE
	.comm	_QLC_83XX_IDC_DEV_COLD,8,3      ; @QLC_83XX_IDC_DEV_COLD
	.comm	_qlcnic_load_fw_file,8,3        ; @qlcnic_load_fw_file
	.comm	_qlcnic_auto_fw_reset,8,3       ; @qlcnic_auto_fw_reset
	.comm	_QLC_83XX_IDC_CTRL,4,2          ; @QLC_83XX_IDC_CTRL
	.comm	_QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY,8,3 ; @QLC_83XX_IDC_DISABLE_FW_RESET_RECOVERY
	.no_dead_strip	_qlcnic_83xx_idc_first_to_load_function_handler
.subsections_via_symbols
