	.file	"extr_gdm_tty.c_register_lte_tty_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	register_lte_tty_device
	.type	register_lte_tty_device, @function
register_lte_tty_device:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR TTY_MAX_COUNT[rip]
	mov	QWORD PTR 8[rsp], rsi
	test	edx, edx
	jle	.L2
	mov	rbp, rdi
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 24
	mov	r12d, ebx
	call	kmalloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L22
	lea	rdi, gdm_table_lock[rip]
	call	mutex_lock@PLT
	mov	edx, DWORD PTR GDM_TTY_MINOR[rip]
	test	edx, edx
	jle	.L5
	mov	rax, QWORD PTR gdm_table[rip]
	lea	r13, 0[0+rbx*8]
	xor	r15d, r15d
	mov	rax, QWORD PTR [rax+rbx*8]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L23:
	add	r15d, 1
	add	rax, 8
	cmp	r15d, edx
	je	.L8
.L7:
	cmp	QWORD PTR [rax], 0
	mov	rcx, rax
	jne	.L23
.L6:
	mov	QWORD PTR [rcx], r14
	lea	rdi, gdm_table_lock[rip]
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR 16[rbp]
	lea	rdi, 16[r14]
	mov	QWORD PTR [rsp], rdi
	mov	QWORD PTR [rax+r13], r14
	call	tty_port_init@PLT
	mov	DWORD PTR [r14], r12d
	mov	rcx, QWORD PTR 8[rsp]
	mov	edx, r15d
	lea	rax, gdm_port_ops[rip]
	mov	DWORD PTR 4[r14], r15d
	mov	rdi, QWORD PTR [rsp]
	mov	QWORD PTR 16[r14], rax
	mov	rax, QWORD PTR gdm_driver[rip]
	mov	QWORD PTR 8[r14], rbp
	mov	esi, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	tty_port_register_device@PLT
	cmp	DWORD PTR TTY_MAX_COUNT[rip], ebx
	jg	.L9
.L2:
	mov	eax, DWORD PTR MAX_ISSUE_NUM[rip]
	xor	ebx, ebx
	test	eax, eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[r14]
	mov	esi, DWORD PTR gdm_tty_recv_complete[rip]
	add	ebx, 1
	mov	edi, DWORD PTR [rax]
	call	[QWORD PTR 8[rax]]
	cmp	DWORD PTR MAX_ISSUE_NUM[rip], ebx
	jg	.L10
.L11:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L5:
	.cfi_restore_state
	je	.L8
	mov	rax, QWORD PTR gdm_table[rip]
	lea	r13, 0[0+rbx*8]
	xor	r15d, r15d
	mov	rcx, QWORD PTR [rax+rbx*8]
	jmp	.L6
.L22:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L8:
	.cfi_restore_state
	mov	rdi, r14
	call	kfree@PLT
	lea	rdi, gdm_table_lock[rip]
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	.cfi_endproc
.LFE0:
	.size	register_lte_tty_device, .-register_lte_tty_device
	.comm	gdm_tty_recv_complete,4,4
	.comm	gdm_table_lock,4,4
	.comm	gdm_table,8,8
	.comm	gdm_port_ops,4,4
	.comm	gdm_driver,8,8
	.comm	TTY_MAX_COUNT,4,4
	.comm	MAX_ISSUE_NUM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GDM_TTY_MINOR,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_gdm_tty.c_register_lte_tty_device.c"
	.text
	.align	2
	.global	register_lte_tty_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	register_lte_tty_device, %function
register_lte_tty_device:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, .L25
	sub	sp, sp, #12
	ldr	r3, [fp]
	cmp	r3, #0
	ble	.L2
	mov	r7, r0
	mov	r10, r1
	mov	r5, #0
	ldr	r8, .L25+4
	ldr	r9, .L25+8
.L9:
	ldr	r3, .L25+12
	mov	r0, #16
	ldr	r1, [r3]
	bl	kmalloc
	subs	r4, r0, #0
	beq	.L23
	mov	r0, r8
	bl	mutex_lock
	ldr	r3, .L25+16
	ldr	ip, [r3]
	cmp	ip, #0
	ble	.L5
	ldr	r3, [r9]
	mov	r2, #0
	ldr	r3, [r3, r5, lsl #2]
	lsl	r6, r5, #2
	b	.L7
.L24:
	add	r2, r2, #1
	cmp	r2, ip
	beq	.L8
.L7:
	ldr	r0, [r3]
	mov	r1, r3
	cmp	r0, #0
	add	r3, r3, #4
	bne	.L24
.L6:
	str	r4, [r1]
	mov	r0, r8
	str	r2, [sp, #4]
	bl	mutex_unlock
	ldr	r1, [r7, #8]
	add	r3, r4, #12
	mov	r0, r3
	str	r4, [r1, r6]
	str	r3, [sp]
	bl	tty_port_init
	ldr	r3, .L25+20
	ldr	r2, [sp, #4]
	ldr	r1, [r3]
	ldr	r3, [sp]
	str	r5, [r4]
	mov	r0, r3
	ldr	r3, .L25+24
	str	r2, [r4, #4]
	str	r3, [r4, #12]
	ldr	r1, [r1, r6]
	mov	r3, r10
	str	r7, [r4, #8]
	bl	tty_port_register_device
	ldr	r3, [fp]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L9
.L2:
	ldr	r6, .L25+28
	ldr	r3, [r6]
	cmp	r3, #0
	movgt	r5, #0
	ldrgt	r7, .L25+32
	ble	.L11
.L10:
	ldr	r3, [r4, #8]
	ldr	r1, [r7]
	ldm	r3, {r0, r2}
	blx	r2
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L10
.L11:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	beq	.L8
	ldr	r3, [r9]
	mov	r2, #0
	ldr	r1, [r3, r5, lsl #2]
	lsl	r6, r5, #2
	b	.L6
.L23:
	ldr	r3, .L25+36
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	mov	r0, r4
	bl	kfree
	ldr	r0, .L25+4
	bl	mutex_unlock
	ldr	r3, .L25+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	.align	2
.L25:
	.word	TTY_MAX_COUNT
	.word	gdm_table_lock
	.word	gdm_table
	.word	GFP_KERNEL
	.word	GDM_TTY_MINOR
	.word	gdm_driver
	.word	gdm_port_ops
	.word	MAX_ISSUE_NUM
	.word	gdm_tty_recv_complete
	.word	ENOMEM
	.word	EINVAL
	.size	register_lte_tty_device, .-register_lte_tty_device
	.comm	gdm_tty_recv_complete,4,4
	.comm	gdm_table_lock,4,4
	.comm	gdm_table,4,4
	.comm	gdm_port_ops,4,4
	.comm	gdm_driver,4,4
	.comm	TTY_MAX_COUNT,4,4
	.comm	MAX_ISSUE_NUM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GDM_TTY_MINOR,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
