	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_der_read_len
_secp256k1_der_read_len:                ## @secp256k1_der_read_len
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_VERIFY_CHECK
	movq	$0, (%rbx)
	movq	(%r15), %rcx
	xorl	%eax, %eax
	cmpq	%r14, %rcx
	jae	LBB0_19
## %bb.1:
	leaq	1(%rcx), %rdx
	movq	%rdx, (%r15)
	movzbl	(%rcx), %esi
	cmpl	$255, %esi
	je	LBB0_19
## %bb.2:
	testb	$-128, %sil
	jne	LBB0_4
## %bb.3:
	movq	%rsi, (%rbx)
	movl	$1, %eax
	jmp	LBB0_19
LBB0_4:
	cmpb	$-128, %sil
	je	LBB0_19
## %bb.5:
	andl	$127, %esi
	movq	%r14, %rdi
	subq	%rdx, %rdi
	cmpq	%rsi, %rdi
	jb	LBB0_19
## %bb.6:
	movzbl	(%rdx), %edx
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.7:
	cmpl	$8, %esi
	ja	LBB0_19
## %bb.8:
	testl	%esi, %esi
	je	LBB0_9
## %bb.10:
	movq	%rdx, (%rbx)
	addq	$2, %rcx
	movq	%rcx, (%r15)
	movq	%rsi, %rax
	decq	%rax
	je	LBB0_17
## %bb.11:
	leaq	-2(%rsi), %r8
	movq	%rax, %r9
	andq	$3, %r9
	je	LBB0_15
## %bb.12:
	negq	%r9
	movl	$1, %eax
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx), %edi
	shlq	$8, %rdx
	orq	%rdi, %rdx
	movq	%rdx, (%rbx)
	incq	%rcx
	movq	%rcx, (%r15)
	leaq	(%r9,%rax), %rdi
	incq	%rdi
	incq	%rax
	cmpq	$1, %rdi
	jne	LBB0_13
## %bb.14:
	subq	%rax, %rsi
	movq	%rsi, %rax
LBB0_15:
	cmpq	$3, %r8
	jb	LBB0_17
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx), %esi
	shlq	$8, %rdx
	orq	%rsi, %rdx
	movq	%rdx, (%rbx)
	leaq	1(%rcx), %rsi
	movq	%rsi, (%r15)
	movzbl	1(%rcx), %esi
	shlq	$8, %rdx
	orq	%rsi, %rdx
	movq	%rdx, (%rbx)
	leaq	2(%rcx), %rsi
	movq	%rsi, (%r15)
	movzbl	2(%rcx), %esi
	shlq	$8, %rdx
	orq	%rsi, %rdx
	movq	%rdx, (%rbx)
	leaq	3(%rcx), %rsi
	movq	%rsi, (%r15)
	movzbl	3(%rcx), %esi
	shlq	$8, %rdx
	orq	%rsi, %rdx
	movq	%rdx, (%rbx)
	addq	$4, %rcx
	movq	%rcx, (%r15)
	addq	$-4, %rax
	jne	LBB0_16
LBB0_17:
	subq	%rcx, %r14
	xorl	%eax, %eax
	cmpq	%r14, %rdx
	jbe	LBB0_18
	jmp	LBB0_19
LBB0_9:
	xorl	%edx, %edx
LBB0_18:
	xorl	%eax, %eax
	cmpq	$127, %rdx
	seta	%al
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_der_read_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_der_read_len
_secp256k1_der_read_len:                ; @secp256k1_der_read_len
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_VERIFY_CHECK
	str	xzr, [x20]
	ldr	x8, [x21]
	cmp	x8, x19
	b.hs	LBB0_2
; %bb.1:
	add	x9, x8, #1
	str	x9, [x21]
	ldrb	w10, [x8]
	cmp	w10, #255
	b.ne	LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	tbnz	w10, #7, LBB0_6
; %bb.5:
	str	x10, [x20]
	mov	w0, #1
	b	LBB0_3
LBB0_6:
	cmp	w10, #128
	b.eq	LBB0_2
; %bb.7:
	and	x10, x10, #0x7f
	sub	x11, x19, x9
	cmp	x11, x10
	b.lo	LBB0_2
; %bb.8:
	ldrb	w9, [x9]
	cmp	x9, #0
	ccmp	w10, #8, #2, ne
	b.hi	LBB0_2
; %bb.9:
	cbz	w10, LBB0_12
; %bb.10:
	str	x9, [x20]
	add	x8, x8, #2
	str	x8, [x21]
	subs	x11, x10, #1
	b.eq	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x8], #1
	bfi	x10, x9, #8, #56
	str	x10, [x20]
	str	x8, [x21]
	mov	x9, x10
	subs	x11, x11, #1
	b.ne	LBB0_11
	b	LBB0_14
LBB0_12:
	mov	x10, #0
	b	LBB0_15
LBB0_13:
	mov	x10, x9
LBB0_14:
	sub	x8, x19, x8
	cmp	x10, x8
	b.hi	LBB0_2
LBB0_15:
	cmp	x10, #127
	cset	w0, hi
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_der_read_len
.subsections_via_symbols
