	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_setup_memwin                ## -- Begin function t4_setup_memwin
	.p2align	4, 0x90
_t4_setup_memwin:                       ## @t4_setup_memwin
	.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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_PCIE_MEM_ACCESS_BASE_WIN_A@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	%edx, %esi
	callq	_PCIE_MEM_ACCESS_REG
	movl	%eax, %r12d
	xorl	%edi, %edi
	callq	_BIR_V
	orl	%eax, %ebx
	movq	_MEMWIN0_APERTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ilog2
	movq	_WINDOW_SHIFT_X@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, %rdi
	callq	_WINDOW_V
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_t4_write_reg
	movl	(%r13), %edi
	movl	%r15d, %esi
	callq	_PCIE_MEM_ACCESS_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_t4_read_reg                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_MEM_ACCESS_BASE_WIN_A,4,2 ## @PCIE_MEM_ACCESS_BASE_WIN_A
	.comm	_MEMWIN0_APERTURE,4,2           ## @MEMWIN0_APERTURE
	.comm	_WINDOW_SHIFT_X,8,3             ## @WINDOW_SHIFT_X
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_setup_memwin                ; -- Begin function t4_setup_memwin
	.p2align	2
_t4_setup_memwin:                       ; @t4_setup_memwin
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _PCIE_MEM_ACCESS_BASE_WIN_A@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PCIE_MEM_ACCESS_BASE_WIN_A@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x2
	bl	_PCIE_MEM_ACCESS_REG
	mov	x22, x0
	mov	w0, #0
	bl	_BIR_V
	orr	w20, w0, w20
Lloh2:
	adrp	x8, _MEMWIN0_APERTURE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MEMWIN0_APERTURE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_ilog2
Lloh5:
	adrp	x8, _WINDOW_SHIFT_X@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WINDOW_SHIFT_X@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	sub	x0, x0, x8
	bl	_WINDOW_V
	orr	w2, w20, w0
	mov	x0, x21
	mov	x1, x22
	bl	_t4_write_reg
	ldr	w0, [x23]
	mov	x1, x19
	bl	_PCIE_MEM_ACCESS_REG
	mov	x1, x0
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_t4_read_reg
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_MEM_ACCESS_BASE_WIN_A,4,2 ; @PCIE_MEM_ACCESS_BASE_WIN_A
	.comm	_MEMWIN0_APERTURE,4,2           ; @MEMWIN0_APERTURE
	.comm	_WINDOW_SHIFT_X,8,3             ; @WINDOW_SHIFT_X
.subsections_via_symbols
