	.file	"extr_context.c_context_new.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	context_new
	.type	context_new, @function
context_new:
.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
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	edi, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR [rsp], rsi
	mov	esi, 72
	mov	DWORD PTR 8[rsp], edx
	mov	DWORD PTR 12[rsp], ecx
	call	calloc@PLT
	test	rax, rax
	je	.L1
	mov	rbx, rax
	mov	rdi, rbp
	mov	r14, rax
	call	lock_basic_lock@PLT
	lea	r15, 64[rbx]
	mov	rdi, rbp
	mov	rsi, r15
	call	find_id@PLT
	mov	rdi, rbp
	test	eax, eax
	je	.L12
	call	lock_basic_unlock@PLT
	mov	rax, r13
	mov	QWORD PTR 48[rbx], r12
	mov	esi, 72
	or	rax, r12
	mov	QWORD PTR 16[rbx], r15
	mov	edi, 1
	setne	al
	mov	QWORD PTR 56[rbx], r13
	movzx	eax, al
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR 80[rsp]
	mov	QWORD PTR 40[rbx], rax
	call	calloc@PLT
	mov	QWORD PTR 24[rbx], rax
	mov	r12, rax
	test	rax, rax
	je	.L10
	mov	rdi, QWORD PTR [rsp]
	call	strdup@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	DWORD PTR 32[r12], eax
	mov	edx, DWORD PTR 32[rdi]
	test	edx, edx
	je	.L13
	mov	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR 4[rdi], eax
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 8[rdi], eax
	mov	rdi, rbp
	call	lock_basic_lock@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L6
	add	DWORD PTR 8[rbp], 1
.L6:
	lea	rdi, 4[rbp]
	lea	rsi, 16[rbx]
	call	rbtree_insert@PLT
	mov	rdi, rbp
	call	lock_basic_unlock@PLT
.L1:
	add	rsp, 24
	.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
.L13:
	.cfi_restore_state
	call	free@PLT
.L10:
	mov	rdi, r14
	xor	r14d, r14d
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	call	lock_basic_unlock@PLT
	mov	rdi, rbx
	xor	r14d, r14d
	call	free@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	context_new, .-context_new
	.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_context.c_context_new.c"
	.text
	.align	2
	.global	context_new
	.syntax unified
	.arm
	.fpu softvfp
	.type	context_new, %function
context_new:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	sub	sp, sp, #12
	mov	r7, r1
	mov	r0, #1
	mov	r1, #40
	mov	r6, r2
	mov	r5, r3
	ldr	r10, [sp, #48]
	bl	calloc
	subs	r9, r0, #0
	beq	.L1
	mov	fp, r0
	add	r8, r9, #36
	mov	r0, r4
	bl	lock_basic_lock
	mov	r1, r8
	mov	r0, r4
	bl	find_id
	subs	r2, r0, #0
	beq	.L13
	mov	r0, r4
	bl	lock_basic_unlock
	ldr	r3, [sp, #52]
	str	r8, [r9, #12]
	orrs	r3, r10, r3
	movne	r2, #1
	moveq	r2, #0
	ldr	r3, [sp, #52]
	mov	r1, #40
	str	r3, [r9, #28]
	ldr	r3, [sp, #56]
	mov	r0, #1
	str	r10, [r9, #32]
	str	r3, [r9, #24]
	str	r2, [r9]
	bl	calloc
	cmp	r0, #0
	mov	r8, r0
	str	r0, [r9, #16]
	beq	.L14
	mov	r0, r7
	bl	strdup
	cmp	r0, #0
	mov	r7, r0
	str	r0, [r8, #20]
	beq	.L15
	mov	r0, r4
	str	r6, [r8, #4]
	str	r5, [r8, #8]
	bl	lock_basic_lock
	ldr	r2, [r9]
	add	r1, fp, #12
	cmp	r2, #0
	ldrne	r2, [r4, #8]
	add	r0, r4, #4
	addne	r2, r2, #1
	strne	r2, [r4, #8]
	bl	rbtree_insert
	mov	r0, r4
	bl	lock_basic_unlock
.L1:
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r4
	str	r2, [sp, #4]
	bl	lock_basic_unlock
	mov	r0, r9
	bl	free
	ldr	r2, [sp, #4]
	mov	r9, r2
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r0, r9
	bl	free
	mov	r9, r8
	b	.L1
.L15:
	mov	r0, r8
	bl	free
	mov	r0, r9
	bl	free
	mov	r9, r7
	b	.L1
	.size	context_new, .-context_new
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
