	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_parse_cb_mmu
_goya_parse_cb_mmu:                     ## @goya_parse_cb_mmu
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rsi), %rdx
	addq	$8, %rdx
	movq	%rdx, (%rsi)
	movq	_HL_KERNEL_ASID_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-44(%rbp), %rcx
	movq	%rdi, %rsi
	callq	_hl_cb_create
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_2:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	movb	(%r12), %cl
	movl	-44(%rbp), %eax
	sarl	%cl, %eax
	movl	%eax, -44(%rbp)
	movslq	%eax, %rdx
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_hl_cb_get
	movq	%rax, 16(%r15)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movslq	-44(%rbp), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_WARN
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%rax), %rdi
	movq	8(%r15), %rdx
	movq	24(%r15), %rax
	movq	(%rax), %rsi
	callq	_memcpy
	movq	(%r15), %r13
	movq	16(%r15), %rax
	movq	24(%r15), %r12
	movq	%rax, 24(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_goya_validate_cb
	movq	%r12, 24(%r15)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	callq	_hl_cb_put
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_3:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	cmpq	(%r15), %r13
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	je	LBB0_9
## %bb.7:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	16(%r15), %rdi
	callq	_hl_cb_put
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	-44(%rbp), %edx
	movb	(%r12), %cl
	shll	%cl, %edx
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_hl_cb_destroy
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HL_KERNEL_ASID_ID,4,2          ## @HL_KERNEL_ASID_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate patched CB for DMA CS %d\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"DMA CB handle invalid 0x%x\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.2:                               ## @.str.2
	.asciz	"user CB size mismatch\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_goya_parse_cb_mmu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_parse_cb_mmu
_goya_parse_cb_mmu:                     ; @goya_parse_cb_mmu
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	add	x2, x8, #8
	str	x2, [x1]
Lloh0:
	adrp	x8, _HL_KERNEL_ASID_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HL_KERNEL_ASID_ID@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	add	x3, sp, #12
	mov	x1, x0
	bl	_hl_cb_create
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19, #4]
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_11
LBB0_2:
Lloh5:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	asr	w8, w9, w8
	str	w8, [sp, #12]
	sxtw	x2, w8
	mov	x0, x19
	mov	x1, x19
	bl	_hl_cb_get
	str	x0, [x20, #16]
	cmp	x0, #0
	cset	w0, eq
	ldrsw	x2, [sp, #12]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_WARN
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x0, [x8]
	ldr	x8, [x20, #24]
	ldr	x1, [x8]
	ldr	x2, [x20, #8]
	bl	_memcpy
	ldr	x23, [x20]
	ldp	x8, x24, [x20, #16]
	str	x8, [x20, #24]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_goya_validate_cb
	str	x24, [x20, #24]
	cbz	w0, LBB0_6
; %bb.4:
	mov	x21, x0
	ldr	x0, [x20, #16]
	bl	_hl_cb_put
	b	LBB0_10
LBB0_5:
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	x8, [x20]
	cmp	x23, x8
	b.ne	LBB0_8
; %bb.7:
	mov	w21, #0
	b	LBB0_10
LBB0_8:
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x0, [x20, #16]
	bl	_hl_cb_put
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	lsl	w2, w8, w9
	mov	x0, x19
	mov	x1, x19
	bl	_hl_cb_destroy
LBB0_11:
	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	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HL_KERNEL_ASID_ID,4,2          ; @HL_KERNEL_ASID_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate patched CB for DMA CS %d\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"DMA CB handle invalid 0x%x\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.2:                               ; @.str.2
	.asciz	"user CB size mismatch\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_goya_parse_cb_mmu
.subsections_via_symbols
