	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_pci_parity_status
_get_pci_parity_status:                 ## @get_pci_parity_status
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_PCI_STATUS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PCI_SEC_STATUS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_pci_read_config_word
	movl	-28(%rbp), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_read_config_dword
	cmpl	$-1, -32(%rbp)
	je	LBB0_9
## %bb.5:
	movl	-28(%rbp), %eax
LBB0_6:
	movq	_PCI_STATUS_DETECTED_PARITY@GOTPCREL(%rip), %rcx
	movq	_PCI_STATUS_SIG_SYSTEM_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_PCI_STATUS_PARITY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	andl	%eax, %edx
	movl	%edx, -28(%rbp)
	je	LBB0_7
## %bb.8:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_pci_write_config_word
	movl	-28(%rbp), %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_SEC_STATUS,4,2             ## @PCI_SEC_STATUS
	.comm	_PCI_STATUS,4,2                 ## @PCI_STATUS
	.comm	_PCI_STATUS_DETECTED_PARITY,4,2 ## @PCI_STATUS_DETECTED_PARITY
	.comm	_PCI_STATUS_SIG_SYSTEM_ERROR,4,2 ## @PCI_STATUS_SIG_SYSTEM_ERROR
	.comm	_PCI_STATUS_PARITY,4,2          ## @PCI_STATUS_PARITY
	.no_dead_strip	_get_pci_parity_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_pci_parity_status
_get_pci_parity_status:                 ; @get_pci_parity_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_SEC_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_SEC_STATUS@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PCI_STATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCI_STATUS@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w20, [x8]
	add	x2, sp, #12
	mov	x1, x20
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #0
	bl	_pci_read_config_dword
	ldr	w8, [sp, #8]
	cmn	w8, #1
	b.eq	LBB0_5
; %bb.2:
	ldr	w8, [sp, #12]
LBB0_3:
Lloh4:
	adrp	x9, _PCI_STATUS_DETECTED_PARITY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PCI_STATUS_DETECTED_PARITY@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	adrp	x10, _PCI_STATUS_SIG_SYSTEM_ERROR@GOTPAGE
Lloh8:
	ldr	x10, [x10, _PCI_STATUS_SIG_SYSTEM_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh10:
	adrp	x10, _PCI_STATUS_PARITY@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PCI_STATUS_PARITY@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ands	w2, w8, w9
	str	w2, [sp, #12]
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_word
	ldr	w0, [sp, #12]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_SEC_STATUS,4,2             ; @PCI_SEC_STATUS
	.comm	_PCI_STATUS,4,2                 ; @PCI_STATUS
	.comm	_PCI_STATUS_DETECTED_PARITY,4,2 ; @PCI_STATUS_DETECTED_PARITY
	.comm	_PCI_STATUS_SIG_SYSTEM_ERROR,4,2 ; @PCI_STATUS_SIG_SYSTEM_ERROR
	.comm	_PCI_STATUS_PARITY,4,2          ; @PCI_STATUS_PARITY
	.no_dead_strip	_get_pci_parity_status
.subsections_via_symbols
