	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_mtt_cleanup           ## -- Begin function hns_roce_mtt_cleanup
	.p2align	4, 0x90
_hns_roce_mtt_cleanup:                  ## @hns_roce_mtt_cleanup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rdx
	testq	%rdx, %rdx
	js	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rsi), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	ja	LBB0_9
## %bb.2:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	leaq	32(%r14), %rdi
	movl	12(%rbx), %esi
	callq	_hns_roce_buddy_free
	leaq	28(%r14), %rsi
	jmp	LBB0_4
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_7:
	leaq	16(%r14), %rdi
	movl	12(%rbx), %esi
	callq	_hns_roce_buddy_free
	leaq	12(%r14), %rsi
	jmp	LBB0_4
LBB0_8:
	leaq	4(%r14), %r15
	leaq	8(%r14), %rdi
	movl	12(%rbx), %esi
	callq	_hns_roce_buddy_free
	movl	12(%rbx), %edx
	movb	(%rbx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	leal	(%rdx,%rax), %ecx
	decl	%ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	jmp	LBB0_5
LBB0_6:
	leaq	24(%r14), %rdi
	movl	12(%rbx), %esi
	callq	_hns_roce_buddy_free
	leaq	20(%r14), %rsi
LBB0_4:
	movl	12(%rbx), %edx
	movb	(%rbx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	leal	(%rdx,%rax), %ecx
	decl	%ecx
	movq	%r14, %rdi
LBB0_5:
                                        ## kill: def $edx killed $edx killed $rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_roce_table_put_range       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupport mtt type %d, clean mtt failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_mtt_cleanup           ; -- Begin function hns_roce_mtt_cleanup
	.p2align	2
_hns_roce_mtt_cleanup:                  ; @hns_roce_mtt_cleanup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x2, [x1]
	tbnz	x2, #63, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1, #8]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hi	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	add	x0, x19, #32
	ldr	w1, [x20, #12]
	bl	_hns_roce_buddy_free
	add	x1, x19, #28
	b	LBB0_9
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_err
LBB0_6:
	add	x0, x19, #16
	ldr	w1, [x20, #12]
	bl	_hns_roce_buddy_free
	add	x1, x19, #12
	b	LBB0_9
LBB0_7:
	add	x21, x19, #4
	add	x0, x19, #8
	ldr	w1, [x20, #12]
	bl	_hns_roce_buddy_free
	ldr	w2, [x20, #12]
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	add	w8, w2, w8
	sub	w3, w8, #1
	mov	x0, x19
	mov	x1, x21
	b	LBB0_10
LBB0_8:
	add	x0, x19, #24
	ldr	w1, [x20, #12]
	bl	_hns_roce_buddy_free
	add	x1, x19, #20
LBB0_9:
	ldr	w2, [x20, #12]
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	add	w8, w2, w8
	sub	w3, w8, #1
	mov	x0, x19
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_hns_roce_table_put_range
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupport mtt type %d, clean mtt failed\n"

.subsections_via_symbols
