	.file	"extr_ecdsa_impl.h_secp256k1_der_read_len.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	secp256k1_der_read_len, @function
secp256k1_der_read_len:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	test	rdi, rdi
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	setne	dil
	movzx	edi, dil
	call	VERIFY_CHECK@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR [rbx], 0
	cmp	rdx, r12
	jnb	.L4
	lea	rdi, 1[rdx]
	mov	QWORD PTR 0[rbp], rdi
	movzx	eax, BYTE PTR [rdx]
	cmp	al, -1
	je	.L4
	test	al, al
	jns	.L16
	cmp	al, -128
	je	.L4
	mov	rcx, r12
	and	eax, 127
	sub	rcx, rdi
	cmp	rcx, rax
	jb	.L4
	movzx	esi, BYTE PTR 1[rdx]
	cmp	rax, 8
	ja	.L4
	test	sil, sil
	je	.L4
	lea	r8, 1[rdx+rax]
	xor	ecx, ecx
	mov	rdx, rdi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	movzx	esi, BYTE PTR [rdx]
.L7:
	sal	rcx, 8
	add	rdx, 1
	or	rcx, rsi
	mov	QWORD PTR [rbx], rcx
	mov	QWORD PTR 0[rbp], rdx
	cmp	rdx, r8
	jne	.L17
	add	rax, rdi
	sub	r12, rax
	cmp	rcx, r12
	seta	al
	cmp	rcx, 127
	setbe	dl
	or	eax, edx
	xor	eax, 1
	movzx	eax, al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L16:
	.cfi_restore_state
	mov	QWORD PTR [rbx], rax
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	secp256k1_der_read_len, .-secp256k1_der_read_len
	.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_ecdsa_impl.h_secp256k1_der_read_len.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	secp256k1_der_read_len, %function
secp256k1_der_read_len:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r4, r0
	subs	r0, r0, #0
	mov	r6, r2
	movne	r0, #1
	bl	VERIFY_CHECK
	mov	r2, #0
	ldr	r3, [r5]
	str	r2, [r4]
	cmp	r3, r6
	bcs	.L4
	add	r2, r3, #1
	str	r2, [r5]
	ldrb	ip, [r3]	@ zero_extendqisi2
	cmp	ip, #255
	beq	.L4
	tst	ip, #128
	beq	.L17
	cmp	ip, #128
	beq	.L4
	and	ip, ip, #127
	sub	r1, r6, r2
	cmp	r1, ip
	bcc	.L4
	ldrb	r0, [r3, #1]	@ zero_extendqisi2
	clz	r1, r0
	lsr	r1, r1, #5
	cmp	ip, #4
	orrhi	r1, r1, #1
	cmp	r1, #0
	bne	.L4
	add	r3, r3, #2
	add	ip, r2, ip
.L7:
	orr	r1, r0, r1, lsl #8
	cmp	ip, r3
	str	r1, [r4]
	str	r3, [r5]
	beq	.L6
	ldrb	r0, [r3], #1	@ zero_extendqisi2
	b	.L7
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L17:
	mov	r0, #1
	str	ip, [r4]
	pop	{r4, r5, r6, pc}
.L6:
	cmp	r1, #127
	movhi	r0, #0
	movls	r0, #1
	sub	r6, r6, ip
	cmp	r1, r6
	movls	r6, r0
	orrhi	r6, r0, #1
	eor	r0, r6, #1
	pop	{r4, r5, r6, pc}
	.size	secp256k1_der_read_len, .-secp256k1_der_read_len
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
