	.file	"extr_pt.c_pt_detect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: %s version %s, major %d\n"
.LC1:
	.string	"failed to register %s driver\n"
.LC2:
	.string	"%s%d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"%s: No ATAPI tape drive detected\n"
	.text
	.p2align 4
	.type	pt_detect, @function
pt_detect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rdi, .LC0[rip]
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rsi, QWORD PTR name[rip]
	mov	ecx, DWORD PTR PT_VERSION[rip]
	mov	r8d, DWORD PTR major[rip]
	mov	rdx, rsi
	call	printk@PLT
	mov	rdi, QWORD PTR name[rip]
	call	pi_register_driver@PLT
	mov	DWORD PTR par_drv[rip], eax
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR PT_UNITS[rip]
	mov	rbx, QWORD PTR pt[rip]
	test	eax, eax
	jle	.L30
	xor	r12d, r12d
	xor	ebp, ebp
	xor	r15d, r15d
	xor	r13d, r13d
	lea	r14, .LC2[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	add	ebp, 1
	add	r12, 56
	cmp	DWORD PTR PT_UNITS[rip], ebp
	jle	.L8
.L31:
	mov	rbx, QWORD PTR pt[rip]
.L3:
	add	rbx, r12
	mov	esi, 1
	lea	rax, 52[rbx]
	lea	rdi, 48[rbx]
	mov	QWORD PTR 8[rbx], rax
	call	atomic_set@PLT
	mov	rdx, QWORD PTR D_SLV[rip]
	mov	edi, DWORD PTR 16[rbx]
	mov	DWORD PTR [rbx], 0
	mov	rax, QWORD PTR DU[rip]
	mov	QWORD PTR 40[rbx], 0
	mov	r8d, ebp
	mov	QWORD PTR 32[rbx], 0
	mov	rcx, QWORD PTR name[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, DWORD PTR PT_NAMELEN[rip]
	mov	rdx, r14
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 4[rbx], eax
	call	snprintf@PLT
	mov	rax, QWORD PTR DU[rip]
	mov	rdx, QWORD PTR D_PRT[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	je	.L6
	mov	esi, DWORD PTR 16[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	rdi, QWORD PTR 8[rbx]
	add	r13d, 1
	mov	rcx, QWORD PTR D_PRO[rip]
	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 80
	mov	esi, DWORD PTR verbose[rip]
	push	rsi
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR PI_PT[rip]
	push	rsi
	.cfi_def_cfa_offset 96
	mov	esi, DWORD PTR pt_scratch[rip]
	push	rsi
	.cfi_def_cfa_offset 104
	mov	rsi, QWORD PTR D_DLY[rip]
	mov	eax, DWORD PTR [rax+rsi*4]
	xor	esi, esi
	push	rax
	.cfi_def_cfa_offset 112
	call	pi_init@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 64
	test	rax, rax
	je	.L6
	mov	rdi, rbx
	call	pt_probe@PLT
	test	eax, eax
	jne	.L7
	add	r15d, 1
	add	ebp, 1
	add	r12, 56
	cmp	DWORD PTR PT_UNITS[rip], ebp
	mov	DWORD PTR [rbx], 1
	jg	.L31
	.p2align 4,,10
	.p2align 3
.L8:
	test	r13d, r13d
	je	.L32
.L10:
	test	r15d, r15d
	je	.L12
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	pi_release@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rbx, QWORD PTR pt[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	ecx, -1
	mov	r9d, -1
	mov	r8d, -1
	mov	edx, -1
	mov	esi, 1
	mov	eax, DWORD PTR 16[rbx]
	mov	rdi, QWORD PTR 8[rbx]
	push	rax
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR verbose[rip]
	push	rax
	.cfi_def_cfa_offset 88
	mov	eax, DWORD PTR PI_PT[rip]
	push	rax
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR pt_scratch[rip]
	push	rax
	.cfi_def_cfa_offset 104
	push	-1
	.cfi_def_cfa_offset 112
	call	pi_init@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 64
	test	rax, rax
	je	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbx
	call	pt_probe@PLT
	test	eax, eax
	jne	.L11
	mov	DWORD PTR [rbx], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, DWORD PTR 16[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	rdi, QWORD PTR 8[rbx]
	mov	ecx, -1
	mov	r9d, -1
	mov	r8d, -1
	mov	edx, -1
	xor	r15d, r15d
	push	rax
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR verbose[rip]
	mov	esi, 1
	push	rax
	.cfi_def_cfa_offset 88
	mov	eax, DWORD PTR PI_PT[rip]
	push	rax
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR pt_scratch[rip]
	push	rax
	.cfi_def_cfa_offset 104
	push	-1
	.cfi_def_cfa_offset 112
	call	pi_init@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 64
	test	rax, rax
	jne	.L9
.L12:
	mov	edi, DWORD PTR par_drv[rip]
	call	pi_unregister_driver@PLT
	mov	rsi, QWORD PTR name[rip]
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	printk@PLT
	mov	eax, -1
	jmp	.L1
.L11:
	mov	rdi, QWORD PTR 8[rbx]
	call	pi_release@PLT
	jmp	.L10
.L2:
	mov	rsi, QWORD PTR name[rip]
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	pt_detect, .-pt_detect
	.comm	verbose,4,4
	.comm	pt_scratch,4,4
	.comm	pt,8,8
	.comm	par_drv,4,4
	.comm	name,8,8
	.comm	major,4,4
	.comm	PT_VERSION,4,4
	.comm	PT_UNITS,4,4
	.comm	PT_NAMELEN,4,4
	.comm	PI_PT,4,4
	.comm	D_UNI,8,8
	.comm	D_SLV,8,8
	.comm	D_PRT,8,8
	.comm	D_PRO,8,8
	.comm	D_MOD,8,8
	.comm	D_DLY,8,8
	.comm	DU,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_pt.c_pt_detect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: %s version %s, major %d\012\000"
	.align	2
.LC1:
	.ascii	"failed to register %s driver\012\000"
	.align	2
.LC2:
	.ascii	"%s%d\000"
	.align	2
.LC3:
	.ascii	"%s: No ATAPI tape drive detected\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pt_detect, %function
pt_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	r3, .L33
	ldr	r4, .L33+4
	ldr	r0, [r3]
	ldr	r2, [r4]
	sub	sp, sp, #52
	ldr	r3, .L33+8
	str	r0, [sp]
	ldr	r3, [r3]
	mov	r1, r2
	ldr	r0, .L33+12
	bl	printk
	ldr	r0, [r4]
	bl	pi_register_driver
	ldr	r3, .L33+16
	cmp	r0, #0
	str	r0, [r3]
	beq	.L2
	ldr	r8, .L33+20
	ldr	r2, .L33+24
	ldr	r3, [r8]
	ldr	fp, [r2]
	cmp	r3, #0
	ble	.L30
	mov	r5, #0
	mov	r9, fp
	ldr	r7, .L33+28
	ldr	r10, .L33+32
	str	r5, [sp, #44]
	str	r5, [sp, #32]
	b	.L3
.L6:
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L8
.L31:
	ldr	r3, .L33+24
	ldr	r9, [r3]
.L3:
	mov	r6, #0
	add	fp, r5, r5, lsl #3
	add	r4, r9, fp, lsl #2
	add	r2, r4, #32
	mov	r1, #1
	str	r2, [r4, #8]
	add	r0, r4, #28
	bl	atomic_set
	ldr	r3, .L33+36
	ldr	r2, [r7]
	ldr	r1, [r3]
	str	r6, [r4, #24]
	str	r6, [r4, #20]
	str	r6, [r9, fp, lsl #2]
	ldr	r3, [r2, r1, lsl #2]
	ldr	r1, .L33+40
	str	r3, [r4, #4]
	ldr	r3, .L33+4
	ldr	r0, [r4, #12]
	str	r6, [r4, #16]
	str	r5, [sp]
	ldr	r3, [r3]
	ldr	r2, .L33+44
	ldr	r1, [r1]
	bl	snprintf
	ldr	r1, [r7]
	ldr	r3, [r10]
	ldr	lr, .L33+48
	ldr	r2, [r1, r3, lsl #2]
	ldr	ip, .L33+52
	cmp	r2, r6
	beq	.L6
	ldr	r0, .L33+56
	ldr	r3, .L33+60
	ldr	r9, [r0]
	ldr	r0, .L33+64
	ldr	r3, [r3]
	ldr	r0, [r0]
	ldr	fp, [r4, #12]
	ldr	r3, [r1, r3, lsl #2]
	str	r0, [sp, #36]
	ldr	r0, [r4, #8]
	str	fp, [sp, #24]
	ldr	fp, .L33+68
	str	r9, [sp, #20]
	ldr	r9, [sp, #36]
	ldr	fp, [fp]
	str	r9, [sp, #16]
	ldr	r9, .L33+72
	str	fp, [sp, #40]
	ldr	fp, [r9]
	ldr	r9, [sp, #40]
	str	r9, [sp, #12]
	ldr	fp, [r1, fp, lsl #2]
	ldr	lr, [lr]
	str	fp, [sp, #8]
	ldr	lr, [r1, lr, lsl #2]
	ldr	ip, [ip]
	str	lr, [sp, #4]
	ldr	ip, [r1, ip, lsl #2]
	mov	r1, r6
	str	ip, [sp]
	bl	pi_init
	ldr	r3, [sp, #32]
	cmp	r0, r6
	add	r3, r3, #1
	str	r3, [sp, #32]
	beq	.L6
	mov	r0, r4
	bl	pt_probe
	cmp	r0, r6
	bne	.L7
	mov	r3, #1
	ldr	r2, [sp, #44]
	str	r3, [r4]
	add	r2, r2, r3
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	str	r2, [sp, #44]
	bgt	.L31
.L8:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	beq	.L32
.L10:
	ldr	r3, [sp, #44]
	cmp	r3, #0
	beq	.L12
	mov	r0, #0
.L1:
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r0, [r4, #8]
	bl	pi_release
	b	.L6
.L32:
	mvn	r3, #0
	ldr	r2, .L33+24
	ldr	ip, .L33+56
	ldr	fp, [r2]
	ldr	r1, .L33+64
	ldr	r2, .L33+68
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	lr, [fp, #12]
	ldr	ip, [ip]
	ldr	r0, [fp, #8]
	str	r1, [sp, #16]
	str	r2, [sp, #12]
	mov	r1, #1
	mov	r2, r3
	str	lr, [sp, #24]
	str	ip, [sp, #20]
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	str	r3, [sp]
	bl	pi_init
	cmp	r0, #0
	beq	.L10
.L9:
	mov	r0, fp
	bl	pt_probe
	cmp	r0, #0
	bne	.L11
	mov	r3, #1
	str	r3, [fp]
	b	.L1
.L30:
	mvn	r3, #0
	ldr	r0, .L33+56
	ldr	r1, .L33+64
	ldr	r2, .L33+68
	ldr	lr, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, [fp, #12]
	ldr	r0, [fp, #8]
	str	r1, [sp, #16]
	str	r2, [sp, #12]
	str	r3, [sp, #8]
	mov	r2, r3
	str	r3, [sp, #4]
	str	r3, [sp]
	mov	r1, #1
	str	lr, [sp, #20]
	str	ip, [sp, #24]
	bl	pi_init
	cmp	r0, #0
	movne	r3, #0
	strne	r3, [sp, #44]
	bne	.L9
.L12:
	ldr	r3, .L33+16
	ldr	r0, [r3]
	bl	pi_unregister_driver
	ldr	r3, .L33+4
	ldr	r0, .L33+76
	ldr	r1, [r3]
	bl	printk
	mvn	r0, #0
	b	.L1
.L11:
	ldr	r0, [fp, #8]
	bl	pi_release
	b	.L10
.L2:
	ldr	r3, .L33+4
	ldr	r0, .L33+80
	ldr	r1, [r3]
	bl	pr_err
	mvn	r0, #0
	b	.L1
.L34:
	.align	2
.L33:
	.word	major
	.word	name
	.word	PT_VERSION
	.word	.LC0
	.word	par_drv
	.word	PT_UNITS
	.word	pt
	.word	DU
	.word	D_PRT
	.word	D_SLV
	.word	PT_NAMELEN
	.word	.LC2
	.word	D_PRO
	.word	D_UNI
	.word	verbose
	.word	D_MOD
	.word	PI_PT
	.word	pt_scratch
	.word	D_DLY
	.word	.LC3
	.word	.LC1
	.size	pt_detect, .-pt_detect
	.comm	verbose,4,4
	.comm	pt_scratch,4,4
	.comm	pt,4,4
	.comm	par_drv,4,4
	.comm	name,4,4
	.comm	major,4,4
	.comm	PT_VERSION,4,4
	.comm	PT_UNITS,4,4
	.comm	PT_NAMELEN,4,4
	.comm	PI_PT,4,4
	.comm	D_UNI,4,4
	.comm	D_SLV,4,4
	.comm	D_PRT,4,4
	.comm	D_PRO,4,4
	.comm	D_MOD,4,4
	.comm	D_DLY,4,4
	.comm	DU,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
