	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_alloc_dm_sw_icm
_handle_alloc_dm_sw_icm:                ## @handle_alloc_dm_sw_icm
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	(%rax), %r12
	movl	(%rbx), %ebx
	movq	%r12, %rdi
	callq	_MLX5_SW_ICM_BLOCK_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_round_up
	movl	%eax, %edi
	callq	_roundup_pow_of_two
	movl	%eax, %ebx
	movl	%eax, 8(%r15)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_to_mucontext
	movl	(%rax), %ecx
	leaq	4(%r15), %r14
	movq	%r12, %rdi
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	movl	%ebx, %edx
	movq	%r14, %r8
	movq	%r15, %r9
	callq	_mlx5_dm_sw_icm_alloc
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	$4, %ecx
	callq	_uverbs_copy_to
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %r13d
	movl	8(%r15), %r14d
	movq	%rbx, %rdi
	callq	_to_mucontext
	movl	(%rax), %ecx
	movl	(%r15), %r9d
	movl	4(%r15), %r8d
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_mlx5_dm_sw_icm_dealloc
	jmp	LBB0_4
LBB0_2:
	xorl	%r13d, %r13d
LBB0_4:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET,4,2 ## @MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET
	.no_dead_strip	_handle_alloc_dm_sw_icm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_alloc_dm_sw_icm
_handle_alloc_dm_sw_icm:                ; @handle_alloc_dm_sw_icm
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w0, [x0]
	bl	_to_mdev
	ldr	x21, [x0]
	ldr	w24, [x24]
	mov	x0, x21
	bl	_MLX5_SW_ICM_BLOCK_SIZE
	mov	x1, x0
	mov	x0, x24
	bl	_round_up
	bl	_roundup_pow_of_two
	mov	x24, x0
	str	w0, [x20, #8]
	mov	x0, x22
	bl	_to_mucontext
	ldr	w3, [x0]
	add	x25, x20, #4
	mov	x0, x21
	mov	x1, x19
	mov	x2, x24
	mov	x4, x25
	mov	x5, x20
	bl	_mlx5_dm_sw_icm_alloc
	mov	x24, x0
	cbnz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x25
	mov	w3, #4
	bl	_uverbs_copy_to
	mov	x24, x0
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w23, [x20, #8]
	mov	x0, x22
	bl	_to_mucontext
	ldr	w3, [x0]
	ldp	w5, w4, [x20]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	bl	_mlx5_dm_sw_icm_dealloc
LBB0_3:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET,4,2 ; @MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET
	.no_dead_strip	_handle_alloc_dm_sw_icm
.subsections_via_symbols
