	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_setup_idc_param         ## -- Begin function qlcnic_setup_idc_param
	.p2align	4, 0x90
_qlcnic_setup_idc_param:                ## @qlcnic_setup_idc_param
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_QLCNIC_CRB_DEV_PARTITION_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLC_SHARED_REG_RD32
	movl	24(%rbx), %esi
	movl	%eax, %edi
	callq	_QLC_DEV_GET_DRV
	movl	%eax, %ecx
	andl	$3, %ecx
	movq	_QLCNIC_TYPE_NIC@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_1
## %bb.2:
	sarl	$2, %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	_QLCNIC_ROM_DEV_INIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_qlcnic_rom_fast_read
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_QLCNIC_INIT_TIMEOUT_SECS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	jmp	LBB0_5
LBB0_1:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	movl	-20(%rbp), %eax
LBB0_5:
	movl	%eax, (%rbx)
	movq	_QLCNIC_ROM_DRV_RESET_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_qlcnic_rom_fast_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_QLCNIC_RESET_TIMEOUT_SECS@GOTPCREL(%rip), %r14
LBB0_7:
	movl	(%r14), %eax
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_CRB_DEV_PARTITION_INFO,4,2 ## @QLCNIC_CRB_DEV_PARTITION_INFO
	.comm	_QLCNIC_TYPE_NIC,4,2            ## @QLCNIC_TYPE_NIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not an Ethernet NIC func=%u\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLCNIC_ROM_DEV_INIT_TIMEOUT,4,2 ## @QLCNIC_ROM_DEV_INIT_TIMEOUT
	.comm	_QLCNIC_INIT_TIMEOUT_SECS,4,2   ## @QLCNIC_INIT_TIMEOUT_SECS
	.comm	_QLCNIC_ROM_DRV_RESET_TIMEOUT,4,2 ## @QLCNIC_ROM_DRV_RESET_TIMEOUT
	.comm	_QLCNIC_RESET_TIMEOUT_SECS,4,2  ## @QLCNIC_RESET_TIMEOUT_SECS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_setup_idc_param         ; -- Begin function qlcnic_setup_idc_param
	.p2align	2
_qlcnic_setup_idc_param:                ; @qlcnic_setup_idc_param
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _QLCNIC_CRB_DEV_PARTITION_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLCNIC_CRB_DEV_PARTITION_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_QLC_SHARED_REG_RD32
	ldr	w1, [x19, #24]
	bl	_QLC_DEV_GET_DRV
	mov	x2, x0
	and	w8, w0, #0x3
Lloh3:
	adrp	x9, _QLCNIC_TYPE_NIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QLCNIC_TYPE_NIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	asr	w8, w2, #2
	ldr	x9, [x19, #8]
	str	w8, [x9]
Lloh6:
	adrp	x8, _QLCNIC_ROM_DEV_INIT_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QLCNIC_ROM_DEV_INIT_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_qlcnic_rom_fast_read
	cbz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _QLCNIC_INIT_TIMEOUT_SECS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QLCNIC_INIT_TIMEOUT_SECS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	b	LBB0_5
LBB0_3:
	ldr	x0, [x19, #16]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	ldr	w8, [sp, #12]
LBB0_5:
	str	w8, [x19]
Lloh17:
	adrp	x8, _QLCNIC_ROM_DRV_RESET_TIMEOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _QLCNIC_ROM_DRV_RESET_TIMEOUT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x20, sp, #12
	add	x2, sp, #12
	mov	x0, x19
	bl	_qlcnic_rom_fast_read
	mov	x8, x0
	mov	w0, #0
Lloh20:
	adrp	x9, _QLCNIC_RESET_TIMEOUT_SECS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _QLCNIC_RESET_TIMEOUT_SECS@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x20, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_CRB_DEV_PARTITION_INFO,4,2 ; @QLCNIC_CRB_DEV_PARTITION_INFO
	.comm	_QLCNIC_TYPE_NIC,4,2            ; @QLCNIC_TYPE_NIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not an Ethernet NIC func=%u\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLCNIC_ROM_DEV_INIT_TIMEOUT,4,2 ; @QLCNIC_ROM_DEV_INIT_TIMEOUT
	.comm	_QLCNIC_INIT_TIMEOUT_SECS,4,2   ; @QLCNIC_INIT_TIMEOUT_SECS
	.comm	_QLCNIC_ROM_DRV_RESET_TIMEOUT,4,2 ; @QLCNIC_ROM_DRV_RESET_TIMEOUT
	.comm	_QLCNIC_RESET_TIMEOUT_SECS,4,2  ; @QLCNIC_RESET_TIMEOUT_SECS
.subsections_via_symbols
