	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_detect_pch               ## -- Begin function intel_detect_pch
	.p2align	4, 0x90
_intel_detect_pch:                      ## @intel_detect_pch
	.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
	movq	%rdi, %r12
	movq	_PCI_CLASS_BRIDGE_ISA@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	shll	$8, %edi
	xorl	%esi, %esi
	callq	_pci_get_class
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	shll	$8, %edi
	movq	%r15, %rsi
	callq	_pci_get_class
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_INTEL_PCH_DEVICE_ID_MASK@GOTPCREL(%rip), %rax
	movzwl	(%rax), %ebx
	andw	8(%r15), %bx
	movzwl	%bx, %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_intel_pch_type
	movl	%eax, %ecx
	movq	_PCH_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r15), %edx
	movl	16(%r15), %esi
	movl	%r13d, %edi
	callq	_intel_is_virt_pch
	testq	%rax, %rax
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rbx
	je	LBB0_8
## %bb.5:
	movq	%r12, %rdi
	callq	_intel_virt_detect_pch
	movzwl	%ax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_intel_pch_type
	movl	%eax, %r14d
	testw	%bx, %bx
	setne	%al
	movq	_PCH_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movl	%r14d, %ecx
LBB0_6:
	movl	%ecx, (%r12)
	movw	%bx, 4(%r12)
	movq	%r12, %rdi
	callq	_HAS_DISPLAY
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_PCH_NOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movw	$0, 4(%r12)
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	xorl	%r15d, %r15d
LBB0_10:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_dev_put                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CLASS_BRIDGE_ISA,4,2       ## @PCI_CLASS_BRIDGE_ISA
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ## @PCI_VENDOR_ID_INTEL
	.comm	_INTEL_PCH_DEVICE_ID_MASK,2,1   ## @INTEL_PCH_DEVICE_ID_MASK
	.comm	_PCH_NONE,4,2                   ## @PCH_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Display disabled, reverting to NOP PCH\n"

	.comm	_PCH_NOP,4,2                    ## @PCH_NOP
L_.str.1:                               ## @.str.1
	.asciz	"No PCH found.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_detect_pch               ; -- Begin function intel_detect_pch
	.p2align	2
_intel_detect_pch:                      ; @intel_detect_pch
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
Lloh0:
	adrp	x23, _PCI_CLASS_BRIDGE_ISA@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PCI_CLASS_BRIDGE_ISA@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w0, w8, #8
	mov	x1, #0
	bl	_pci_get_class
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x25, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh4:
	adrp	x26, _INTEL_PCH_DEVICE_ID_MASK@GOTPAGE
Lloh5:
	ldr	x26, [x26, _INTEL_PCH_DEVICE_ID_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x24, _PCH_NONE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PCH_NONE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	lsl	w0, w8, #8
	mov	x1, x20
	bl	_pci_get_class
	mov	x20, x0
	cbz	x0, LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrh	w8, [x20, #8]
	ldrh	w9, [x26]
	and	w27, w9, w8
	and	w22, w27, #0xffff
	mov	x0, x19
	mov	x1, x22
	bl	_intel_pch_type
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x20, #12]
	mov	x0, x22
	bl	_intel_is_virt_pch
	cbz	x0, LBB0_2
; %bb.6:
	mov	x0, x19
	bl	_intel_virt_detect_pch
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_intel_pch_type
	mov	x21, x0
	cmp	w22, #0
	ldr	w8, [x24]
	ccmp	w0, w8, #0, ne
	cset	w0, eq
	bl	_WARN_ON
	cmp	x0, #0
	csel	w27, w22, wzr, eq
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x20, #0
	b	LBB0_11
LBB0_8:
	mov	x21, x0
LBB0_9:
	str	w21, [x19]
	strh	w27, [x19, #4]
	mov	x0, x19
	bl	_HAS_DISPLAY
	cbnz	w0, LBB0_11
; %bb.10:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh12:
	adrp	x8, _PCH_NOP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCH_NOP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19]
	strh	wzr, [x19, #4]
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_pci_dev_put
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CLASS_BRIDGE_ISA,4,2       ; @PCI_CLASS_BRIDGE_ISA
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ; @PCI_VENDOR_ID_INTEL
	.comm	_INTEL_PCH_DEVICE_ID_MASK,2,1   ; @INTEL_PCH_DEVICE_ID_MASK
	.comm	_PCH_NONE,4,2                   ; @PCH_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Display disabled, reverting to NOP PCH\n"

	.comm	_PCH_NOP,4,2                    ; @PCH_NOP
l_.str.1:                               ; @.str.1
	.asciz	"No PCH found.\n"

.subsections_via_symbols
