	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_nvram_read
_bnx2_nvram_read:                       ## @bnx2_nvram_read
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_bnx2_acquire_nvram_lock
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bnx2_enable_nvram_access
	movl	%r13d, %ebx
	andl	$3, %ebx
	je	LBB0_4
## %bb.5:
	andl	$-4, %r13d
	movl	$4, %edx
	subl	%ebx, %edx
	xorl	%ecx, %ecx
	movq	_BNX2_NVM_COMMAND_FIRST@GOTPCREL(%rip), %rax
	movl	%edx, -80(%rbp)                 ## 4-byte Spill
	cmpl	%r12d, %edx
	jl	LBB0_7
## %bb.6:
	movq	_BNX2_NVM_COMMAND_LAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	orl	(%rax), %ecx
	movl	%ecx, -76(%rbp)                 ## 4-byte Spill
	leaq	-64(%rbp), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_bnx2_nvram_read_dword
	testl	%eax, %eax
	je	LBB0_8
## %bb.26:
	movl	%eax, %r14d
	jmp	LBB0_27
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_4:
	xorl	%edx, %edx
	jmp	LBB0_9
LBB0_8:
	movl	-80(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r12d, %r14d
	cmovgel	%r12d, %r14d
	movl	%ebx, %eax
	leaq	-64(,%rax,4), %rsi
	addq	%rbp, %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	addl	$4, %r13d
	movslq	%r14d, %rax
	leaq	(%r15,%rax,4), %r15
	subl	%eax, %r12d
	movl	-76(%rbp), %edx                 ## 4-byte Reload
LBB0_9:
	movl	%r12d, %eax
	andl	$3, %eax
	leal	4(%r12), %ebx
	andl	$-4, %ebx
	testl	%eax, %eax
	cmovel	%r12d, %ebx
	movl	$4, %r12d
	cmovnel	%eax, %r12d
	cmpl	$4, %ebx
	jne	LBB0_14
## %bb.10:
	xorl	%ecx, %ecx
	movq	_BNX2_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	testl	%edx, %edx
	jne	LBB0_12
## %bb.11:
	movq	_BNX2_NVM_COMMAND_FIRST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_12:
	orl	(%rax), %ecx
	jmp	LBB0_13
LBB0_14:
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.17:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	jne	LBB0_19
## %bb.18:
	movq	_BNX2_NVM_COMMAND_FIRST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_19:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%r15, %rdx
	callq	_bnx2_nvram_read_dword
	movl	%eax, %r14d
	addl	$4, %r13d
	addq	$16, %r15
	testl	%eax, %eax
	sete	%al
	cmpl	$9, %ebx
	jb	LBB0_23
	.p2align	4, 0x90
## %bb.20:
	testl	%r14d, %r14d
	jne	LBB0_23
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_bnx2_nvram_read_dword
	movl	%eax, %r14d
	addl	$4, %r13d
	addq	$16, %r15
	testl	%eax, %eax
	sete	%al
	cmpl	$13, %ebx
	jb	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	addl	$-4, %ebx
	testl	%r14d, %r14d
	je	LBB0_21
LBB0_23:
	testb	%al, %al
	je	LBB0_27
## %bb.24:
	movq	_BNX2_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_13:
	leaq	-64(%rbp), %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%rdx, %r13
	callq	_bnx2_nvram_read_dword
	movl	%eax, %r14d
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	jmp	LBB0_16
LBB0_15:
	xorl	%r14d, %r14d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:
	movq	%rbx, %rdi
	callq	_bnx2_disable_nvram_access
	movq	%rbx, %rdi
	callq	_bnx2_release_nvram_lock
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.25:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_NVM_COMMAND_FIRST,4,2     ## @BNX2_NVM_COMMAND_FIRST
	.comm	_BNX2_NVM_COMMAND_LAST,4,2      ## @BNX2_NVM_COMMAND_LAST
	.no_dead_strip	_bnx2_nvram_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_nvram_read
_bnx2_nvram_read:                       ; @bnx2_nvram_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	w3, LBB0_5
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	bl	_bnx2_acquire_nvram_lock
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.2:
	mov	x0, x19
	bl	_bnx2_enable_nvram_access
	ands	w25, w23, #0x3
	b.eq	LBB0_6
; %bb.3:
	and	w23, w23, #0xfffffffc
	mov	w8, #4
Lloh3:
	adrp	x9, _BNX2_NVM_COMMAND_FIRST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BNX2_NVM_COMMAND_FIRST@GOTPAGEOFF]
Lloh5:
	adrp	x10, _BNX2_NVM_COMMAND_LAST@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BNX2_NVM_COMMAND_LAST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	sub	w26, w8, w25
	cmp	w26, w20
	csel	w8, wzr, w10, lt
	orr	w24, w8, w9
	add	x27, sp, #8
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x23
	mov	x3, x24
	bl	_bnx2_nvram_read_dword
	cbz	w0, LBB0_7
; %bb.4:
	mov	x22, x0
	b	LBB0_20
LBB0_5:
	mov	w22, #0
	b	LBB0_20
LBB0_6:
	mov	w24, #0
	b	LBB0_8
LBB0_7:
	cmp	w26, w20
	csel	w22, w26, w20, lt
	add	x1, x27, w25, uxtw #2
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	add	w23, w23, #4
	add	x21, x21, w22, sxtw #2
	sub	w20, w20, w22
LBB0_8:
	add	w8, w20, #4
	and	w8, w8, #0xfffffffc
	ands	w9, w20, #0x3
	csel	w25, w20, w8, eq
	mov	w8, #4
	csel	w20, w8, w9, eq
	cmp	w25, #4
	b.ne	LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _BNX2_NVM_COMMAND_LAST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BNX2_NVM_COMMAND_LAST@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _BNX2_NVM_COMMAND_FIRST@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BNX2_NVM_COMMAND_FIRST@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w24, #0
	csel	w9, w9, wzr, eq
	orr	w3, w9, w8
	b	LBB0_17
LBB0_10:
	cmp	w25, #1
	b.lt	LBB0_18
; %bb.11:
Lloh15:
	adrp	x8, _BNX2_NVM_COMMAND_FIRST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BNX2_NVM_COMMAND_FIRST@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w24, #0
	csel	w3, w8, wzr, eq
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_bnx2_nvram_read_dword
	mov	x22, x0
	add	w23, w23, #4
	add	x21, x21, #16
	cmp	w0, #0
	cset	w8, eq
	cmp	w25, #9
	b.lo	LBB0_15
; %bb.12:
	cbnz	w22, LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	mov	w3, #0
	bl	_bnx2_nvram_read_dword
	mov	x22, x0
	add	w23, w23, #4
	add	x21, x21, #16
	cmp	w0, #0
	cset	w8, eq
	cmp	w25, #13
	b.lo	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	sub	w25, w25, #4
	cbz	w22, LBB0_13
LBB0_15:
	cbz	w8, LBB0_20
; %bb.16:
Lloh18:
	adrp	x8, _BNX2_NVM_COMMAND_LAST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BNX2_NVM_COMMAND_LAST@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
LBB0_17:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x23
	bl	_bnx2_nvram_read_dword
	mov	x22, x0
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x20
	bl	_memcpy
	b	LBB0_19
LBB0_18:
	mov	w22, #0
LBB0_19:
	mov	x0, x19
	bl	_bnx2_disable_nvram_access
	mov	x0, x19
	bl	_bnx2_release_nvram_lock
LBB0_20:
	ldr	x8, [sp, #24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_NVM_COMMAND_FIRST,4,2     ; @BNX2_NVM_COMMAND_FIRST
	.comm	_BNX2_NVM_COMMAND_LAST,4,2      ; @BNX2_NVM_COMMAND_LAST
	.no_dead_strip	_bnx2_nvram_read
.subsections_via_symbols
