	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_memwin_rdma
_setup_memwin_rdma:                     ## @setup_memwin_rdma
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	movq	_PCI_BASE_ADDRESS_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_t4_read_pcie_cfg4
	movl	%eax, %r14d
	movq	_PCI_BASE_ADDRESS_MEM_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movl	16(%r13), %edi
	movq	%r13, %rsi
	callq	_OCQ_WIN_OFFSET
	addl	%eax, %r14d
	movq	8(%r13), %rdi
	callq	_roundup_pow_of_two
	movl	%eax, %r15d
	sarl	$10, %r15d
	movq	_PCIE_MEM_ACCESS_BASE_WIN_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_PCIE_MEM_ACCESS_REG
	movl	%eax, %r12d
	movl	$1, %edi
	callq	_BIR_V
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_ilog2
	movl	%eax, %edi
	callq	_WINDOW_V
	orl	%eax, %ebx
	orl	%r14d, %ebx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_t4_write_reg
	movq	_PCIE_MEM_ACCESS_OFFSET_A@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$3, %esi
	callq	_PCIE_MEM_ACCESS_REG
	movl	(%r13), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_t4_write_reg
	movl	(%rbx), %edi
	movl	$3, %esi
	callq	_PCIE_MEM_ACCESS_REG
	movq	%r13, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_t4_read_reg                    ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_BASE_ADDRESS_2,4,2         ## @PCI_BASE_ADDRESS_2
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ## @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_PCIE_MEM_ACCESS_BASE_WIN_A,4,2 ## @PCIE_MEM_ACCESS_BASE_WIN_A
	.comm	_PCIE_MEM_ACCESS_OFFSET_A,4,2   ## @PCIE_MEM_ACCESS_OFFSET_A
	.no_dead_strip	_setup_memwin_rdma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_memwin_rdma
_setup_memwin_rdma:                     ; @setup_memwin_rdma
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_BASE_ADDRESS_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_BASE_ADDRESS_2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_t4_read_pcie_cfg4
Lloh3:
	adrp	x8, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_BASE_ADDRESS_MEM_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w20, w8, w0
	ldr	w0, [x19, #16]
	mov	x1, x19
	bl	_OCQ_WIN_OFFSET
	add	w22, w20, w0
	ldr	x0, [x19, #8]
	bl	_roundup_pow_of_two
	asr	w20, w0, #10
Lloh6:
	adrp	x8, _PCIE_MEM_ACCESS_BASE_WIN_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIE_MEM_ACCESS_BASE_WIN_A@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #3
	bl	_PCIE_MEM_ACCESS_REG
	mov	x21, x0
	mov	w0, #1
	bl	_BIR_V
	orr	w22, w0, w22
	mov	x0, x20
	bl	_ilog2
	bl	_WINDOW_V
	orr	w2, w22, w0
	mov	x0, x19
	mov	x1, x21
	bl	_t4_write_reg
Lloh9:
	adrp	x20, _PCIE_MEM_ACCESS_OFFSET_A@GOTPAGE
Lloh10:
	ldr	x20, [x20, _PCIE_MEM_ACCESS_OFFSET_A@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #3
	bl	_PCIE_MEM_ACCESS_REG
	mov	x1, x0
	ldr	w2, [x19]
	mov	x0, x19
	bl	_t4_write_reg
	ldr	w0, [x20]
	mov	w1, #3
	bl	_PCIE_MEM_ACCESS_REG
	mov	x1, x0
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_t4_read_reg
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_BASE_ADDRESS_2,4,2         ; @PCI_BASE_ADDRESS_2
	.comm	_PCI_BASE_ADDRESS_MEM_MASK,4,2  ; @PCI_BASE_ADDRESS_MEM_MASK
	.comm	_PCIE_MEM_ACCESS_BASE_WIN_A,4,2 ; @PCIE_MEM_ACCESS_BASE_WIN_A
	.comm	_PCIE_MEM_ACCESS_OFFSET_A,4,2   ; @PCIE_MEM_ACCESS_OFFSET_A
	.no_dead_strip	_setup_memwin_rdma
.subsections_via_symbols
