	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_cpufw_get             ## -- Begin function pvr2_hdw_cpufw_get
	.p2align	4, 0x90
_pvr2_hdw_cpufw_get:                    ## @pvr2_hdw_cpufw_get
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	4(%rdi), %edi
	callq	_LOCK_TAKE
	testq	%r12, %r12
	je	LBB0_7
## %bb.1:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.2:
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.4:
	movl	(%r14), %eax
	movl	%eax, %ebx
	subl	%r15d, %ebx
	jbe	LBB0_5
## %bb.6:
	leal	(%r15,%r13), %ecx
	cmpl	%eax, %ecx
	cmovbel	%r13d, %ebx
	movl	%r15d, %eax
	addq	%rax, %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movq	_PVR2_TRACE_FIRMWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_pvr2_trace
	jmp	LBB0_7
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_PVR2_TRACE_FIRMWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_pvr2_trace
LBB0_7:
	movl	4(%r14), %edi
	callq	_LOCK_GIVE
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PVR2_TRACE_FIRMWARE,4,2        ## @PVR2_TRACE_FIRMWARE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read firmware data offs=%d EOF"

L_.str.1:                               ## @.str.1
	.asciz	"Read firmware data offs=%d cnt=%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_cpufw_get             ; -- Begin function pvr2_hdw_cpufw_get
	.p2align	2
_pvr2_hdw_cpufw_get:                    ; @pvr2_hdw_cpufw_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w0, [x0, #4]
	bl	_LOCK_TAKE
	cbz	x22, LBB0_7
; %bb.1:
	cbz	w23, LBB0_7
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w9, [x19]
	subs	w10, w9, w20
	b.ls	LBB0_6
; %bb.4:
	add	w11, w23, w20
	cmp	w11, w9
	csel	w21, w10, w23, hi
	add	x1, x8, w20, uxtw
	mov	x0, x22
	mov	x2, x21
	bl	_memcpy
Lloh3:
	adrp	x8, _PVR2_TRACE_FIRMWARE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR2_TRACE_FIRMWARE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _PVR2_TRACE_FIRMWARE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PVR2_TRACE_FIRMWARE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
	mov	w21, #0
LBB0_7:
	ldr	w0, [x19, #4]
	bl	_LOCK_GIVE
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PVR2_TRACE_FIRMWARE,4,2        ; @PVR2_TRACE_FIRMWARE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read firmware data offs=%d EOF"

l_.str.1:                               ; @.str.1
	.asciz	"Read firmware data offs=%d cnt=%d"

.subsections_via_symbols
