	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p54_download_eeprom            ## -- Begin function p54_download_eeprom
	.p2align	4, 0x90
_p54_download_eeprom:                   ## @p54_download_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	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	leaq	4(%rcx), %r14
	leaq	40(%rcx), %rax
	cmpl	$1289, (%rdi)                   ## imm = 0x509
	movq	_P54_HDR_FLAG_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmovgeq	%rax, %r14
	movq	_P54_CONTROL_TYPE_EEPROM_READBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdx
	callq	_p54_alloc_skb
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	leaq	4(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r13)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_skb_put
	movq	%rax, %r14
	cmpl	$1288, (%r13)                   ## imm = 0x508
	jg	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_cpu_to_le16
	movq	%rax, 32(%r14)
	movq	%r12, %rdi
	callq	_cpu_to_le16
	movq	%rax, 24(%r14)
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_cpu_to_le32
	movl	%eax, 16(%r14)
	movq	%r12, %rdi
	callq	_cpu_to_le16
	movq	%rax, 8(%r14)
	movl	$15, (%r14)
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_5:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_p54_tx
	leaq	24(%r13), %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wait_for_completion_interruptible_timeout
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jg	LBB0_7
## %bb.6:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wiphy_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movq	$0, 8(%r13)
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P54_HDR_FLAG_CONTROL,4,2       ## @P54_HDR_FLAG_CONTROL
	.comm	_P54_CONTROL_TYPE_EEPROM_READBACK,4,2 ## @P54_CONTROL_TYPE_EEPROM_READBACK
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LOCK"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"device does not respond or signal received!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p54_download_eeprom            ; -- Begin function p54_download_eeprom
	.p2align	2
_p54_download_eeprom:                   ; @p54_download_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	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1288
	mov	w8, #4
	mov	w9, #40
	csel	x8, x9, x8, gt
Lloh0:
	adrp	x9, _P54_HDR_FLAG_CONTROL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _P54_HDR_FLAG_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x25, x8, x3
Lloh3:
	adrp	x8, _P54_CONTROL_TYPE_EEPROM_READBACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P54_CONTROL_TYPE_EEPROM_READBACK@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x2, x25
	bl	_p54_alloc_skb
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_2:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	str	x24, [x19, #8]
	mov	x0, x22
	mov	x1, x25
	bl	_skb_put
	mov	x24, x0
	ldr	w8, [x19]
	mov	x0, x23
	cmp	w8, #1288
	b.gt	LBB0_4
; %bb.3:
	bl	_cpu_to_le16
	str	x0, [x24, #32]
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [x24, #24]
	b	LBB0_5
LBB0_4:
	bl	_cpu_to_le32
	str	w0, [x24, #16]
	mov	x0, x21
	bl	_cpu_to_le16
	str	x0, [x24, #8]
	mov	w8, #15
	str	w8, [x24]
	ldr	w0, [x24, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_memcpy
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	bl	_p54_tx
	add	x0, x19, #24
Lloh14:
	adrp	x8, _HZ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_wait_for_completion_interruptible_timeout
	cmp	x0, #0
	b.le	LBB0_7
; %bb.6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_err
Lloh19:
	adrp	x8, _EBUSY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	str	xzr, [x19, #8]
	mov	x0, x20
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_P54_HDR_FLAG_CONTROL,4,2       ; @P54_HDR_FLAG_CONTROL
	.comm	_P54_CONTROL_TYPE_EEPROM_READBACK,4,2 ; @P54_CONTROL_TYPE_EEPROM_READBACK
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LOCK"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"device does not respond or signal received!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
