	.file	"extr_tty_io.c___tty_alloc_driver.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	__tty_alloc_driver
	.type	__tty_alloc_driver, @function
__tty_alloc_driver:
.LFB0:
	.cfi_startproc
	endbr64
	test	edi, edi
	je	.L26
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	test	QWORD PTR TTY_DRIVER_UNNUMBERED_NODE[rip], rdx
	je	.L3
	cmp	edi, 1
	ja	.L32
.L3:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 64
	call	kzalloc@PLT
	mov	edi, DWORD PTR ENOMEM[rip]
	mov	r12, rax
	neg	edi
	test	rax, rax
	je	.L30
	lea	rdi, 60[rax]
	call	kref_init@PLT
	mov	eax, DWORD PTR TTY_DRIVER_MAGIC[rip]
	mov	QWORD PTR 48[r12], r13
	mov	DWORD PTR [r12], ebp
	mov	DWORD PTR 56[r12], eax
	mov	QWORD PTR 8[r12], rbx
	test	QWORD PTR TTY_DRIVER_DEVPTS_MEM[rip], rbx
	je	.L33
.L5:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	test	QWORD PTR TTY_DRIVER_DYNAMIC_ALLOC[rip], rbx
	jne	.L11
	mov	edi, ebp
	mov	esi, 64
	call	kcalloc@PLT
	mov	QWORD PTR 40[r12], rax
	mov	rdi, rax
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 64
	mov	edi, ebp
	call	kcalloc@PLT
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 64
	mov	edi, ebp
	mov	QWORD PTR 32[r12], rax
	call	kcalloc@PLT
	cmp	QWORD PTR 32[r12], 0
	mov	QWORD PTR 24[r12], rax
	je	.L29
	test	rax, rax
	jne	.L5
.L29:
	mov	ebp, DWORD PTR ENOMEM[rip]
	mov	rdi, QWORD PTR 40[r12]
	neg	ebp
.L7:
	call	kfree@PLT
	mov	rdi, QWORD PTR 32[r12]
	call	kfree@PLT
	mov	rdi, QWORD PTR 24[r12]
	call	kfree@PLT
	mov	rdi, QWORD PTR 16[r12]
	call	kfree@PLT
	mov	rdi, r12
	call	kfree@PLT
	mov	edi, ebp
.L30:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	edi, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 24
	neg	edi
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	ebp, 1
.L8:
	mov	esi, 64
	mov	edi, ebp
	call	kcalloc@PLT
	mov	QWORD PTR 16[r12], rax
	test	rax, rax
	je	.L29
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	edi, DWORD PTR EINVAL[rip]
	neg	edi
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	mov	ebp, DWORD PTR ENOMEM[rip]
	neg	ebp
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	__tty_alloc_driver, .-__tty_alloc_driver
	.comm	TTY_DRIVER_UNNUMBERED_NODE,8,8
	.comm	TTY_DRIVER_MAGIC,4,4
	.comm	TTY_DRIVER_DYNAMIC_ALLOC,8,8
	.comm	TTY_DRIVER_DEVPTS_MEM,8,8
	.comm	GFP_KERNEL,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_tty_io.c___tty_alloc_driver.c"
	.text
	.align	2
	.global	__tty_alloc_driver
	.syntax unified
	.arm
	.fpu softvfp
	.type	__tty_alloc_driver, %function
__tty_alloc_driver:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r5, r0, #0
	beq	.L2
	ldr	r3, .L22
	mov	r6, r2
	ldr	r3, [r3]
	and	r3, r3, r2
	cmp	r3, #0
	cmpne	r5, #1
	bhi	.L2
	ldr	r8, .L22+4
	mov	r7, r1
	mov	r0, #36
	ldr	r1, [r8]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L20
	add	r0, r4, #32
	bl	kref_init
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r6, r2
	str	r7, [r4, #24]
	str	r6, [r4, #4]
	str	r3, [r4, #28]
	str	r5, [r4]
	beq	.L21
.L5:
	ldr	r3, .L22+16
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r6, r3
	bne	.L10
	mov	r1, #36
	mov	r0, r5
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r4, #20]
	beq	.L8
	ldr	r2, [r8]
	b	.L7
.L2:
	ldr	r3, .L22+20
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L10:
	mov	r5, #1
.L7:
	mov	r0, r5
	mov	r1, #36
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L18
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ldr	r3, .L22+24
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L21:
	mov	r1, #36
	ldr	r2, [r8]
	mov	r0, r5
	bl	kcalloc
	mov	r1, #36
	str	r0, [r4, #16]
	ldr	r2, [r8]
	mov	r0, r5
	bl	kcalloc
	ldr	r3, [r4, #16]
	str	r0, [r4, #12]
	cmp	r0, #0
	cmpne	r3, #0
	bne	.L5
.L18:
	ldr	r3, .L22+24
	ldr	r0, [r4, #20]
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L6:
	bl	kfree
	ldr	r0, [r4, #16]
	bl	kfree
	ldr	r0, [r4, #12]
	bl	kfree
	ldr	r0, [r4, #8]
	bl	kfree
	mov	r0, r4
	bl	kfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	ERR_PTR
.L8:
	ldr	r3, .L22+24
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L6
.L23:
	.align	2
.L22:
	.word	TTY_DRIVER_UNNUMBERED_NODE
	.word	GFP_KERNEL
	.word	TTY_DRIVER_DEVPTS_MEM
	.word	TTY_DRIVER_MAGIC
	.word	TTY_DRIVER_DYNAMIC_ALLOC
	.word	EINVAL
	.word	ENOMEM
	.size	__tty_alloc_driver, .-__tty_alloc_driver
	.comm	TTY_DRIVER_UNNUMBERED_NODE,4,4
	.comm	TTY_DRIVER_MAGIC,4,4
	.comm	TTY_DRIVER_DYNAMIC_ALLOC,4,4
	.comm	TTY_DRIVER_DEVPTS_MEM,4,4
	.comm	GFP_KERNEL,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
