	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_alloc_ucontext
_mthca_alloc_ucontext:                  ## @mthca_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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movq	$0, -40(%rbp)
	callq	_to_mucontext
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_mdev
	cmpl	$0, 12(%rax)
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_to_mdev
	movl	8(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	%rax, %rdi
	callq	_mthca_is_memfree
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	(%rax), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	movq	%rax, -48(%rbp)
	movq	%rbx, %rdi
	callq	_to_mdev
	leaq	8(%r14), %r12
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_mthca_uar_alloc
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	%rax, %rdi
	callq	_mthca_init_user_db_tab
	movl	%eax, 12(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	12(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_mthca_uar_free
	movl	%r14d, %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_ib_copy_to_udata
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_to_mdev
	movl	12(%r14), %edx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_mthca_cleanup_user_db_tab
	movq	%rbx, %rdi
	callq	_to_mdev
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_mthca_uar_free
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_11:
	movq	$0, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_mthca_alloc_ucontext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_alloc_ucontext
_mthca_alloc_ucontext:                  ; @mthca_alloc_ucontext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	ldr	x19, [x0]
	str	xzr, [sp, #8]
	bl	_to_mucontext
	mov	x20, x0
	mov	x0, x19
	bl	_to_mdev
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_to_mdev
	ldr	w8, [x0, #8]
	str	w8, [sp, #8]
	mov	x0, x19
	bl	_to_mdev
	bl	_mthca_is_memfree
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_to_mdev
	ldr	x8, [x0]
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x8, #0
LBB0_6:
	str	x8, [sp]
	mov	x0, x19
	bl	_to_mdev
	add	x22, x20, #8
	mov	x1, x22
	bl	_mthca_uar_alloc
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_to_mdev
	bl	_mthca_init_user_db_tab
	str	w0, [x20, #12]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w0, [x20, #12]
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_to_mdev
	mov	x1, x22
	bl	_mthca_uar_free
	mov	x0, x20
LBB0_9:
	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
	add	sp, sp, #64
	ret
LBB0_10:
	mov	x1, sp
	mov	x0, x21
	mov	w2, #16
	bl	_ib_copy_to_udata
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_to_mdev
	ldr	w2, [x20, #12]
	mov	x1, x22
	bl	_mthca_cleanup_user_db_tab
	mov	x0, x19
	bl	_to_mdev
	mov	x1, x22
	bl	_mthca_uar_free
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_4
LBB0_12:
	str	xzr, [x20]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_mthca_alloc_ucontext
.subsections_via_symbols
