	.file	"extr_tape_class.c_register_tape_dev.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.text
	.p2align 4
	.globl	register_tape_dev
	.type	register_tape_dev, @function
register_tape_dev:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	edi, 32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	mov	edi, DWORD PTR ENOMEM[rip]
	neg	edi
	test	rax, rax
	je	.L21
	mov	edx, DWORD PTR TAPECLASS_NAME_LEN[rip]
	mov	rdi, QWORD PTR [rax]
	mov	rbp, rax
	mov	rsi, r15
	call	strlcpy@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	esi, 47
	call	strchr@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	BYTE PTR [rdi], 33
	mov	esi, 47
	call	strchr@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L4
.L3:
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR TAPECLASS_NAME_LEN[rip]
	mov	rsi, r14
	call	strlcpy@PLT
	mov	rdi, QWORD PTR 8[rbp]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L23:
	mov	BYTE PTR [rax], 33
.L20:
	mov	esi, 47
	call	strchr@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L23
	xor	eax, eax
	call	cdev_alloc@PLT
	mov	QWORD PTR 16[rbp], rax
	mov	rdi, rax
	test	rax, rax
	je	.L24
	mov	eax, DWORD PTR [rbx]
	mov	QWORD PTR 8[rdi], rbx
	mov	esi, r12d
	mov	edx, 1
	mov	DWORD PTR 16[rdi], eax
	call	cdev_add@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L25
.L9:
	mov	rdi, QWORD PTR 16[rbp]
	call	cdev_del@PLT
.L8:
	mov	rdi, rbp
	call	kfree@PLT
	mov	edi, r12d
.L21:
	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
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbp]
	mov	r9, QWORD PTR 0[rbp]
	xor	ecx, ecx
	mov	rsi, r13
	mov	edi, DWORD PTR tape_class[rip]
	lea	r8, .LC0[rip]
	mov	edx, DWORD PTR [rax]
	call	device_create@PLT
	mov	QWORD PTR 24[rbp], rax
	mov	rdi, rax
	call	PTR_ERR_OR_ZERO@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	rdx, QWORD PTR 8[rbp]
	mov	rsi, QWORD PTR 24[rbp]
	mov	rdi, r13
	call	sysfs_create_link@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L26
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, rbp
	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
.L24:
	.cfi_restore_state
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L8
.L26:
	mov	rax, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR tape_class[rip]
	mov	esi, DWORD PTR [rax]
	call	device_destroy@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	register_tape_dev, .-register_tape_dev
	.comm	tape_class,4,4
	.comm	TAPECLASS_NAME_LEN,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_tape_class.c_register_tape_dev.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s\000"
	.text
	.align	2
	.global	register_tape_dev
	.syntax unified
	.arm
	.fpu softvfp
	.type	register_tape_dev, %function
register_tape_dev:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	ldr	r1, .L26
	sub	sp, sp, #8
	mov	r7, r0
	ldr	r1, [r1]
	mov	r0, #16
	mov	r5, r2
	mov	r8, r3
	ldr	r10, [sp, #40]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L22
	ldr	r9, .L26+4
	mov	r1, r8
	ldr	r2, [r9]
	ldr	r0, [r4]
	bl	strlcpy
	mov	r1, #47
	ldr	r0, [r4]
	bl	strchr
	cmp	r0, #0
	beq	.L3
	mov	r8, #33
.L4:
	mov	r1, #47
	strb	r8, [r0]
	bl	strchr
	cmp	r0, #0
	bne	.L4
.L3:
	mov	r1, r10
	ldr	r2, [r9]
	ldr	r0, [r4, #4]
	bl	strlcpy
	mov	r1, #47
	ldr	r0, [r4, #4]
	bl	strchr
	cmp	r0, #0
	beq	.L5
	mov	r8, #33
.L6:
	mov	r1, #47
	strb	r8, [r0]
	bl	strchr
	cmp	r0, #0
	bne	.L6
.L5:
	bl	cdev_alloc
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L23
	ldr	r2, [r5]
	mov	r1, r6
	str	r2, [r0, #8]
	str	r5, [r0, #4]
	mov	r2, #1
	bl	cdev_add
	subs	r5, r0, #0
	beq	.L24
.L9:
	ldr	r0, [r4, #8]
	bl	cdev_del
.L8:
	mov	r0, r4
	bl	kfree
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	ERR_PTR
.L24:
	ldr	r3, [r4, #8]
	ldr	ip, [r4]
	ldr	r1, .L26+8
	ldr	r6, .L26+12
	ldr	r2, [r3]
	ldr	r0, [r6]
	mov	r3, r5
	stm	sp, {r1, ip}
	mov	r1, r7
	bl	device_create
	str	r0, [r4, #12]
	bl	PTR_ERR_OR_ZERO
	subs	r5, r0, #0
	bne	.L9
	mov	r0, r7
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #12]
	bl	sysfs_create_link
	subs	r5, r0, #0
	bne	.L25
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r3, .L26+16
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L8
.L22:
	ldr	r3, .L26+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	ERR_PTR
.L25:
	ldr	r3, [r4, #8]
	ldr	r0, [r6]
	ldr	r1, [r3]
	bl	device_destroy
	b	.L9
.L27:
	.align	2
.L26:
	.word	GFP_KERNEL
	.word	TAPECLASS_NAME_LEN
	.word	.LC0
	.word	tape_class
	.word	ENOMEM
	.size	register_tape_dev, .-register_tape_dev
	.comm	tape_class,4,4
	.comm	TAPECLASS_NAME_LEN,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
