	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_arbel_write_mtt_seg
_mthca_arbel_write_mtt_seg:             ## @mthca_arbel_write_mtt_seg
	.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	%rcx, %r12
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	shll	$2, %r13d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movl	%r13d, %eax
	cltd
	idivl	%esi
	movslq	%eax, %rcx
	movslq	%r13d, %rax
	movslq	%r8d, %r15
	leaq	(%rax,%r15,4), %rax
	decq	%rax
	shlq	$2, %r15
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setne	%dil
	callq	_BUG_ON
	movl	%r13d, %eax
	cltd
	idivl	8(%r14)
	movl	%edx, %edi
	callq	_BUG_ON
	movl	12(%r14), %edi
	movl	%r13d, %eax
	cltd
	idivl	8(%r14)
	movslq	%eax, %rsi
	addq	(%rbx), %rsi
	leaq	-44(%rbp), %rdx
	callq	_mthca_table_find
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rdi
	movl	-44(%rbp), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edx
	callq	_dma_sync_single_for_cpu
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	%eax, %r13d
	xorl	%r14d, %r14d
	movq	_MTHCA_MTT_FLAG_PRESENT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	orl	(%r12,%r14,4), %edi
	callq	_cpu_to_be64
	movl	%eax, (%rbx,%r14,4)
	incq	%r14
	cmpq	%r14, %r13
	jne	LBB0_5
LBB0_6:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	-44(%rbp), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_sync_single_for_device
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MTHCA_MTT_FLAG_PRESENT,4,2     ## @MTHCA_MTT_FLAG_PRESENT
	.no_dead_strip	_mthca_arbel_write_mtt_seg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_arbel_write_mtt_seg
_mthca_arbel_write_mtt_seg:             ; @mthca_arbel_write_mtt_seg
	.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
	mov	x22, x4
	mov	x19, x3
	mov	x23, x1
	mov	x20, x0
	lsl	w24, w2, #2
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	sdiv	w9, w24, w8
	sbfiz	x21, x22, #2, #32
	add	x10, x21, w24, sxtw
	sub	x10, x10, #1
	udiv	x8, x10, x8
	cmp	x8, w9, sxtw
	cset	w0, ne
	bl	_BUG_ON
	ldr	w8, [x20, #8]
	sdiv	w9, w24, w8
	msub	w0, w9, w8, w24
	bl	_BUG_ON
	ldr	x8, [x23]
	ldp	w9, w0, [x20, #8]
	sdiv	w9, w24, w9
	add	x1, x8, w9, sxtw
	add	x2, sp, #12
	bl	_mthca_table_find
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x0, [x20]
	ldr	w1, [sp, #12]
Lloh3:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x2, x21
	bl	_dma_sync_single_for_cpu
	cmp	w22, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w22, w22
Lloh5:
	adrp	x25, _MTHCA_MTT_FLAG_PRESENT@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MTHCA_MTT_FLAG_PRESENT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19], #4
	ldr	w9, [x25]
	orr	w0, w9, w8
	bl	_cpu_to_be64
	str	w0, [x23], #4
	subs	x22, x22, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	x0, [x20]
	ldr	w1, [sp, #12]
	ldr	w3, [x24]
	mov	x2, x21
	bl	_dma_sync_single_for_device
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MTHCA_MTT_FLAG_PRESENT,4,2     ; @MTHCA_MTT_FLAG_PRESENT
	.no_dead_strip	_mthca_arbel_write_mtt_seg
.subsections_via_symbols
