	.file	"extr_context.c_context_deinit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	context_deinit, @function
context_deinit:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L16
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ossl_ctx_thread_stop@PLT
	mov	rbx, QWORD PTR 32[rbp]
	test	rbx, rbx
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	call	[QWORD PTR 8[rbx]]
	mov	rdi, rbx
	mov	rbx, QWORD PTR [rbx]
	call	OPENSSL_free@PLT
	test	rbx, rbx
	jne	.L4
.L3:
	mov	edi, DWORD PTR CRYPTO_EX_INDEX_OPENSSL_CTX[rip]
	lea	rdx, 24[rbp]
	xor	esi, esi
	call	CRYPTO_free_ex_data@PLT
	mov	rdi, rbp
	call	crypto_cleanup_all_ex_data_int@PLT
	mov	eax, DWORD PTR OPENSSL_CTX_MAX_INDEXES[rip]
	test	eax, eax
	jle	.L5
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, QWORD PTR [rax+rbx*8]
	add	rbx, 1
	call	CRYPTO_THREAD_lock_free@PLT
	cmp	DWORD PTR OPENSSL_CTX_MAX_INDEXES[rip], ebx
	jg	.L6
.L5:
	mov	rdi, QWORD PTR 8[rbp]
	call	CRYPTO_THREAD_lock_free@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	CRYPTO_THREAD_lock_free@PLT
	mov	QWORD PTR 0[rbp], 0
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, 1
	ret
	.cfi_endproc
.LFE0:
	.size	context_deinit, .-context_deinit
	.comm	OPENSSL_CTX_MAX_INDEXES,4,4
	.comm	CRYPTO_EX_INDEX_OPENSSL_CTX,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_context.c_context_deinit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	context_deinit, %function
context_deinit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r5, r0, #0
	beq	.L2
	bl	ossl_ctx_thread_stop
	ldr	r4, [r5, #16]
	cmp	r4, #0
	beq	.L3
.L4:
	ldr	r3, [r4, #4]
	mov	r0, r5
	blx	r3
	mov	r0, r4
	ldr	r4, [r4]
	bl	OPENSSL_free
	cmp	r4, #0
	bne	.L4
.L3:
	ldr	r3, .L17
	mov	r1, #0
	ldr	r0, [r3]
	add	r2, r5, #12
	ldr	r6, .L17+4
	bl	CRYPTO_free_ex_data
	mov	r0, r5
	bl	crypto_cleanup_all_ex_data_int
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L5
	mov	r4, #0
.L6:
	ldr	r3, [r5, #8]
	ldr	r0, [r3, r4, lsl #2]
	bl	CRYPTO_THREAD_lock_free
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L6
.L5:
	ldr	r0, [r5, #4]
	bl	CRYPTO_THREAD_lock_free
	ldr	r0, [r5]
	bl	CRYPTO_THREAD_lock_free
	mov	r3, #0
	str	r3, [r5]
.L2:
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L18:
	.align	2
.L17:
	.word	CRYPTO_EX_INDEX_OPENSSL_CTX
	.word	OPENSSL_CTX_MAX_INDEXES
	.size	context_deinit, .-context_deinit
	.comm	OPENSSL_CTX_MAX_INDEXES,4,4
	.comm	CRYPTO_EX_INDEX_OPENSSL_CTX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
