	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_re_create_fence_mr
_bnxt_re_create_fence_mr:               ## @bnxt_re_create_fence_mr
	.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	%rdi, %r15
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_MW_BIND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movq	8(%rdi), %r14
	movq	8(%r14), %rax
	movq	(%rax), %rbx
	movq	24(%rdi), %rsi
	movq	_BNXT_RE_FENCE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_dma_map_single
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_rdev_to_dev
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	$0, 40(%r15)
	jmp	LBB0_11
LBB0_2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, 40(%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	%rax, 32(%r15)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 48(%rax)
	leaq	4(%r15), %rax
	movq	%rax, 32(%r14)
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	%r12d, %edi
	callq	___from_ib_access_flags
	movl	%eax, 20(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bnxt_qplib_alloc_mrw
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_rdev_to_dev
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_7:
	movl	16(%r14), %eax
	movl	%eax, 44(%r14)
	movq	24(%r15), %rax
	movq	%rax, 8(%r14)
	movq	_BNXT_RE_FENCE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r13, -56(%rbp)
	movq	_BNXT_RE_FENCE_PBL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_bnxt_qplib_reg_mr
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_rdev_to_dev
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movq	%r15, %rdi
	callq	_bnxt_re_destroy_fence_mr
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r14), %eax
	movl	%eax, 40(%r14)
	movq	_IB_MW_TYPE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_bnxt_re_alloc_mw
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rdev_to_dev
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_11
LBB0_13:
	movq	%rbx, 16(%r15)
	movq	%r15, %rdi
	callq	_bnxt_re_create_fence_wqe
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_MW_BIND,4,2          ## @IB_ACCESS_MW_BIND
	.comm	_BNXT_RE_FENCE_BYTES,4,2        ## @BNXT_RE_FENCE_BYTES
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to dma-map fence-MR-mem\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR,4,2 ## @CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to alloc fence-HW-MR\n"

	.comm	_BNXT_RE_FENCE_PBL_SIZE,4,2     ## @BNXT_RE_FENCE_PBL_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Failed to register fence-MR\n"

	.comm	_IB_MW_TYPE_1,4,2               ## @IB_MW_TYPE_1
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create fence-MW for PD: %p\n"

	.no_dead_strip	_bnxt_re_create_fence_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_re_create_fence_mr
_bnxt_re_create_fence_mr:               ; @bnxt_re_create_fence_mr
	.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	x19, x0
Lloh0:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IB_ACCESS_MW_BIND@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IB_ACCESS_MW_BIND@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
Lloh5:
	ldr	w26, [x9]
	ldr	x20, [x0, #8]
	ldr	x8, [x20, #8]
	ldr	x21, [x8]
	ldr	x1, [x0, #24]
Lloh6:
	adrp	x24, _BNXT_RE_FENCE_BYTES@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BNXT_RE_FENCE_BYTES@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh8:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_dma_map_single
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	bl	_dma_mapping_error
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_rdev_to_dev
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	str	xzr, [x19, #40]
LBB0_2:
	mov	x0, x19
	bl	_bnxt_re_destroy_fence_mr
LBB0_3:
	mov	x0, x21
	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
LBB0_4:
	str	x23, [x19, #40]
Lloh16:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x0
	orr	w0, w26, w25
	str	x22, [x19, #32]
	str	x20, [x22, #48]
	add	x8, x19, #4
	str	x8, [x22, #32]
Lloh19:
	adrp	x8, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x22, #24]
	bl	___from_ib_access_flags
	str	w0, [x22, #20]
	mov	x0, x20
	mov	x1, x22
	bl	_bnxt_qplib_alloc_mrw
	cbz	w0, LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x0, x20
	bl	_rdev_to_dev
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_2
LBB0_7:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_2
LBB0_8:
	ldr	w8, [x22, #16]
	str	w8, [x22, #44]
	ldr	x8, [x19, #24]
	str	x8, [x22, #8]
	ldr	w8, [x24]
	str	w8, [x22, #4]
	str	x23, [sp, #8]
Lloh27:
	adrp	x8, _BNXT_RE_FENCE_PBL_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BNXT_RE_FENCE_PBL_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
Lloh30:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh32:
	ldr	w5, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x22
	mov	w4, #0
	bl	_bnxt_qplib_reg_mr
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	mov	x0, x20
	bl	_rdev_to_dev
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_2
LBB0_10:
	ldr	w8, [x22]
	str	w8, [x22, #40]
Lloh35:
	adrp	x8, _IB_MW_TYPE_1@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IB_MW_TYPE_1@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_bnxt_re_alloc_mw
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_rdev_to_dev
	str	x19, [sp]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_2
LBB0_12:
	str	x21, [x19, #16]
	mov	x0, x19
	bl	_bnxt_re_create_fence_wqe
	mov	w21, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_ACCESS_MW_BIND,4,2          ; @IB_ACCESS_MW_BIND
	.comm	_BNXT_RE_FENCE_BYTES,4,2        ; @BNXT_RE_FENCE_BYTES
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to dma-map fence-MR-mem\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR,4,2 ; @CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to alloc fence-HW-MR\n"

	.comm	_BNXT_RE_FENCE_PBL_SIZE,4,2     ; @BNXT_RE_FENCE_PBL_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Failed to register fence-MR\n"

	.comm	_IB_MW_TYPE_1,4,2               ; @IB_MW_TYPE_1
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create fence-MW for PD: %p\n"

	.no_dead_strip	_bnxt_re_create_fence_mr
.subsections_via_symbols
