	.file	"extr_sis5513.c_sis_ata33_program_udma_timings.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sis_ata33_program_udma_timings, @function
sis_ata33_program_udma_timings:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR [rax]
	call	to_pci_dev@PLT
	mov	r13d, DWORD PTR chipset_family[rip]
	lea	rdx, 4[rsp]
	mov	DWORD PTR 4[rsp], 0
	mov	rbp, rax
	mov	eax, DWORD PTR [r12]
	mov	rdi, rbp
	lea	r12d, 65[rax+rax]
	mov	esi, r12d
	call	pci_read_config_byte@PLT
	mov	rax, QWORD PTR cycle_time_offset[rip]
	mov	edi, DWORD PTR 4[rsp]
	movsx	rsi, r13d
	mov	ecx, 8
	sub	ebx, DWORD PTR XFER_UDMA_0[rip]
	lea	r8, [rax+rsi*4]
	mov	rax, QWORD PTR cycle_time_range[rip]
	or	dil, -128
	movsx	rbx, ebx
	mov	DWORD PTR 4[rsp], edi
	sub	ecx, DWORD PTR [rax+rsi*4]
	mov	eax, 255
	sar	eax, cl
	mov	ecx, DWORD PTR [r8]
	sal	eax, cl
	not	eax
	mov	edx, eax
	mov	rax, QWORD PTR cycle_time_value[rip]
	and	edx, edi
	mov	rdi, rbp
	mov	rax, QWORD PTR [rax+rsi*8]
	mov	DWORD PTR 4[rsp], edx
	mov	esi, r12d
	mov	ecx, DWORD PTR [r8]
	mov	eax, DWORD PTR [rax+rbx*4]
	sal	eax, cl
	or	edx, eax
	mov	DWORD PTR 4[rsp], edx
	call	pci_write_config_byte@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sis_ata33_program_udma_timings, .-sis_ata33_program_udma_timings
	.comm	cycle_time_value,8,8
	.comm	cycle_time_range,8,8
	.comm	cycle_time_offset,8,8
	.comm	chipset_family,4,4
	.comm	XFER_UDMA_0,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_sis5513.c_sis_ata33_program_udma_timings.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sis_ata33_program_udma_timings, %function
sis_ata33_program_udma_timings:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, [r0, #4]
	sub	sp, sp, #8
	ldr	r0, [r3]
	ldr	r3, .L6
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_pci_dev
	mov	ip, #0
	ldr	r4, [r4]
	ldr	r3, .L6+4
	lsl	r4, r4, #1
	add	r4, r4, #65
	mov	r1, r4
	mov	r2, sp
	ldr	r6, [r3]
	mov	r7, r0
	str	ip, [sp]
	bl	pci_read_config_byte
	mov	r3, #255
	ldr	r2, [sp]
	ldr	r1, .L6+8
	orr	r2, r2, #128
	ldr	r0, [r1]
	ldr	r1, .L6+12
	str	r2, [sp]
	ldr	r0, [r0, r6, lsl #2]
	ldr	ip, [r1]
	ldr	lr, .L6+16
	ldr	r1, .L6+20
	ldr	r8, [lr]
	rsb	r0, r0, #8
	ldr	lr, [ip, r6, lsl #2]
	ldr	r1, [r1]
	asr	r3, r3, r0
	bic	r2, r2, r3, lsl lr
	ldr	r0, [r8, r6, lsl #2]
	sub	r5, r5, r1
	str	r2, [sp]
	ldr	r3, [ip, r6, lsl #2]
	ldr	r0, [r0, r5, lsl #2]
	mov	r1, r4
	orr	r2, r2, r0, lsl r3
	mov	r0, r7
	str	r2, [sp]
	bl	pci_write_config_byte
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	chipset_family
	.word	cycle_time_range
	.word	cycle_time_offset
	.word	cycle_time_value
	.word	XFER_UDMA_0
	.size	sis_ata33_program_udma_timings, .-sis_ata33_program_udma_timings
	.comm	cycle_time_value,4,4
	.comm	cycle_time_range,4,4
	.comm	cycle_time_offset,4,4
	.comm	chipset_family,4,4
	.comm	XFER_UDMA_0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
