	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_WRITE_MTT_wrapper         ## -- Begin function mlx4_WRITE_MTT_wrapper
	.p2align	4, 0x90
_mlx4_WRITE_MTT_wrapper:                ## @mlx4_WRITE_MTT_wrapper
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rcx), %r14
	movq	$0, -56(%rbp)
	movl	(%r14), %edi
	callq	_be64_to_cpu
	movl	(%r12), %r12d
	leaq	-56(%rbp), %r8
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r12d, %ecx
	callq	_get_containing_mtt
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	testl	%r12d, %r12d
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r14,%rbx,4), %edi
	callq	_be64_to_cpu
	andq	$-2, %rax
	movq	%rax, 16(%r14,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_3
LBB0_4:
	movl	(%r14), %edi
	callq	_be64_to_cpu
	addq	$16, %r14
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	movq	%r14, %r8
	callq	___mlx4_write_mtt
	movl	%eax, %r13d
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edx
	movq	_RES_MTT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_put_res
LBB0_6:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_MTT,4,2                    ## @RES_MTT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_WRITE_MTT_wrapper         ; -- Begin function mlx4_WRITE_MTT_wrapper
	.p2align	2
_mlx4_WRITE_MTT_wrapper:                ; @mlx4_WRITE_MTT_wrapper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x3]
	str	xzr, [sp]
	ldr	w0, [x21]
	bl	_be64_to_cpu
	mov	x2, x0
	ldr	w22, [x22]
	mov	x4, sp
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x22
	bl	_get_containing_mtt
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.1:
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
	add	x24, x21, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24, x23, lsl #2]
	bl	_be64_to_cpu
	and	x8, x0, #0xfffffffffffffffe
	add	x9, x24, x23, lsl #3
	str	x8, [x9, #8]
	add	x23, x23, #1
	cmp	x22, x23
	b.ne	LBB0_3
LBB0_4:
	ldr	w0, [x21], #16
	bl	_be64_to_cpu
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x20
	mov	x3, x22
	mov	x4, x21
	bl	___mlx4_write_mtt
	mov	x23, x0
	ldr	x8, [sp]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w2, [x8]
Lloh0:
	adrp	x8, _RES_MTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_MTT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_put_res
LBB0_6:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_MTT,4,2                    ; @RES_MTT
.subsections_via_symbols
