	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_mr_rdma_pfault_handler
_mlx5_ib_mr_rdma_pfault_handler:        ## @mlx5_ib_mr_rdma_pfault_handler
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rsi), %r15
	movq	16(%rsi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	%r15, 24(%rsi)
	movq	32(%rsi), %rsi
	movq	%r15, %rdi
	callq	_min
	movq	24(%rbx), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %r13
	xorl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	subq	%rax, %r13
	movq	%r13, 32(%rbx)
	movq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_3
LBB0_2:
	movq	40(%rbx), %r13
	movq	_MAX_PREFETCH_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_min
	movq	%rax, %r15
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_3:
	movq	%r12, %r14
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	%rbx, %r9
	pushq	$0
	pushq	$0
	callq	_pagefault_single_data_segment
	addq	$16, %rsp
	movl	%eax, %r12d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	je	LBB0_8
## %bb.4:
	testl	%r12d, %r12d
	js	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_pages_in_range
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmpl	%r12d, %eax
	jle	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_mlx5_ib_page_fault_resume
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	je	LBB0_12
## %bb.7:
	movl	8(%rbx), %ecx
	movslq	12(%rbx), %r8
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_ib_dbg                    ## TAILCALL
LBB0_8:
	movq	%r14, %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_mlx5_ib_page_fault_resume
	movl	8(%rbx), %edx
	movl	12(%rbx), %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %r8d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mlx5_ib_dbg
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.9:
	movq	$0, -80(%rbp)
	leaq	-80(%rbp), %r9
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	pushq	$0
	pushq	$0
	callq	_pagefault_single_data_segment
	addq	$16, %rsp
	testl	%eax, %eax
	jns	LBB0_12
## %bb.10:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_12
## %bb.11:
	movl	8(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_mlx5_ib_dbg
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PREFETCH_LEN,8,3           ## @MAX_PREFETCH_LEN
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PAGE FAULT error %d. QP 0x%x, type: 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"PAGE FAULT completed. QP 0x%x, type: 0x%x, prefetch_activated: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Prefetch failed. ret: %d, QP 0x%x, address: 0x%.16llx, length = 0x%.16x\n"

	.no_dead_strip	_mlx5_ib_mr_rdma_pfault_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_ib_mr_rdma_pfault_handler
_mlx5_ib_mr_rdma_pfault_handler:        ; @mlx5_ib_mr_rdma_pfault_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x19, x0
	ldr	x21, [x1]
	ldp	x23, x8, [x1, #16]
	add	x8, x8, x21
	str	x8, [x1, #24]
	ldr	x1, [x1, #32]
	mov	x0, x21
	bl	_min
	str	xzr, [x20]
	ldp	x22, x8, [x20, #24]
	subs	x24, x8, x0
	str	x24, [x20, #32]
	b.eq	LBB0_2
; %bb.1:
	mov	w27, #0
	b	LBB0_3
LBB0_2:
	ldr	x24, [x20, #40]
Lloh0:
	adrp	x8, _MAX_PREFETCH_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PREFETCH_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	mov	x1, x21
	bl	_min
	mov	x21, x0
	mov	w27, #1
LBB0_3:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x23
	mov	x3, x22
	mov	x4, x24
	mov	x5, x20
	mov	x6, #0
	mov	w7, #0
	bl	_pagefault_single_data_segment
	mov	w28, #0
Lloh3:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
	ldr	w8, [x26]
	cmn	w0, w8
	b.eq	LBB0_8
; %bb.4:
	mov	x25, x0
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x24
	bl	_pages_in_range
	mov	x28, x27
	cmp	w0, w25
	b.le	LBB0_8
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_mlx5_ib_page_fault_resume
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w25, w8
	b.eq	LBB0_12
; %bb.7:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	ldp	w3, w4, [x20, #8]
                                        ; kill: def $w4 killed $w4 def $x4
	sxtw	x4, w4
	mov	x0, x19
	mov	x2, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_mlx5_ib_dbg
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_mlx5_ib_page_fault_resume
	ldp	w2, w3, [x20, #8]
	mov	w4, w28
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_ib_dbg
	cbz	w28, LBB0_12
; %bb.9:
	str	xzr, [sp, #8]
	add	x5, sp, #8
	mov	x0, x19
	mov	x1, #0
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x6, #0
	mov	w7, #0
	bl	_pagefault_single_data_segment
	tbz	w0, #31, LBB0_12
; %bb.10:
	mov	x2, x0
	ldr	w8, [x26]
	cmn	w0, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	w3, [x20, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	str	x21, [sp]
	mov	x0, x19
	mov	x4, x22
	bl	_mlx5_ib_dbg
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PREFETCH_LEN,8,3           ; @MAX_PREFETCH_LEN
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PAGE FAULT error %d. QP 0x%x, type: 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"PAGE FAULT completed. QP 0x%x, type: 0x%x, prefetch_activated: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Prefetch failed. ret: %d, QP 0x%x, address: 0x%.16llx, length = 0x%.16x\n"

	.no_dead_strip	_mlx5_ib_mr_rdma_pfault_handler
.subsections_via_symbols
