	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_mr_wqe_pfault_handler
_mlx5_ib_mr_wqe_pfault_handler:         ## @mlx5_ib_mr_wqe_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %r12d
	movl	8(%rsi), %r15d
	movq	_MLX5_PFAULT_REQUESTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	$0, -72(%rbp)
	movl	4(%rsi), %esi
	movl	%r12d, %edx
	callq	_odp_get_rsc
	testq	%rax, %rax
	je	LBB0_29
## %bb.1:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_MLX5_RES_QP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_MLX5_RES_SRQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_MLX5_RES_XSRQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx5_ib_err
	movl	$1, %r13d
	jmp	LBB0_28
LBB0_29:
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_ib_dbg                    ## TAILCALL
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___get_free_page
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, -80(%rbp)
	movq	(%r15), %rax
	movq	_MLX5_RES_QP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	%r15, %rdi
	callq	_res_to_qp
	andl	%r12d, %r13d
	movq	%rax, %r12
	setne	%al
	testq	%r12, %r12
	je	LBB0_13
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.11:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %r8
	movq	%r12, %rdi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_mlx5_ib_read_user_wqe_sq
	testl	%eax, %eax
	jne	LBB0_26
## %bb.12:
	movq	-64(%rbp), %r9
	leaq	-80(%rbp), %rcx
	leaq	-72(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_mlx5_ib_mr_initiator_pfault_handler
	movb	$1, %sil
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx5_ib_err
	movl	$1, %r13d
	jmp	LBB0_28
LBB0_8:
	testl	%r12d, %r13d
	setne	%al
LBB0_18:
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_res_to_srq
	movq	%rax, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %r8
	movq	%r12, %rdi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_mlx5_ib_read_user_wqe_srq
	testl	%eax, %eax
	je	LBB0_19
LBB0_26:
	movl	12(%r14), %r8d
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_mlx5_ib_err
LBB0_27:
	movl	$1, %r13d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_28:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_mlx5_ib_page_fault_resume
	movl	(%r14), %r8d
	movl	4(%r14), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_mlx5_ib_dbg
	movq	%r15, %rdi
	callq	_mlx5_core_res_put
	movq	%r12, %rdi
	callq	_free_page
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	testq	%r12, %r12
	je	LBB0_17
## %bb.14:
	testl	%r13d, %r13d
	jne	LBB0_17
## %bb.15:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %r8
	movq	%r12, %rdi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_mlx5_ib_read_user_wqe_rq
	testl	%eax, %eax
	jne	LBB0_26
## %bb.16:
	movq	-64(%rbp), %r8
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_mlx5_ib_mr_responder_pfault_handler_rq
	xorl	%esi, %esi
	jmp	LBB0_20
LBB0_19:
	movq	-64(%rbp), %r8
	leaq	-80(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_mlx5_ib_mr_responder_pfault_handler_srq
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	-84(%rbp), %esi                 ## 4-byte Reload
LBB0_20:
	movl	$1, %r13d
	testl	%eax, %eax
	js	LBB0_28
## %bb.21:
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rcx
	cmpq	%rcx, %rdx
	jae	LBB0_28
## %bb.22:
	xorb	$1, %sil
	movzbl	%sil, %eax
	movl	%eax, (%rsp)
	leaq	-104(%rbp), %r8
	leaq	-96(%rbp), %r9
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pagefault_data_segments
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_25
## %bb.23:
	testl	%eax, %eax
	js	LBB0_28
## %bb.24:
	movq	-96(%rbp), %rax
	cmpq	-104(%rbp), %rax
	jg	LBB0_28
LBB0_25:
	xorl	%r13d, %r13d
	jmp	LBB0_28
LBB0_17:
	testq	%r12, %r12
	jne	LBB0_27
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_PFAULT_REQUESTOR,4,2      ## @MLX5_PFAULT_REQUESTOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wqe page fault for missing resource %d\n"

	.comm	_MLX5_RES_QP,8,3                ## @MLX5_RES_QP
	.comm	_MLX5_RES_SRQ,8,3               ## @MLX5_RES_SRQ
	.comm	_MLX5_RES_XSRQ,8,3              ## @MLX5_RES_XSRQ
L_.str.1:                               ## @.str.1
	.asciz	"wqe page fault for unsupported type %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"Error allocating memory for IO page fault handling.\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.3:                               ## @.str.3
	.asciz	"Failed reading a WQE following page fault, error %d, wqe_index %x, qpn %x\n"

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

	.no_dead_strip	_mlx5_ib_mr_wqe_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_wqe_pfault_handler
_mlx5_ib_mr_wqe_pfault_handler:         ; @mlx5_ib_mr_wqe_pfault_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x8, _MLX5_PFAULT_REQUESTOR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_PFAULT_REQUESTOR@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	str	xzr, [sp, #48]
	ldr	w24, [x1]
	ldp	w1, w23, [x1, #4]
	mov	x2, x24
	bl	_odp_get_rsc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x27, _MLX5_RES_QP@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MLX5_RES_QP@GOTPAGEOFF]
	ldr	x9, [x27]
Lloh5:
	adrp	x10, _MLX5_RES_SRQ@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MLX5_RES_SRQ@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _MLX5_RES_XSRQ@GOTPAGE
Lloh9:
	ldr	x11, [x11, _MLX5_RES_XSRQ@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_9
; %bb.2:
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	___get_free_page
	mov	x22, x0
	cbz	x0, LBB0_10
; %bb.3:
	and	w26, w25, w24
	str	x22, [sp, #56]
	ldr	x8, [x21]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x21
	bl	_res_to_qp
	mov	x24, x0
	cmp	w26, #0
	cset	w25, ne
	cbz	x0, LBB0_17
; %bb.5:
	cbz	w26, LBB0_17
; %bb.6:
Lloh14:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_mlx5_ib_read_user_wqe_sq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_13
; %bb.7:
	ldr	x5, [sp, #24]
	add	x3, sp, #56
	add	x4, sp, #48
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mlx5_ib_mr_initiator_pfault_handler
	mov	w25, #1
	b	LBB0_22
LBB0_8:
	ldr	w2, [x20, #4]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_mlx5_ib_dbg
LBB0_9:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_ib_err
	mov	x22, #0
	b	LBB0_15
LBB0_10:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_11:
	cmp	w26, #0
	cset	w25, ne
LBB0_12:
	mov	x0, x21
	bl	_res_to_srq
	mov	x24, x0
Lloh23:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	x1, x23
	mov	x2, x22
	bl	_mlx5_ib_read_user_wqe_srq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_21
LBB0_13:
	ldr	w8, [x20, #12]
	stp	x23, x8, [sp, #8]
	str	x0, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_mlx5_ib_err
LBB0_15:
	mov	w23, #1
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_mlx5_ib_page_fault_resume
	ldp	w8, w2, [x20]
	stp	x23, x8, [sp]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_mlx5_ib_dbg
	mov	x0, x21
	bl	_mlx5_core_res_put
	mov	x0, x22
	bl	_free_page
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_17:
	cbz	x24, LBB0_28
; %bb.18:
	cbnz	w26, LBB0_28
; %bb.19:
Lloh30:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_mlx5_ib_read_user_wqe_rq
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_13
; %bb.20:
	ldr	x4, [sp, #24]
	add	x3, sp, #48
	mov	x0, x19
	mov	x1, x24
	mov	x2, x22
	bl	_mlx5_ib_mr_responder_pfault_handler_rq
	mov	w25, #0
	b	LBB0_22
LBB0_21:
	ldr	x4, [sp, #24]
	add	x2, sp, #56
	add	x3, sp, #48
	mov	x0, x19
	mov	x1, x24
	bl	_mlx5_ib_mr_responder_pfault_handler_srq
LBB0_22:
	tbnz	w0, #31, LBB0_15
; %bb.23:
	ldp	x3, x2, [sp, #48]
	cmp	x2, x3
	b.hs	LBB0_15
; %bb.24:
	eor	w6, w25, #0x1
	add	x4, sp, #40
	add	x5, sp, #32
	mov	x0, x19
	mov	x1, x20
	bl	_pagefault_data_segments
Lloh33:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_27
; %bb.25:
	tbnz	w0, #31, LBB0_15
; %bb.26:
	ldp	x8, x9, [sp, #32]
	cmp	x8, x9
	b.gt	LBB0_15
LBB0_27:
	mov	w23, #0
	b	LBB0_16
LBB0_28:
	cbnz	x24, LBB0_15
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_PFAULT_REQUESTOR,4,2      ; @MLX5_PFAULT_REQUESTOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wqe page fault for missing resource %d\n"

	.comm	_MLX5_RES_QP,8,3                ; @MLX5_RES_QP
	.comm	_MLX5_RES_SRQ,8,3               ; @MLX5_RES_SRQ
	.comm	_MLX5_RES_XSRQ,8,3              ; @MLX5_RES_XSRQ
l_.str.1:                               ; @.str.1
	.asciz	"wqe page fault for unsupported type %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"Error allocating memory for IO page fault handling.\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.3:                               ; @.str.3
	.asciz	"Failed reading a WQE following page fault, error %d, wqe_index %x, qpn %x\n"

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

	.no_dead_strip	_mlx5_ib_mr_wqe_pfault_handler
.subsections_via_symbols
