	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_hdw_check_firmware
_pvr2_hdw_check_firmware:               ## @pvr2_hdw_check_firmware
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_LOCK_TAKE
	movq	_FX2CMD_GET_EEPROM_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$1, %r8d
	movq	%rcx, %r9
	callq	_pvr2_send_request_ex
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_LOCK_GIVE
	movq	_PVR2_TRACE_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pvr2_trace
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
LBB0_3:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	sete	%al
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FX2CMD_GET_EEPROM_ADDR,4,2     ## @FX2CMD_GET_EEPROM_ADDR
	.comm	_HZ,4,2                         ## @HZ
	.comm	_PVR2_TRACE_INIT,4,2            ## @PVR2_TRACE_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Probe of device endpoint 1 result status %d"

L_.str.1:                               ## @.str.1
	.asciz	"Probe of device endpoint 1 succeeded"

	.no_dead_strip	_pvr2_hdw_check_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_hdw_check_firmware
_pvr2_hdw_check_firmware:               ; @pvr2_hdw_check_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	w0, [x0]
	bl	_LOCK_TAKE
Lloh0:
	adrp	x8, _FX2CMD_GET_EEPROM_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FX2CMD_GET_EEPROM_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x3, [x20, #8]
	str	w8, [x3]
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	mov	w4, #1
	mov	x5, x3
	mov	w6, #1
	bl	_pvr2_send_request_ex
	mov	x19, x0
	ldr	w0, [x20]
	bl	_LOCK_GIVE
Lloh6:
	adrp	x8, _PVR2_TRACE_INIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PVR2_TRACE_INIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	cbz	w19, LBB0_2
; %bb.1:
	str	x19, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_3:
	bl	_pvr2_trace
	cmp	w19, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FX2CMD_GET_EEPROM_ADDR,4,2     ; @FX2CMD_GET_EEPROM_ADDR
	.comm	_HZ,4,2                         ; @HZ
	.comm	_PVR2_TRACE_INIT,4,2            ; @PVR2_TRACE_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Probe of device endpoint 1 result status %d"

l_.str.1:                               ; @.str.1
	.asciz	"Probe of device endpoint 1 succeeded"

	.no_dead_strip	_pvr2_hdw_check_firmware
.subsections_via_symbols
