	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_map_phys_fmr              ## -- Begin function mlx4_map_phys_fmr
	.p2align	4, 0x90
_mlx4_map_phys_fmr:                     ## @mlx4_map_phys_fmr
	.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	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	callq	_mlx4_check_fmr
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rbx
	incl	36(%r12)
	movl	32(%r12), %edi
	callq	_key_to_hw_index
	addl	8(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_hw_index_to_key
	movl	%eax, 32(%r12)
	movl	%eax, (%rbx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_MLX4_MPT_STATUS_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	(%rax), %rdi
	movl	16(%r12), %esi
	movl	%r14d, %r13d
	leal	(,%r14,4), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	callq	_dma_sync_single_for_cpu
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_MLX4_MTT_FLAG_PRESENT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	orl	(%r15,%rbx,4), %edi
	callq	_cpu_to_be64
	movq	24(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movl	16(%r12), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_sync_single_for_device
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 24(%rcx)
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	8(%r12), %rcx
	movq	%rax, 16(%rcx)
	movb	(%r12), %cl
	shlq	%cl, %r13
	movl	%r13d, %edi
	callq	_cpu_to_be64
	movq	8(%r12), %rcx
	movq	%rax, 8(%rcx)
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be64
	movq	8(%r12), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
	movq	_MLX4_MPT_STATUS_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
	xorl	%eax, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MPT_STATUS_SW,4,2         ## @MLX4_MPT_STATUS_SW
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MLX4_MTT_FLAG_PRESENT,4,2      ## @MLX4_MTT_FLAG_PRESENT
	.comm	_MLX4_MPT_STATUS_HW,4,2         ## @MLX4_MPT_STATUS_HW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_map_phys_fmr              ; -- Begin function mlx4_map_phys_fmr
	.p2align	2
_mlx4_map_phys_fmr:                     ; @mlx4_map_phys_fmr
	.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	x26, x6
	mov	x25, x5
	mov	x20, x4
	mov	x24, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, x1
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	bl	_mlx4_check_fmr
	cbnz	w0, LBB0_5
; %bb.1:
	ldp	w0, w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #36]
	bl	_key_to_hw_index
	ldr	w8, [x22, #8]
	add	w23, w0, w8
	mov	x0, x23
	bl	_hw_index_to_key
	str	w0, [x19, #32]
	str	w0, [x26]
	str	w0, [x25]
Lloh0:
	adrp	x8, _MLX4_MPT_STATUS_SW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_MPT_STATUS_SW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	bl	_wmb
	ldr	x8, [x22]
	ldr	x0, [x8]
	ldr	w1, [x19, #16]
	mov	w26, w24
	lsl	w25, w24, #2
Lloh3:
	adrp	x27, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x27]
	mov	x2, x25
	bl	_dma_sync_single_for_cpu
	cmp	w24, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x24, #0
Lloh5:
	adrp	x28, _MLX4_MTT_FLAG_PRESENT@GOTPAGE
Lloh6:
	ldr	x28, [x28, _MLX4_MTT_FLAG_PRESENT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, x24, lsl #2]
	ldr	w9, [x28]
	orr	w0, w9, w8
	bl	_cpu_to_be64
	ldr	x8, [x19, #24]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	cmp	x26, x24
	b.ne	LBB0_3
LBB0_4:
	ldr	x8, [x22]
	ldr	x0, [x8]
	ldr	w1, [x19, #16]
	ldr	w3, [x27]
	mov	x2, x25
	bl	_dma_sync_single_for_device
	mov	x0, x23
	bl	_cpu_to_be32
	ldr	x8, [x19, #8]
	str	x0, [x8, #24]
	mov	x0, x23
	bl	_cpu_to_be32
	ldp	x9, x8, [x19]
	str	x0, [x8, #16]
	lsl	x0, x26, x9
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_cpu_to_be64
	ldr	x8, [x19, #8]
	str	x0, [x8]
	bl	_wmb
Lloh7:
	adrp	x8, _MLX4_MPT_STATUS_HW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MLX4_MPT_STATUS_HW@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	bl	_wmb
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MPT_STATUS_SW,4,2         ; @MLX4_MPT_STATUS_SW
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MLX4_MTT_FLAG_PRESENT,4,2      ; @MLX4_MTT_FLAG_PRESENT
	.comm	_MLX4_MPT_STATUS_HW,4,2         ; @MLX4_MPT_STATUS_HW
.subsections_via_symbols
