	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt596_probe
_vt596_probe:                           ## @vt596_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	%rsi, %r14
	movq	%rdi, %r15
	movq	_force_addr@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.1:
	andl	$65520, %edi                    ## imm = 0xFFF0
	movq	_vt596_smba@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_force@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_2:
	movq	_vt596_driver@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$8, %esi
	callq	_acpi_check_region
	testl	%eax, %eax
	je	LBB0_15
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_30
LBB0_4:
	movl	8(%r14), %esi
	movq	_vt596_smba@GOTPCREL(%rip), %r13
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_pci_read_config_word
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	(%r13), %edi
	testb	$1, %dil
	jne	LBB0_10
LBB0_6:
	movq	(%r14), %rax
	movq	_PCI_DEVICE_ID_VIA_82C596_3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:
	movq	_SMBBA2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_vt596_smba@GOTPCREL(%rip), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_word
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:
	movl	(%rbx), %edi
	testb	$1, %dil
	jne	LBB0_9
LBB0_12:
	addq	$8, %r15
	leaq	L_.str(%rip), %rsi
LBB0_13:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_15:
	movq	_vt596_smba@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	(%rbx), %edx
	movl	$8, %esi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movq	%r13, %rbx
	movq	_SMBHSTCFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-41(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_byte
	cmpl	$0, (%r12)
	je	LBB0_19
## %bb.18:
	movl	(%r13), %esi
	movzbl	-41(%rbp), %edx
	andl	$-2, %edx
	movq	%r15, %rdi
	callq	_pci_write_config_byte
	movl	8(%r14), %esi
	movq	%rbx, %r12
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_word
	movl	(%r13), %esi
	movzbl	-41(%rbp), %edx
	orl	$1, %edx
	movq	%r15, %rdi
	callq	_pci_write_config_byte
	leaq	8(%r15), %rdi
	movl	(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_22
LBB0_16:
	addq	$8, %r15
	movl	(%r13), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_30
LBB0_19:
	movb	-41(%rbp), %al
	testb	$1, %al
	movq	%rbx, %r12
	jne	LBB0_22
## %bb.20:
	movq	_force@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_28
## %bb.21:
	movl	(%r13), %esi
	orb	$1, %al
	movzbl	%al, %edx
	movq	%r15, %rdi
	callq	_pci_write_config_byte
	leaq	8(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_info
LBB0_22:
	leaq	8(%r15), %rbx
	movl	(%r12), %edx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$11, %eax
	ja	LBB0_26
## %bb.23:
	cmpl	$4, %eax
	je	LBB0_24
LBB0_25:
	movq	_FEATURE_I2CBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_vt596_features@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_26:
	movq	_vt596_adapter@GOTPCREL(%rip), %r14
	movq	%rbx, 8(%r14)
	movl	(%r14), %edi
	movl	(%r12), %ecx
	leaq	L_.str.7(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	%r15, %rdi
	callq	_pci_dev_get
	movq	_vt596_pdev@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movq	%r14, %rdi
	callq	_i2c_add_adapter
	testl	%eax, %eax
	je	LBB0_3
## %bb.27:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	callq	_pci_dev_put
	movq	$0, (%r15)
LBB0_29:
	movl	(%r12), %edi
	movl	$8, %esi
	callq	_release_region
LBB0_30:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_SMBHSTCFG@GOTPCREL(%rip), %rax
	movl	$132, (%rax)
LBB0_10:
	andl	$65520, %edi                    ## imm = 0xFFF0
	movl	%edi, (%r13)
	jne	LBB0_2
## %bb.11:
	addq	$8, %r15
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_28:
	addq	$8, %r15
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_24:
	cmpl	$64, 4(%r15)
	jge	LBB0_25
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_force_addr,4,2                 ## @force_addr
	.comm	_vt596_smba,4,2                 ## @vt596_smba
	.comm	_force,8,3                      ## @force
	.comm	_PCI_DEVICE_ID_VIA_82C596_3,8,3 ## @PCI_DEVICE_ID_VIA_82C596_3
	.comm	_SMBBA2,4,2                     ## @SMBBA2
	.comm	_SMBHSTCFG,4,2                  ## @SMBHSTCFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot configure SMBus I/O Base address\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_vt596_driver,4,2               ## @vt596_driver
L_.str.2:                               ## @.str.2
	.asciz	"SMBus region 0x%x already in use!\n"

L_.str.3:                               ## @.str.3
	.asciz	"WARNING: SMBus interface set to new address 0x%04x!\n"

L_.str.4:                               ## @.str.4
	.asciz	"Enabling SMBus device\n"

L_.str.5:                               ## @.str.5
	.asciz	"SMBUS: Error: Host SMBus controller not enabled! - upgrade BIOS or use force=1\n"

L_.str.6:                               ## @.str.6
	.asciz	"VT596_smba = 0x%X\n"

	.comm	_FEATURE_I2CBLOCK,4,2           ## @FEATURE_I2CBLOCK
	.comm	_vt596_features,4,2             ## @vt596_features
	.comm	_vt596_adapter,16,3             ## @vt596_adapter
L_.str.7:                               ## @.str.7
	.asciz	"SMBus Via Pro adapter at %04x"

	.comm	_vt596_pdev,8,3                 ## @vt596_pdev
	.no_dead_strip	_vt596_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt596_probe
_vt596_probe:                           ; @vt596_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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _force_addr@GOTPAGE
Lloh1:
	ldr	x23, [x23, _force_addr@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_6
; %bb.1:
	and	w0, w8, #0xfff0
Lloh2:
	adrp	x8, _vt596_smba@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vt596_smba@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
Lloh5:
	adrp	x8, _force@GOTPAGE
Lloh6:
	ldr	x8, [x8, _force@GOTPAGEOFF]
Lloh7:
	str	xzr, [x8]
LBB0_2:
Lloh8:
	adrp	x21, _vt596_driver@GOTPAGE
Lloh9:
	ldr	x21, [x21, _vt596_driver@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #8
	bl	_acpi_check_region
	cbnz	w0, LBB0_26
; %bb.3:
Lloh10:
	adrp	x22, _vt596_smba@GOTPAGE
Lloh11:
	ldr	x22, [x22, _vt596_smba@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x21]
	mov	w1, #8
	bl	_request_region
	cbz	w0, LBB0_12
; %bb.4:
Lloh12:
	adrp	x21, _SMBHSTCFG@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SMBHSTCFG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #15
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	w8, [x23]
	cbz	w8, LBB0_13
; %bb.5:
	ldr	w1, [x21]
	ldrb	w8, [sp, #15]
	and	w2, w8, #0xfe
	mov	x0, x19
	bl	_pci_write_config_byte
	ldr	w1, [x20, #8]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_pci_write_config_word
	ldr	w1, [x21]
	ldrb	w8, [sp, #15]
	orr	w2, w8, #0x1
	mov	x0, x19
	bl	_pci_write_config_byte
	add	x0, x19, #8
	ldr	w2, [x22]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
	b	LBB0_16
LBB0_6:
	ldr	w1, [x20, #8]
Lloh16:
	adrp	x21, _vt596_smba@GOTPAGE
Lloh17:
	ldr	x21, [x21, _vt596_smba@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x21
	bl	_pci_read_config_word
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w8, [x21]
	tbnz	w8, #0, LBB0_23
LBB0_8:
	ldr	x8, [x20]
Lloh18:
	adrp	x9, _PCI_DEVICE_ID_VIA_82C596_3@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PCI_DEVICE_ID_VIA_82C596_3@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
Lloh21:
	adrp	x8, _SMBBA2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SMBBA2@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x22, _vt596_smba@GOTPAGE
Lloh25:
	ldr	x22, [x22, _vt596_smba@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x22
	bl	_pci_read_config_word
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w8, [x22]
	tbnz	w8, #0, LBB0_22
LBB0_11:
	add	x0, x19, #8
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_25
LBB0_12:
	add	x0, x19, #8
	ldr	w8, [x22]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_25
LBB0_13:
	ldrb	w8, [sp, #15]
	tbnz	w8, #0, LBB0_16
; %bb.14:
Lloh30:
	adrp	x9, _force@GOTPAGE
Lloh31:
	ldr	x9, [x9, _force@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cbz	x9, LBB0_28
; %bb.15:
	ldr	w1, [x21]
	orr	w2, w8, #0x1
	mov	x0, x19
	bl	_pci_write_config_byte
	add	x0, x19, #8
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
LBB0_16:
	add	x20, x19, #8
	ldr	w2, [x22]
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #11
	b.hi	LBB0_19
; %bb.17:
	cmp	w8, #4
	b.eq	LBB0_29
LBB0_18:
Lloh37:
	adrp	x8, _FEATURE_I2CBLOCK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FEATURE_I2CBLOCK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _vt596_features@GOTPAGE
Lloh41:
	ldr	x9, [x9, _vt596_features@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_19:
Lloh42:
	adrp	x21, _vt596_adapter@GOTPAGE
Lloh43:
	ldr	x21, [x21, _vt596_adapter@GOTPAGEOFF]
	str	x20, [x21, #8]
	ldr	w0, [x21]
	ldr	w3, [x22]
Lloh44:
	adrp	x2, l_.str.7@PAGE
Lloh45:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	mov	x0, x19
	bl	_pci_dev_get
Lloh46:
	adrp	x20, _vt596_pdev@GOTPAGE
Lloh47:
	ldr	x20, [x20, _vt596_pdev@GOTPAGEOFF]
	str	x0, [x20]
	mov	x0, x21
	bl	_i2c_add_adapter
	cbz	w0, LBB0_26
; %bb.20:
	mov	x19, x0
	ldr	x0, [x20]
	bl	_pci_dev_put
	str	xzr, [x20]
LBB0_21:
	ldr	w0, [x22]
	mov	w1, #8
	bl	_release_region
	b	LBB0_27
LBB0_22:
Lloh48:
	adrp	x9, _SMBHSTCFG@GOTPAGE
Lloh49:
	ldr	x9, [x9, _SMBHSTCFG@GOTPAGEOFF]
	mov	w10, #132
Lloh50:
	str	w10, [x9]
LBB0_23:
	ands	w0, w8, #0xfff0
	str	w0, [x21]
	b.ne	LBB0_2
; %bb.24:
	add	x0, x19, #8
Lloh51:
	adrp	x1, l_.str.1@PAGE
Lloh52:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_25:
	bl	_dev_err
LBB0_26:
Lloh53:
	adrp	x8, _ENODEV@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_27:
	mov	x0, x19
	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_28:
	add	x0, x19, #8
Lloh56:
	adrp	x1, l_.str.5@PAGE
Lloh57:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
Lloh58:
	adrp	x8, _ENODEV@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_21
LBB0_29:
	ldr	w8, [x19, #4]
	cmp	w8, #64
	b.ge	LBB0_18
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_force_addr,4,2                 ; @force_addr
	.comm	_vt596_smba,4,2                 ; @vt596_smba
	.comm	_force,8,3                      ; @force
	.comm	_PCI_DEVICE_ID_VIA_82C596_3,8,3 ; @PCI_DEVICE_ID_VIA_82C596_3
	.comm	_SMBBA2,4,2                     ; @SMBBA2
	.comm	_SMBHSTCFG,4,2                  ; @SMBHSTCFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot configure SMBus I/O Base address\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_vt596_driver,4,2               ; @vt596_driver
l_.str.2:                               ; @.str.2
	.asciz	"SMBus region 0x%x already in use!\n"

l_.str.3:                               ; @.str.3
	.asciz	"WARNING: SMBus interface set to new address 0x%04x!\n"

l_.str.4:                               ; @.str.4
	.asciz	"Enabling SMBus device\n"

l_.str.5:                               ; @.str.5
	.asciz	"SMBUS: Error: Host SMBus controller not enabled! - upgrade BIOS or use force=1\n"

l_.str.6:                               ; @.str.6
	.asciz	"VT596_smba = 0x%X\n"

	.comm	_FEATURE_I2CBLOCK,4,2           ; @FEATURE_I2CBLOCK
	.comm	_vt596_features,4,2             ; @vt596_features
	.comm	_vt596_adapter,16,3             ; @vt596_adapter
l_.str.7:                               ; @.str.7
	.asciz	"SMBus Via Pro adapter at %04x"

	.comm	_vt596_pdev,8,3                 ; @vt596_pdev
	.no_dead_strip	_vt596_probe
.subsections_via_symbols
