	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hl_cb_alloc
_hl_cb_alloc:                           ## @hl_cb_alloc
	.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	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_HL_KERNEL_ASID_ID@GOTPCREL(%rip), %r13
	cmpl	%edx, (%r13)
	jne	LBB0_2
## %bb.1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %rbx
	leaq	16(%rax), %rdx
	movq	8(%r15), %rax
	cmpl	%r12d, (%r13)
	jne	LBB0_7
## %bb.5:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_8
LBB0_7:
	movq	_GFP_USER@GOTPCREL(%rip), %rsi
	movq	___GFP_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
LBB0_8:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, 8(%rbx)
	movl	%r14d, (%rbx)
	jmp	LBB0_12
LBB0_10:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_kfree
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	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
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_USER,4,2                   ## @GFP_USER
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate %d of dma memory for CB\n"

	.no_dead_strip	_hl_cb_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hl_cb_alloc
_hl_cb_alloc:                           ; @hl_cb_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _HL_KERNEL_ASID_ID@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HL_KERNEL_ASID_ID@GOTPAGEOFF]
Lloh2:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh4:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, w2
	csel	x8, x23, x9, eq
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x24]
	ldr	x9, [x21, #8]
	ldr	x9, [x9]
	add	x2, x20, #16
Lloh6:
	adrp	x10, _GFP_USER@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GFP_USER@GOTPAGEOFF]
Lloh8:
	adrp	x11, ___GFP_ZERO@GOTPAGE
Lloh9:
	ldr	x11, [x11, ___GFP_ZERO@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	ldr	w11, [x11]
	orr	w10, w11, w10
	ldr	w11, [x23]
	cmp	w8, w22
	csel	w3, w11, w10, eq
	mov	x0, x21
	mov	x1, x19
	blr	x9
	cbz	x0, LBB0_3
; %bb.2:
	str	x0, [x20, #8]
	str	w19, [x20]
	b	LBB0_4
LBB0_3:
	ldr	w0, [x21]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	mov	x0, x20
	bl	_kfree
	mov	x20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HL_KERNEL_ASID_ID,4,2          ; @HL_KERNEL_ASID_ID
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_USER,4,2                   ; @GFP_USER
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate %d of dma memory for CB\n"

	.no_dead_strip	_hl_cb_alloc
.subsections_via_symbols
