	.file	"extr_prep_ide.c_ide_setup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"HARD DISC MODEL: %s c,h,s %d,%d,%d\n"
	.text
	.p2align 4
	.globl	ide_setup
	.type	ide_setup, @function
ide_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 576
	.cfi_def_cfa_offset 608
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 568[rsp], rax
	xor	eax, eax
	call	ide_rdy@PLT
	mov	rdi, rbx
	call	ide_bsy@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR [rbx], 512
	mov	esi, 1
	lea	rdi, 2[rax]
	call	SetPhysByte@PLT
	mov	rax, QWORD PTR 16[rbx]
	xor	esi, esi
	lea	rdi, 3[rax]
	call	SetPhysByte@PLT
	mov	rax, QWORD PTR 16[rbx]
	xor	esi, esi
	lea	rdi, 4[rax]
	call	SetPhysByte@PLT
	mov	rax, QWORD PTR 16[rbx]
	xor	esi, esi
	lea	rdi, 5[rax]
	call	SetPhysByte@PLT
	mov	rax, QWORD PTR 16[rbx]
	xor	esi, esi
	lea	rdi, 6[rax]
	call	SetPhysByte@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	esi, 236
	lea	rdi, 7[rax]
	call	SetPhysByte@PLT
	mov	rdi, rbx
	call	ide_drq@PLT
	movsx	rax, DWORD PTR [rbx]
	shr	rax
	je	.L2
	xor	ebp, ebp
	mov	r12, rsp
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, QWORD PTR 16[rbx]
	call	GetPhysHalf@PLT
	movsx	edi, ax
	call	SWAP_W@PLT
	mov	WORD PTR [r12+rbp*2], ax
	xor	eax, eax
	add	rbp, 1
	call	sync@PLT
	movsx	rax, DWORD PTR [rbx]
	shr	rax
	cmp	rax, rbp
	ja	.L3
.L2:
	movzx	eax, WORD PTR 2[rsp]
	lea	rsi, 54[rsp]
	mov	edx, 41
	lea	rbp, 512[rsp]
	mov	rdi, rbp
	mov	WORD PTR 4[rbx], ax
	movzx	eax, WORD PTR 6[rsp]
	mov	WORD PTR 6[rbx], ax
	movzx	eax, WORD PTR 12[rsp]
	mov	WORD PTR 8[rbx], ax
	call	strncpy@PLT
	movsx	ecx, WORD PTR 6[rbx]
	movsx	edx, WORD PTR 4[rbx]
	mov	rsi, rbp
	movsx	r8d, WORD PTR 8[rbx]
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	rax, QWORD PTR 568[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 576
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ide_setup, .-ide_setup
	.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_prep_ide.c_ide_setup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HARD DISC MODEL: %s c,h,s %d,%d,%d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ide_setup
	.syntax unified
	.arm
	.fpu softvfp
	.type	ide_setup, %function
ide_setup:
	@ args = 0, pretend = 0, frame = 560
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, .L12
	sub	sp, sp, #568
	ldr	r3, [r3]
	str	r3, [sp, #564]
	mov	r3,#0
	bl	ide_rdy
	mov	r0, r4
	bl	ide_bsy
	mov	r3, #512
	ldr	r0, [r4, #12]
	str	r3, [r4]
	mov	r1, #1
	add	r0, r0, #2
	bl	SetPhysByte
	ldr	r0, [r4, #12]
	mov	r1, #0
	add	r0, r0, #3
	bl	SetPhysByte
	ldr	r0, [r4, #12]
	mov	r1, #0
	add	r0, r0, #4
	bl	SetPhysByte
	ldr	r0, [r4, #12]
	mov	r1, #0
	add	r0, r0, #5
	bl	SetPhysByte
	ldr	r0, [r4, #12]
	mov	r1, #0
	add	r0, r0, #6
	bl	SetPhysByte
	ldr	r0, [r4, #12]
	mov	r1, #236
	add	r0, r0, #7
	bl	SetPhysByte
	mov	r0, r4
	bl	ide_drq
	ldr	r3, [r4]
	lsrs	r3, r3, #1
	addeq	r7, sp, #8
	beq	.L2
	mov	r5, #0
	add	r7, sp, #8
	sub	r6, r7, #2
.L3:
	ldr	r0, [r4, #12]
	bl	GetPhysHalf
	bl	SWAP_W
	strh	r0, [r6, #2]!	@ movhi
	bl	sync
	ldr	r3, [r4]
	add	r5, r5, #1
	cmp	r5, r3, lsr #1
	bcc	.L3
.L2:
	ldrsh	r5, [r7, #2]
	ldrsh	r6, [r7, #6]
	ldrsh	r8, [r7, #12]
	mov	r2, #41
	add	r1, r7, #54
	strh	r5, [r4, #4]	@ movhi
	strh	r6, [r4, #6]	@ movhi
	strh	r8, [r4, #8]	@ movhi
	add	r0, sp, #520
	bl	strncpy
	mov	r3, r6
	mov	r2, r5
	ldr	r0, .L12+4
	str	r8, [sp]
	add	r1, sp, #520
	bl	printf
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #564]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #568
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC1
	.word	.LC0
	.size	ide_setup, .-ide_setup
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
