	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_alloc_ucontext             ## -- Begin function efa_alloc_ucontext
	.p2align	4, 0x90
_efa_alloc_ucontext:                    ## @efa_alloc_ucontext
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_eucontext
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_to_edev
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	leaq	16(%rax), %rdi
	leaq	-40(%rbp), %rsi
	callq	_efa_com_alloc_uar
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	movq	%r15, %rdi
	callq	_atomic64_inc
LBB0_6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-40(%rbp), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_xa_init
	movq	_EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE@GOTPCREL(%rip), %rax
	movq	_EFA_USER_CMDS_SUPP_UDATA_CREATE_AH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -52(%rbp)
	movl	12(%r15), %eax
	movl	%eax, -56(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -60(%rbp)
	movl	4(%r15), %eax
	movl	%eax, -64(%rbp)
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_6
## %bb.2:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:
	movl	$16, %edi
	callq	_min
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_ib_copy_to_udata
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	movl	-40(%rbp), %esi
	movq	%r15, %rdi
	callq	_efa_dealloc_uar
	movl	%r14d, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE,4,2 ## @EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE
	.comm	_EFA_USER_CMDS_SUPP_UDATA_CREATE_AH,4,2 ## @EFA_USER_CMDS_SUPP_UDATA_CREATE_AH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_alloc_ucontext             ; -- Begin function efa_alloc_ucontext
	.p2align	2
_efa_alloc_ucontext:                    ; @efa_alloc_ucontext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	bl	_to_eucontext
	mov	x22, x0
	ldr	w0, [x19]
	bl	_to_edev
	mov	x19, x0
	stp	xzr, xzr, [sp, #16]
	add	x0, x0, #16
	add	x1, sp, #8
	bl	_efa_com_alloc_uar
	mov	x21, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_atomic64_inc
	b	LBB0_7
LBB0_2:
	ldr	w8, [sp, #8]
	str	w8, [x22, #4]
	mov	x0, x22
	bl	_xa_init
Lloh0:
	adrp	x8, _EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EFA_USER_CMDS_SUPP_UDATA_CREATE_AH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EFA_USER_CMDS_SUPP_UDATA_CREATE_AH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #28]
	ldr	w8, [x19, #12]
	str	w8, [sp, #24]
	ldur	d0, [x19, #4]
	str	d0, [sp, #16]
	cbz	x20, LBB0_6
; %bb.3:
	ldr	x1, [x20]
	cbz	x1, LBB0_6
; %bb.4:
	mov	w0, #16
	bl	_min
	mov	x2, x0
	add	x1, sp, #16
	mov	x0, x20
	bl	_ib_copy_to_udata
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_efa_dealloc_uar
	b	LBB0_1
LBB0_6:
	mov	w21, #0
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE,4,2 ; @EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE
	.comm	_EFA_USER_CMDS_SUPP_UDATA_CREATE_AH,4,2 ; @EFA_USER_CMDS_SUPP_UDATA_CREATE_AH
.subsections_via_symbols
