	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_pogo_errata_restore_misc_reg
_amd_pogo_errata_restore_misc_reg:      ## @amd_pogo_errata_restore_misc_reg
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	4(%rax), %edi
	movq	_PCIX_MISC_BRIDGE_ERRORS_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_PERR_OBSERVED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-36(%rbp), %ebx
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ctrl_dbg
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movl	(%r15), %esi
	movl	%ebx, %edx
	callq	_pci_write_config_dword
LBB0_2:
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movq	_PCIX_MEM_BASE_LIMIT_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_RSE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-32(%rbp), %ebx
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ctrl_dbg
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movl	(%r15), %esi
	movl	%ebx, %edx
	callq	_pci_write_config_dword
LBB0_4:
	movq	(%r14), %rax
	movl	4(%rax), %edi
	movq	_PCIX_MISCII_OFFSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	(%r14), %rax
	movq	_SERRFATALENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.5:
	orl	-28(%rbp), %ecx
	jmp	LBB0_7
LBB0_6:
	notl	%ecx
	andl	-28(%rbp), %ecx
LBB0_7:
	movl	%ecx, -28(%rbp)
	movq	_SERRNONFATALENABLE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rax), %esi
	andl	%edx, %esi
	movl	%edx, %edi
	notl	%edi
	andl	%ecx, %edi
	orl	%ecx, %edx
	testl	%esi, %esi
	cmovel	%edi, %edx
	movl	%edx, -28(%rbp)
	movq	_PERRFLOODENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %esi
	andl	%ecx, %esi
	movl	%ecx, %edi
	notl	%edi
	andl	%edx, %edi
	orl	%ecx, %edx
	testl	%esi, %esi
	cmovel	%edi, %edx
	movl	%edx, -28(%rbp)
	movq	_PERRFATALENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %esi
	andl	%ecx, %esi
	movl	%ecx, %edi
	notl	%edi
	andl	%edx, %edi
	orl	%ecx, %edx
	testl	%esi, %esi
	cmovel	%edi, %edx
	movl	%edx, -28(%rbp)
	movq	_PERRNONFATALENABLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %esi
	andl	%ecx, %esi
	movl	%ecx, %edi
	notl	%edi
	andl	%edx, %edi
	orl	%ecx, %edx
	testl	%esi, %esi
	cmovel	%edi, %edx
	movl	%edx, -28(%rbp)
	movl	4(%rax), %edi
	movl	(%rbx), %esi
	callq	_pci_write_config_dword
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIX_MISC_BRIDGE_ERRORS_OFFSET,4,2 ## @PCIX_MISC_BRIDGE_ERRORS_OFFSET
	.comm	_PERR_OBSERVED_MASK,4,2         ## @PERR_OBSERVED_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bridge_Errors[ PERR_OBSERVED = %08X] (W1C)\n"

	.comm	_PCIX_MEM_BASE_LIMIT_OFFSET,4,2 ## @PCIX_MEM_BASE_LIMIT_OFFSET
	.comm	_RSE_MASK,4,2                   ## @RSE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Memory_Base_Limit[ RSE ] (W1C)\n"

	.comm	_PCIX_MISCII_OFFSET,4,2         ## @PCIX_MISCII_OFFSET
	.comm	_SERRFATALENABLE_MASK,4,2       ## @SERRFATALENABLE_MASK
	.comm	_SERRNONFATALENABLE_MASK,4,2    ## @SERRNONFATALENABLE_MASK
	.comm	_PERRFLOODENABLE_MASK,4,2       ## @PERRFLOODENABLE_MASK
	.comm	_PERRFATALENABLE_MASK,4,2       ## @PERRFATALENABLE_MASK
	.comm	_PERRNONFATALENABLE_MASK,4,2    ## @PERRNONFATALENABLE_MASK
	.no_dead_strip	_amd_pogo_errata_restore_misc_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amd_pogo_errata_restore_misc_reg
_amd_pogo_errata_restore_misc_reg:      ; @amd_pogo_errata_restore_misc_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #4]
Lloh0:
	adrp	x21, _PCIX_MISC_BRIDGE_ERRORS_OFFSET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCIX_MISC_BRIDGE_ERRORS_OFFSET@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #24
	bl	_pci_read_config_dword
	ldr	w8, [sp, #24]
Lloh2:
	adrp	x9, _PERR_OBSERVED_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PERR_OBSERVED_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ands	w20, w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19]
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ctrl_dbg
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_pci_write_config_dword
LBB0_2:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
Lloh7:
	adrp	x21, _PCIX_MEM_BASE_LIMIT_OFFSET@GOTPAGE
Lloh8:
	ldr	x21, [x21, _PCIX_MEM_BASE_LIMIT_OFFSET@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #20
	bl	_pci_read_config_dword
	ldr	w8, [sp, #20]
Lloh9:
	adrp	x9, _RSE_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RSE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ands	w20, w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ctrl_dbg
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_pci_write_config_dword
LBB0_4:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
Lloh14:
	adrp	x20, _PCIX_MISCII_OFFSET@GOTPAGE
Lloh15:
	ldr	x20, [x20, _PCIX_MISCII_OFFSET@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #28
	bl	_pci_read_config_dword
	ldr	x8, [x19]
	ldr	w10, [x8]
Lloh16:
	adrp	x9, _SERRFATALENABLE_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SERRFATALENABLE_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w10
	b.eq	LBB0_6
; %bb.5:
	ldr	w10, [sp, #28]
	orr	w9, w10, w9
	b	LBB0_7
LBB0_6:
	ldr	w10, [sp, #28]
	bic	w9, w10, w9
LBB0_7:
	str	w9, [sp, #28]
Lloh19:
	adrp	x10, _SERRNONFATALENABLE_MASK@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SERRNONFATALENABLE_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	ldp	w11, w0, [x8]
	tst	w10, w11
	bic	w11, w9, w10
	orr	w9, w10, w9
	csel	w9, w11, w9, eq
	str	w9, [sp, #28]
	ldr	w10, [x8]
Lloh22:
	adrp	x11, _PERRFLOODENABLE_MASK@GOTPAGE
Lloh23:
	ldr	x11, [x11, _PERRFLOODENABLE_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w11, [x11]
	tst	w11, w10
	bic	w10, w9, w11
	orr	w9, w9, w11
	csel	w9, w10, w9, eq
	str	w9, [sp, #28]
	ldr	w10, [x8]
Lloh25:
	adrp	x11, _PERRFATALENABLE_MASK@GOTPAGE
Lloh26:
	ldr	x11, [x11, _PERRFATALENABLE_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	tst	w11, w10
	bic	w10, w9, w11
	orr	w9, w9, w11
	csel	w9, w10, w9, eq
	str	w9, [sp, #28]
	ldr	w8, [x8]
Lloh28:
	adrp	x10, _PERRNONFATALENABLE_MASK@GOTPAGE
Lloh29:
	ldr	x10, [x10, _PERRNONFATALENABLE_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	bic	w11, w9, w10
	orr	w9, w9, w10
	tst	w10, w8
	csel	w2, w11, w9, eq
	str	w2, [sp, #28]
	ldr	w1, [x20]
	bl	_pci_write_config_dword
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIX_MISC_BRIDGE_ERRORS_OFFSET,4,2 ; @PCIX_MISC_BRIDGE_ERRORS_OFFSET
	.comm	_PERR_OBSERVED_MASK,4,2         ; @PERR_OBSERVED_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bridge_Errors[ PERR_OBSERVED = %08X] (W1C)\n"

	.comm	_PCIX_MEM_BASE_LIMIT_OFFSET,4,2 ; @PCIX_MEM_BASE_LIMIT_OFFSET
	.comm	_RSE_MASK,4,2                   ; @RSE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Memory_Base_Limit[ RSE ] (W1C)\n"

	.comm	_PCIX_MISCII_OFFSET,4,2         ; @PCIX_MISCII_OFFSET
	.comm	_SERRFATALENABLE_MASK,4,2       ; @SERRFATALENABLE_MASK
	.comm	_SERRNONFATALENABLE_MASK,4,2    ; @SERRNONFATALENABLE_MASK
	.comm	_PERRFLOODENABLE_MASK,4,2       ; @PERRFLOODENABLE_MASK
	.comm	_PERRFATALENABLE_MASK,4,2       ; @PERRFATALENABLE_MASK
	.comm	_PERRNONFATALENABLE_MASK,4,2    ; @PERRNONFATALENABLE_MASK
	.no_dead_strip	_amd_pogo_errata_restore_misc_reg
.subsections_via_symbols
