	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_spa
_alloc_spa:                             ## @alloc_spa
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	24(%rax), %rdi
	callq	_mutex_init
	leaq	20(%rbx), %rdi
	movl	(%r12), %esi
	callq	_INIT_RADIX_TREE
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	_xsl_fault_handler_bh@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	_SPA_SPA_SIZE_LOG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	%rsi, 8(%rbx)
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r12), %edi
	callq	___get_free_pages
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	16(%r14), %esi
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %r8
	callq	_pr_debug
	movq	%rbx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_xsl_fault_handler_bh,4,2       ## @xsl_fault_handler_bh
	.comm	_SPA_SPA_SIZE_LOG,8,3           ## @SPA_SPA_SIZE_LOG
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't allocate Shared Process Area\n"

L_.str.1:                               ## @.str.1
	.asciz	"Allocated SPA for %x:%x:%x at %p\n"

	.no_dead_strip	_alloc_spa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_spa
_alloc_spa:                             ; @alloc_spa
	.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
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x0, x0, #24
	bl	_mutex_init
	add	x0, x20, #20
	ldr	w1, [x22]
	bl	_INIT_RADIX_TREE
	add	x0, x20, #16
Lloh2:
	adrp	x8, _xsl_fault_handler_bh@GOTPAGE
Lloh3:
	ldr	x8, [x8, _xsl_fault_handler_bh@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh5:
	adrp	x8, _SPA_SPA_SIZE_LOG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPA_SPA_SIZE_LOG@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	sub	x1, x8, x9
	str	x1, [x20, #8]
	ldr	w8, [x22]
Lloh11:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	___get_free_pages
	str	x0, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x4, x0
	ldp	w2, w1, [x19, #12]
	ldr	w3, [x19, #8]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_5
LBB0_3:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x20
	bl	_kfree
LBB0_4:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_xsl_fault_handler_bh,4,2       ; @xsl_fault_handler_bh
	.comm	_SPA_SPA_SIZE_LOG,8,3           ; @SPA_SPA_SIZE_LOG
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate Shared Process Area\n"

l_.str.1:                               ; @.str.1
	.asciz	"Allocated SPA for %x:%x:%x at %p\n"

	.no_dead_strip	_alloc_spa
.subsections_via_symbols
