	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucma_alloc_ctx
_ucma_alloc_ctx:                        ## @ucma_alloc_ctx
	.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	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	leaq	24(%rax), %rdi
	movl	$1, %esi
	callq	_atomic_set
	leaq	20(%r15), %rdi
	callq	_init_completion
	leaq	16(%r15), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, 8(%r15)
	movq	%r15, %rbx
	addq	$4, %rbx
	movq	_ctx_idr@GOTPCREL(%rip), %r12
	movq	_mut@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_idr_pre_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_idr_get_new
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	je	LBB0_2
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	callq	_kfree
LBB0_7:
	xorl	%r15d, %r15d
LBB0_8:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ctx_idr,4,2                    ## @ctx_idr
	.comm	_mut,4,2                        ## @mut
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_ucma_alloc_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucma_alloc_ctx
_ucma_alloc_ctx:                        ; @ucma_alloc_ctx
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	add	x0, x19, #24
	mov	w1, #1
	bl	_atomic_set
	add	x0, x19, #20
	bl	_init_completion
	add	x0, x19, #16
	bl	_INIT_LIST_HEAD
	str	x20, [x19, #8]
	add	x21, x19, #4
Lloh2:
	adrp	x22, _ctx_idr@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ctx_idr@GOTPAGEOFF]
Lloh4:
	adrp	x23, _mut@GOTPAGE
Lloh5:
	ldr	x23, [x23, _mut@GOTPAGEOFF]
Lloh6:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x22
	bl	_idr_pre_get
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_mutex_lock
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_idr_get_new
	mov	x24, x0
	mov	x0, x23
	bl	_mutex_unlock
	ldr	w8, [x26]
	cmn	w24, w8
	b.eq	LBB0_2
; %bb.4:
	cbz	w24, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_list_add_tail
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ctx_idr,4,2                    ; @ctx_idr
	.comm	_mut,4,2                        ; @mut
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_ucma_alloc_ctx
.subsections_via_symbols
