	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnad_get_eeprom
_bnad_get_eeprom:                       ## @bnad_get_eeprom
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	callq	_netdev_priv
	movq	%rax, %r15
	movq	$0, -48(%rbp)
	movq	16(%rax), %rax
	movl	4(%rax), %ecx
	shll	$16, %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	8(%r12), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_bnad_get_flash_partition_by_offset
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r15, -56(%rbp)
	movl	$0, -64(%rbp)
	leaq	-60(%rbp), %rdi
	callq	_init_completion
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	addq	$8, %rdi
	movl	4(%r15), %edx
	movl	16(%r12), %r8d
	movq	8(%r12), %r9
	subq	-48(%rbp), %r9
	movq	_bnad_cb_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-64(%rbp), %rbx
	movq	%r13, %rsi
	movq	%r14, %rcx
	pushq	%rbx
	pushq	%rax
	callq	_bfa_nw_flash_read_part
	addq	$16, %rsp
	movl	%eax, %ebx
	movq	_BFA_STATUS_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	cmpl	%r14d, %ebx
	jne	LBB0_4
## %bb.3:
	leaq	-60(%rbp), %rdi
	callq	_wait_for_completion
	movl	-64(%rbp), %ebx
	jmp	LBB0_4
LBB0_1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_bnad_cb_completion,4,2         ## @bnad_cb_completion
	.comm	_BFA_STATUS_OK,4,2              ## @BFA_STATUS_OK
	.no_dead_strip	_bnad_get_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnad_get_eeprom
_bnad_get_eeprom:                       ; @bnad_get_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x22, x1
	bl	_netdev_priv
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	x8, [x0, #16]
	ldp	w9, w8, [x8]
	orr	w8, w9, w8, lsl #16
	str	w8, [x22]
	ldr	x1, [x22, #8]
	add	x2, sp, #8
	bl	_bnad_get_flash_partition_by_offset
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
	str	x20, [sp, #24]
	str	wzr, [sp, #16]
	add	x8, sp, #16
	orr	x21, x8, #0x4
	mov	x0, x21
	bl	_init_completion
	mov	x0, x20
	mov	x1, #0
	bl	_spin_lock_irqsave
	add	x0, x20, #8
	ldr	w2, [x20, #4]
	ldr	w4, [x22, #16]
	ldr	x8, [x22, #8]
	ldr	x9, [sp, #8]
	sub	x5, x8, x9
Lloh0:
	adrp	x8, _bnad_cb_completion@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bnad_cb_completion@GOTPAGEOFF]
Lloh2:
	ldr	w6, [x8]
	add	x7, sp, #16
	mov	x1, x23
	mov	x3, x19
	bl	_bfa_nw_flash_read_part
	mov	x19, x0
Lloh3:
	adrp	x8, _BFA_STATUS_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BFA_STATUS_OK@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	cmp	w19, w22
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_wait_for_completion
	ldr	w19, [sp, #16]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_bnad_cb_completion,4,2         ; @bnad_cb_completion
	.comm	_BFA_STATUS_OK,4,2              ; @BFA_STATUS_OK
	.no_dead_strip	_bnad_get_eeprom
.subsections_via_symbols
