	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbridge_get_onedevice
_sbridge_get_onedevice:                 ## @sbridge_get_onedevice
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %r12
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	(%rax,%rax,2), %rbx
	leaq	(%r12,%rbx,8), %r15
	addq	$8, %r15
	movl	8(%r12,%rbx,8), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_sbridge_printk
	movl	(%r13), %edi
	movl	8(%r12,%rbx,8), %esi
	movq	(%r14), %rdx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rdi
	movq	%rax, %r15
	callq	_pci_domain_nr
	movl	%eax, %r14d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movl	(%rax), %r15d
	leaq	(%r12,%rbx,8), %r13
	movq	(%r12,%rbx,8), %rdx
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movq	%r12, %r8
	callq	_get_sbridge_dev
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r13), %rdx
	cmpl	$1, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_IMC1@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_SOCK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_24
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_alloc_sbridge_dev
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %r12
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	1(%rax), %rdx
	movq	%rdx, (%r12)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, (%rcx,%rax,8)
	testl	%ebx, %ebx
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_pci_dev_get
LBB0_22:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r13), %rdx
	movq	_SOCK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %ebx
	jl	LBB0_10
LBB0_24:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_pci_enable_device
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rsi
	callq	_sbridge_printk
	jmp	LBB0_5
LBB0_1:
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.2:
	movq	$0, (%r14)
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_19:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rsi
	callq	_sbridge_printk
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_dev_put
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_27
LBB0_3:
	xorl	%r14d, %r14d
	cmpq	$0, 16(%r12,%rbx,8)
	jne	LBB0_27
## %bb.4:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.7:
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	movl	(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_sbridge_printk
	jmp	LBB0_5
LBB0_26:
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_edac_dbg
	movq	%rbx, %rdi
	callq	_pci_dev_get
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	jmp	LBB0_27
LBB0_13:
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_edac_dbg
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_dev_put
LBB0_27:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_dev_put
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Seeking for: PCI ID %04x:%04x\n"

	.comm	_PCI_VENDOR_ID_INTEL,4,2        ## @PCI_VENDOR_ID_INTEL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Device not found: %04x:%04x\n"

	.comm	_IMC1,8,3                       ## @IMC1
L_.str.2:                               ## @.str.2
	.asciz	"Skip IMC1: %04x:%04x (since HA1 was absent)\n"

	.comm	_SOCK,8,3                       ## @SOCK
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
L_.str.3:                               ## @.str.3
	.asciz	"Duplicated device for %04x:%04x\n"

L_.str.4:                               ## @.str.4
	.asciz	"Couldn't enable %04x:%04x\n"

L_.str.5:                               ## @.str.5
	.asciz	"Detected %04x:%04x\n"

	.no_dead_strip	_sbridge_get_onedevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbridge_get_onedevice
_sbridge_get_onedevice:                 ; @sbridge_get_onedevice
	.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	x22, x4
	mov	x21, x3
	mov	x23, x2
	str	x1, [sp, #24]                   ; 8-byte Folded Spill
	mov	x19, x0
	ldr	x24, [x2, #8]
	mov	w28, w3
Lloh0:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh2:
	adrp	x26, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x26]
	mov	w8, #24
	umaddl	x25, w3, w8, x24
	ldr	w3, [x25, #8]!
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sbridge_printk
	ldr	w0, [x26]
	ldr	w1, [x25]
	ldr	x2, [x19]
	bl	_pci_get_device
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x0
	stp	x19, x25, [sp, #8]              ; 16-byte Folded Spill
	ldr	x0, [x0]
	bl	_pci_domain_nr
	mov	x25, x0
	mov	x27, #0
	mov	w19, #0
	ldr	x8, [x20]
	ldr	w26, [x8]
	mov	w8, #24
	madd	x28, x28, x8, x24
	ldr	x2, [x28]
Lloh7:
	adrp	x24, _SOCK@GOTPAGE
Lloh8:
	ldr	x24, [x24, _SOCK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x26
	mov	x3, x22
	mov	x4, x27
	bl	_get_sbridge_dev
	mov	x27, x0
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x2, [x28]
	cmp	w21, #1
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh9:
	adrp	x8, _IMC1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IMC1@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_24
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
	cmp	x2, x8
	b.eq	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x26
	mov	x3, x23
	bl	_alloc_sbridge_dev
	cbz	x0, LBB0_27
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x0
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldp	x9, x8, [x27]
	ldr	x10, [x8, x9, lsl #3]
	cbnz	x10, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x9, #1
	str	x10, [x27]
	str	x20, [x8, x9, lsl #3]
	cbz	w19, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_pci_dev_get
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x2, [x28]
	ldr	x8, [x24]
	cmp	x2, x8
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w19, w19, #1
	ldr	w8, [x23]
	cmp	w19, w8
	b.lt	LBB0_2
LBB0_13:
	mov	x0, x20
	bl	_pci_enable_device
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_unlikely
	cbz	x0, LBB0_23
; %bb.14:
Lloh12:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_sbridge_printk
	b	LBB0_18
LBB0_15:
	ldr	x8, [x19]
	cbz	x8, LBB0_20
; %bb.16:
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_26
LBB0_17:
Lloh20:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_sbridge_printk
	mov	x0, x20
	bl	_pci_dev_put
LBB0_18:
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_26
LBB0_20:
	mov	w8, #24
	madd	x8, x28, x8, x24
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_25
; %bb.21:
	cbz	w21, LBB0_18
; %bb.22:
Lloh30:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	w2, [x26]
	ldr	w3, [x25]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sbridge_printk
	b	LBB0_18
LBB0_23:
Lloh35:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_edac_dbg
	mov	x0, x20
	bl	_pci_dev_get
	mov	w0, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x20, [x8]
	b	LBB0_26
LBB0_24:
Lloh40:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
Lloh43:
	adrp	x1, l_.str.2@PAGE
Lloh44:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
	bl	_edac_dbg
	mov	x0, x20
	bl	_pci_dev_put
LBB0_25:
	mov	w0, #0
LBB0_26:
	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_27:
	mov	x0, x20
	bl	_pci_dev_put
Lloh45:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Seeking for: PCI ID %04x:%04x\n"

	.comm	_PCI_VENDOR_ID_INTEL,4,2        ; @PCI_VENDOR_ID_INTEL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Device not found: %04x:%04x\n"

	.comm	_IMC1,8,3                       ; @IMC1
l_.str.2:                               ; @.str.2
	.asciz	"Skip IMC1: %04x:%04x (since HA1 was absent)\n"

	.comm	_SOCK,8,3                       ; @SOCK
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
l_.str.3:                               ; @.str.3
	.asciz	"Duplicated device for %04x:%04x\n"

l_.str.4:                               ; @.str.4
	.asciz	"Couldn't enable %04x:%04x\n"

l_.str.5:                               ; @.str.5
	.asciz	"Detected %04x:%04x\n"

	.no_dead_strip	_sbridge_get_onedevice
.subsections_via_symbols
