	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlx5_ib_alloc_mr
___mlx5_ib_alloc_mr:                    ## @__mlx5_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_create_mkey_in@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLX5_ST_SZ_BYTES
	movl	%eax, %r15d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_ALIGN
	movl	%eax, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %esi
	movl	%r15d, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r12), %ecx
	movl	%ecx, (%r13)
	movq	$0, 8(%r13)
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	cmpl	$128, %edx
	je	LBB0_9
## %bb.5:
	cmpl	$130, %edx
	je	LBB0_10
## %bb.6:
	cmpl	$129, %edx
	jne	LBB0_11
## %bb.7:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	movl	%r15d, %r8d
	movq	%rax, %rbx
	callq	_mlx5_alloc_mem_reg_descs
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_9:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	movl	%r15d, %r8d
	movq	%rax, %rbx
	callq	_mlx5_alloc_sg_gaps_descs
LBB0_8:
	movq	%rbx, %rdi
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	pushq	%r15
	pushq	%rax
	movq	%rax, %rbx
	callq	_mlx5_alloc_integrity_descs
	movq	%rbx, %rdi
	addq	$16, %rsp
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rbx
	callq	_mlx5_ib_warn
	movq	%rbx, %rdi
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	callq	_kfree
	testl	%ebx, %ebx
	je	LBB0_15
LBB0_13:
	movq	%r13, %rdi
	callq	_kfree
LBB0_14:
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_15:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_create_mkey_in,4,2             ## @create_mkey_in
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid mr type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	___mlx5_ib_alloc_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mlx5_ib_alloc_mr
___mlx5_ib_alloc_mr:                    ; @__mlx5_ib_alloc_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x5, [sp, #8]                    ; 8-byte Folded Spill
	mov	x24, x4
	mov	x25, x3
	mov	x27, x2
	mov	x26, x1
	mov	x23, x0
	ldr	w0, [x0]
	bl	_to_mdev
	mov	x28, x0
Lloh0:
	adrp	x8, _create_mkey_in@GOTPAGE
Lloh1:
	ldr	x8, [x8, _create_mkey_in@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_MLX5_ST_SZ_BYTES
	mov	x21, x0
	mov	x0, x27
	mov	x1, x25
	mov	w2, #4
	bl	_ALIGN
	mov	x22, x0
Lloh3:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w1, [x20]
	mov	x0, x21
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	ldr	w8, [x23]
	str	w8, [x19]
	str	xzr, [x19, #8]
	cmp	w26, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w26, #130
	b.eq	LBB0_9
; %bb.4:
	cmp	w26, #129
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	bl	_mlx5_alloc_mem_reg_descs
	mov	x21, x0
	b	LBB0_11
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_7:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_8:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	bl	_mlx5_alloc_sg_gaps_descs
	mov	x21, x0
	b	LBB0_11
LBB0_9:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x27
	mov	x3, x25
	mov	x4, x24
	ldr	x5, [sp, #8]                    ; 8-byte Folded Reload
	mov	x6, x20
	mov	x7, x21
	bl	_mlx5_alloc_integrity_descs
	mov	x21, x0
	b	LBB0_11
LBB0_10:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x28
	mov	x2, x26
	bl	_mlx5_ib_warn
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x20
	bl	_kfree
	cbz	w21, LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x0, x21
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_14:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_create_mkey_in,4,2             ; @create_mkey_in
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid mr type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	___mlx5_ib_alloc_mr
.subsections_via_symbols
