	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_pic_detect_device_type
_sony_pic_detect_device_type:           ## @sony_pic_detect_device_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_PCI_DEVICE_ID_INTEL_82371AB_3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_SONYPI_DEVICE_TYPE1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	_type1_events@GOTPCREL(%rip), %rcx
	movq	_SONYPI_TYPE1_OFFSET@GOTPCREL(%rip), %rdx
	jmp	LBB0_9
LBB0_2:
	movl	(%r14), %edi
	movq	_PCI_DEVICE_ID_INTEL_ICH6_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_SONYPI_DEVICE_TYPE2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	_type2_events@GOTPCREL(%rip), %rcx
	movq	_SONYPI_TYPE2_OFFSET@GOTPCREL(%rip), %rdx
	jmp	LBB0_9
LBB0_4:
	movl	(%r14), %edi
	movq	_PCI_DEVICE_ID_INTEL_ICH7_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movl	(%r14), %edi
	movq	_PCI_DEVICE_ID_INTEL_ICH8_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:
	movl	(%r14), %edi
	movq	_PCI_DEVICE_ID_INTEL_ICH9_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_SONYPI_DEVICE_TYPE3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	_type3_handle_irq@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rbx)
	movq	_type3_events@GOTPCREL(%rip), %rcx
	movq	_SONYPI_TYPE3_OFFSET@GOTPCREL(%rip), %rdx
LBB0_9:
	movq	(%rdx), %rdx
	movq	%rdx, 16(%rbx)
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rbx)
	movq	%rax, %rdi
	callq	_pci_dev_put
	movq	(%rbx), %rax
	movq	_SONYPI_DEVICE_TYPE1@GOTPCREL(%rip), %rcx
	movq	_SONYPI_DEVICE_TYPE2@GOTPCREL(%rip), %rdx
	xorl	%edi, %edi
	cmpq	(%rdx), %rax
	sete	%dil
	xorl	$3, %edi
	cmpq	(%rcx), %rax
	movl	$1, %esi
	cmovnel	%edi, %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_8:
	movq	_SONYPI_DEVICE_TYPE2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_type2_events@GOTPCREL(%rip), %rcx
	movq	_SONYPI_TYPE2_OFFSET@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ## @PCI_VENDOR_ID_INTEL
	.comm	_PCI_DEVICE_ID_INTEL_82371AB_3,4,2 ## @PCI_DEVICE_ID_INTEL_82371AB_3
	.comm	_SONYPI_DEVICE_TYPE1,8,3        ## @SONYPI_DEVICE_TYPE1
	.comm	_SONYPI_TYPE1_OFFSET,8,3        ## @SONYPI_TYPE1_OFFSET
	.comm	_type1_events,8,3               ## @type1_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH6_1,4,2 ## @PCI_DEVICE_ID_INTEL_ICH6_1
	.comm	_SONYPI_DEVICE_TYPE2,8,3        ## @SONYPI_DEVICE_TYPE2
	.comm	_SONYPI_TYPE2_OFFSET,8,3        ## @SONYPI_TYPE2_OFFSET
	.comm	_type2_events,8,3               ## @type2_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH7_1,4,2 ## @PCI_DEVICE_ID_INTEL_ICH7_1
	.comm	_SONYPI_DEVICE_TYPE3,8,3        ## @SONYPI_DEVICE_TYPE3
	.comm	_type3_handle_irq,8,3           ## @type3_handle_irq
	.comm	_SONYPI_TYPE3_OFFSET,8,3        ## @SONYPI_TYPE3_OFFSET
	.comm	_type3_events,8,3               ## @type3_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH8_4,4,2 ## @PCI_DEVICE_ID_INTEL_ICH8_4
	.comm	_PCI_DEVICE_ID_INTEL_ICH9_1,4,2 ## @PCI_DEVICE_ID_INTEL_ICH9_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected Type%d model\n"

	.no_dead_strip	_sony_pic_detect_device_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_pic_detect_device_type
_sony_pic_detect_device_type:           ; @sony_pic_detect_device_type
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x22, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _PCI_DEVICE_ID_INTEL_82371AB_3@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_DEVICE_ID_INTEL_82371AB_3@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
Lloh5:
	adrp	x20, _SONYPI_DEVICE_TYPE1@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SONYPI_DEVICE_TYPE1@GOTPAGEOFF]
Lloh7:
	adrp	x21, _SONYPI_DEVICE_TYPE2@GOTPAGE
Lloh8:
	ldr	x21, [x21, _SONYPI_DEVICE_TYPE2@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	str	x8, [x19]
Lloh9:
	adrp	x8, _type1_events@GOTPAGE
Lloh10:
	ldr	x8, [x8, _type1_events@GOTPAGEOFF]
Lloh11:
	adrp	x9, _SONYPI_TYPE1_OFFSET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SONYPI_TYPE1_OFFSET@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldr	w0, [x22]
Lloh13:
	adrp	x8, _PCI_DEVICE_ID_INTEL_ICH6_1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_DEVICE_ID_INTEL_ICH6_1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
	cbz	x0, LBB0_4
LBB0_3:
	ldr	x8, [x21]
	str	x8, [x19]
Lloh16:
	adrp	x8, _type2_events@GOTPAGE
Lloh17:
	ldr	x8, [x8, _type2_events@GOTPAGEOFF]
Lloh18:
	adrp	x9, _SONYPI_TYPE2_OFFSET@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SONYPI_TYPE2_OFFSET@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w0, [x22]
Lloh20:
	adrp	x8, _PCI_DEVICE_ID_INTEL_ICH7_1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PCI_DEVICE_ID_INTEL_ICH7_1@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
	cbnz	x0, LBB0_7
; %bb.5:
	ldr	w0, [x22]
Lloh23:
	adrp	x8, _PCI_DEVICE_ID_INTEL_ICH8_4@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCI_DEVICE_ID_INTEL_ICH8_4@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x22]
Lloh26:
	adrp	x8, _PCI_DEVICE_ID_INTEL_ICH9_1@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PCI_DEVICE_ID_INTEL_ICH9_1@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
	cbz	x0, LBB0_3
LBB0_7:
Lloh29:
	adrp	x8, _SONYPI_DEVICE_TYPE3@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SONYPI_DEVICE_TYPE3@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh32:
	adrp	x8, _type3_handle_irq@GOTPAGE
Lloh33:
	ldr	x8, [x8, _type3_handle_irq@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	str	x8, [x19, #24]
Lloh35:
	adrp	x8, _type3_events@GOTPAGE
Lloh36:
	ldr	x8, [x8, _type3_events@GOTPAGEOFF]
Lloh37:
	adrp	x9, _SONYPI_TYPE3_OFFSET@GOTPAGE
Lloh38:
	ldr	x9, [x9, _SONYPI_TYPE3_OFFSET@GOTPAGEOFF]
LBB0_8:
	ldr	x9, [x9]
	ldr	x8, [x8]
	stp	x8, x9, [x19, #8]
	bl	_pci_dev_put
	ldr	x8, [x19]
	ldr	x9, [x20]
	ldr	x10, [x21]
	cmp	x8, x10
	mov	w10, #2
	cinc	w10, w10, ne
	cmp	x8, x9
	csinc	w1, w10, wzr, ne
Lloh39:
	adrp	x0, l_.str@PAGE
Lloh40:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pr_info
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ; @PCI_VENDOR_ID_INTEL
	.comm	_PCI_DEVICE_ID_INTEL_82371AB_3,4,2 ; @PCI_DEVICE_ID_INTEL_82371AB_3
	.comm	_SONYPI_DEVICE_TYPE1,8,3        ; @SONYPI_DEVICE_TYPE1
	.comm	_SONYPI_TYPE1_OFFSET,8,3        ; @SONYPI_TYPE1_OFFSET
	.comm	_type1_events,8,3               ; @type1_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH6_1,4,2 ; @PCI_DEVICE_ID_INTEL_ICH6_1
	.comm	_SONYPI_DEVICE_TYPE2,8,3        ; @SONYPI_DEVICE_TYPE2
	.comm	_SONYPI_TYPE2_OFFSET,8,3        ; @SONYPI_TYPE2_OFFSET
	.comm	_type2_events,8,3               ; @type2_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH7_1,4,2 ; @PCI_DEVICE_ID_INTEL_ICH7_1
	.comm	_SONYPI_DEVICE_TYPE3,8,3        ; @SONYPI_DEVICE_TYPE3
	.comm	_type3_handle_irq,8,3           ; @type3_handle_irq
	.comm	_SONYPI_TYPE3_OFFSET,8,3        ; @SONYPI_TYPE3_OFFSET
	.comm	_type3_events,8,3               ; @type3_events
	.comm	_PCI_DEVICE_ID_INTEL_ICH8_4,4,2 ; @PCI_DEVICE_ID_INTEL_ICH8_4
	.comm	_PCI_DEVICE_ID_INTEL_ICH9_1,4,2 ; @PCI_DEVICE_ID_INTEL_ICH9_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected Type%d model\n"

	.no_dead_strip	_sony_pic_detect_device_type
.subsections_via_symbols
