	.file	"extr_char_dev.c___register_chrdev_region.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"CHRDEV \"%s\" major requested (%u) is greater than the maximum (%u)\n"
	.align 8
.LC1:
	.string	"CHRDEV \"%s\" minor range requested (%u-%u) is out of range of maximum range (%u-%u) for a single major\n"
	.align 8
.LC2:
	.string	"CHRDEV \"%s\" dynamic allocation region is full\n"
	.text
	.p2align 4
	.type	__register_chrdev_region, @function
__register_chrdev_region:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ecx, DWORD PTR CHRDEV_MAJOR_MAX[rip]
	cmp	ecx, edi
	jbe	.L25
	mov	r9d, DWORD PTR MINORMASK[rip]
	mov	r13d, esi
	mov	ebx, edx
	lea	eax, 1[r9]
	sub	eax, esi
	cmp	eax, edx
	jb	.L26
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 32
	call	kzalloc@PLT
	mov	edi, DWORD PTR ENOMEM[rip]
	mov	r14, rax
	neg	edi
	test	rax, rax
	je	.L23
	lea	rdi, chrdevs_lock[rip]
	call	mutex_lock@PLT
	test	r12d, r12d
	jne	.L5
	xor	eax, eax
	call	find_dynamic_major@PLT
	mov	r15d, eax
	mov	r12d, eax
	test	eax, eax
	js	.L27
.L5:
	mov	edi, r12d
	mov	r15d, DWORD PTR EBUSY[rip]
	call	major_to_index@PLT
	movsx	r8, eax
	mov	rax, QWORD PTR chrdevs[rip]
	mov	rcx, QWORD PTR [rax+r8*8]
	test	rcx, rcx
	je	.L8
	xor	r9d, r9d
.L12:
	cmp	DWORD PTR [rcx], r12d
	jb	.L9
	ja	.L10
	mov	eax, DWORD PTR 4[rcx]
	mov	edx, DWORD PTR 8[rcx]
	add	edx, eax
	cmp	edx, r13d
	jbe	.L9
	lea	edx, [rbx+r13]
	cmp	eax, edx
	jb	.L28
.L10:
	mov	DWORD PTR [r14], r12d
	mov	edi, DWORD PTR 24[r14]
	mov	edx, 4
	mov	rsi, rbp
	mov	DWORD PTR 4[r14], r13d
	mov	DWORD PTR 8[r14], ebx
	mov	QWORD PTR 24[rsp], r8
	mov	QWORD PTR 16[rsp], rcx
	mov	QWORD PTR 8[rsp], r9
	call	strlcpy@PLT
	mov	r9, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR 24[rsp]
	test	r9, r9
	je	.L17
.L14:
	mov	rax, QWORD PTR 16[r9]
	mov	QWORD PTR 16[r14], rax
	mov	QWORD PTR 16[r9], r14
.L15:
	lea	rdi, chrdevs_lock[rip]
	call	mutex_unlock@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L28:
	.cfi_restore_state
	neg	r15d
.L7:
	lea	rdi, chrdevs_lock[rip]
	call	mutex_unlock@PLT
	mov	rdi, r14
	call	kfree@PLT
	mov	edi, r15d
.L23:
	add	rsp, 40
	.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
.L9:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rcx]
	mov	r9, rcx
	test	rax, rax
	je	.L29
	mov	rcx, rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	lea	ecx, -1[rsi+rdx]
	lea	rdi, .LC1[rip]
	mov	edx, esi
	xor	r8d, r8d
	mov	rsi, rbp
	xor	eax, eax
	call	pr_err@PLT
	mov	edi, DWORD PTR EINVAL[rip]
	neg	edi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edx, edi
	sub	ecx, 1
	lea	rdi, .LC0[rip]
	mov	rsi, rbp
	xor	eax, eax
	call	pr_err@PLT
	mov	edi, DWORD PTR EINVAL[rip]
	neg	edi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L8:
	mov	DWORD PTR [r14], r12d
	mov	edi, DWORD PTR 24[r14]
	mov	edx, 4
	mov	rsi, rbp
	mov	DWORD PTR 4[r14], r13d
	mov	DWORD PTR 8[r14], ebx
	mov	QWORD PTR 16[rsp], r8
	mov	QWORD PTR 8[rsp], rcx
	call	strlcpy@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	r8, QWORD PTR 16[rsp]
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR chrdevs[rip]
	mov	QWORD PTR 16[r14], rcx
	mov	QWORD PTR [rax+r8*8], r14
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rsi, rbp
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	pr_err@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	mov	DWORD PTR [r14], r12d
	mov	edi, DWORD PTR 24[r14]
	mov	edx, 4
	mov	rsi, rbp
	mov	DWORD PTR 4[r14], r13d
	mov	DWORD PTR 8[r14], ebx
	mov	QWORD PTR 8[rsp], rcx
	call	strlcpy@PLT
	mov	r9, QWORD PTR 8[rsp]
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	__register_chrdev_region, .-__register_chrdev_region
	.comm	chrdevs_lock,4,4
	.comm	chrdevs,8,8
	.comm	MINORMASK,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	CHRDEV_MAJOR_MAX,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_char_dev.c___register_chrdev_region.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"CHRDEV \"%s\" major requested (%u) is greater than "
	.ascii	"the maximum (%u)\012\000"
	.align	2
.LC1:
	.ascii	"CHRDEV \"%s\" minor range requested (%u-%u) is out "
	.ascii	"of range of maximum range (%u-%u) for a single majo"
	.ascii	"r\012\000"
	.align	2
.LC2:
	.ascii	"CHRDEV \"%s\" dynamic allocation region is full\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__register_chrdev_region, %function
__register_chrdev_region:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r0, .L31
	mov	r9, r1
	ldr	r1, [r0]
	mov	r8, r3
	cmp	r1, r4
	sub	sp, sp, #20
	bls	.L25
	ldr	r3, .L31+4
	mov	r5, r2
	ldr	r1, [r3]
	add	r3, r1, #1
	sub	r3, r3, r9
	cmp	r3, r2
	bcc	.L26
	ldr	r3, .L31+8
	mov	r0, #20
	ldr	r1, [r3]
	bl	kzalloc
	subs	r6, r0, #0
	beq	.L27
	ldr	r0, .L31+12
	bl	mutex_lock
	cmp	r4, #0
	bne	.L5
	bl	find_dynamic_major
	subs	r4, r0, #0
	blt	.L28
.L5:
	ldr	r3, .L31+16
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	bl	major_to_index
	ldr	r3, .L31+20
	mov	r10, r0
	ldr	r1, [r3]
	ldr	r7, [r1, r0, lsl #2]
	cmp	r7, #0
	beq	.L8
	mov	fp, #0
.L12:
	ldr	r1, [r7]
	cmp	r1, r4
	bcc	.L9
	bhi	.L10
	ldmib	r7, {r0, r1}
	add	r1, r0, r1
	cmp	r1, r9
	bls	.L9
	add	r1, r5, r9
	cmp	r0, r1
	bcc	.L29
.L10:
	mov	r1, r8
	mov	r2, #4
	stm	r6, {r4, r9}
	ldr	r0, [r6, #16]
	str	r5, [r6, #8]
	bl	strlcpy
	cmp	fp, #0
	ldr	r3, .L31+20
	beq	.L17
.L14:
	ldr	r3, [fp, #12]
	str	r3, [r6, #12]
	str	r6, [fp, #12]
.L15:
	ldr	r0, .L31+12
	bl	mutex_unlock
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r1, [r7, #12]
	mov	fp, r7
	cmp	r1, #0
	beq	.L30
	mov	r7, r1
	b	.L12
.L26:
	mov	r0, #0
	add	r3, r2, r9
	sub	r3, r3, #1
	str	r1, [sp, #4]
	str	r0, [sp]
	mov	r2, r9
	mov	r1, r8
	ldr	r0, .L31+24
	bl	pr_err
	ldr	r3, .L31+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L23:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERR_PTR
.L25:
	sub	r3, r1, #1
	mov	r2, r4
	mov	r1, r8
	ldr	r0, .L31+32
	bl	pr_err
	ldr	r3, .L31+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERR_PTR
.L27:
	ldr	r3, .L31+36
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L23
.L8:
	mov	r1, r8
	mov	r2, #4
	stm	r6, {r4, r9}
	ldr	r0, [r6, #16]
	str	r5, [r6, #8]
	bl	strlcpy
	ldr	r3, .L31+20
.L17:
	ldr	r3, [r3]
	str	r7, [r6, #12]
	str	r6, [r3, r10, lsl #2]
	b	.L15
.L29:
	ldr	r3, [sp, #12]
	rsb	r4, r3, #0
.L7:
	ldr	r0, .L31+12
	bl	mutex_unlock
	mov	r0, r6
	bl	kfree
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERR_PTR
.L28:
	mov	r1, r8
	ldr	r0, .L31+40
	bl	pr_err
	b	.L7
.L30:
	mov	r1, r8
	mov	r2, #4
	stm	r6, {r4, r9}
	ldr	r0, [r6, #16]
	str	r5, [r6, #8]
	bl	strlcpy
	b	.L14
.L32:
	.align	2
.L31:
	.word	CHRDEV_MAJOR_MAX
	.word	MINORMASK
	.word	GFP_KERNEL
	.word	chrdevs_lock
	.word	EBUSY
	.word	chrdevs
	.word	.LC1
	.word	EINVAL
	.word	.LC0
	.word	ENOMEM
	.word	.LC2
	.size	__register_chrdev_region, .-__register_chrdev_region
	.comm	chrdevs_lock,4,4
	.comm	chrdevs,4,4
	.comm	MINORMASK,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	CHRDEV_MAJOR_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
