	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pvr2_ioread_start
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_pvr2_ioread_start:                     ## @pvr2_ioread_start
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	cmpl	$0, (%rdi)
	je	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	cmpl	$0, 80(%rdi)
	je	LBB0_9
## %bb.2:
	movq	_PVR2_TRACE_START_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_pvr2_trace
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	80(%r14), %edi
	callq	_pvr2_stream_get_idle_buffer
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_pvr2_buffer_queue
	testl	%eax, %eax
	jns	LBB0_3
## %bb.5:
	movl	%eax, %ebx
	movq	_PVR2_TRACE_DATA_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	%r14, %rdi
	callq	_pvr2_ioread_stop
	jmp	LBB0_9
LBB0_6:
	movl	$1, (%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r14)
	movups	%xmm0, 56(%r14)
	movq	$0, 72(%r14)
	cmpq	$0, 32(%r14)
	je	LBB0_8
## %bb.7:
	movq	_PVR2_TRACE_DATA_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movl	$1, 4(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
LBB0_8:
	movq	$0, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_TRACE_START_STOP,4,2      ## @PVR2_TRACE_START_STOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/*---TRACE_READ---*/ pvr2_ioread_start id=%p"

	.comm	_PVR2_TRACE_DATA_FLOW,4,2       ## @PVR2_TRACE_DATA_FLOW
L_.str.1:                               ## @.str.1
	.asciz	"/*---TRACE_READ---*/ pvr2_ioread_start id=%p error=%d"

L_.str.2:                               ## @.str.2
	.asciz	"/*---TRACE_READ---*/ sync_state <== 1"

	.no_dead_strip	_pvr2_ioread_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_ioread_start
_pvr2_ioread_start:                     ; @pvr2_ioread_start
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_3
LBB0_1:
	mov	w20, #0
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	mov	x19, x0
	ldr	w8, [x0, #80]
	cbz	w8, LBB0_1
; %bb.4:
Lloh0:
	adrp	x8, _PVR2_TRACE_START_STOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_TRACE_START_STOP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pvr2_trace
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #80]
	bl	_pvr2_stream_get_idle_buffer
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_pvr2_buffer_queue
	tbz	w0, #31, LBB0_5
; %bb.7:
	mov	x20, x0
Lloh5:
	adrp	x8, _PVR2_TRACE_DATA_FLOW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PVR2_TRACE_DATA_FLOW@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	stp	x19, x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pvr2_trace
	mov	x0, x19
	bl	_pvr2_ioread_stop
	b	LBB0_2
LBB0_8:
	mov	w20, #1
	str	w20, [x19]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #40]
	stur	q0, [x19, #56]
	str	xzr, [x19, #72]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.9:
Lloh10:
	adrp	x8, _PVR2_TRACE_DATA_FLOW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PVR2_TRACE_DATA_FLOW@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_pvr2_trace
	str	w20, [x19, #4]
	stp	xzr, xzr, [x19, #16]
LBB0_10:
	mov	w20, #0
	str	xzr, [x19, #8]
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_TRACE_START_STOP,4,2      ; @PVR2_TRACE_START_STOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/*---TRACE_READ---*/ pvr2_ioread_start id=%p"

	.comm	_PVR2_TRACE_DATA_FLOW,4,2       ; @PVR2_TRACE_DATA_FLOW
l_.str.1:                               ; @.str.1
	.asciz	"/*---TRACE_READ---*/ pvr2_ioread_start id=%p error=%d"

l_.str.2:                               ; @.str.2
	.asciz	"/*---TRACE_READ---*/ sync_state <== 1"

	.no_dead_strip	_pvr2_ioread_start
.subsections_via_symbols
