	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp8psk_bcm4500_reload
_gp8psk_bcm4500_reload:                 ## @gp8psk_bcm4500_reload
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_deb_xfer
	movq	_BOOT_8PSK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_gp8psk_usb_in_op
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_gp8psk_usb_in_op
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_USB_PID_GENPIX_8PSK_REV_1_WARM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	callq	_gp8psk_load_bcm4500fw
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reloading firmware\n"

	.comm	_BOOT_8PSK,4,2                  ## @BOOT_8PSK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USB_PID_GENPIX_8PSK_REV_1_WARM,4,2 ## @USB_PID_GENPIX_8PSK_REV_1_WARM
	.no_dead_strip	_gp8psk_bcm4500_reload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp8psk_bcm4500_reload
_gp8psk_bcm4500_reload:                 ; @gp8psk_bcm4500_reload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_xfer
Lloh2:
	adrp	x21, _BOOT_8PSK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _BOOT_8PSK@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x4, sp, #12
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w5, #1
	bl	_gp8psk_usb_in_op
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	add	x4, sp, #12
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	mov	w5, #1
	bl	_gp8psk_usb_in_op
	cbz	x0, LBB0_4
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
Lloh7:
	adrp	x8, _USB_PID_GENPIX_8PSK_REV_1_WARM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _USB_PID_GENPIX_8PSK_REV_1_WARM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_gp8psk_load_bcm4500fw
	cbnz	x0, LBB0_2
	b	LBB0_3
LBB0_6:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reloading firmware\n"

	.comm	_BOOT_8PSK,4,2                  ; @BOOT_8PSK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USB_PID_GENPIX_8PSK_REV_1_WARM,4,2 ; @USB_PID_GENPIX_8PSK_REV_1_WARM
	.no_dead_strip	_gp8psk_bcm4500_reload
.subsections_via_symbols
