	.file	"extr_pata_ali.c_ali_set_piomode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ali_set_piomode, @function
ali_set_piomode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	rdi, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r14, rsp
	call	ata_dev_pair@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	rdx, r14
	mov	rdi, rbp
	mov	r12, rax
	mov	r8d, 1
	mov	ecx, 30000
	call	ata_timing_compute@PLT
	test	r12, r12
	je	.L2
	mov	rsi, QWORD PTR 16[r12]
	lea	r15, 4[rsp]
	mov	ecx, 30000
	mov	rdi, r12
	mov	r8d, 1
	mov	rdx, r15
	call	ata_timing_compute@PLT
	mov	rsi, r14
	mov	rdx, r14
	mov	rdi, r15
	mov	ecx, DWORD PTR ATA_TIMING_SETUP[rip]
	or	ecx, DWORD PTR ATA_TIMING_8BIT[rip]
	call	ata_timing_merge@PLT
	mov	rsi, QWORD PTR 8[r12]
	test	rsi, rsi
	jne	.L15
.L2:
	mov	rax, QWORD PTR ATA_DEV_ATA[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L4
	xor	edx, edx
	mov	rsi, rbp
	mov	rdi, r13
	call	ali_fifo_control@PLT
.L4:
	xor	ecx, ecx
	mov	rdx, r14
	mov	rsi, rbp
	mov	rdi, r13
	call	ali_program_modes@PLT
	mov	rax, QWORD PTR ATA_DEV_ATA[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L16
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edx, 5
	mov	rsi, rbp
	mov	rdi, r13
	call	ali_fifo_control@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdx, r15
	mov	rdi, r12
	mov	r8d, 1
	mov	ecx, 30000
	call	ata_timing_compute@PLT
	mov	rdx, r14
	mov	rsi, r14
	mov	rdi, r15
	mov	ecx, DWORD PTR ATA_TIMING_SETUP[rip]
	or	ecx, DWORD PTR ATA_TIMING_8BIT[rip]
	call	ata_timing_merge@PLT
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ali_set_piomode, .-ali_set_piomode
	.comm	ATA_TIMING_SETUP,4,4
	.comm	ATA_TIMING_8BIT,4,4
	.comm	ATA_DEV_ATA,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_pata_ali.c_ali_set_piomode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ali_set_piomode, %function
ali_set_piomode:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L18
	sub	sp, sp, #28
	mov	r6, r0
	mov	r0, r1
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	ata_dev_pair
	mov	r7, #1
	mov	r5, r0
	ldr	r1, [r4, #8]
	mov	r0, r4
	ldr	r3, .L18+4
	str	r7, [sp]
	add	r2, sp, #12
	bl	ata_timing_compute
	cmp	r5, #0
	beq	.L2
	ldr	r9, .L18+8
	ldr	r8, .L18+12
	ldr	r1, [r5, #8]
	ldr	r3, .L18+4
	add	r2, sp, #16
	mov	r0, r5
	str	r7, [sp]
	bl	ata_timing_compute
	ldr	r2, [r9]
	ldr	r3, [r8]
	add	r0, sp, #16
	orr	r3, r2, r3
	add	r2, sp, #12
	mov	r1, r2
	bl	ata_timing_merge
	ldr	r1, [r5, #4]
	cmp	r1, #0
	bne	.L15
.L2:
	ldr	r5, .L18+16
	ldr	r2, [r4]
	ldr	r3, [r5]
	cmp	r2, r3
	beq	.L4
	mov	r2, #0
	mov	r1, r4
	mov	r0, r6
	bl	ali_fifo_control
.L4:
	mov	r3, #0
	add	r2, sp, #12
	mov	r1, r4
	mov	r0, r6
	bl	ali_program_modes
	ldr	r3, [r5]
	ldr	r2, [r4]
	cmp	r2, r3
	beq	.L16
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	mov	r1, r4
	mov	r0, r6
	mov	r2, #5
	bl	ali_fifo_control
	b	.L1
.L15:
	add	r2, sp, #16
	mov	r0, r5
	ldr	r3, .L18+4
	str	r7, [sp]
	bl	ata_timing_compute
	ldr	r2, [r9]
	ldr	r3, [r8]
	add	r0, sp, #16
	orr	r3, r2, r3
	add	r2, sp, #12
	mov	r1, r2
	bl	ata_timing_merge
	b	.L2
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	30000
	.word	ATA_TIMING_SETUP
	.word	ATA_TIMING_8BIT
	.word	ATA_DEV_ATA
	.size	ali_set_piomode, .-ali_set_piomode
	.comm	ATA_TIMING_SETUP,4,4
	.comm	ATA_TIMING_8BIT,4,4
	.comm	ATA_DEV_ATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
