	.file	"extr_pktcdvd.c_pkt_remove_dev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"dev not setup\n"
.LC1:
	.string	"writer unmapped\n"
	.text
	.p2align 4
	.type	pkt_remove_dev, @function
pkt_remove_dev:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR SINGLE_DEPTH_NESTING[rip]
	mov	r12, rdi
	lea	rdi, ctl_mutex[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	mutex_lock_nested@PLT
	mov	edi, DWORD PTR MAX_WRITERS[rip]
	test	edi, edi
	jle	.L9
	mov	rcx, QWORD PTR pkt_devs[rip]
	lea	esi, -1[rdi]
	xor	eax, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, rdx
.L5:
	mov	rbp, QWORD PTR [rcx+rax*8]
	mov	edx, eax
	mov	ebx, eax
	test	rbp, rbp
	je	.L3
	cmp	QWORD PTR 0[rbp], r12
	je	.L4
.L3:
	lea	ebx, 1[rdx]
	lea	rdx, 1[rax]
	cmp	rax, rsi
	jne	.L10
.L2:
	cmp	edi, ebx
	je	.L16
.L4:
	cmp	QWORD PTR 8[rbp], 0
	jle	.L7
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L6:
	lea	rdi, ctl_mutex[rip]
	call	mutex_unlock@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR 40[rbp]
	call	IS_ERR@PLT
	test	eax, eax
	je	.L17
.L8:
	mov	rax, QWORD PTR pkt_devs[rip]
	movsx	rbx, ebx
	mov	rdi, rbp
	xor	r12d, r12d
	mov	QWORD PTR [rax+rbx*8], 0
	call	pkt_debugfs_dev_remove@PLT
	mov	rdi, rbp
	call	pkt_sysfs_dev_remove@PLT
	mov	edi, DWORD PTR 36[rbp]
	mov	esi, DWORD PTR FMODE_READ[rip]
	or	esi, DWORD PTR FMODE_NDELAY[rip]
	call	blkdev_put@PLT
	mov	edi, DWORD PTR 32[rbp]
	mov	esi, DWORD PTR pkt_proc[rip]
	call	remove_proc_entry@PLT
	lea	rdx, .LC1[rip]
	mov	rsi, rbp
	mov	edi, 1
	call	pkt_dbg@PLT
	mov	rdi, QWORD PTR 24[rbp]
	call	del_gendisk@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR [rax]
	call	blk_cleanup_queue@PLT
	mov	rdi, QWORD PTR 24[rbp]
	call	put_disk@PLT
	lea	rdi, 16[rbp]
	call	mempool_exit@PLT
	mov	rdi, rbp
	call	kfree@PLT
	mov	edi, DWORD PTR THIS_MODULE[rip]
	call	module_put@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC0[rip]
	call	pr_debug@PLT
	mov	r12d, DWORD PTR ENXIO[rip]
	neg	r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 40[rbp]
	call	kthread_stop@PLT
	jmp	.L8
.L9:
	xor	ebx, ebx
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	pkt_remove_dev, .-pkt_remove_dev
	.comm	pkt_proc,4,4
	.comm	pkt_devs,8,8
	.comm	ctl_mutex,4,4
	.comm	THIS_MODULE,4,4
	.comm	SINGLE_DEPTH_NESTING,4,4
	.comm	MAX_WRITERS,4,4
	.comm	FMODE_READ,4,4
	.comm	FMODE_NDELAY,4,4
	.comm	ENXIO,4,4
	.comm	EBUSY,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_pktcdvd.c_pkt_remove_dev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"dev not setup\012\000"
	.align	2
.LC1:
	.ascii	"writer unmapped\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pkt_remove_dev, %function
pkt_remove_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L18
	push	{r4, r5, r6, lr}
	ldr	r1, [r3]
	mov	r6, r0
	ldr	r0, .L18+4
	bl	mutex_lock_nested
	ldr	r3, .L18+8
	ldr	r1, [r3]
	cmp	r1, #0
	ble	.L2
	mov	r5, #0
	ldr	r3, .L18+12
	ldr	r3, [r3]
	sub	r3, r3, #4
.L5:
	ldr	r4, [r3, #4]!
	cmp	r4, #0
	beq	.L3
	ldr	r2, [r4]
	cmp	r2, r6
	beq	.L4
.L3:
	add	r5, r5, #1
	cmp	r1, r5
	bne	.L5
.L6:
	ldr	r0, .L18+16
	bl	pr_debug
	ldr	r3, .L18+20
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L7
.L2:
	movne	r5, #0
	beq	.L6
.L4:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	ble	.L8
	ldr	r3, .L18+24
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L7:
	ldr	r0, .L18+4
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r0, [r4, #24]
	bl	IS_ERR
	cmp	r0, #0
	beq	.L17
.L9:
	mov	r3, #0
	ldr	r2, .L18+12
	mov	r0, r4
	ldr	r2, [r2]
	mov	r6, r3
	str	r3, [r2, r5, lsl #2]
	bl	pkt_debugfs_dev_remove
	mov	r0, r4
	bl	pkt_sysfs_dev_remove
	ldr	r2, .L18+28
	ldr	r3, .L18+32
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, [r4, #20]
	orr	r1, r1, r3
	bl	blkdev_put
	ldr	r3, .L18+36
	ldr	r0, [r4, #16]
	ldr	r1, [r3]
	bl	remove_proc_entry
	mov	r1, r4
	ldr	r2, .L18+40
	mov	r0, #1
	bl	pkt_dbg
	ldr	r0, [r4, #12]
	bl	del_gendisk
	ldr	r3, [r4, #12]
	ldr	r0, [r3]
	bl	blk_cleanup_queue
	ldr	r0, [r4, #12]
	bl	put_disk
	add	r0, r4, #8
	bl	mempool_exit
	mov	r0, r4
	bl	kfree
	ldr	r3, .L18+44
	ldr	r0, [r3]
	bl	module_put
	b	.L7
.L17:
	ldr	r0, [r4, #24]
	bl	kthread_stop
	b	.L9
.L19:
	.align	2
.L18:
	.word	SINGLE_DEPTH_NESTING
	.word	ctl_mutex
	.word	MAX_WRITERS
	.word	pkt_devs
	.word	.LC0
	.word	ENXIO
	.word	EBUSY
	.word	FMODE_READ
	.word	FMODE_NDELAY
	.word	pkt_proc
	.word	.LC1
	.word	THIS_MODULE
	.size	pkt_remove_dev, .-pkt_remove_dev
	.comm	pkt_proc,4,4
	.comm	pkt_devs,4,4
	.comm	ctl_mutex,4,4
	.comm	THIS_MODULE,4,4
	.comm	SINGLE_DEPTH_NESTING,4,4
	.comm	MAX_WRITERS,4,4
	.comm	FMODE_READ,4,4
	.comm	FMODE_NDELAY,4,4
	.comm	ENXIO,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
