	.file	"extr_longhaul.c_longhaul_setup_southbridge.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ACPI I/O at 0x%x\n"
	.text
	.p2align 4
	.type	longhaul_setup_southbridge, @function
longhaul_setup_southbridge:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	edx, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR PCI_DEVICE_ID_VIA_8235[rip]
	mov	edi, DWORD PTR PCI_VENDOR_ID_VIA[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	pci_get_device@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L13
.L2:
	lea	r12, 4[rsp]
	mov	esi, 236
	mov	rdi, rbp
	mov	rdx, r12
	call	pci_read_config_byte@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, 236
	mov	rdi, rbp
	and	edx, -5
	mov	DWORD PTR 4[rsp], edx
	call	pci_write_config_byte@PLT
	mov	rdx, r12
	mov	esi, 228
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, 228
	mov	rdi, rbp
	and	dl, 127
	mov	DWORD PTR 4[rsp], edx
	call	pci_write_config_byte@PLT
	mov	rdx, r12
	mov	esi, 229
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, 229
	mov	rdi, rbp
	or	dl, -128
	mov	DWORD PTR 4[rsp], edx
	call	pci_write_config_byte@PLT
	mov	rdx, r12
	mov	esi, 129
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	test	BYTE PTR 4[rsp], -128
	jne	.L14
	mov	rdi, rbp
	call	pci_dev_put@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR PCI_DEVICE_ID_VIA_8237[rip]
	mov	edi, DWORD PTR PCI_VENDOR_ID_VIA[rip]
	xor	edx, edx
	call	pci_get_device@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L2
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L15
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rdx, acpi_regs_addr[rip]
	mov	esi, 136
	mov	rdi, rbp
	call	pci_read_config_dword@PLT
	mov	esi, DWORD PTR acpi_regs_addr[rip]
	lea	rdi, .LC0[rip]
	and	esi, 65280
	mov	DWORD PTR acpi_regs_addr[rip], esi
	call	pr_info@PLT
	mov	rdi, rbp
	call	pci_dev_put@PLT
	mov	eax, 1
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	longhaul_setup_southbridge, .-longhaul_setup_southbridge
	.comm	acpi_regs_addr,4,4
	.comm	PCI_VENDOR_ID_VIA,4,4
	.comm	PCI_DEVICE_ID_VIA_8237,4,4
	.comm	PCI_DEVICE_ID_VIA_8235,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_longhaul.c_longhaul_setup_southbridge.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ACPI I/O at 0x%x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	longhaul_setup_southbridge, %function
longhaul_setup_southbridge:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L15
	ldr	r5, .L15+4
	ldr	r1, [r3]
	ldr	r3, .L15+8
	sub	sp, sp, #12
	mov	r2, #0
	ldr	r0, [r5]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	pci_get_device
	subs	r4, r0, #0
	beq	.L12
.L2:
	mov	r2, sp
	mov	r1, #236
	mov	r0, r4
	bl	pci_read_config_byte
	ldr	r2, [sp]
	mov	r1, #236
	bic	r2, r2, #4
	mov	r0, r4
	str	r2, [sp]
	bl	pci_write_config_byte
	mov	r2, sp
	mov	r1, #228
	mov	r0, r4
	bl	pci_read_config_byte
	ldr	r2, [sp]
	mov	r1, #228
	bic	r2, r2, #128
	mov	r0, r4
	str	r2, [sp]
	bl	pci_write_config_byte
	mov	r2, sp
	mov	r1, #229
	mov	r0, r4
	bl	pci_read_config_byte
	ldr	r2, [sp]
	mov	r1, #229
	orr	r2, r2, #128
	mov	r0, r4
	str	r2, [sp]
	bl	pci_write_config_byte
	mov	r2, sp
	mov	r1, #129
	mov	r0, r4
	bl	pci_read_config_byte
	ldr	r3, [sp]
	tst	r3, #128
	bne	.L13
	mov	r0, r4
	bl	pci_dev_put
	mov	r0, #1
	b	.L1
.L12:
	ldr	r3, .L15+12
	mov	r2, r4
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	pci_get_device
	subs	r4, r0, #0
	moveq	r0, r4
	bne	.L2
.L1:
	ldr	r3, .L15+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L13:
	ldr	r5, .L15+16
	mov	r1, #136
	mov	r2, r5
	mov	r0, r4
	bl	pci_read_config_dword
	ldr	r1, [r5]
	ldr	r0, .L15+20
	and	r1, r1, #65280
	str	r1, [r5]
	bl	pr_info
	mov	r0, r4
	bl	pci_dev_put
	mov	r0, #1
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	PCI_DEVICE_ID_VIA_8235
	.word	PCI_VENDOR_ID_VIA
	.word	.LC1
	.word	PCI_DEVICE_ID_VIA_8237
	.word	acpi_regs_addr
	.word	.LC0
	.size	longhaul_setup_southbridge, .-longhaul_setup_southbridge
	.comm	acpi_regs_addr,4,4
	.comm	PCI_VENDOR_ID_VIA,4,4
	.comm	PCI_DEVICE_ID_VIA_8237,4,4
	.comm	PCI_DEVICE_ID_VIA_8235,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
