	.file	"extr_tpm2-space.c_tpm2_save_space.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tpm2_save_space, @function
tpm2_save_space:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rdi, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r14, 4[rsp]
	mov	DWORD PTR 4[rsp], 0
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	test	r12d, r12d
	jne	.L1
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax+r13]
	call	tpm2_flush_context@PLT
	mov	rdi, QWORD PTR 16[rbp]
	mov	DWORD PTR [rdi+r13], -1
.L3:
	add	rbx, 1
.L2:
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jle	.L18
	mov	rdi, QWORD PTR 16[rbp]
	lea	r13, 0[0+rbx*4]
	mov	esi, DWORD PTR [rdi+rbx*4]
	lea	eax, 1[rsi]
	cmp	eax, 1
	jbe	.L3
	mov	edx, DWORD PTR 24[rbp]
	mov	ecx, DWORD PTR PAGE_SIZE[rip]
	mov	r8, r14
	mov	rdi, rbp
	call	tpm2_save_context@PLT
	mov	r12d, eax
	add	eax, DWORD PTR ENOENT[rip]
	jne	.L4
	mov	rdi, QWORD PTR 16[rbp]
	mov	DWORD PTR [rdi+r13], 0
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L20:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	DWORD PTR 4[rsp], 0
	mov	rdi, QWORD PTR 0[rbp]
	xor	ebx, ebx
	lea	r13, 4[rsp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	test	r12d, r12d
	js	.L10
	mov	rdi, QWORD PTR 0[rbp]
.L8:
	add	rbx, 1
.L7:
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	jle	.L20
	mov	rdi, QWORD PTR 0[rbp]
	lea	r14, 0[0+rbx*4]
	mov	esi, DWORD PTR [rdi+rbx*4]
	test	esi, esi
	je	.L8
	mov	edx, DWORD PTR 8[rbp]
	mov	ecx, DWORD PTR PAGE_SIZE[rip]
	mov	r8, r13
	mov	rdi, rbp
	call	tpm2_save_context@PLT
	mov	r12d, eax
	add	eax, DWORD PTR ENOENT[rip]
	jne	.L9
	mov	rdi, QWORD PTR 0[rbp]
	mov	DWORD PTR [rdi+r14], 0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, rbp
	call	tpm2_flush_space@PLT
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tpm2_save_space, .-tpm2_save_space
	.comm	PAGE_SIZE,4,4
	.comm	ENOENT,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_tpm2-space.c_tpm2_save_space.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tpm2_save_space, %function
tpm2_save_space:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, #0
	ldr	r3, .L21
	sub	sp, sp, #16
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r0, [r0, #8]
	ldr	r10, .L21+4
	ldr	r8, .L21+8
	str	r5, [sp, #8]
	add	r9, sp, #8
	b	.L2
.L4:
	cmp	r0, #0
	bne	.L1
	ldr	r3, [r4, #8]
	mov	r0, r4
	ldr	r1, [r3, r7]
	bl	tpm2_flush_context
	mvn	r3, #0
	ldr	r0, [r4, #8]
	str	r3, [r0, r7]
.L3:
	add	r5, r5, #1
.L2:
	bl	ARRAY_SIZE
	cmp	r0, r5
	ble	.L18
	ldr	r0, [r4, #8]
	lsl	r7, r5, #2
	ldr	r1, [r0, r5, lsl #2]
	add	r3, r1, #1
	cmp	r3, #1
	bls	.L3
	str	r9, [sp]
	ldr	r3, [r10]
	mov	r0, r4
	ldr	r2, [r4, #12]
	bl	tpm2_save_context
	ldr	r3, [r8]
	mov	r6, r0
	cmn	r0, r3
	bne	.L4
	mov	r3, #0
	ldr	r0, [r4, #8]
	str	r3, [r0, r7]
	b	.L3
.L20:
	mov	r6, #0
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mov	r5, #0
	ldr	r0, [r4]
	ldr	r10, .L21+4
	ldr	r8, .L21+8
	str	r5, [sp, #8]
	add	r9, sp, #8
	b	.L7
.L9:
	cmp	r0, #0
	blt	.L10
	ldr	r0, [r4]
.L8:
	add	r5, r5, #1
.L7:
	bl	ARRAY_SIZE
	cmp	r0, r5
	ble	.L20
	ldr	r0, [r4]
	lsl	r7, r5, #2
	ldr	r1, [r0, r5, lsl #2]
	cmp	r1, #0
	beq	.L8
	str	r9, [sp]
	ldr	r3, [r10]
	mov	r0, r4
	ldr	r2, [r4, #4]
	bl	tpm2_save_context
	ldr	r3, [r8]
	mov	r6, r0
	cmn	r0, r3
	bne	.L9
	mov	r3, #0
	ldr	r0, [r4]
	str	r3, [r0, r7]
	b	.L8
.L10:
	mov	r0, r4
	bl	tpm2_flush_space
	b	.L1
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	PAGE_SIZE
	.word	ENOENT
	.size	tpm2_save_space, .-tpm2_save_space
	.comm	PAGE_SIZE,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
