	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_alloc_ucontext
_mlx4_ib_alloc_ucontext:                ## @mlx4_ib_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_to_mdev
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_mucontext
	cmpl	$0, 8(%r13)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	(%r12), %rcx
	movq	_MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION@GOTPCREL(%rip), %rbx
	movq	(%r13), %rax
	cmpq	(%rbx), %rcx
	jne	LBB0_4
## %bb.3:
	movl	12(%rax), %ecx
	movl	%ecx, -52(%rbp)
	movl	8(%rax), %ecx
	movl	%ecx, -56(%rbp)
	movl	4(%rax), %eax
	movl	%eax, -60(%rbp)
	jmp	LBB0_5
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_4:
	movl	16(%rax), %ecx
	movl	%ecx, -80(%rbp)
	movups	(%rax), %xmm0
	movaps	%xmm0, -96(%rbp)
LBB0_5:
	movq	%r12, %rdi
	callq	_to_mdev
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_mlx4_uar_alloc
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	leaq	16(%r14), %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%r14), %rdi
	callq	_mutex_init
	leaq	8(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_mutex_init
	movq	(%r12), %rax
	cmpq	(%rbx), %rax
	leaq	-64(%rbp), %rax
	leaq	-96(%rbp), %rsi
	cmoveq	%rax, %rsi
	movq	%r15, %rdi
	movl	$20, %edx
	callq	_ib_copy_to_udata
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_to_mdev
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_mlx4_uar_free
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION,8,3 ## @MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_mlx4_ib_alloc_ucontext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_alloc_ucontext
_mlx4_ib_alloc_ucontext:                ; @mlx4_ib_alloc_ucontext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	mov	x0, x19
	bl	_to_mdev
	mov	x22, x0
	mov	x0, x20
	bl	_to_mucontext
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x9, [x19]
Lloh0:
	adrp	x23, _MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION@GOTPAGEOFF]
	ldr	x10, [x23]
	ldr	x8, [x22]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	ldr	w9, [x8, #12]
	str	w9, [sp, #36]
	ldur	d0, [x8, #4]
	stur	d0, [sp, #28]
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w9, [x8, #16]
	str	w9, [sp, #16]
	ldr	q0, [x8]
	str	q0, [sp]
LBB0_5:
	mov	x0, x19
	bl	_to_mdev
	ldr	x0, [x0]
	mov	x1, x20
	bl	_mlx4_uar_alloc
	cbnz	w0, LBB0_9
; %bb.6:
	add	x0, x20, #16
	bl	_INIT_LIST_HEAD
	add	x0, x20, #12
	bl	_mutex_init
	add	x0, x20, #8
	bl	_INIT_LIST_HEAD
	add	x0, x20, #4
	bl	_mutex_init
	ldr	x8, [x19]
	ldr	x9, [x23]
	mov	x10, sp
	add	x11, sp, #24
	cmp	x8, x9
	csel	x1, x11, x10, eq
	mov	x0, x21
	mov	w2, #20
	bl	_ib_copy_to_udata
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_to_mdev
	ldr	x0, [x0]
	mov	x1, x20
	bl	_mlx4_uar_free
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION,8,3 ; @MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_mlx4_ib_alloc_ucontext
.subsections_via_symbols
