	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dr_icm_pool_mr_create
_dr_icm_pool_mr_create:                 ## @dr_icm_pool_mr_create
	.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
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	8(%rax), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kvzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, 48(%rax)
	leaq	40(%rax), %r13
	movq	%r13, %rdi
	callq	_INIT_LIST_HEAD
	movl	%r12d, 16(%rbx)
	movl	16(%r14), %esi
	movl	20(%r14), %edi
	callq	_mlx5dr_icm_pool_chunk_size_to_byte
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edx
	movl	%edx, 20(%rbx)
	movl	16(%rbx), %esi
	leaq	24(%rbx), %r8
	leaq	32(%rbx), %r9
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_mlx5_dm_sw_icm_alloc
	movq	8(%r14), %rdi
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_mlx5dr_err
	jmp	LBB0_3
LBB0_5:
	movl	(%rdi), %esi
	movl	20(%rbx), %edx
	movq	24(%rbx), %rcx
	movq	_MLX5_MKC_ACCESS_MODE_SW_ICM@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %r9
	addq	$44, %r9
	movq	%r15, %rdi
	callq	_dr_icm_create_dm_mkey
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_mlx5dr_err
	movl	16(%rbx), %esi
	movl	20(%rbx), %edx
	movq	24(%rbx), %r8
	movl	32(%rbx), %r9d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_mlx5_dm_sw_icm_dealloc
LBB0_3:
	movq	%rbx, %rdi
	callq	_kvfree
LBB0_4:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	24(%rbx), %rcx
	movq	%rcx, (%rbx)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	-1(%rdx), %rax
	andq	%rcx, %rax
	je	LBB0_9
## %bb.8:
	subq	%rax, %rdx
	movq	%rdx, 8(%rbx)
LBB0_9:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_list_add_tail
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate SW ICM memory, err (%d)\n"

	.comm	_MLX5_MKC_ACCESS_MODE_SW_ICM,4,2 ## @MLX5_MKC_ACCESS_MODE_SW_ICM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create SW ICM MKEY, err (%d)\n"

	.no_dead_strip	_dr_icm_pool_mr_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dr_icm_pool_mr_create
_dr_icm_pool_mr_create:                 ; @dr_icm_pool_mr_create
	.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	x24, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kvzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	str	x20, [x19, #48]
	add	x23, x19, #40
	mov	x0, x23
	bl	_INIT_LIST_HEAD
	str	w24, [x19, #16]
	ldp	w1, w0, [x20, #16]
	bl	_mlx5dr_icm_pool_chunk_size_to_byte
	lsl	w2, w0, #1
	str	w2, [x19, #20]
	ldr	w1, [x19, #16]
	add	x4, x19, #24
	add	x5, x19, #32
	mov	x0, x21
	mov	w3, #0
	bl	_mlx5_dm_sw_icm_alloc
	mov	x2, x0
	ldr	x0, [x20, #8]
	cbz	w2, LBB0_3
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_mlx5dr_err
	b	LBB0_5
LBB0_3:
	ldr	w1, [x0]
	ldr	w2, [x19, #20]
	ldr	x3, [x19, #24]
Lloh5:
	adrp	x8, _MLX5_MKC_ACCESS_MODE_SW_ICM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX5_MKC_ACCESS_MODE_SW_ICM@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	add	x5, x19, #44
	mov	x0, x21
	bl	_dr_icm_create_dm_mkey
	cbz	w0, LBB0_7
; %bb.4:
	mov	x2, x0
	ldr	x0, [x20, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_mlx5dr_err
	ldp	w1, w2, [x19, #16]
	ldr	x4, [x19, #24]
	ldr	w5, [x19, #32]
	mov	x0, x21
	mov	w3, #0
	bl	_mlx5_dm_sw_icm_dealloc
LBB0_5:
	mov	x0, x19
	bl	_kvfree
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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
LBB0_7:
	ldr	x8, [x19, #24]
	str	x8, [x19]
	sub	x9, x22, #1
	ands	x8, x8, x9
	b.eq	LBB0_9
; %bb.8:
	sub	x8, x22, x8
	str	x8, [x19, #8]
LBB0_9:
	mov	x0, x23
	mov	x1, x20
	bl	_list_add_tail
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate SW ICM memory, err (%d)\n"

	.comm	_MLX5_MKC_ACCESS_MODE_SW_ICM,4,2 ; @MLX5_MKC_ACCESS_MODE_SW_ICM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create SW ICM MKEY, err (%d)\n"

	.no_dead_strip	_dr_icm_pool_mr_create
.subsections_via_symbols
