	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p54_read_eeprom                ## -- Begin function p54_read_eeprom
	.p2align	4, 0x90
_p54_read_eeprom:                       ## @p54_read_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_EEPROM_READBACK_LEN@GOTPCREL(%rip), %rax
	cmpl	$1289, (%r12)                   ## imm = 0x509
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	setl	-41(%rbp)                       ## 1-byte Folded Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8224, %ebx                     ## imm = 0x2020
	movl	$8224, %edi                     ## imm = 0x2020
	callq	_kzalloc
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %al
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r15
	addq	$-12, %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_min
	movq	%rax, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_p54_download_eeprom
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r12, %r14
	subq	%r12, %rbx
	jne	LBB0_2
## %bb.5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_p54_parse_eeprom
	movl	%eax, %r13d
	jmp	LBB0_6
LBB0_3:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_6:
	movq	%r15, %rdi
	callq	_kfree
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EEPROM_READBACK_LEN,8,3        ## @EEPROM_READBACK_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p54_read_eeprom                ; -- Begin function p54_read_eeprom
	.p2align	2
_p54_read_eeprom:                       ; @p54_read_eeprom
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _EEPROM_READBACK_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EEPROM_READBACK_LEN@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	ldr	w8, [x21]
	cmp	w8, #1288
	mov	x8, #-4
	mov	x9, #-12
	csel	x24, x9, x8, gt
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #8224
	bl	_kzalloc
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	neg	w25, w22
	b	LBB0_6
LBB0_2:
	mov	x22, #0
	add	x23, x24, x23
	mov	w24, #8224
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_min
	mov	x26, x0
	add	x1, x19, x22
	mov	x0, x21
	mov	x2, x22
	mov	x3, x26
	bl	_p54_download_eeprom
	mov	x25, x0
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x26, x22
	subs	x24, x24, x26
	b.ne	LBB0_3
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_p54_parse_eeprom
	mov	x25, x0
LBB0_6:
	mov	x0, x19
	bl	_kfree
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EEPROM_READBACK_LEN,8,3        ; @EEPROM_READBACK_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
