	.file	"extr_a_d2i_fp.c_asn1_d2i_read_bio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	asn1_d2i_read_bio
	.type	asn1_d2i_read_bio, @function
asn1_d2i_read_bio:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	r15, QWORD PTR HEADER_SIZE[rip]
	mov	QWORD PTR 8[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	BUF_MEM_new@PLT
	test	rax, rax
	jne	.L2
	mov	rsi, QWORD PTR ERR_R_MALLOC_FAILURE[rip]
	mov	edi, DWORD PTR ASN1_F_ASN1_D2I_READ_BIO[rip]
	call	ASN1err@PLT
	mov	eax, -1
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L62
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	r12, rax
	xor	eax, eax
	xor	ebx, ebx
	xor	ebp, ebp
	call	ERR_clear_error@PLT
	xor	r14d, r14d
.L4:
	mov	r8, rbx
	sub	r8, rbp
	cmp	r8, r15
	ja	.L5
.L65:
	lea	rsi, [r15+rbp]
	mov	r15, rsi
	sub	r15, rbx
	cmp	rbx, rsi
	ja	.L58
	mov	rdi, r12
	mov	QWORD PTR [rsp], r8
	call	BUF_MEM_grow_clean@PLT
	test	eax, eax
	je	.L58
	mov	rax, QWORD PTR [r12]
	mov	rdx, r15
	mov	rdi, r13
	lea	rsi, [rax+rbx*4]
	call	BIO_read@PLT
	mov	r8, QWORD PTR [rsp]
	test	eax, eax
	jns	.L9
	cmp	rbp, rbx
	je	.L59
.L9:
	test	eax, eax
	jle	.L5
	cdqe
	add	rax, rbx
	mov	rbx, rax
	jc	.L60
	mov	r8, rax
	sub	r8, rbp
.L5:
	mov	rax, QWORD PTR [r12]
	lea	rdx, 32[rsp]
	lea	rcx, 36[rsp]
	lea	rsi, 48[rsp]
	lea	rdi, 40[rsp]
	lea	r15, [rax+rbp*4]
	mov	QWORD PTR 40[rsp], r15
	call	ASN1_get_object@PLT
	mov	edx, eax
	test	al, -128
	jne	.L63
.L13:
	mov	rax, QWORD PTR 40[rsp]
	sub	rax, r15
	cdqe
	add	rbp, rax
	and	edx, 1
	je	.L14
	cmp	QWORD PTR UINT32_MAX[rip], r14
	je	.L64
	mov	r8, rbx
	mov	r15, QWORD PTR HEADER_SIZE[rip]
	add	r14, 1
	sub	r8, rbp
	cmp	r8, r15
	jbe	.L65
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 48[rsp]
	test	r14, r14
	je	.L17
	test	rax, rax
	jne	.L17
	mov	eax, DWORD PTR V_ASN1_EOC[rip]
	cmp	DWORD PTR 32[rsp], eax
	je	.L66
.L18:
	mov	r15, QWORD PTR HEADER_SIZE[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, rbx
	sub	rdx, rbp
	cmp	rdx, rax
	jb	.L67
.L20:
	add	rbp, rax
	jc	.L60
	test	r14, r14
	jne	.L18
.L19:
	cmp	QWORD PTR INT_MAX[rip], rbp
	jb	.L60
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], r12
	mov	eax, ebp
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L63:
	mov	DWORD PTR [rsp], eax
	xor	eax, eax
	call	ERR_peek_error@PLT
	mov	edi, eax
	call	ERR_GET_REASON@PLT
	cmp	QWORD PTR ASN1_R_TOO_LONG[rip], rax
	jne	.L7
	xor	eax, eax
	call	ERR_clear_error@PLT
	mov	edx, DWORD PTR [rsp]
	jmp	.L13
.L60:
	mov	rsi, QWORD PTR ASN1_R_TOO_LONG[rip]
	mov	edi, DWORD PTR ASN1_F_ASN1_D2I_READ_BIO[rip]
	call	ASN1err@PLT
.L7:
	mov	rdi, r12
	call	BUF_MEM_free@PLT
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L67:
	mov	rcx, QWORD PTR ASN1_CHUNK_INITIAL_SIZE[rip]
	lea	rdx, 0[rbp+rax]
	mov	QWORD PTR [rsp], rcx
	mov	rcx, rdx
	sub	rcx, rbx
	cmp	QWORD PTR INT_MAX[rip], rcx
	mov	QWORD PTR 24[rsp], rcx
	jb	.L60
	cmp	rbx, rdx
	ja	.L60
	test	rcx, rcx
	je	.L20
.L22:
	mov	rcx, QWORD PTR [rsp]
	mov	rax, QWORD PTR 24[rsp]
	mov	rdi, r12
	cmp	rcx, rax
	cmovbe	rax, rcx
	lea	rsi, [rax+rbx]
	mov	QWORD PTR 16[rsp], rax
	call	BUF_MEM_grow_clean@PLT
	test	eax, eax
	je	.L58
	mov	rax, QWORD PTR 16[rsp]
	test	rax, rax
	je	.L24
	mov	r15, rax
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L25:
	cdqe
	add	rbx, rax
	sub	r15, rax
	je	.L24
.L26:
	mov	rax, QWORD PTR [r12]
	mov	rdx, r15
	mov	rdi, r13
	lea	rsi, [rax+rbx*4]
	call	BIO_read@PLT
	test	eax, eax
	jg	.L25
.L59:
	mov	rsi, QWORD PTR ASN1_R_NOT_ENOUGH_DATA[rip]
	mov	edi, DWORD PTR ASN1_F_ASN1_D2I_READ_BIO[rip]
	call	ASN1err@PLT
	mov	rdi, r12
	call	BUF_MEM_free@PLT
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L66:
	sub	r14, 1
	jne	.L18
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rax, QWORD PTR INT_MAX[rip]
	mov	rcx, QWORD PTR [rsp]
	shr	rax
	lea	rdx, [rcx+rcx]
	cmp	rax, rcx
	cmovbe	rdx, rcx
	mov	rcx, QWORD PTR 16[rsp]
	sub	QWORD PTR 24[rsp], rcx
	mov	QWORD PTR [rsp], rdx
	jne	.L22
	mov	rax, QWORD PTR 48[rsp]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L58:
	mov	rsi, QWORD PTR ERR_R_MALLOC_FAILURE[rip]
	mov	edi, DWORD PTR ASN1_F_ASN1_D2I_READ_BIO[rip]
	call	ASN1err@PLT
	jmp	.L7
.L64:
	mov	rsi, QWORD PTR ASN1_R_HEADER_TOO_LONG[rip]
	mov	edi, DWORD PTR ASN1_F_ASN1_D2I_READ_BIO[rip]
	call	ASN1err@PLT
	jmp	.L7
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	asn1_d2i_read_bio, .-asn1_d2i_read_bio
	.comm	V_ASN1_EOC,4,4
	.comm	UINT32_MAX,8,8
	.comm	INT_MAX,8,8
	.comm	HEADER_SIZE,8,8
	.comm	ERR_R_MALLOC_FAILURE,8,8
	.comm	ASN1_R_TOO_LONG,8,8
	.comm	ASN1_R_NOT_ENOUGH_DATA,8,8
	.comm	ASN1_R_HEADER_TOO_LONG,8,8
	.comm	ASN1_F_ASN1_D2I_READ_BIO,4,4
	.comm	ASN1_CHUNK_INITIAL_SIZE,8,8
	.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_a_d2i_fp.c_asn1_d2i_read_bio.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	asn1_d2i_read_bio
	.syntax unified
	.arm
	.fpu softvfp
	.type	asn1_d2i_read_bio, %function
asn1_d2i_read_bio:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L67
	sub	sp, sp, #52
	ldr	fp, .L67+4
	str	r1, [sp, #12]
	mov	r7, r0
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	ldr	r9, [fp]
	bl	BUF_MEM_new
	subs	r6, r0, #0
	bne	.L2
	ldr	r2, .L67+8
	ldr	r3, .L67+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ASN1err
	mvn	r0, #0
.L1:
	ldr	r3, .L67
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L61
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r4, #0
	bl	ERR_clear_error
	mov	r5, r4
	mov	r8, r4
.L4:
	sub	r10, r4, r5
	cmp	r10, r9
	bhi	.L5
.L64:
	add	r1, r9, r5
	cmp	r4, r1
	sub	r9, r1, r4
	bhi	.L57
	mov	r0, r6
	bl	BUF_MEM_grow_clean
	cmp	r0, #0
	beq	.L57
	ldr	r1, [r6]
	mov	r2, r9
	mov	r0, r7
	add	r1, r1, r4, lsl #2
	bl	BIO_read
	sub	r3, r5, r4
	clz	r3, r3
	lsr	r3, r3, #5
	ands	r3, r3, r0, lsr #31
	bne	.L58
	cmp	r0, #0
	ble	.L5
	adds	r4, r0, r4
	bcs	.L59
	sub	r10, r4, r5
.L5:
	ldr	r9, [r6]
	add	r3, sp, #40
	str	r10, [sp]
	add	r9, r9, r5, lsl #2
	add	r2, sp, #36
	add	r1, sp, #32
	add	r0, sp, #28
	str	r9, [sp, #28]
	bl	ASN1_get_object
	tst	r0, #128
	mov	r10, r0
	bne	.L62
.L13:
	ldr	r3, [sp, #28]
	tst	r10, #1
	sub	r9, r3, r9
	add	r5, r5, r9
	beq	.L14
	ldr	r3, .L67+16
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L63
	ldr	r9, [fp]
	sub	r10, r4, r5
	cmp	r10, r9
	add	r8, r8, #1
	bls	.L64
	b	.L5
.L14:
	cmp	r8, #0
	ldr	r3, [sp, #32]
	beq	.L17
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L67+20
	ldr	r2, [sp, #36]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L65
.L18:
	ldr	r9, [fp]
	b	.L4
.L17:
	sub	r2, r4, r5
	cmp	r2, r3
	bcc	.L66
.L20:
	adds	r5, r3, r5
	bcs	.L59
	cmp	r8, #0
	bne	.L18
.L19:
	ldr	r3, .L67+24
	ldr	r3, [r3]
	cmp	r3, r5
	bcc	.L59
	ldr	r3, [sp, #12]
	mov	r0, r5
	str	r6, [r3]
	b	.L1
.L62:
	bl	ERR_peek_error
	bl	ERR_GET_REASON
	ldr	r3, .L67+28
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L7
	bl	ERR_clear_error
	b	.L13
.L59:
	ldr	r2, .L67+28
	ldr	r3, .L67+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ASN1err
.L7:
	mov	r0, r6
	bl	BUF_MEM_free
	mvn	r0, #0
	b	.L1
.L66:
	ldr	r1, .L67+24
	add	r2, r5, r3
	ldr	r1, [r1]
	sub	r9, r2, r4
	cmp	r1, r9
	ldr	r1, .L67+32
	ldr	r1, [r1]
	bcc	.L59
	cmp	r4, r2
	bhi	.L59
	cmp	r9, #0
	strne	r5, [sp, #20]
	strne	r8, [sp, #16]
	movne	r5, r1
	beq	.L20
.L22:
	cmp	r5, r9
	movcc	r10, r5
	movcs	r10, r9
	mov	r0, r6
	add	r1, r10, r4
	bl	BUF_MEM_grow_clean
	cmp	r0, #0
	beq	.L57
	cmp	r10, #0
	beq	.L24
	mov	r8, r10
	b	.L26
.L25:
	subs	r8, r8, r0
	add	r4, r4, r0
	beq	.L24
.L26:
	ldr	r1, [r6]
	mov	r2, r8
	mov	r0, r7
	add	r1, r1, r4, lsl #2
	bl	BIO_read
	cmp	r0, #0
	bgt	.L25
.L58:
	ldr	r2, .L67+36
	ldr	r3, .L67+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ASN1err
	mov	r0, r6
	bl	BUF_MEM_free
	mvn	r0, #0
	b	.L1
.L65:
	subs	r8, r8, #1
	bne	.L18
	b	.L19
.L24:
	ldr	r3, .L67+24
	ldr	r2, [r3]
	cmp	r5, r2, lsr #1
	lslcc	r5, r5, #1
	subs	r9, r9, r10
	bne	.L22
	ldr	r8, [sp, #16]
	ldr	r5, [sp, #20]
	ldr	r3, [sp, #32]
	b	.L20
.L57:
	ldr	r2, .L67+8
	ldr	r3, .L67+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ASN1err
	b	.L7
.L63:
	ldr	r2, .L67+40
	ldr	r3, .L67+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ASN1err
	b	.L7
.L61:
	bl	__stack_chk_fail
.L68:
	.align	2
.L67:
	.word	.LC0
	.word	HEADER_SIZE
	.word	ERR_R_MALLOC_FAILURE
	.word	ASN1_F_ASN1_D2I_READ_BIO
	.word	UINT32_MAX
	.word	V_ASN1_EOC
	.word	INT_MAX
	.word	ASN1_R_TOO_LONG
	.word	ASN1_CHUNK_INITIAL_SIZE
	.word	ASN1_R_NOT_ENOUGH_DATA
	.word	ASN1_R_HEADER_TOO_LONG
	.size	asn1_d2i_read_bio, .-asn1_d2i_read_bio
	.comm	V_ASN1_EOC,4,4
	.comm	UINT32_MAX,4,4
	.comm	INT_MAX,4,4
	.comm	HEADER_SIZE,4,4
	.comm	ERR_R_MALLOC_FAILURE,4,4
	.comm	ASN1_R_TOO_LONG,4,4
	.comm	ASN1_R_NOT_ENOUGH_DATA,4,4
	.comm	ASN1_R_HEADER_TOO_LONG,4,4
	.comm	ASN1_F_ASN1_D2I_READ_BIO,4,4
	.comm	ASN1_CHUNK_INITIAL_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
