	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_can_start_firmware
_qlcnic_can_start_firmware:             ## @qlcnic_can_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %ebx
	movl	4(%rdi), %r15d
	movq	___QLCNIC_START_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r13), %rsi
	callq	_test_and_clear_bit
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movq	%r13, %rdi
	callq	_qlcnic_api_lock
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_2
LBB0_20:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_QLCNIC_CRB_DRV_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	movl	%eax, %r12d
	leal	(,%r15,4), %eax
	btl	%eax, %r12d
	jb	LBB0_4
## %bb.3:
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_QLC_DEV_SET_REF_CNT
	movq	_QLCNIC_CRB_DRV_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_QLC_SHARED_REG_WR32
LBB0_4:
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	movl	%eax, %r12d
	movq	_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%r12d, %ecx
	callq	_QLCDB
	addl	$-128, %r12d
	cmpl	$6, %r12d
	ja	LBB0_12
## %bb.5:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r12,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_10:
	movq	_QLCNIC_CRB_DRV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	movl	%eax, %r12d
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_QLC_DEV_SET_RST_RDY
	jmp	LBB0_11
LBB0_8:
	movq	_QLCNIC_CRB_DRV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	movl	%eax, %r12d
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_QLC_DEV_SET_QSCNT_RDY
LBB0_11:
	movq	_QLCNIC_CRB_DRV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_QLC_SHARED_REG_WR32
LBB0_12:
	movq	%r13, %rdi
	callq	_qlcnic_api_unlock
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	cmpl	$128, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	decl	%ebx
	jne	LBB0_13
	jmp	LBB0_16
LBB0_15:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.17:
	movq	%r13, %rdi
	callq	_qlcnic_api_lock
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:
	movq	_QLCNIC_CRB_DRV_STATE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_RD32
	movl	%eax, %r14d
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_QLC_DEV_CLR_RST_QSCNT
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_QLC_SHARED_REG_WR32
LBB0_6:
	movq	%r13, %rdi
	callq	_qlcnic_check_idc_ver
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_16:
	movq	8(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_20
LBB0_9:
	movq	8(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_7:
	movq	%r13, %rdi
	callq	_qlcnic_api_unlock
	jmp	LBB0_20
LBB0_19:
	movq	_QLCNIC_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$132, %edx
	callq	_QLC_SHARED_REG_WR32
	movq	_QLCNIC_CRB_DRV_IDC_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_DRV_IDC_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_QLC_SHARED_REG_WR32
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_qlcnic_idc_debug_info
	movq	%r13, %rdi
	callq	_qlcnic_api_unlock
	movl	$1, %r14d
	jmp	LBB0_20
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.comm	___QLCNIC_START_FW,4,2          ## @__QLCNIC_START_FW
	.comm	_QLCNIC_CRB_DRV_ACTIVE,4,2      ## @QLCNIC_CRB_DRV_ACTIVE
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ## @QLCNIC_CRB_DEV_STATE
	.comm	_HW,4,2                         ## @HW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device state = %u\n"

	.comm	_QLCNIC_CRB_DRV_IDC_VER,4,2     ## @QLCNIC_CRB_DRV_IDC_VER
	.comm	_QLCNIC_DRV_IDC_VER,4,2         ## @QLCNIC_DRV_IDC_VER
	.comm	_QLCNIC_CRB_DRV_STATE,4,2       ## @QLCNIC_CRB_DRV_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Device in failed state.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Waiting for device to initialize timeout\n"

	.no_dead_strip	_qlcnic_can_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_can_start_firmware
_qlcnic_can_start_firmware:             ; @qlcnic_can_start_firmware
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldp	w22, w20, [x0]
Lloh0:
	adrp	x8, ___QLCNIC_START_FW@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___QLCNIC_START_FW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_and_clear_bit
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #1
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_qlcnic_api_lock
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh3:
	adrp	x23, _QLCNIC_CRB_DRV_ACTIVE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _QLCNIC_CRB_DRV_ACTIVE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	lsl	w8, w20, #2
	lsr	w8, w0, w8
	tbnz	w8, #0, LBB0_7
; %bb.6:
	mov	x21, x0
	mov	x1, x20
	bl	_QLC_DEV_SET_REF_CNT
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x21
	bl	_QLC_SHARED_REG_WR32
LBB0_7:
Lloh5:
	adrp	x23, _QLCNIC_CRB_DEV_STATE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _QLCNIC_CRB_DEV_STATE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	mov	x21, x0
Lloh7:
	adrp	x8, _HW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HW@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_QLCDB
	sub	w8, w21, #128
	cmp	w8, #6
	b.hi	LBB0_12
; %bb.8:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh14:
	adrp	x8, _QLCNIC_CRB_DRV_STATE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QLCNIC_CRB_DRV_STATE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	mov	x21, x0
	mov	x1, x20
	bl	_QLC_DEV_SET_RST_RDY
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x8, _QLCNIC_CRB_DRV_STATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _QLCNIC_CRB_DRV_STATE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	mov	x21, x0
	mov	x1, x20
	bl	_QLC_DEV_SET_QSCNT_RDY
LBB0_11:
Lloh20:
	adrp	x8, _QLCNIC_CRB_DRV_STATE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _QLCNIC_CRB_DRV_STATE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_QLC_SHARED_REG_WR32
LBB0_12:
	mov	x0, x19
	bl	_qlcnic_api_unlock
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1000
	bl	_msleep
	ldr	w1, [x23]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	cmp	w0, #128
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_13
	b	LBB0_19
LBB0_15:
	cbz	w22, LBB0_19
; %bb.16:
	mov	x0, x19
	bl	_qlcnic_api_lock
	cbnz	x0, LBB0_3
; %bb.17:
Lloh23:
	adrp	x22, _QLCNIC_CRB_DRV_STATE@GOTPAGE
Lloh24:
	ldr	x22, [x22, _QLCNIC_CRB_DRV_STATE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	mov	x21, x0
	mov	x1, x20
	bl	_QLC_DEV_CLR_RST_QSCNT
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_QLC_SHARED_REG_WR32
LBB0_18:
	mov	x0, x19
	bl	_qlcnic_check_idc_ver
	mov	x20, x0
	mov	x0, x19
	bl	_qlcnic_api_unlock
	mov	x0, x20
	b	LBB0_4
LBB0_19:
	ldr	x0, [x19, #8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_20:
	ldr	x0, [x19, #8]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_qlcnic_api_unlock
	b	LBB0_3
LBB0_21:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #132
	bl	_QLC_SHARED_REG_WR32
Lloh29:
	adrp	x8, _QLCNIC_CRB_DRV_IDC_VER@GOTPAGE
Lloh30:
	ldr	x8, [x8, _QLCNIC_CRB_DRV_IDC_VER@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _QLCNIC_DRV_IDC_VER@GOTPAGE
Lloh33:
	ldr	x8, [x8, _QLCNIC_DRV_IDC_VER@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_WR32
	mov	x0, x19
	mov	w1, #0
	bl	_qlcnic_idc_debug_info
	mov	x0, x19
	bl	_qlcnic_api_unlock
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_18-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_10-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_20-LBB0_9)>>2
	.byte	(LBB0_21-LBB0_9)>>2
                                        ; -- End function
	.comm	___QLCNIC_START_FW,4,2          ; @__QLCNIC_START_FW
	.comm	_QLCNIC_CRB_DRV_ACTIVE,4,2      ; @QLCNIC_CRB_DRV_ACTIVE
	.comm	_QLCNIC_CRB_DEV_STATE,4,2       ; @QLCNIC_CRB_DEV_STATE
	.comm	_HW,4,2                         ; @HW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device state = %u\n"

	.comm	_QLCNIC_CRB_DRV_IDC_VER,4,2     ; @QLCNIC_CRB_DRV_IDC_VER
	.comm	_QLCNIC_DRV_IDC_VER,4,2         ; @QLCNIC_DRV_IDC_VER
	.comm	_QLCNIC_CRB_DRV_STATE,4,2       ; @QLCNIC_CRB_DRV_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Device in failed state.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Waiting for device to initialize timeout\n"

	.no_dead_strip	_qlcnic_can_start_firmware
.subsections_via_symbols
