	.file	"extr_pd.c_pd_detect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%c"
.LC1:
	.string	"failed to register %s driver\n"
.LC2:
	.string	"%s: no valid drive found\n"
	.text
	.p2align 4
	.type	pd_detect, @function
pd_detect:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR PD_UNITS[rip]
	mov	rcx, QWORD PTR name[rip]
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	test	edx, edx
	jle	.L2
	xor	ebp, ebp
	xor	r13d, r13d
	lea	r14, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rcx, QWORD PTR name[rip]
.L5:
	mov	rbx, rbp
	mov	esi, DWORD PTR PD_NAMELEN[rip]
	lea	r8d, 97[rbp]
	mov	rdx, r14
	mov	rax, QWORD PTR drives[rip]
	sal	rbx, 6
	movsx	r8d, r8b
	add	rbx, QWORD PTR pd[rip]
	mov	edi, DWORD PTR 40[rbx]
	mov	rax, QWORD PTR [rax+rbp*8]
	mov	r12, QWORD PTR [rax]
	lea	rax, 56[rbx]
	mov	DWORD PTR [rbx], 1
	mov	QWORD PTR 32[rbx], rax
	mov	rax, QWORD PTR D_SLV[rip]
	mov	QWORD PTR 48[rbx], 0
	mov	eax, DWORD PTR [r12+rax*4]
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 4[rbx], eax
	call	snprintf@PLT
	mov	rax, QWORD PTR D_GEO[rip]
	lea	rdi, 44[rbx]
	mov	eax, DWORD PTR [r12+rax*4]
	mov	DWORD PTR 8[rbx], eax
	mov	rax, QWORD PTR D_SBY[rip]
	mov	eax, DWORD PTR [r12+rax*4]
	mov	DWORD PTR 12[rbx], eax
	mov	rax, QWORD PTR D_PRT[rip]
	cmp	DWORD PTR [r12+rax*4], 1
	sbb	r13d, -1
	add	rbp, 1
	call	INIT_LIST_HEAD@PLT
	cmp	DWORD PTR PD_UNITS[rip], ebp
	jg	.L42
	mov	rdi, QWORD PTR name[rip]
	call	pi_register_driver@PLT
	mov	DWORD PTR par_drv[rip], eax
	test	eax, eax
	je	.L9
	mov	rbp, QWORD PTR pd[rip]
	test	r13d, r13d
	je	.L8
	mov	eax, DWORD PTR PD_UNITS[rip]
	test	eax, eax
	jle	.L22
	xor	ebx, ebx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	mov	eax, DWORD PTR PD_UNITS[rip]
	add	rbx, 1
	add	rbp, 64
	cmp	eax, ebx
	jle	.L13
.L18:
	mov	rax, QWORD PTR drives[rip]
	mov	rdx, QWORD PTR D_PRT[rip]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	je	.L16
	mov	rcx, QWORD PTR D_PRO[rip]
	mov	esi, DWORD PTR 40[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, QWORD PTR 32[rbp]
	mov	r9d, DWORD PTR [rax+rcx*4]
	mov	rcx, QWORD PTR D_UNI[rip]
	mov	r8d, DWORD PTR [rax+rcx*4]
	mov	rcx, QWORD PTR D_MOD[rip]
	mov	ecx, DWORD PTR [rax+rcx*4]
	push	rsi
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR verbose[rip]
	push	rsi
	.cfi_def_cfa_offset 72
	mov	esi, DWORD PTR PI_PD[rip]
	push	rsi
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR pd_scratch[rip]
	push	rsi
	.cfi_def_cfa_offset 88
	mov	rsi, QWORD PTR D_DLY[rip]
	mov	eax, DWORD PTR [rax+rsi*4]
	xor	esi, esi
	push	rax
	.cfi_def_cfa_offset 96
	call	pi_init@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 48
	test	rax, rax
	je	.L16
	mov	rdi, rbp
	call	pd_probe_drive@PLT
	cmp	QWORD PTR 16[rbp], 0
	jne	.L16
	mov	rdi, QWORD PTR 32[rbp]
	call	pi_release@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, rcx
	call	pi_register_driver@PLT
	mov	DWORD PTR par_drv[rip], eax
	test	eax, eax
	je	.L9
	mov	rbp, QWORD PTR pd[rip]
.L8:
	mov	eax, DWORD PTR 40[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, QWORD PTR 32[rbp]
	mov	ecx, -1
	mov	r8d, -1
	mov	r9d, -1
	mov	edx, -1
	mov	esi, 1
	push	rax
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR verbose[rip]
	push	rax
	.cfi_def_cfa_offset 72
	mov	eax, DWORD PTR PI_PD[rip]
	push	rax
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR pd_scratch[rip]
	push	rax
	.cfi_def_cfa_offset 88
	push	-1
	.cfi_def_cfa_offset 96
	call	pi_init@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 48
	mov	r8, rax
	mov	eax, DWORD PTR PD_UNITS[rip]
	test	r8, r8
	je	.L13
	mov	rdi, rbp
	call	pd_probe_drive@PLT
	cmp	QWORD PTR 16[rbp], 0
	je	.L12
.L40:
	mov	eax, DWORD PTR PD_UNITS[rip]
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbx, QWORD PTR pd[rip]
	test	eax, eax
	jle	.L22
	xor	ebp, ebp
	xor	eax, eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L19:
	add	ebp, 1
	add	rbx, 64
	cmp	DWORD PTR PD_UNITS[rip], ebp
	jle	.L43
.L20:
	mov	rdi, QWORD PTR 16[rbx]
	test	rdi, rdi
	je	.L19
	mov	rsi, QWORD PTR 24[rbx]
	add	ebp, 1
	add	rbx, 64
	call	set_capacity@PLT
	mov	rdi, QWORD PTR -48[rbx]
	call	add_disk@PLT
	cmp	DWORD PTR PD_UNITS[rip], ebp
	mov	eax, 1
	jg	.L20
.L43:
	test	eax, eax
	je	.L22
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rsi, QWORD PTR name[rip]
	lea	rdi, .LC2[rip]
	call	printk@PLT
	mov	edi, DWORD PTR par_drv[rip]
	call	pi_unregister_driver@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	mov	rdi, QWORD PTR 32[rbp]
	call	pi_release@PLT
	jmp	.L40
.L9:
	mov	rsi, QWORD PTR name[rip]
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	pd_detect, .-pd_detect
	.comm	verbose,4,4
	.comm	pd_scratch,4,4
	.comm	pd,8,8
	.comm	par_drv,4,4
	.comm	name,8,8
	.comm	drives,8,8
	.comm	PI_PD,4,4
	.comm	PD_UNITS,4,4
	.comm	PD_NAMELEN,4,4
	.comm	D_UNI,8,8
	.comm	D_SLV,8,8
	.comm	D_SBY,8,8
	.comm	D_PRT,8,8
	.comm	D_PRO,8,8
	.comm	D_MOD,8,8
	.comm	D_GEO,8,8
	.comm	D_DLY,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_pd.c_pd_detect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s%c\000"
	.align	2
.LC1:
	.ascii	"failed to register %s driver\012\000"
	.align	2
.LC2:
	.ascii	"%s: no valid drive found\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pd_detect, %function
pd_detect:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L46
	ldr	r3, .L46+4
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, #0
	sub	sp, sp, #52
	ble	.L2
	mov	r2, #0
	mov	r5, r2
	str	r2, [sp, #40]
	ldr	r2, .L46+8
	ldr	r8, .L46+12
	ldr	fp, .L46+16
	ldr	r10, .L46+20
	ldr	r9, .L46+24
	str	r2, [sp, #36]
	b	.L5
.L43:
	ldr	r3, [r3]
.L5:
	ldr	r1, [sp, #36]
	ldr	r0, [r8]
	ldr	r1, [r1]
	add	r2, r5, r5, lsl #2
	add	r2, r5, r2, lsl #1
	add	r4, r1, r2, lsl #2
	ldr	r0, [r0, r5, lsl #2]
	add	ip, r4, #40
	ldr	r6, [r0]
	mov	lr, #1
	str	ip, [r4, #24]
	mov	ip, #0
	ldr	r0, .L46+28
	str	ip, [r4, #36]
	ldr	r0, [r0]
	str	lr, [r1, r2, lsl #2]
	ldr	r1, [r6, r0, lsl #2]
	add	r2, r5, #97
	str	r1, [r4, #4]
	and	r2, r2, #255
	ldr	r1, .L46+32
	str	ip, [r4, #20]
	ldr	r0, [r4, #28]
	str	r2, [sp]
	ldr	r1, [r1]
	ldr	r2, .L46+36
	bl	snprintf
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	r1, [r6, r3, lsl #2]
	ldr	r3, [r9]
	str	r1, [r4, #8]
	ldr	r2, [r6, r2, lsl #2]
	add	r0, r4, #32
	str	r2, [r4, #12]
	ldr	r3, [r6, r3, lsl #2]
	add	r5, r5, #1
	cmp	r3, #0
	ldrne	r3, [sp, #40]
	addne	r3, r3, #1
	strne	r3, [sp, #40]
	bl	INIT_LIST_HEAD
	ldr	r3, [r7]
	cmp	r3, r5
	ldr	r3, .L46+4
	bgt	.L43
	ldr	r0, [r3]
	bl	pi_register_driver
	ldr	r3, .L46+40
	cmp	r0, #0
	str	r3, [sp, #44]
	str	r0, [r3]
	beq	.L9
	ldr	r3, [sp, #40]
	cmp	r3, #0
	ldr	r3, [sp, #36]
	ldr	r5, [r3]
	beq	.L8
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L22
	mov	r4, #0
	ldr	r10, .L46+44
	ldr	fp, .L46+48
	b	.L18
.L16:
	ldr	r3, [r7]
	add	r5, r5, #44
	cmp	r3, r4
	ble	.L13
.L18:
	ldr	r2, [r8]
	ldr	r3, [r9]
	ldr	r2, [r2, r4, lsl #2]
	ldr	ip, .L46+52
	ldr	r1, [r2]
	add	r4, r4, #1
	ldr	r2, [r1, r3, lsl #2]
	cmp	r2, #0
	beq	.L16
	ldr	r0, .L46+56
	ldr	r3, .L46+60
	ldr	lr, [r0]
	ldr	r3, [r3]
	ldr	r6, [r5, #28]
	ldr	r3, [r1, r3, lsl #2]
	ldr	r0, [r5, #24]
	str	r6, [sp, #24]
	str	lr, [sp, #20]
	ldr	r6, [r10]
	ldr	lr, [fp]
	str	r6, [sp, #16]
	ldr	r6, .L46+64
	ldr	r6, [r6]
	str	lr, [sp, #12]
	ldr	lr, [r1, r6, lsl #2]
	ldr	r6, .L46+68
	ldr	r6, [r6]
	str	lr, [sp, #8]
	ldr	r6, [r1, r6, lsl #2]
	ldr	lr, [ip]
	str	r6, [sp, #4]
	ldr	r1, [r1, lr, lsl #2]
	str	r1, [sp]
	mov	r1, #0
	bl	pi_init
	cmp	r0, #0
	beq	.L16
	mov	r0, r5
	bl	pd_probe_drive
	ldr	r3, [r5, #16]
	cmp	r3, #0
	bne	.L16
	ldr	r0, [r5, #24]
	bl	pi_release
	ldr	r3, [r7]
	add	r5, r5, #44
	cmp	r3, r4
	bgt	.L18
.L13:
	cmp	r3, #0
	ldr	r3, [sp, #36]
	ldr	r4, [r3]
	ble	.L22
	mov	r5, #0
	mov	r2, r5
	b	.L20
.L19:
	ldr	r3, [r7]
	add	r4, r4, #44
	cmp	r3, r5
	ble	.L44
.L20:
	ldr	r0, [r4, #16]
	add	r5, r5, #1
	cmp	r0, #0
	beq	.L19
	ldr	r1, [r4, #20]
	bl	set_capacity
	ldr	r0, [r4, #16]
	bl	add_disk
	ldr	r3, [r7]
	mov	r2, #1
	cmp	r3, r5
	add	r4, r4, #44
	bgt	.L20
.L44:
	cmp	r2, #0
	beq	.L22
.L1:
	mov	r0, r2
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r3, .L46+4
	ldr	r0, .L46+72
	ldr	r1, [r3]
	bl	printk
	ldr	r3, [sp, #44]
	ldr	r0, [r3]
	bl	pi_unregister_driver
	mov	r2, #0
	mov	r0, r2
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r0, r3
	bl	pi_register_driver
	ldr	r3, .L46+40
	cmp	r0, #0
	str	r3, [sp, #44]
	str	r0, [r3]
	beq	.L9
	ldr	r3, .L46+8
	ldr	r5, [r3]
	str	r3, [sp, #36]
.L8:
	mvn	r3, #0
	ldr	r0, .L46+56
	ldr	r1, .L46+44
	ldr	r2, .L46+48
	ldr	lr, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, [r5, #28]
	ldr	r0, [r5, #24]
	str	r1, [sp, #16]
	str	r2, [sp, #12]
	mov	r1, #1
	mov	r2, r3
	str	lr, [sp, #20]
	str	ip, [sp, #24]
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	str	r3, [sp]
	bl	pi_init
	cmp	r0, #0
	bne	.L45
.L11:
	ldr	r3, [r7]
	b	.L13
.L45:
	mov	r0, r5
	bl	pd_probe_drive
	ldr	r3, [r5, #16]
	cmp	r3, #0
	bne	.L11
	ldr	r0, [r5, #24]
	bl	pi_release
	ldr	r3, [r7]
	b	.L13
.L9:
	ldr	r3, .L46+4
	ldr	r0, .L46+76
	ldr	r1, [r3]
	bl	pr_err
	mvn	r2, #0
	b	.L1
.L47:
	.align	2
.L46:
	.word	PD_UNITS
	.word	name
	.word	pd
	.word	drives
	.word	D_GEO
	.word	D_SBY
	.word	D_PRT
	.word	D_SLV
	.word	PD_NAMELEN
	.word	.LC0
	.word	par_drv
	.word	PI_PD
	.word	pd_scratch
	.word	D_UNI
	.word	verbose
	.word	D_MOD
	.word	D_DLY
	.word	D_PRO
	.word	.LC2
	.word	.LC1
	.size	pd_detect, .-pd_detect
	.comm	verbose,4,4
	.comm	pd_scratch,4,4
	.comm	pd,4,4
	.comm	par_drv,4,4
	.comm	name,4,4
	.comm	drives,4,4
	.comm	PI_PD,4,4
	.comm	PD_UNITS,4,4
	.comm	PD_NAMELEN,4,4
	.comm	D_UNI,4,4
	.comm	D_SLV,4,4
	.comm	D_SBY,4,4
	.comm	D_PRT,4,4
	.comm	D_PRO,4,4
	.comm	D_MOD,4,4
	.comm	D_GEO,4,4
	.comm	D_DLY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
