	.file	"extr_ide-xfer-mode.c_ide_set_pio_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ide_set_pio_mode
	.type	ide_set_pio_mode, @function
ide_set_pio_mode:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdx, QWORD PTR [rdi]
	mov	eax, DWORD PTR [rdx]
	mov	r13d, eax
	and	r13d, DWORD PTR IDE_HFLAG_NO_SET_MODE[rip]
	jne	.L7
	mov	rbx, QWORD PTR 8[rdx]
	test	rbx, rbx
	je	.L4
	mov	rdx, QWORD PTR [rbx]
	test	rdx, rdx
	je	.L4
	cmp	QWORD PTR 8[rbx], 0
	mov	rbp, rdi
	mov	r12, rsi
	je	.L13
	test	DWORD PTR IDE_HFLAG_POST_SET_MODE[rip], eax
	jne	.L14
	sub	rsi, QWORD PTR XFER_PIO_0[rip]
	call	rdx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	mov	rdi, rbp
	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
	jmp	ide_config_drive_speed@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	call	ide_config_drive_speed@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L4
	mov	rsi, r12
	mov	rdi, rbp
	sub	rsi, QWORD PTR XFER_PIO_0[rip]
	call	[QWORD PTR [rbx]]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	r13d, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	sub	rsi, QWORD PTR XFER_PIO_0[rip]
	call	rdx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r13d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ide_set_pio_mode, .-ide_set_pio_mode
	.comm	XFER_PIO_0,8,8
	.comm	IDE_HFLAG_POST_SET_MODE,4,4
	.comm	IDE_HFLAG_NO_SET_MODE,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_ide-xfer-mode.c_ide_set_pio_mode.c"
	.text
	.align	2
	.global	ide_set_pio_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	ide_set_pio_mode, %function
ide_set_pio_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0]
	ldr	r3, .L15
	ldr	ip, [r2]
	ldr	r3, [r3]
	push	{r4, r5, r6, r7, r8, lr}
	ands	r4, ip, r3
	bne	.L7
	ldr	r7, [r2, #4]
	cmp	r7, #0
	beq	.L4
	ldr	r2, [r7]
	cmp	r2, #0
	beq	.L4
	ldr	r3, [r7, #4]
	mov	r6, r1
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L15+4
	mov	r5, r0
	ldr	r3, [r3]
	tst	ip, r3
	bne	.L14
	ldr	r3, .L15+8
	ldr	r1, [r3]
	sub	r1, r6, r1
	blx	r2
	mov	r1, r6
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	ide_config_drive_speed
.L14:
	bl	ide_config_drive_speed
	subs	r4, r0, #0
	bne	.L4
	ldr	r2, .L15+8
	mov	r0, r5
	ldr	r1, [r2]
	ldr	r3, [r7]
	sub	r1, r6, r1
	blx	r3
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L15+8
	ldr	r1, [r3]
	sub	r1, r6, r1
	blx	r2
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mvn	r4, #0
	b	.L1
.L16:
	.align	2
.L15:
	.word	IDE_HFLAG_NO_SET_MODE
	.word	IDE_HFLAG_POST_SET_MODE
	.word	XFER_PIO_0
	.size	ide_set_pio_mode, .-ide_set_pio_mode
	.comm	XFER_PIO_0,4,4
	.comm	IDE_HFLAG_POST_SET_MODE,4,4
	.comm	IDE_HFLAG_NO_SET_MODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
