	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_tlp_header
_get_tlp_header:                        ## @get_tlp_header
	.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
	movl	%r9d, %r14d
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	xorl	%eax, %eax
	testl	%r9d, %r9d
	sete	%al
	movq	8(%rdi), %rcx
	movq	(%rcx,%rax,8), %rdx
	movq	16(%rcx,%rax,8), %r12
	movq	_TLP_READ_TAG@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_TLP_WRITE_TAG@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	32(%rcx), %rax
	movq	_ALTERA_PCIE_V1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	sete	%al
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	callq	_S10_RP_SECONDARY
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	setl	%al
LBB0_3:
	testb	%al, %al
	cmovneq	%rdx, %r12
	testl	%r14d, %r14d
	cmoveq	%r13, %r15
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_TLP_CFG_DW0
	movq	16(%rbp), %r14
	movl	%eax, (%r14)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_TLP_CFG_DW1
	movl	%eax, 4(%r14)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_TLP_CFG_DW2
	movl	%eax, 8(%r14)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLP_READ_TAG,8,3               ## @TLP_READ_TAG
	.comm	_TLP_WRITE_TAG,8,3              ## @TLP_WRITE_TAG
	.comm	_ALTERA_PCIE_V1,8,3             ## @ALTERA_PCIE_V1
	.no_dead_strip	_get_tlp_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_tlp_header
_get_tlp_header:                        ; @get_tlp_header
	.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	x19, x6
	mov	x25, x5
	mov	x23, x4
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	cmp	w5, #0
	cset	w8, eq
	ldr	x9, [x0, #8]
	mov	w10, #16
	mov	w11, #24
	csel	x10, x11, x10, eq
	ldr	x26, [x9, w8, uxtw #3]
	ldr	x27, [x9, x10]
Lloh0:
	adrp	x8, _TLP_READ_TAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLP_READ_TAG@GOTPAGEOFF]
Lloh2:
	ldr	x28, [x8]
Lloh3:
	adrp	x8, _TLP_WRITE_TAG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TLP_WRITE_TAG@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
	ldr	x8, [x9, #32]
Lloh6:
	adrp	x9, _ALTERA_PCIE_V1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ALTERA_PCIE_V1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x24]
	cmp	x8, x22
	cset	w8, eq
	b	LBB0_3
LBB0_2:
	mov	x0, x24
	bl	_S10_RP_SECONDARY
	cmp	x0, x22
	cset	w8, lt
LBB0_3:
	cmp	w8, #0
	csel	x1, x26, x27, ne
	cmp	w25, #0
	csel	x25, x20, x28, eq
	mov	x0, x24
	bl	_TLP_CFG_DW0
	str	w0, [x19]
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	bl	_TLP_CFG_DW1
	str	w0, [x19, #4]
	mov	x0, x22
	mov	x1, x21
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_TLP_CFG_DW2
	str	w0, [x19, #8]
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TLP_READ_TAG,8,3               ; @TLP_READ_TAG
	.comm	_TLP_WRITE_TAG,8,3              ; @TLP_WRITE_TAG
	.comm	_ALTERA_PCIE_V1,8,3             ; @ALTERA_PCIE_V1
	.no_dead_strip	_get_tlp_header
.subsections_via_symbols
