	.file	"extr_i2c-ali15x3.c_ali15x3_setup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr\n"
	.align 8
.LC1:
	.string	"ALI15X3_smb region 0x%x already in use!\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"forcing ISA address 0x%04X\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"force address failed - not supported?\n"
	.section	.rodata.str1.1
.LC4:
	.string	"enabling SMBus device\n"
.LC5:
	.string	"enabling SMBus controller\n"
.LC6:
	.string	"SMBREV = 0x%X\n"
.LC7:
	.string	"iALI15X3_smba = 0x%X\n"
	.text
	.p2align 4
	.type	ali15x3_setup, @function
ali15x3_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR SMBATPC[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r12, 3[rsp]
	mov	rdx, r12
	call	pci_read_config_byte@PLT
	movzx	eax, BYTE PTR 3[rsp]
	movzx	edx, BYTE PTR ALI15X3_LOCK[rip]
	test	al, dl
	jne	.L24
.L2:
	mov	esi, DWORD PTR SMBBA[rip]
	lea	rdx, ali15x3_smba[rip]
	mov	rdi, rbp
	call	pci_read_config_word@PLT
	mov	esi, DWORD PTR ALI15X3_SMB_IOSIZE[rip]
	mov	edi, DWORD PTR ali15x3_smba[rip]
	mov	eax, DWORD PTR force_addr[rip]
	mov	edx, esi
	neg	edx
	and	edi, edx
	movzx	edi, di
	mov	DWORD PTR ali15x3_smba[rip], edi
	test	edi, edi
	jne	.L3
	test	eax, eax
	je	.L25
.L4:
	and	edx, eax
	mov	DWORD PTR ali15x3_smba[rip], edx
	mov	edi, edx
	mov	edx, DWORD PTR ali15x3_driver[rip]
	call	acpi_check_region@PLT
	test	rax, rax
	je	.L7
.L27:
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L26
	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
.L3:
	.cfi_restore_state
	test	eax, eax
	jne	.L4
	mov	edx, DWORD PTR ali15x3_driver[rip]
	call	acpi_check_region@PLT
	test	rax, rax
	jne	.L27
.L7:
	mov	edx, DWORD PTR ali15x3_driver[rip]
	mov	esi, DWORD PTR ALI15X3_SMB_IOSIZE[rip]
	mov	edi, DWORD PTR ali15x3_smba[rip]
	call	request_region@PLT
	test	eax, eax
	je	.L28
	mov	eax, DWORD PTR force_addr[rip]
	test	eax, eax
	jne	.L29
.L9:
	mov	esi, DWORD PTR SMBCOM[rip]
	mov	rdx, r12
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	test	BYTE PTR 3[rsp], 1
	je	.L30
.L12:
	mov	esi, DWORD PTR SMBHSTCFG[rip]
	mov	rdx, r12
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	test	BYTE PTR 3[rsp], 1
	je	.L31
.L13:
	mov	esi, DWORD PTR SMBCLK[rip]
	mov	edx, 32
	mov	rdi, rbp
	call	pci_write_config_byte@PLT
	mov	esi, DWORD PTR SMBREV[rip]
	mov	rdx, r12
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	movzx	edx, BYTE PTR 3[rsp]
	lea	rsi, .LC6[rip]
	mov	rdi, rbp
	call	dev_dbg@PLT
	mov	edx, DWORD PTR ali15x3_smba[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rbp
	call	dev_dbg@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	not	edx
	mov	esi, DWORD PTR SMBATPC[rip]
	mov	rdi, rbp
	and	edx, eax
	mov	BYTE PTR 3[rsp], dl
	movzx	edx, dl
	call	pci_write_config_byte@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edx, DWORD PTR ali15x3_smba[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_info@PLT
	mov	edx, DWORD PTR ali15x3_smba[rip]
	mov	esi, DWORD PTR SMBBA[rip]
	mov	rdi, rbp
	call	pci_write_config_word@PLT
	cmp	rax, QWORD PTR PCIBIOS_SUCCESSFUL[rip]
	je	.L32
.L11:
	mov	esi, DWORD PTR ALI15X3_SMB_IOSIZE[rip]
	mov	edi, DWORD PTR ali15x3_smba[rip]
	call	release_region@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edx, DWORD PTR ali15x3_smba[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, rbp
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	dev_info@PLT
	movzx	edx, BYTE PTR 3[rsp]
	mov	esi, DWORD PTR SMBHSTCFG[rip]
	mov	rdi, rbp
	or	edx, 1
	movzx	edx, dl
	call	pci_write_config_byte@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, rbp
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	dev_info@PLT
	movzx	edx, BYTE PTR 3[rsp]
	mov	esi, DWORD PTR SMBCOM[rip]
	mov	rdi, rbp
	or	edx, 1
	movzx	edx, dl
	call	pci_write_config_byte@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	mov	esi, DWORD PTR SMBBA[rip]
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	call	pci_read_config_word@PLT
	cmp	rax, QWORD PTR PCIBIOS_SUCCESSFUL[rip]
	jne	.L11
	mov	eax, DWORD PTR ALI15X3_SMB_IOSIZE[rip]
	neg	eax
	and	eax, DWORD PTR 4[rsp]
	cmp	eax, DWORD PTR ali15x3_smba[rip]
	je	.L9
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L11
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ali15x3_setup, .-ali15x3_setup
	.comm	force_addr,4,4
	.comm	ali15x3_smba,4,4
	.comm	ali15x3_driver,4,4
	.comm	SMBREV,4,4
	.comm	SMBHSTCFG,4,4
	.comm	SMBCOM,4,4
	.comm	SMBCLK,4,4
	.comm	SMBBA,4,4
	.comm	SMBATPC,4,4
	.comm	PCIBIOS_SUCCESSFUL,8,8
	.comm	ENODEV,4,4
	.comm	EBUSY,4,4
	.comm	ALI15X3_SMB_IOSIZE,4,4
	.comm	ALI15X3_LOCK,1,1
	.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_i2c-ali15x3.c_ali15x3_setup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ALI15X3_smb region uninitialized - upgrade BIOS or "
	.ascii	"use force_addr=0xaddr\012\000"
	.align	2
.LC1:
	.ascii	"ALI15X3_smb region 0x%x already in use!\012\000"
	.align	2
.LC2:
	.ascii	"forcing ISA address 0x%04X\012\000"
	.align	2
.LC3:
	.ascii	"force address failed - not supported?\012\000"
	.align	2
.LC4:
	.ascii	"enabling SMBus device\012\000"
	.align	2
.LC5:
	.ascii	"enabling SMBus controller\012\000"
	.align	2
.LC6:
	.ascii	"SMBREV = 0x%X\012\000"
	.align	2
.LC7:
	.ascii	"iALI15X3_smba = 0x%X\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ali15x3_setup, %function
ali15x3_setup:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, .L34
	sub	sp, sp, #16
	ldr	r3, .L34+4
	add	r2, sp, #7
	ldr	r1, [r4]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	pci_read_config_byte
	ldr	r3, .L34+8
	ldrb	r2, [sp, #7]	@ zero_extendqisi2
	ldrb	r3, [r3]	@ zero_extendqisi2
	tst	r2, r3
	bne	.L26
.L2:
	ldr	r6, .L34+12
	ldr	r8, .L34+16
	ldr	r7, .L34+20
	mov	r2, r6
	ldr	r1, [r8]
	mov	r0, r5
	bl	pci_read_config_word
	ldr	r1, [r7]
	ldr	r0, [r6]
	rsb	r2, r1, #0
	and	r0, r0, r2
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	ldr	r9, .L34+24
	cmp	r0, #0
	ldr	r3, [r9]
	str	r0, [r6]
	bne	.L3
	cmp	r3, #0
	beq	.L27
.L4:
	and	r0, r2, r3
	str	r0, [r6]
.L6:
	ldr	r10, .L34+28
	ldr	r2, [r10]
	bl	acpi_check_region
	subs	r4, r0, #0
	beq	.L7
	ldr	r3, .L34+32
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L34+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	cmp	r3, #0
	beq	.L6
	b	.L4
.L7:
	ldr	r2, [r10]
	ldr	r1, [r7]
	ldr	r0, [r6]
	bl	request_region
	cmp	r0, #0
	beq	.L29
	ldr	r3, [r9]
	cmp	r3, #0
	bne	.L30
.L9:
	ldr	r7, .L34+36
	mov	r0, r5
	ldr	r1, [r7]
	add	r2, sp, #7
	bl	pci_read_config_byte
	ldrb	r3, [sp, #7]	@ zero_extendqisi2
	tst	r3, #1
	beq	.L31
.L12:
	ldr	r7, .L34+40
	mov	r0, r5
	ldr	r1, [r7]
	add	r2, sp, #7
	bl	pci_read_config_byte
	ldrb	r3, [sp, #7]	@ zero_extendqisi2
	tst	r3, #1
	beq	.L32
.L13:
	ldr	r3, .L34+44
	mov	r2, #32
	ldr	r1, [r3]
	mov	r0, r5
	bl	pci_write_config_byte
	ldr	r3, .L34+48
	add	r2, sp, #7
	ldr	r1, [r3]
	mov	r0, r5
	bl	pci_read_config_byte
	ldrb	r2, [sp, #7]	@ zero_extendqisi2
	mov	r0, r5
	ldr	r1, .L34+52
	bl	dev_dbg
	mov	r0, r5
	ldr	r2, [r6]
	ldr	r1, .L34+56
	bl	dev_dbg
	b	.L1
.L26:
	bic	r2, r2, r3
	mov	r0, r5
	ldr	r1, [r4]
	strb	r2, [sp, #7]
	bl	pci_write_config_byte
	b	.L2
.L30:
	ldr	r2, [r6]
	ldr	r1, .L34+60
	mov	r0, r5
	bl	dev_info
	mov	r0, r5
	ldr	r2, [r6]
	ldr	r1, [r8]
	bl	pci_write_config_word
	ldr	r9, .L34+64
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L33
.L11:
	ldr	r1, [r7]
	ldr	r0, [r6]
	bl	release_region
	ldr	r3, .L34+68
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L27:
	mov	r0, r5
	ldr	r1, .L34+72
	bl	dev_err
	ldr	r3, .L34+68
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L29:
	mov	r0, r5
	ldr	r2, [r6]
	ldr	r1, .L34+76
	bl	dev_err
	ldr	r3, .L34+68
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L32:
	mov	r0, r5
	ldr	r1, .L34+80
	bl	dev_info
	ldrb	r2, [sp, #7]	@ zero_extendqisi2
	mov	r0, r5
	ldr	r1, [r7]
	orr	r2, r2, #1
	bl	pci_write_config_byte
	b	.L13
.L31:
	mov	r0, r5
	ldr	r1, .L34+84
	bl	dev_info
	ldrb	r2, [sp, #7]	@ zero_extendqisi2
	mov	r0, r5
	ldr	r1, [r7]
	orr	r2, r2, #1
	bl	pci_write_config_byte
	b	.L12
.L33:
	mov	r0, r5
	ldr	r1, [r8]
	add	r2, sp, #8
	bl	pci_read_config_word
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L11
	ldr	r3, [r7]
	ldr	r1, [sp, #8]
	ldr	r2, [r6]
	rsb	r3, r3, #0
	and	r3, r3, r1
	cmp	r3, r2
	beq	.L9
	mov	r0, r5
	ldr	r1, .L34+88
	bl	dev_err
	b	.L11
.L28:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	SMBATPC
	.word	.LC8
	.word	ALI15X3_LOCK
	.word	ali15x3_smba
	.word	SMBBA
	.word	ALI15X3_SMB_IOSIZE
	.word	force_addr
	.word	ali15x3_driver
	.word	EBUSY
	.word	SMBCOM
	.word	SMBHSTCFG
	.word	SMBCLK
	.word	SMBREV
	.word	.LC6
	.word	.LC7
	.word	.LC2
	.word	PCIBIOS_SUCCESSFUL
	.word	ENODEV
	.word	.LC0
	.word	.LC1
	.word	.LC5
	.word	.LC4
	.word	.LC3
	.size	ali15x3_setup, .-ali15x3_setup
	.comm	force_addr,4,4
	.comm	ali15x3_smba,4,4
	.comm	ali15x3_driver,4,4
	.comm	SMBREV,4,4
	.comm	SMBHSTCFG,4,4
	.comm	SMBCOM,4,4
	.comm	SMBCLK,4,4
	.comm	SMBBA,4,4
	.comm	SMBATPC,4,4
	.comm	PCIBIOS_SUCCESSFUL,4,4
	.comm	ENODEV,4,4
	.comm	EBUSY,4,4
	.comm	ALI15X3_SMB_IOSIZE,4,4
	.comm	ALI15X3_LOCK,1,1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
