	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function piix4_setup_sb800
_piix4_setup_sb800:                     ## @piix4_setup_sb800
	.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	_force@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_force_addr@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	addq	$20, %r12
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_43
LBB0_2:
	movl	%edx, %ebx
	movq	(%r12), %rax
	movq	_PCI_VENDOR_ID_AMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.3:
	movq	8(%r12), %rcx
	movq	_PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	xorl	%r14d, %r14d
	cmpl	$64, 16(%r12)
	jg	LBB0_10
LBB0_5:
	movq	_PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	xorl	%r14d, %r14d
	cmpl	$72, 16(%r12)
	jg	LBB0_10
LBB0_7:
	movq	_PCI_VENDOR_ID_HYGON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	8(%r12), %rax
	movq	_PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	sete	%al
	leal	40(,%rax,4), %r14d
LBB0_10:
	movq	_SB800_PIIX4_SMB_IDX@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$2, %esi
	callq	_request_muxed_region
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_outb_p
	movl	(%r15), %edi
	incl	%edi
	callq	_inb_p
	movl	%eax, %r13d
	movl	%r14d, %edi
	orl	$1, %edi
	movl	(%r15), %esi
	callq	_outb_p
	movl	(%r15), %edi
	incl	%edi
	callq	_inb_p
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	$2, %esi
	callq	_release_region
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.14:
	shll	$8, %ebx
	orl	%r13d, %ebx
	andl	$1, %r13d
	andl	$65504, %ebx                    ## imm = 0xFFE0
	movl	%ebx, %r15d
	testl	%r13d, %r13d
	je	LBB0_16
LBB0_17:
	movq	_SMBIOSIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_piix4_driver@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movzwl	%r15w, %r14d
	movl	%r14d, %edi
	callq	_acpi_check_region
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_19:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_43
LBB0_11:
	addq	$20, %r12
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
LBB0_22:
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_43
LBB0_13:
	andl	$16, %r13d
	shll	$8, %ebx
	leal	32(%rbx), %r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovel	%ebx, %r15d
	testl	%r13d, %r13d
	jne	LBB0_17
LBB0_16:
	addq	$20, %r12
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_43
LBB0_20:
	movl	(%r13), %esi
	movq	(%rbx), %rdx
	movl	%r14d, %edi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_21
## %bb.23:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_25
## %bb.24:
	addq	$20, %r12
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	jmp	LBB0_42
LBB0_21:
	addq	$20, %r12
	movzwl	%r15w, %edx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_22
LBB0_25:
	movzwl	%r15w, %r14d
	leal	16(%r14), %ebx
	movzwl	%bx, %edi
	leaq	L_.str.6(%rip), %rdx
	movl	$1, %esi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_26
## %bb.27:
	movl	%ebx, %edi
	callq	_inb_p
	movl	%eax, %r15d
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_release_region
	leaq	20(%r12), %rbx
	testb	$1, %r15b
	leaq	L_.str.9(%rip), %rax
	leaq	L_.str.8(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	sarl	$4, %r15d
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_info
	movq	(%r12), %rax
	movq	_PCI_VENDOR_ID_AMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.28:
	movq	_PCI_VENDOR_ID_HYGON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.35:
	movq	_SB800_PIIX4_SMB_IDX@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$2, %esi
	callq	_request_muxed_region
	testl	%eax, %eax
	je	LBB0_36
## %bb.37:
	movq	_SB800_PIIX4_PORT_IDX_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_outb_p
	movl	(%r15), %edi
	incl	%edi
	callq	_inb_p
	testb	$1, %al
	jne	LBB0_38
## %bb.39:
	movq	_SB800_PIIX4_PORT_IDX@GOTPCREL(%rip), %rax
	jmp	LBB0_40
LBB0_26:
	addq	$20, %r12
	leaq	L_.str.7(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r13), %esi
	movl	%r14d, %edi
	callq	_release_region
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %r14d
	jmp	LBB0_43
LBB0_29:
	movq	8(%r12), %rax
	movq	_PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_32
## %bb.30:
	movq	_PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_34
## %bb.31:
	cmpl	$31, 16(%r12)
	jl	LBB0_34
LBB0_32:
	movq	_SB800_PIIX4_PORT_IDX_KERNCZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_piix4_port_sel_sb800@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movq	_SB800_PIIX4_PORT_IDX_MASK_KERNCZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_piix4_port_mask_sb800@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_36:
	movl	(%r13), %esi
	movl	%r14d, %edi
	callq	_release_region
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_34:
	movq	_SB800_PIIX4_PORT_IDX_ALT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_piix4_port_sel_sb800@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movq	_SB800_PIIX4_PORT_IDX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_piix4_port_mask_sb800@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SB800_PIIX4_PORT_IDX_SHIFT@GOTPCREL(%rip), %rax
LBB0_33:
	movl	(%rax), %eax
	movq	_piix4_port_shift_sb800@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_41
LBB0_38:
	movq	_SB800_PIIX4_PORT_IDX_ALT@GOTPCREL(%rip), %rax
LBB0_40:
	movq	(%rax), %rax
	movq	_piix4_port_sel_sb800@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movq	_SB800_PIIX4_PORT_IDX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_piix4_port_mask_sb800@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SB800_PIIX4_PORT_IDX_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_piix4_port_shift_sb800@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SB800_PIIX4_SMB_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_release_region
	movq	(%r15), %rdx
LBB0_41:
	leaq	L_.str.11(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_42:
	xorl	%eax, %eax
	callq	_dev_info
LBB0_43:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_force,8,3                      ## @force
	.comm	_force_addr,8,3                 ## @force_addr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMBus does not support forcing address!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_VENDOR_ID_AMD,8,3          ## @PCI_VENDOR_ID_AMD
	.comm	_PCI_DEVICE_ID_AMD_HUDSON2_SMBUS,8,3 ## @PCI_DEVICE_ID_AMD_HUDSON2_SMBUS
	.comm	_PCI_DEVICE_ID_AMD_KERNCZ_SMBUS,8,3 ## @PCI_DEVICE_ID_AMD_KERNCZ_SMBUS
	.comm	_PCI_VENDOR_ID_HYGON,8,3        ## @PCI_VENDOR_ID_HYGON
	.comm	_SB800_PIIX4_SMB_IDX,4,2        ## @SB800_PIIX4_SMB_IDX
L_.str.1:                               ## @.str.1
	.asciz	"sb800_piix4_smb"

L_.str.2:                               ## @.str.2
	.asciz	"SMB base address index region 0x%x already in use.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"SMBus Host Controller not enabled!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SMBIOSIZE,4,2                  ## @SMBIOSIZE
	.comm	_piix4_driver,8,3               ## @piix4_driver
L_.str.4:                               ## @.str.4
	.asciz	"SMBus region 0x%x already in use!\n"

L_.str.5:                               ## @.str.5
	.asciz	"Auxiliary SMBus Host Controller at 0x%x\n"

L_.str.6:                               ## @.str.6
	.asciz	"i2ccfg"

L_.str.7:                               ## @.str.7
	.asciz	"SMBus I2C bus config region 0x%x already in use!\n"

L_.str.8:                               ## @.str.8
	.asciz	"Using IRQ for SMBus\n"

L_.str.9:                               ## @.str.9
	.asciz	"Using SMI# for SMBus\n"

L_.str.10:                              ## @.str.10
	.asciz	"SMBus Host Controller at 0x%x, revision %d\n"

	.comm	_SB800_PIIX4_PORT_IDX_KERNCZ,8,3 ## @SB800_PIIX4_PORT_IDX_KERNCZ
	.comm	_piix4_port_sel_sb800,8,3       ## @piix4_port_sel_sb800
	.comm	_SB800_PIIX4_PORT_IDX_MASK_KERNCZ,4,2 ## @SB800_PIIX4_PORT_IDX_MASK_KERNCZ
	.comm	_piix4_port_mask_sb800,4,2      ## @piix4_port_mask_sb800
	.comm	_SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ,4,2 ## @SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ
	.comm	_piix4_port_shift_sb800,4,2     ## @piix4_port_shift_sb800
	.comm	_SB800_PIIX4_PORT_IDX_ALT,8,3   ## @SB800_PIIX4_PORT_IDX_ALT
	.comm	_SB800_PIIX4_PORT_IDX_MASK,4,2  ## @SB800_PIIX4_PORT_IDX_MASK
	.comm	_SB800_PIIX4_PORT_IDX_SHIFT,4,2 ## @SB800_PIIX4_PORT_IDX_SHIFT
	.comm	_SB800_PIIX4_PORT_IDX_SEL,4,2   ## @SB800_PIIX4_PORT_IDX_SEL
	.comm	_SB800_PIIX4_PORT_IDX,8,3       ## @SB800_PIIX4_PORT_IDX
L_.str.11:                              ## @.str.11
	.asciz	"Using register 0x%02x for SMBus port selection\n"

	.no_dead_strip	_piix4_setup_sb800
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function piix4_setup_sb800
_piix4_setup_sb800:                     ; @piix4_setup_sb800
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _force@GOTPAGE
Lloh1:
	ldr	x8, [x8, _force@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _force_addr@GOTPAGE
Lloh4:
	ldr	x9, [x9, _force_addr@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x19, #20
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_22
LBB0_2:
	mov	x20, x2
	ldr	x8, [x19]
Lloh10:
	adrp	x24, _PCI_VENDOR_ID_AMD@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PCI_VENDOR_ID_AMD@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	ldr	x9, [x19, #8]
Lloh12:
	adrp	x10, _PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
	ldr	w10, [x19, #16]
	cmp	w10, #64
	b.gt	LBB0_9
LBB0_5:
Lloh15:
	adrp	x10, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.6:
	ldr	w9, [x19, #16]
	cmp	w9, #72
	b.gt	LBB0_9
LBB0_7:
Lloh18:
	adrp	x9, _PCI_VENDOR_ID_HYGON@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PCI_VENDOR_ID_HYGON@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
Lloh21:
	adrp	x9, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_9:
	mov	w21, #0
	b	LBB0_11
LBB0_10:
	mov	w8, #40
	mov	w9, #44
	cmp	w20, #0
	csel	w21, w9, w8, eq
LBB0_11:
Lloh24:
	adrp	x25, _SB800_PIIX4_SMB_IDX@GOTPAGE
Lloh25:
	ldr	x25, [x25, _SB800_PIIX4_SMB_IDX@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #2
	bl	_request_muxed_region
	cbz	w0, LBB0_17
; %bb.12:
	ldr	w1, [x25]
	mov	x0, x21
	bl	_outb_p
	ldr	w8, [x25]
	add	w0, w8, #1
	bl	_inb_p
	mov	x22, x0
	orr	w0, w21, #0x1
	ldr	w1, [x25]
	bl	_outb_p
	ldr	w8, [x25]
	add	w0, w8, #1
	bl	_inb_p
	mov	x23, x0
	ldr	w0, [x25]
	mov	w1, #2
	bl	_release_region
	and	w8, w22, #0x1
	orr	w9, w22, w23, lsl #8
	and	w9, w9, #0xffffffe0
	and	w10, w22, #0x10
	lsl	w11, w23, #8
	mov	w12, #32
	bfi	w12, w23, #8, #24
	cmp	w20, #0
	csel	w11, w11, w12, eq
	cmp	w21, #0
	csel	w8, w8, w10, ne
	csel	w22, w9, w11, ne
	cbz	w8, LBB0_20
; %bb.13:
Lloh28:
	adrp	x23, _SMBIOSIZE@GOTPAGE
Lloh29:
	ldr	x23, [x23, _SMBIOSIZE@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh30:
	adrp	x26, _piix4_driver@GOTPAGE
Lloh31:
	ldr	x26, [x26, _piix4_driver@GOTPAGEOFF]
	ldr	x2, [x26]
	and	w21, w22, #0xffff
	mov	x0, x21
	bl	_acpi_check_region
	cbnz	x0, LBB0_21
; %bb.14:
	ldr	w1, [x23]
	ldr	x2, [x26]
	mov	x0, x21
	bl	_request_region
	cbz	w0, LBB0_24
; %bb.15:
	cbz	w20, LBB0_25
; %bb.16:
	add	x0, x19, #20
	and	w20, w22, #0xffff
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	b	LBB0_39
LBB0_17:
	add	x0, x19, #20
	ldr	w8, [x25]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_18:
	bl	_dev_err
LBB0_19:
Lloh36:
	adrp	x8, _EBUSY@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_22
LBB0_20:
	add	x0, x19, #20
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_21:
Lloh40:
	adrp	x8, _ENODEV@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_23:
	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
	add	sp, sp, #96
	ret
LBB0_24:
	add	x0, x19, #20
	and	x8, x22, #0xffff
	str	x8, [sp]
Lloh42:
	adrp	x1, l_.str.4@PAGE
Lloh43:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_25:
	and	w20, w22, #0xffff
	add	w21, w20, #16
	and	w0, w21, #0xffff
Lloh44:
	adrp	x2, l_.str.6@PAGE
Lloh45:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w1, #1
	bl	_request_region
	cbz	w0, LBB0_30
; %bb.26:
	mov	x0, x21
	bl	_inb_p
	mov	x22, x0
	mov	x0, x21
	mov	w1, #1
	bl	_release_region
	add	x21, x19, #20
Lloh46:
	adrp	x8, l_.str.8@PAGE
Lloh47:
	add	x8, x8, l_.str.8@PAGEOFF
Lloh48:
	adrp	x9, l_.str.9@PAGE
Lloh49:
	add	x9, x9, l_.str.9@PAGEOFF
	tst	w22, #0x1
	csel	x1, x9, x8, eq
	mov	x0, x21
	bl	_dev_dbg
	asr	w8, w22, #4
	str	x8, [sp]
Lloh50:
	adrp	x1, l_.str.10@PAGE
Lloh51:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_info
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_32
; %bb.27:
Lloh52:
	adrp	x9, _PCI_VENDOR_ID_HYGON@GOTPAGE
Lloh53:
	ldr	x9, [x9, _PCI_VENDOR_ID_HYGON@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_32
; %bb.28:
	ldr	w0, [x25]
Lloh55:
	adrp	x2, l_.str.1@PAGE
Lloh56:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #2
	bl	_request_muxed_region
	cbz	w0, LBB0_31
; %bb.29:
Lloh57:
	adrp	x8, _SB800_PIIX4_PORT_IDX_SEL@GOTPAGE
Lloh58:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_SEL@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	ldr	w1, [x25]
	bl	_outb_p
	ldr	w8, [x25]
	add	w0, w8, #1
	bl	_inb_p
Lloh60:
	adrp	x8, _SB800_PIIX4_PORT_IDX_ALT@GOTPAGE
Lloh61:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_ALT@GOTPAGEOFF]
Lloh62:
	adrp	x9, _SB800_PIIX4_PORT_IDX@GOTPAGE
Lloh63:
	ldr	x9, [x9, _SB800_PIIX4_PORT_IDX@GOTPAGEOFF]
	tst	w0, #0x1
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
Lloh64:
	adrp	x9, _SB800_PIIX4_PORT_IDX_MASK@GOTPAGE
Lloh65:
	ldr	x9, [x9, _SB800_PIIX4_PORT_IDX_MASK@GOTPAGEOFF]
Lloh66:
	adrp	x10, _piix4_port_mask_sb800@GOTPAGE
Lloh67:
	ldr	x10, [x10, _piix4_port_mask_sb800@GOTPAGEOFF]
Lloh68:
	ldr	w9, [x9]
Lloh69:
	str	w9, [x10]
Lloh70:
	adrp	x19, _piix4_port_sel_sb800@GOTPAGE
Lloh71:
	ldr	x19, [x19, _piix4_port_sel_sb800@GOTPAGEOFF]
Lloh72:
	adrp	x9, _SB800_PIIX4_PORT_IDX_SHIFT@GOTPAGE
Lloh73:
	ldr	x9, [x9, _SB800_PIIX4_PORT_IDX_SHIFT@GOTPAGEOFF]
	str	x8, [x19]
Lloh74:
	ldr	w8, [x9]
Lloh75:
	adrp	x9, _piix4_port_shift_sb800@GOTPAGE
Lloh76:
	ldr	x9, [x9, _piix4_port_shift_sb800@GOTPAGEOFF]
Lloh77:
	str	w8, [x9]
	ldr	w0, [x25]
	mov	w1, #2
	bl	_release_region
	ldr	x2, [x19]
	b	LBB0_38
LBB0_30:
	add	x0, x19, #20
	str	x21, [sp]
Lloh78:
	adrp	x1, l_.str.7@PAGE
Lloh79:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
LBB0_31:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_release_region
	b	LBB0_19
LBB0_32:
	ldr	x8, [x19, #8]
Lloh80:
	adrp	x9, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGE
Lloh81:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_KERNCZ_SMBUS@GOTPAGEOFF]
Lloh82:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_35
; %bb.33:
Lloh83:
	adrp	x9, _PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPAGE
Lloh84:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_HUDSON2_SMBUS@GOTPAGEOFF]
Lloh85:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.34:
	ldr	w8, [x19, #16]
	cmp	w8, #31
	b.lt	LBB0_36
LBB0_35:
Lloh86:
	adrp	x8, _SB800_PIIX4_PORT_IDX_KERNCZ@GOTPAGE
Lloh87:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_KERNCZ@GOTPAGEOFF]
Lloh88:
	ldr	x2, [x8]
Lloh89:
	adrp	x8, _piix4_port_sel_sb800@GOTPAGE
Lloh90:
	ldr	x8, [x8, _piix4_port_sel_sb800@GOTPAGEOFF]
Lloh91:
	str	x2, [x8]
Lloh92:
	adrp	x8, _SB800_PIIX4_PORT_IDX_MASK_KERNCZ@GOTPAGE
Lloh93:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_MASK_KERNCZ@GOTPAGEOFF]
Lloh94:
	ldr	w8, [x8]
Lloh95:
	adrp	x9, _piix4_port_mask_sb800@GOTPAGE
Lloh96:
	ldr	x9, [x9, _piix4_port_mask_sb800@GOTPAGEOFF]
Lloh97:
	str	w8, [x9]
Lloh98:
	adrp	x8, _SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ@GOTPAGE
Lloh99:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ@GOTPAGEOFF]
	b	LBB0_37
LBB0_36:
Lloh100:
	adrp	x8, _SB800_PIIX4_PORT_IDX_ALT@GOTPAGE
Lloh101:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_ALT@GOTPAGEOFF]
Lloh102:
	ldr	x2, [x8]
Lloh103:
	adrp	x8, _piix4_port_sel_sb800@GOTPAGE
Lloh104:
	ldr	x8, [x8, _piix4_port_sel_sb800@GOTPAGEOFF]
Lloh105:
	str	x2, [x8]
Lloh106:
	adrp	x8, _SB800_PIIX4_PORT_IDX_MASK@GOTPAGE
Lloh107:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_MASK@GOTPAGEOFF]
Lloh108:
	ldr	w8, [x8]
Lloh109:
	adrp	x9, _piix4_port_mask_sb800@GOTPAGE
Lloh110:
	ldr	x9, [x9, _piix4_port_mask_sb800@GOTPAGEOFF]
Lloh111:
	str	w8, [x9]
Lloh112:
	adrp	x8, _SB800_PIIX4_PORT_IDX_SHIFT@GOTPAGE
Lloh113:
	ldr	x8, [x8, _SB800_PIIX4_PORT_IDX_SHIFT@GOTPAGEOFF]
LBB0_37:
	ldr	w8, [x8]
Lloh114:
	adrp	x9, _piix4_port_shift_sb800@GOTPAGE
Lloh115:
	ldr	x9, [x9, _piix4_port_shift_sb800@GOTPAGEOFF]
Lloh116:
	str	w8, [x9]
LBB0_38:
Lloh117:
	adrp	x1, l_.str.11@PAGE
Lloh118:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_39:
	bl	_dev_info
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotStr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotStr	Lloh66, Lloh67, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh68
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh98, Lloh99
	.loh AdrpLdrGotStr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotStr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh112, Lloh113
	.loh AdrpLdrGotStr	Lloh109, Lloh110, Lloh111
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotStr	Lloh103, Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpLdrGotStr	Lloh114, Lloh115, Lloh116
	.loh AdrpAdd	Lloh117, Lloh118
	.cfi_endproc
                                        ; -- End function
	.comm	_force,8,3                      ; @force
	.comm	_force_addr,8,3                 ; @force_addr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMBus does not support forcing address!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_VENDOR_ID_AMD,8,3          ; @PCI_VENDOR_ID_AMD
	.comm	_PCI_DEVICE_ID_AMD_HUDSON2_SMBUS,8,3 ; @PCI_DEVICE_ID_AMD_HUDSON2_SMBUS
	.comm	_PCI_DEVICE_ID_AMD_KERNCZ_SMBUS,8,3 ; @PCI_DEVICE_ID_AMD_KERNCZ_SMBUS
	.comm	_PCI_VENDOR_ID_HYGON,8,3        ; @PCI_VENDOR_ID_HYGON
	.comm	_SB800_PIIX4_SMB_IDX,4,2        ; @SB800_PIIX4_SMB_IDX
l_.str.1:                               ; @.str.1
	.asciz	"sb800_piix4_smb"

l_.str.2:                               ; @.str.2
	.asciz	"SMB base address index region 0x%x already in use.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"SMBus Host Controller not enabled!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SMBIOSIZE,4,2                  ; @SMBIOSIZE
	.comm	_piix4_driver,8,3               ; @piix4_driver
l_.str.4:                               ; @.str.4
	.asciz	"SMBus region 0x%x already in use!\n"

l_.str.5:                               ; @.str.5
	.asciz	"Auxiliary SMBus Host Controller at 0x%x\n"

l_.str.6:                               ; @.str.6
	.asciz	"i2ccfg"

l_.str.7:                               ; @.str.7
	.asciz	"SMBus I2C bus config region 0x%x already in use!\n"

l_.str.8:                               ; @.str.8
	.asciz	"Using IRQ for SMBus\n"

l_.str.9:                               ; @.str.9
	.asciz	"Using SMI# for SMBus\n"

l_.str.10:                              ; @.str.10
	.asciz	"SMBus Host Controller at 0x%x, revision %d\n"

	.comm	_SB800_PIIX4_PORT_IDX_KERNCZ,8,3 ; @SB800_PIIX4_PORT_IDX_KERNCZ
	.comm	_piix4_port_sel_sb800,8,3       ; @piix4_port_sel_sb800
	.comm	_SB800_PIIX4_PORT_IDX_MASK_KERNCZ,4,2 ; @SB800_PIIX4_PORT_IDX_MASK_KERNCZ
	.comm	_piix4_port_mask_sb800,4,2      ; @piix4_port_mask_sb800
	.comm	_SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ,4,2 ; @SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ
	.comm	_piix4_port_shift_sb800,4,2     ; @piix4_port_shift_sb800
	.comm	_SB800_PIIX4_PORT_IDX_ALT,8,3   ; @SB800_PIIX4_PORT_IDX_ALT
	.comm	_SB800_PIIX4_PORT_IDX_MASK,4,2  ; @SB800_PIIX4_PORT_IDX_MASK
	.comm	_SB800_PIIX4_PORT_IDX_SHIFT,4,2 ; @SB800_PIIX4_PORT_IDX_SHIFT
	.comm	_SB800_PIIX4_PORT_IDX_SEL,4,2   ; @SB800_PIIX4_PORT_IDX_SEL
	.comm	_SB800_PIIX4_PORT_IDX,8,3       ; @SB800_PIIX4_PORT_IDX
l_.str.11:                              ; @.str.11
	.asciz	"Using register 0x%02x for SMBus port selection\n"

	.no_dead_strip	_piix4_setup_sb800
.subsections_via_symbols
