	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_umem_write_mtt_block
_mlx4_ib_umem_write_mtt_block:          ## @mlx4_ib_umem_write_mtt_block
	.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
                                        ## kill: def $r9d killed $r9d def $r9
                                        ## kill: def $r8d killed $r8d def $r8
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leal	(%r9,%r8), %r13d
	movslq	%edx, %rsi
	leaq	-1(%rsi), %r15
	movl	%r15d, %r14d
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	andl	%r9d, %r14d
	addl	%r8d, %r14d
	movl	%r13d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_round_up
	movl	%eax, %ebx
	subl	%r13d, %ebx
	addl	%r14d, %ebx
	movslq	%ebx, %rax
	testq	%rax, %r15
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_2:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r12d, %esi
	callq	_round_down
	movl	%eax, %r14d
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.3:
	movq	32(%rbp), %r13
	movq	24(%rbp), %r15
	movq	16(%rbp), %r8
	movl	(%r13), %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rsi
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	addl	%r12d, %r14d
	decl	%ebx
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rax
	movl	%r14d, (%r8,%rax,4)
	movslq	(%r13), %rcx
	incq	%rcx
	movl	%ecx, (%r13)
	movslq	(%rsi), %rax
	shrq	$2, %rax
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rdx), %edi
	movl	(%r15), %edx
	movq	%r9, %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r8, %r12
	callq	_mlx4_write_mtt
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %eax
	addl	%eax, (%r15)
	movl	$0, (%r13)
	xorl	%ecx, %ecx
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %r8
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rsi
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write_block: len %llx is not aligned to mtt_size %llx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_mlx4_ib_umem_write_mtt_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_umem_write_mtt_block
_mlx4_ib_umem_write_mtt_block:          ; @mlx4_ib_umem_write_mtt_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x21, x6
	mov	x24, x5
	mov	x25, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	add	w26, w5, w4
	sxtw	x8, w19
	sub	x27, x8, #1
	and	w8, w27, w5
	add	w28, w8, w4
	mov	x0, x26
	mov	x1, x2
	bl	_round_up
	sub	w8, w0, w26
	add	w1, w28, w8
	sxtw	x8, w1
	tst	x27, x8
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x19
	bl	_pr_warn
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	asr	w25, w1, w25
	mov	x0, x24
	mov	x1, x19
	bl	_round_down
	cmp	w25, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x24, x0
	ldr	x26, [x29, #16]
	ldr	w3, [x26]
Lloh5:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, w19
	subs	w25, w25, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	w24, [x21, w3, sxtw #2]
	ldrsw	x8, [x26]
	add	x3, x8, #1
	str	w3, [x26]
	ldrsw	x8, [x27]
	cmp	x3, x8, lsr #2
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	ldr	w2, [x20]
	mov	x1, x22
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	x4, x21
	bl	_mlx4_write_mtt
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w3, #0
	ldr	w8, [x26]
	ldr	w9, [x20]
	add	w8, w9, w8
	str	w8, [x20]
	str	wzr, [x26]
	b	LBB0_4
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write_block: len %llx is not aligned to mtt_size %llx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_mlx4_ib_umem_write_mtt_block
.subsections_via_symbols
