	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_alloc_dm               ## -- Begin function mlx5_ib_alloc_dm
	.p2align	4, 0x90
_mlx5_ib_alloc_dm:                      ## @mlx5_ib_alloc_dm
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rdi
	movq	%rcx, %rsi
	movl	$129, %ecx
	callq	_uverbs_get_const_default
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_to_mdev
	movl	-36(%rbp), %edx
	movl	(%r15), %r8d
	movl	4(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_mlx5_ib_dbg
	movq	%rbx, %rdi
	callq	_to_mdev
	movl	-36(%rbp), %esi
	movl	%eax, %edi
	callq	_check_dm_type_support
	testl	%eax, %eax
	je	LBB0_5
LBB0_2:
	movl	%eax, %edi
LBB0_3:
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_4:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %rbx
	movl	-36(%rbp), %eax
	movl	%eax, (%rbx)
	movl	-36(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$130, %eax
	je	LBB0_12
## %bb.8:
	cmpl	$129, %eax
	jne	LBB0_16
## %bb.9:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_handle_alloc_dm_memic
	jmp	LBB0_14
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_3
LBB0_11:
	movq	_MLX5_SW_ICM_TYPE_STEERING@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_MLX5_SW_ICM_TYPE_HEADER_MODIFY@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_handle_alloc_dm_sw_icm
LBB0_14:
	movl	%eax, %r14d
	testl	%r14d, %r14d
	je	LBB0_17
LBB0_15:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %edi
	jmp	LBB0_3
LBB0_16:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r14d, %r14d
	jne	LBB0_15
LBB0_17:
	addq	$4, %rbx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE,4,2 ## @MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc_dm req: dm_type=%d user_length=0x%llx log_alignment=%d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX5_SW_ICM_TYPE_STEERING,4,2  ## @MLX5_SW_ICM_TYPE_STEERING
	.comm	_MLX5_SW_ICM_TYPE_HEADER_MODIFY,4,2 ## @MLX5_SW_ICM_TYPE_HEADER_MODIFY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_alloc_dm               ; -- Begin function mlx5_ib_alloc_dm
	.p2align	2
_mlx5_ib_alloc_dm:                      ; @mlx5_ib_alloc_dm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x0, sp, #12
	mov	x1, x3
	mov	w3, #129
	bl	_uverbs_get_const_default
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_to_mdev
	ldr	w2, [sp, #12]
	ldp	w4, w3, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_mlx5_ib_dbg
	mov	x0, x22
	bl	_to_mdev
	ldr	w1, [sp, #12]
	bl	_check_dm_type_support
	cbz	w0, LBB0_4
LBB0_2:
	bl	_ERR_PTR
LBB0_3:
	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
	add	sp, sp, #64
	ret
LBB0_4:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x22, x0
	ldr	w8, [sp, #12]
	str	w8, [x0]
	ldr	w8, [sp, #12]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.8:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	bl	_handle_alloc_dm_memic
	mov	x19, x0
	cbnz	w19, LBB0_13
	b	LBB0_15
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
LBB0_10:
Lloh11:
	adrp	x8, _MLX5_SW_ICM_TYPE_STEERING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX5_SW_ICM_TYPE_STEERING@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh13:
	adrp	x8, _MLX5_SW_ICM_TYPE_HEADER_MODIFY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLX5_SW_ICM_TYPE_HEADER_MODIFY@GOTPAGEOFF]
LBB0_12:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	bl	_handle_alloc_dm_sw_icm
	mov	x19, x0
	cbz	w19, LBB0_15
LBB0_13:
	mov	x0, x22
	bl	_kfree
	mov	x0, x19
	b	LBB0_2
LBB0_14:
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w19, w8
	cbnz	w19, LBB0_13
LBB0_15:
	add	x0, x22, #4
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE,4,2 ; @MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc_dm req: dm_type=%d user_length=0x%llx log_alignment=%d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX5_SW_ICM_TYPE_STEERING,4,2  ; @MLX5_SW_ICM_TYPE_STEERING
	.comm	_MLX5_SW_ICM_TYPE_HEADER_MODIFY,4,2 ; @MLX5_SW_ICM_TYPE_HEADER_MODIFY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
