	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_context_set_notify
_pvr2_context_set_notify:               ## @pvr2_context_set_notify
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_pvr2_context_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	_pvr2_context_notify_first@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_pvr2_context_notify_last@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, (%rcx)
	leaq	8(%rdx), %rcx
	testq	%rdx, %rdx
	cmoveq	%rax, %rcx
	movq	%rbx, (%rcx)
	movl	$1, (%rbx)
	movq	_pvr2_context_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testq	%r14, %r14
	je	LBB0_3
## %bb.12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movl	$0, (%rbx)
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rcx, 16(%rax)
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
LBB0_9:
	movq	%rax, 8(%rcx)
	jmp	LBB0_11
LBB0_3:
	movq	_pvr2_context_sync_data@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
LBB0_7:
	movq	_pvr2_context_notify_last@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	testq	%rcx, %rcx
	jne	LBB0_9
LBB0_10:
	movq	_pvr2_context_notify_first@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_11:
	movq	_pvr2_context_mutex@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pvr2_context_mutex,4,2         ## @pvr2_context_mutex
	.comm	_pvr2_context_notify_first,8,3  ## @pvr2_context_notify_first
	.comm	_pvr2_context_notify_last,8,3   ## @pvr2_context_notify_last
	.comm	_pvr2_context_sync_data,4,2     ## @pvr2_context_sync_data
	.no_dead_strip	_pvr2_context_set_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_context_set_notify
_pvr2_context_set_notify:               ; @pvr2_context_set_notify
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _pvr2_context_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pvr2_context_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19]
	cbz	w20, LBB0_4
; %bb.1:
	cbnz	w8, LBB0_11
; %bb.2:
Lloh2:
	adrp	x8, _pvr2_context_notify_first@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pvr2_context_notify_first@GOTPAGEOFF]
	ldr	x20, [x8]
Lloh4:
	adrp	x9, _pvr2_context_notify_last@GOTPAGE
Lloh5:
	ldr	x9, [x9, _pvr2_context_notify_last@GOTPAGEOFF]
	ldr	x10, [x9]
	stp	xzr, x10, [x19, #8]
	str	x19, [x9]
	add	x9, x10, #8
	cmp	x10, #0
	csel	x8, x8, x9, eq
	str	x19, [x8]
	mov	w8, #1
	str	w8, [x19]
Lloh6:
	adrp	x0, _pvr2_context_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _pvr2_context_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	x20, LBB0_8
; %bb.3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	cbz	w8, LBB0_11
; %bb.5:
	str	wzr, [x19]
	ldp	x8, x9, [x19, #8]
	cbz	x8, LBB0_9
; %bb.6:
	str	x9, [x8, #16]
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_10
LBB0_7:
	str	x8, [x9, #8]
	b	LBB0_11
LBB0_8:
Lloh8:
	adrp	x0, _pvr2_context_sync_data@GOTPAGE
Lloh9:
	ldr	x0, [x0, _pvr2_context_sync_data@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_wake_up
LBB0_9:
Lloh10:
	adrp	x10, _pvr2_context_notify_last@GOTPAGE
Lloh11:
	ldr	x10, [x10, _pvr2_context_notify_last@GOTPAGEOFF]
Lloh12:
	str	x9, [x10]
	cbnz	x9, LBB0_7
LBB0_10:
Lloh13:
	adrp	x9, _pvr2_context_notify_first@GOTPAGE
Lloh14:
	ldr	x9, [x9, _pvr2_context_notify_first@GOTPAGEOFF]
Lloh15:
	str	x8, [x9]
LBB0_11:
Lloh16:
	adrp	x0, _pvr2_context_mutex@GOTPAGE
Lloh17:
	ldr	x0, [x0, _pvr2_context_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_pvr2_context_mutex,4,2         ; @pvr2_context_mutex
	.comm	_pvr2_context_notify_first,8,3  ; @pvr2_context_notify_first
	.comm	_pvr2_context_notify_last,8,3   ; @pvr2_context_notify_last
	.comm	_pvr2_context_sync_data,4,2     ; @pvr2_context_sync_data
	.no_dead_strip	_pvr2_context_set_notify
.subsections_via_symbols
