	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s10_tlp_read_packet
_s10_tlp_read_packet:                   ## @s10_tlp_read_packet
	.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
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_TLP_LOOP@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	_S10_RP_RXCPL_STATUS@GOTPCREL(%rip), %r15
	movq	_RP_RXCPL_SOP@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_cra_readl
	testl	%eax, (%r12)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$5, %edi
	callq	_udelay
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	_S10_RP_RXCPL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_cra_readl
	movl	%eax, -64(%rbp)
	movl	(%r14), %eax
LBB0_5:
	movq	_PCIBIOS_DEVICE_NOT_FOUND@GOTPCREL(%rip), %r14
	cmpl	%eax, %ebx
	je	LBB0_15
## %bb.6:
	movl	$1, %r15d
	leaq	-64(%rbp), %r12
	movq	_RP_RXCPL_EOP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jge	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_S10_RP_RXCPL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_cra_readl
	movl	%eax, %ebx
	movq	_S10_RP_RXCPL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_cra_readl
	movl	%eax, -64(%rbp,%r15,4)
	incq	%r15
	testl	%ebx, (%r14)
	je	LBB0_7
## %bb.9:
	movl	-60(%rbp), %edi
	callq	_TLP_COMP_STATUS
	testl	%eax, %eax
	movq	_PCIBIOS_DEVICE_NOT_FOUND@GOTPCREL(%rip), %r14
	jne	LBB0_15
## %bb.10:
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.11:
	movl	-60(%rbp), %edi
	callq	_TLP_BYTE_COUNT
	cmpl	$4, %eax
	jne	LBB0_15
## %bb.12:
	cmpl	$4, %r15d
	jne	LBB0_15
## %bb.13:
	movl	-52(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
	movq	_PCIBIOS_DEVICE_NOT_FOUND@GOTPCREL(%rip), %r14
LBB0_15:
	movl	(%r14), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TLP_LOOP,4,2                   ## @TLP_LOOP
	.comm	_S10_RP_RXCPL_STATUS,4,2        ## @S10_RP_RXCPL_STATUS
	.comm	_RP_RXCPL_SOP,4,2               ## @RP_RXCPL_SOP
	.comm	_S10_RP_RXCPL_REG,4,2           ## @S10_RP_RXCPL_REG
	.comm	_PCIBIOS_DEVICE_NOT_FOUND,4,2   ## @PCIBIOS_DEVICE_NOT_FOUND
	.comm	_RP_RXCPL_EOP,4,2               ## @RP_RXCPL_EOP
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ## @PCIBIOS_SUCCESSFUL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Malformed TLP packet\n"

	.no_dead_strip	_s10_tlp_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s10_tlp_read_packet
_s10_tlp_read_packet:                   ; @s10_tlp_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
Lloh3:
	adrp	x24, _TLP_LOOP@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TLP_LOOP@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh5:
	adrp	x23, _S10_RP_RXCPL_STATUS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _S10_RP_RXCPL_STATUS@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w22, #0
Lloh7:
	adrp	x25, _RP_RXCPL_SOP@GOTPAGE
Lloh8:
	ldr	x25, [x25, _RP_RXCPL_SOP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	bl	_cra_readl
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #5
	bl	_udelay
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w22, #0
LBB0_5:
	cmp	w22, w8
	b.ne	LBB0_7
	b	LBB0_17
LBB0_6:
Lloh9:
	adrp	x8, _S10_RP_RXCPL_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S10_RP_RXCPL_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_cra_readl
	str	w0, [sp, #8]
	ldr	w8, [x24]
	cmp	w22, w8
	b.eq	LBB0_17
LBB0_7:
	mov	w26, #1
	add	x24, sp, #8
Lloh12:
	adrp	x25, _S10_RP_RXCPL_REG@GOTPAGE
Lloh13:
	ldr	x25, [x25, _S10_RP_RXCPL_REG@GOTPAGEOFF]
Lloh14:
	adrp	x27, _RP_RXCPL_EOP@GOTPAGE
Lloh15:
	ldr	x27, [x27, _RP_RXCPL_EOP@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x26, w0, sxtw
	b.ge	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	bl	_cra_readl
	mov	x22, x0
	ldr	w1, [x25]
	mov	x0, x21
	bl	_cra_readl
	add	x28, x26, #1
	str	w0, [x24, x26, lsl #2]
	ldr	w8, [x27]
	mov	x26, x28
	tst	w8, w22
	b.eq	LBB0_8
; %bb.10:
	ldr	w0, [sp, #12]
	bl	_TLP_COMP_STATUS
	cbnz	w0, LBB0_17
; %bb.11:
	cbz	x19, LBB0_15
; %bb.12:
	ldr	w0, [sp, #12]
	bl	_TLP_BYTE_COUNT
Lloh16:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
	cmp	w0, #4
	b.ne	LBB0_18
; %bb.13:
	cmp	w28, #4
	b.ne	LBB0_18
; %bb.14:
	ldr	w8, [sp, #20]
	str	w8, [x19]
LBB0_15:
Lloh18:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_17:
Lloh22:
	adrp	x8, _PCIBIOS_DEVICE_NOT_FOUND@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCIBIOS_DEVICE_NOT_FOUND@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TLP_LOOP,4,2                   ; @TLP_LOOP
	.comm	_S10_RP_RXCPL_STATUS,4,2        ; @S10_RP_RXCPL_STATUS
	.comm	_RP_RXCPL_SOP,4,2               ; @RP_RXCPL_SOP
	.comm	_S10_RP_RXCPL_REG,4,2           ; @S10_RP_RXCPL_REG
	.comm	_PCIBIOS_DEVICE_NOT_FOUND,4,2   ; @PCIBIOS_DEVICE_NOT_FOUND
	.comm	_RP_RXCPL_EOP,4,2               ; @RP_RXCPL_EOP
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ; @PCIBIOS_SUCCESSFUL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Malformed TLP packet\n"

	.no_dead_strip	_s10_tlp_read_packet
.subsections_via_symbols
