	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via686a_pci_probe
_via686a_pci_probe:                     ## @via686a_pci_probe
	.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, %r15
	movq	_force_addr@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_VIA686A_EXTENT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	andl	%ecx, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_VIA686A_BASE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$1, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_pci_write_config_word
	cmpq	%rax, %r14
	jne	LBB0_14
LBB0_2:
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_VIA686A_BASE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	cmpq	%rax, %rbx
	jne	LBB0_14
## %bb.3:
	movq	_VIA686A_EXTENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	andl	-44(%rbp), %r14d
	je	LBB0_4
## %bb.5:
	movq	(%r13), %rbx
	movq	_VIA686A_ENABLE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	cmpq	%rax, %rbx
	jne	LBB0_14
## %bb.6:
	testb	$1, -44(%rbp)
	jne	LBB0_10
## %bb.7:
	cmpl	$0, (%r12)
	je	LBB0_8
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	(%r13), %rbx
	movq	_VIA686A_ENABLE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	orl	$1, %edx
	movq	%r15, %rdi
	callq	_pci_write_config_word
	cmpq	%rax, %rbx
	jne	LBB0_14
LBB0_10:
	movq	_via686a_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_register
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	movl	%r14d, %edi
	callq	_via686a_device_add
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	_via686a_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_unregister
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_14
LBB0_12:
	movq	%r15, %rdi
	callq	_pci_dev_get
	movq	_s_bridge@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_force_addr,4,2                 ## @force_addr
	.comm	_VIA686A_EXTENT,4,2             ## @VIA686A_EXTENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Forcing ISA address 0x%x\n"

	.comm	_PCIBIOS_SUCCESSFUL,8,3         ## @PCIBIOS_SUCCESSFUL
	.comm	_VIA686A_BASE_REG,4,2           ## @VIA686A_BASE_REG
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"base address not set - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_VIA686A_ENABLE_REG,4,2         ## @VIA686A_ENABLE_REG
L_.str.2:                               ## @.str.2
	.asciz	"Sensors disabled, enable with force_addr=0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Enabling sensors\n"

	.comm	_via686a_driver,4,2             ## @via686a_driver
	.comm	_s_bridge,4,2                   ## @s_bridge
	.no_dead_strip	_via686a_pci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via686a_pci_probe
_via686a_pci_probe:                     ; @via686a_pci_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x22, _force_addr@GOTPAGE
Lloh1:
	ldr	x22, [x22, _force_addr@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x21, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
Lloh4:
	adrp	x20, _VIA686A_BASE_REG@GOTPAGE
Lloh5:
	ldr	x20, [x20, _VIA686A_BASE_REG@GOTPAGEOFF]
	cbz	w8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _VIA686A_EXTENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VIA686A_EXTENT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	neg	w9, w9
	and	w23, w8, w9
	str	x23, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	x24, [x21]
	ldr	w1, [x20]
	orr	w2, w23, #0x1
	mov	x0, x19
	bl	_pci_write_config_word
	cmp	x24, x0
	b.ne	LBB0_12
LBB0_2:
	ldr	x23, [x21]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	cmp	x23, x0
	b.ne	LBB0_12
; %bb.3:
	ldr	w8, [sp, #12]
Lloh11:
	adrp	x9, _VIA686A_EXTENT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VIA686A_EXTENT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	neg	w9, w9
	ands	w20, w8, w9
	b.eq	LBB0_11
; %bb.4:
	ldr	x24, [x21]
Lloh14:
	adrp	x23, _VIA686A_ENABLE_REG@GOTPAGE
Lloh15:
	ldr	x23, [x23, _VIA686A_ENABLE_REG@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	cmp	x24, x0
	b.ne	LBB0_12
; %bb.5:
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_8
; %bb.6:
	ldr	w8, [x22]
	cbz	w8, LBB0_13
; %bb.7:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	x21, [x21]
	ldr	w1, [x23]
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x1
	mov	x0, x19
	bl	_pci_write_config_word
	cmp	x21, x0
	b.ne	LBB0_12
LBB0_8:
Lloh18:
	adrp	x0, _via686a_driver@GOTPAGE
Lloh19:
	ldr	x0, [x0, _via686a_driver@GOTPAGEOFF]
	bl	_platform_driver_register
	cbnz	x0, LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_via686a_device_add
	cbz	x0, LBB0_14
; %bb.10:
Lloh20:
	adrp	x0, _via686a_driver@GOTPAGE
Lloh21:
	ldr	x0, [x0, _via686a_driver@GOTPAGEOFF]
	bl	_platform_driver_unregister
	b	LBB0_12
LBB0_11:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_12:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	str	x20, [sp]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_12
LBB0_14:
	mov	x0, x19
	bl	_pci_dev_get
Lloh29:
	adrp	x8, _s_bridge@GOTPAGE
Lloh30:
	ldr	x8, [x8, _s_bridge@GOTPAGEOFF]
Lloh31:
	str	w0, [x8]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_force_addr,4,2                 ; @force_addr
	.comm	_VIA686A_EXTENT,4,2             ; @VIA686A_EXTENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Forcing ISA address 0x%x\n"

	.comm	_PCIBIOS_SUCCESSFUL,8,3         ; @PCIBIOS_SUCCESSFUL
	.comm	_VIA686A_BASE_REG,4,2           ; @VIA686A_BASE_REG
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"base address not set - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_VIA686A_ENABLE_REG,4,2         ; @VIA686A_ENABLE_REG
l_.str.2:                               ; @.str.2
	.asciz	"Sensors disabled, enable with force_addr=0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Enabling sensors\n"

	.comm	_via686a_driver,4,2             ; @via686a_driver
	.comm	_s_bridge,4,2                   ; @s_bridge
	.no_dead_strip	_via686a_pci_probe
.subsections_via_symbols
