	.file	"extr_pata_atiixp.c_atiixp_cable_detect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atiixp_cable_detect, @function
atiixp_cable_detect:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	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	edi, DWORD PTR attixp_cable_override_dmi_table[rip]
	mov	rbp, rax
	call	dmi_check_system@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR ATA_CBL_PATA40_SHORT[rip]
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L9
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, QWORD PTR ATIIXP_IDE_UDMA_MODE[rip]
	lea	rdx, 4[rsp]
	add	rsi, QWORD PTR [rbx]
	mov	rdi, rbp
	call	pci_read_config_byte@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	al, 4
	jne	.L4
	and	eax, 112
	mov	edx, eax
	mov	eax, DWORD PTR ATA_CBL_PATA40[rip]
	cmp	edx, 63
	jle	.L1
.L4:
	mov	eax, DWORD PTR ATA_CBL_PATA80[rip]
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	atiixp_cable_detect, .-atiixp_cable_detect
	.comm	attixp_cable_override_dmi_table,4,4
	.comm	ATIIXP_IDE_UDMA_MODE,8,8
	.comm	ATA_CBL_PATA80,4,4
	.comm	ATA_CBL_PATA40_SHORT,4,4
	.comm	ATA_CBL_PATA40,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_pata_atiixp.c_atiixp_cable_detect.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atiixp_cable_detect, %function
atiixp_cable_detect:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, [r0, #4]
	ldr	r2, .L10
	sub	sp, sp, #12
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bl	to_pci_dev
	ldr	r3, .L10+4
	mov	r5, r0
	ldr	r0, [r3]
	bl	dmi_check_system
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L10+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	ldr	r3, .L10+12
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r0, r5
	add	r1, r1, r3
	mov	r2, sp
	bl	pci_read_config_byte
	ldr	r3, [sp]
	tst	r3, #4
	bne	.L4
	and	r3, r3, #112
	cmp	r3, #63
	ldrle	r3, .L10+16
	ldrle	r0, [r3]
	ble	.L1
.L4:
	ldr	r3, .L10+20
	ldr	r0, [r3]
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	attixp_cable_override_dmi_table
	.word	ATA_CBL_PATA40_SHORT
	.word	ATIIXP_IDE_UDMA_MODE
	.word	ATA_CBL_PATA40
	.word	ATA_CBL_PATA80
	.size	atiixp_cable_detect, .-atiixp_cable_detect
	.comm	attixp_cable_override_dmi_table,4,4
	.comm	ATIIXP_IDE_UDMA_MODE,4,4
	.comm	ATA_CBL_PATA80,4,4
	.comm	ATA_CBL_PATA40_SHORT,4,4
	.comm	ATA_CBL_PATA40,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
