	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_alloc_mr               ## -- Begin function mlx4_ib_alloc_mr
	.p2align	4, 0x90
_mlx4_ib_alloc_mr:                      ## @mlx4_ib_alloc_mr
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %r13
	movq	_IB_MR_TYPE_MEM_REG@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_MLX4_MAX_FAST_REG_PAGES@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jl	LBB0_2
## %bb.5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movl	(%r13), %ebx
	movq	%r12, %rdi
	callq	_to_mpd
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	%r14d, %r9d
	pushq	%r15
	pushq	$0
	callq	_mlx4_mr_alloc
	addq	$16, %rsp
	movq	%r13, %rbx
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movl	(%r12), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_mlx4_alloc_priv_pages
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	%r14d, 24(%r15)
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_mlx4_mr_enable
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movl	%eax, %r13d
	movl	(%r12), %eax
	movl	%eax, 4(%r15)
	movq	%r15, %rdi
	callq	_mlx4_free_priv_pages
LBB0_11:
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_mlx4_mr_free
LBB0_12:
	movq	%r15, %rdi
	callq	_kfree
	movl	%r13d, %edi
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movl	(%r15), %ecx
	movq	%r15, %rax
	addq	$4, %rax
	movl	%ecx, 8(%r15)
	movl	%ecx, 12(%r15)
	movq	$0, 16(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MR_TYPE_MEM_REG,4,2         ## @IB_MR_TYPE_MEM_REG
	.comm	_MLX4_MAX_FAST_REG_PAGES,4,2    ## @MLX4_MAX_FAST_REG_PAGES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_alloc_mr               ; -- Begin function mlx4_ib_alloc_mr
	.p2align	2
_mlx4_ib_alloc_mr:                      ; @mlx4_ib_alloc_mr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_mdev
Lloh0:
	adrp	x8, _IB_MR_TYPE_MEM_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_MR_TYPE_MEM_REG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MLX4_MAX_FAST_REG_PAGES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_MAX_FAST_REG_PAGES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w22, #8, eq
	b.ge	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x19, x0
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	ldr	w23, [x19]
	mov	x0, x21
	bl	_to_mpd
	ldr	w1, [x0]
	mov	x0, x23
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, x22
	mov	w6, #0
	mov	x7, x20
	bl	_mlx4_mr_alloc
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x22
	bl	_mlx4_alloc_priv_pages
	mov	x23, x0
	cbnz	w0, LBB0_7
; %bb.5:
	str	w22, [x20, #24]
	ldr	w0, [x19]
	mov	x1, x20
	bl	_mlx4_mr_enable
	cbz	w0, LBB0_12
; %bb.6:
	mov	x23, x0
	ldr	w8, [x21]
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_mlx4_free_priv_pages
LBB0_7:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_mlx4_mr_free
LBB0_8:
	mov	x0, x20
	bl	_kfree
	mov	x0, x23
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_12:
	ldr	w8, [x20]
	add	x0, x20, #4
	stp	w8, w8, [x20, #8]
	str	xzr, [x20, #16]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MR_TYPE_MEM_REG,4,2         ; @IB_MR_TYPE_MEM_REG
	.comm	_MLX4_MAX_FAST_REG_PAGES,4,2    ; @MLX4_MAX_FAST_REG_PAGES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
