	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_ioread_set_sync_key       ## -- Begin function pvr2_ioread_set_sync_key
	.p2align	4, 0x90
_pvr2_ioread_set_sync_key:              ## @pvr2_ioread_set_sync_key
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	cmovnel	%edx, %ebx
	movl	(%rdi), %eax
	cmpl	%eax, %ebx
	jne	LBB0_5
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.3:
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_16
## %bb.4:
	movl	(%r12), %eax
LBB0_5:
	cmpl	%eax, %ebx
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %r15d
	testl	%r15d, %r15d
	je	LBB0_16
LBB0_14:
	movq	8(%r12), %rdi
	jmp	LBB0_15
LBB0_7:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_kfree
	movq	$0, 8(%r12)
LBB0_9:
	movl	$0, (%r12)
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, %rdi
	movl	%ebx, (%r12)
LBB0_15:
	movq	%r14, %rsi
	movl	%r15d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_12:
	movl	(%r12), %r15d
	testl	%r15d, %r15d
	jne	LBB0_14
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_ioread_set_sync_key       ; -- Begin function pvr2_ioread_set_sync_key
	.p2align	2
_pvr2_ioread_set_sync_key:              ; @pvr2_ioread_set_sync_key
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmp	x1, #0
	csel	w22, wzr, w2, eq
	ldr	w8, [x0]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.2:
	cbz	w22, LBB0_15
; %bb.3:
	ldr	x1, [x21, #8]
	mov	x0, x19
	mov	x2, x22
	bl	_memcmp
	cbz	w0, LBB0_15
; %bb.4:
	ldr	w8, [x21]
LBB0_5:
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.6:
	mov	x20, x22
	cbz	w20, LBB0_15
LBB0_7:
	ldr	x0, [x21, #8]
	b	LBB0_13
LBB0_8:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_kfree
	str	xzr, [x21, #8]
LBB0_10:
	str	wzr, [x21]
	cbz	w22, LBB0_15
; %bb.11:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_kmalloc
	str	x0, [x21, #8]
	cbz	x0, LBB0_14
; %bb.12:
	str	w22, [x21]
LBB0_13:
	mov	x1, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_memcpy
LBB0_14:
	ldr	w20, [x21]
	cbnz	w20, LBB0_7
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
