	.file	"extr_ide-dma-sff.c_config_drive_for_dma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	config_drive_for_dma
	.type	config_drive_for_dma, @function
config_drive_for_dma:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR ide_disk[rip]
	cmp	QWORD PTR 8[rdi], rax
	je	.L2
	mov	rax, QWORD PTR 16[rdi]
	xor	r8d, r8d
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR IDE_HFLAG_NO_ATAPI_DMA[rip], eax
	jne	.L15
.L2:
	mov	rax, QWORD PTR [rdi]
	mov	rdx, QWORD PTR ATA_ID_FIELD_VALID[rip]
	test	BYTE PTR [rax+rdx*4], 4
	jne	.L19
.L4:
	mov	rdx, QWORD PTR ATA_ID_MWDMA_MODES[rip]
	mov	r8d, 1
	mov	edx, DWORD PTR [rax+rdx*4]
	and	edx, 1028
	cmp	edx, 1028
	je	.L15
	mov	rdx, QWORD PTR ATA_ID_SWDMA_MODES[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	and	eax, 1028
	cmp	eax, 1028
	je	.L15
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	call	ide_dma_good_drive@PLT
	xor	r8d, r8d
	test	rax, rax
	setne	r8b
	add	rsp, 8
	.cfi_def_cfa_offset 8
	mov	eax, r8d
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdx, QWORD PTR ATA_ID_UDMA_MODES[rip]
	mov	r8d, 1
	test	BYTE PTR 1[rax+rdx*4], 127
	je	.L4
.L15:
	mov	eax, r8d
	ret
	.cfi_endproc
.LFE0:
	.size	config_drive_for_dma, .-config_drive_for_dma
	.comm	ide_disk,8,8
	.comm	IDE_HFLAG_NO_ATAPI_DMA,4,4
	.comm	ATA_ID_UDMA_MODES,8,8
	.comm	ATA_ID_SWDMA_MODES,8,8
	.comm	ATA_ID_MWDMA_MODES,8,8
	.comm	ATA_ID_FIELD_VALID,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_ide-dma-sff.c_config_drive_for_dma.c"
	.text
	.align	2
	.global	config_drive_for_dma
	.syntax unified
	.arm
	.fpu softvfp
	.type	config_drive_for_dma, %function
config_drive_for_dma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L18
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L2
	ldr	r2, [r0, #8]
	ldr	r3, .L18+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L5
.L2:
	ldr	r2, .L18+8
	ldr	r3, [r0]
	ldr	r2, [r2]
	ldr	r2, [r3, r2, lsl #2]
	tst	r2, #4
	bne	.L17
.L4:
	ldr	r1, .L18+12
	ldr	r2, .L18+16
	ldr	r1, [r1]
	ldr	r1, [r3, r1, lsl #2]
	bics	r1, r2, r1
	beq	.L8
	ldr	r1, .L18+20
	ldr	r1, [r1]
	ldr	r3, [r3, r1, lsl #2]
	bics	r3, r2, r3
	beq	.L8
	push	{r4, lr}
	bl	ide_dma_good_drive
	subs	r0, r0, #0
	movne	r0, #1
	pop	{r4, pc}
.L17:
	ldr	r2, .L18+24
	ldr	r2, [r2]
	ldr	r2, [r3, r2, lsl #2]
	tst	r2, #32512
	beq	.L4
.L8:
	mov	r0, #1
	bx	lr
.L5:
	mov	r0, #0
	bx	lr
.L19:
	.align	2
.L18:
	.word	ide_disk
	.word	IDE_HFLAG_NO_ATAPI_DMA
	.word	ATA_ID_FIELD_VALID
	.word	ATA_ID_MWDMA_MODES
	.word	1028
	.word	ATA_ID_SWDMA_MODES
	.word	ATA_ID_UDMA_MODES
	.size	config_drive_for_dma, .-config_drive_for_dma
	.comm	ide_disk,4,4
	.comm	IDE_HFLAG_NO_ATAPI_DMA,4,4
	.comm	ATA_ID_UDMA_MODES,4,4
	.comm	ATA_ID_SWDMA_MODES,4,4
	.comm	ATA_ID_MWDMA_MODES,4,4
	.comm	ATA_ID_FIELD_VALID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
