	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_map_mr_sg_pi           ## -- Begin function mlx5_ib_map_mr_sg_pi
	.p2align	4, 0x90
_mlx5_ib_map_mr_sg_pi:                  ## @mlx5_ib_map_mr_sg_pi
	.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	$56, %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
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_to_mmr
	movq	%rax, %r12
	movq	(%r13), %rax
	movq	_IB_MR_TYPE_INTEGRITY@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r12)
	movups	%xmm0, 48(%r12)
	movq	$0, 64(%r12)
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movl	%r15d, %edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%ebx, %r9d
	callq	_mlx5_ib_map_pa_mr_sg_pi
	leal	(%rbx,%r15), %r13d
	cmpl	%r13d, %eax
	jne	LBB0_3
## %bb.1:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	$0, 16(%r14)
	movq	$0, 8(%r12)
LBB0_2:
	movl	(%r12), %eax
	jmp	LBB0_8
LBB0_3:
	movq	24(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%ebx, %r9d
	callq	_mlx5_ib_map_mtt_mr_sg_pi
	cmpl	%r13d, %eax
	je	LBB0_6
## %bb.4:
	movq	16(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%ebx, %r9d
	callq	_mlx5_ib_map_klm_mr_sg_pi
	xorl	%edi, %edi
	cmpl	%r13d, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	$0, 16(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_2
## %bb.7:
	movl	(%rax), %eax
LBB0_8:
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MR_TYPE_INTEGRITY,8,3       ## @IB_MR_TYPE_INTEGRITY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_map_mr_sg_pi           ; -- Begin function mlx5_ib_map_mr_sg_pi
	.p2align	2
_mlx5_ib_map_mr_sg_pi:                  ; @mlx5_ib_map_mr_sg_pi
	.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	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
	bl	_to_mmr
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _IB_MR_TYPE_INTEGRITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_MR_TYPE_INTEGRITY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x20, #32]
	str	xzr, [x20, #64]
	mov	x0, x19
	mov	x1, x26
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	bl	_mlx5_ib_map_pa_mr_sg_pi
	add	w28, w22, w25
	cmp	w0, w28
	b.ne	LBB0_3
; %bb.1:
	str	xzr, [x19, #16]
	str	xzr, [x20, #8]
LBB0_2:
	mov	w0, #0
	ldr	w8, [x20]
	b	LBB0_8
LBB0_3:
	ldr	x27, [x20, #24]
	mov	x0, x19
	mov	x1, x26
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	bl	_mlx5_ib_map_mtt_mr_sg_pi
	cmp	w0, w28
	b.eq	LBB0_6
; %bb.4:
	ldr	x27, [x20, #16]
	mov	x0, x19
	mov	x1, x26
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	bl	_mlx5_ib_map_klm_mr_sg_pi
	cmp	w0, w28
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	str	xzr, [x19, #16]
	str	x27, [x20, #8]
	cbz	x27, LBB0_2
; %bb.7:
	mov	w0, #0
	ldr	w8, [x27]
LBB0_8:
	ldr	x9, [x19, #8]
	str	w8, [x9]
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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MR_TYPE_INTEGRITY,8,3       ; @IB_MR_TYPE_INTEGRITY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
