	.file	"extr_cs5520.c_cs5520_set_pio_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cs5520_set_pio_mode, @function
cs5520_set_pio_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR 8[rdi]
	mov	rbx, rsi
	mov	edi, DWORD PTR [rax]
	call	to_pci_dev@PLT
	mov	r13d, DWORD PTR 0[rbp]
	mov	r12, rax
	mov	rax, QWORD PTR cs5520_pio_clocks[rip]
	cmp	r13d, 1
	mov	rdi, r12
	setg	r14b
	sal	rbx, 3
	add	rax, rbx
	lea	esi, 98[r14]
	add	r14d, 25
	mov	edx, DWORD PTR [rax]
	sal	edx, 4
	or	edx, DWORD PTR 4[rax]
	call	pci_write_config_byte@PLT
	mov	rax, QWORD PTR cs5520_pio_clocks[rip]
	mov	rdi, r12
	add	rax, rbx
	mov	edx, DWORD PTR [rax]
	sal	edx, 4
	or	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR 0[rbp]
	and	eax, 1
	lea	esi, [rax+r14*4]
	call	pci_write_config_byte@PLT
	mov	esi, DWORD PTR 0[rbp]
	xor	eax, eax
	mov	rdi, r12
	add	rbx, QWORD PTR cs5520_pio_clocks[rip]
	mov	edx, DWORD PTR [rbx]
	sal	edx, 4
	or	edx, DWORD PTR 4[rbx]
	cmp	r13d, 1
	pop	rbx
	.cfi_def_cfa_offset 40
	setg	al
	and	esi, 1
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	lea	eax, 102[0+rax*4]
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	add	esi, eax
	jmp	pci_write_config_byte@PLT
	.cfi_endproc
.LFE0:
	.size	cs5520_set_pio_mode, .-cs5520_set_pio_mode
	.comm	cs5520_pio_clocks,8,8
	.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_cs5520.c_cs5520_set_pio_mode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cs5520_set_pio_mode, %function
cs5520_set_pio_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r3, [r0, #4]
	mov	r4, r1
	ldr	r0, [r3]
	bl	to_pci_dev
	ldr	r7, [r5]
	mov	r6, r0
	cmp	r7, #1
	movle	r9, #0
	movgt	r9, #1
	ldr	r10, .L4
	add	r1, r9, #98
	ldr	r3, [r10]
	lsl	r8, r4, #3
	add	r2, r3, r4, lsl #3
	ldr	r2, [r2, #4]
	ldr	r3, [r3, r4, lsl #3]
	add	r9, r9, #25
	orr	r2, r2, r3, lsl #4
	bl	pci_write_config_byte
	ldr	r3, [r10]
	ldr	r1, [r5]
	add	r2, r3, r8
	ldr	r2, [r2, #4]
	ldr	r3, [r3, r4, lsl #3]
	and	r1, r1, #1
	add	r1, r1, r9, lsl #2
	orr	r2, r2, r3, lsl #4
	mov	r0, r6
	bl	pci_write_config_byte
	cmp	r7, #1
	movgt	r7, #106
	movle	r7, #102
	ldr	r3, [r10]
	ldr	r1, [r5]
	add	r8, r3, r8
	ldr	r2, [r8, #4]
	ldr	r3, [r3, r4, lsl #3]
	and	r1, r1, #1
	mov	r0, r6
	add	r1, r7, r1
	orr	r2, r2, r3, lsl #4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	pci_write_config_byte
.L5:
	.align	2
.L4:
	.word	cs5520_pio_clocks
	.size	cs5520_set_pio_mode, .-cs5520_set_pio_mode
	.comm	cs5520_pio_clocks,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
