	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_write_mtr
_hns_roce_write_mtr:                    ## @hns_roce_write_mtr
	.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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rcx), %ebx
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.1:
	movq	%rdi, %r12
	movl	(%rcx), %r13d
	addl	%r13d, %ebx
	xorl	%r14d, %r14d
	movq	_PAGE_ADDR_SHIFT@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%esi, %r14d
	movl	%r9d, %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%ecx, %r13d
	cmpl	%ebx, %r13d
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	leaq	-44(%rbp), %rcx
	xorl	%r8d, %r8d
	callq	_hns_roce_hem_list_find_mtt
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ecx
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r9d
	movq	(%r12), %r8
	movq	_HNS_ROCE_HW_VER1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movslq	%r14d, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rbx
	xorl	%esi, %esi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	(%rbx,%rsi,4), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movl	%edx, (%rax,%rsi,4)
	incq	%rsi
	movslq	-44(%rbp), %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_8
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%ecx, %ecx
	cmpq	%rdi, %r8
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	(%r15), %ecx
	jmp	LBB0_7
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_12:
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_HNS_ROCE_HW_VER1,8,3           ## @HNS_ROCE_HW_VER1
	.comm	_PAGE_ADDR_SHIFT,4,2            ## @PAGE_ADDR_SHIFT
	.no_dead_strip	_hns_roce_write_mtr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_write_mtr
_hns_roce_write_mtr:                    ; @hns_roce_write_mtr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x3, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w23, #0
	ldr	w22, [x3]
	add	w24, w8, w22
Lloh0:
	adrp	x25, _HNS_ROCE_HW_VER1@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HNS_ROCE_HW_VER1@GOTPAGEOFF]
Lloh2:
	adrp	x26, _PAGE_ADDR_SHIFT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PAGE_ADDR_SHIFT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w12, w22
	cmp	w22, w24
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x3, sp, #12
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	x4, #0
	bl	_hns_roce_hem_list_find_mtt
	cbz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [sp, #12]
	cmp	w12, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	ldr	x9, [x21]
	ldr	x10, [x25]
	add	x11, x19, w23, sxtw #2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x12, x8, #2
	ldr	w13, [x11, x12]
	ldr	w14, [x26]
	cmp	x9, x10
	csel	w14, w14, wzr, eq
	asr	w13, w13, w14
	str	w13, [x0, x12]
	add	x8, x8, #1
	ldrsw	x12, [sp, #12]
	cmp	x8, x12
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, w8
	b	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_HNS_ROCE_HW_VER1,8,3           ; @HNS_ROCE_HW_VER1
	.comm	_PAGE_ADDR_SHIFT,4,2            ; @PAGE_ADDR_SHIFT
	.no_dead_strip	_hns_roce_write_mtr
.subsections_via_symbols
