	.file	"extr_inode.c_devpts_new_index.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	devpts_new_index
	.type	devpts_new_index, @function
devpts_new_index:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r12, 4[rsp]
	call	pts_sb_from_inode@PLT
	mov	rdi, rax
	call	DEVPTS_SB@PLT
	mov	rbp, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rdi, allocated_ptys_lock[rip]
	call	mutex_lock@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	ida_get_new@PLT
	mov	ebx, eax
	test	eax, eax
	jns	.L5
	lea	rdi, allocated_ptys_lock[rip]
	call	mutex_unlock@PLT
	add	ebx, DWORD PTR EAGAIN[rip]
	jne	.L10
.L2:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, rbp
	call	ida_pre_get@PLT
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
.L1:
	mov	rdx, QWORD PTR 8[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L12
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
.L13:
	.cfi_restore_state
	mov	rdi, rbp
	call	ida_remove@PLT
	lea	rdi, allocated_ptys_lock[rip]
	call	mutex_unlock@PLT
.L10:
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR 4[rsp]
	cmp	esi, DWORD PTR pty_limit[rip]
	jge	.L13
	lea	rdi, allocated_ptys_lock[rip]
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR 4[rsp]
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	devpts_new_index, .-devpts_new_index
	.comm	pty_limit,4,4
	.comm	allocated_ptys_lock,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	EAGAIN,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_inode.c_devpts_new_index.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	devpts_new_index
	.syntax unified
	.arm
	.fpu softvfp
	.type	devpts_new_index, %function
devpts_new_index:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L14
	sub	sp, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	pts_sb_from_inode
	bl	DEVPTS_SB
	ldr	r7, .L14+4
	mov	r5, r0
	ldr	r6, .L14+8
	ldr	r8, .L14+12
	b	.L2
.L3:
	mov	r0, r6
	bl	mutex_lock
	mov	r1, sp
	mov	r0, r5
	bl	ida_get_new
	subs	r4, r0, #0
	bge	.L5
	mov	r0, r6
	bl	mutex_unlock
	ldr	r3, [r8]
	cmn	r4, r3
	bne	.L10
.L2:
	mov	r0, r5
	ldr	r1, [r7]
	bl	ida_pre_get
	cmp	r0, #0
	bne	.L3
	ldr	r3, .L14+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, r5
	bl	ida_remove
	ldr	r0, .L14+8
	bl	mutex_unlock
.L10:
	ldr	r3, .L14+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L5:
	ldr	r3, .L14+24
	ldr	r1, [sp]
	ldr	r3, [r3]
	cmp	r1, r3
	bge	.L13
	ldr	r0, .L14+8
	bl	mutex_unlock
	ldr	r0, [sp]
	b	.L1
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	GFP_KERNEL
	.word	allocated_ptys_lock
	.word	EAGAIN
	.word	ENOMEM
	.word	EIO
	.word	pty_limit
	.size	devpts_new_index, .-devpts_new_index
	.comm	pty_limit,4,4
	.comm	allocated_ptys_lock,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
