	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_der_parse_integer
_secp256k1_der_parse_integer:           ## @secp256k1_der_parse_integer
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -84(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	(%rsi), %rax
	xorl	%r12d, %r12d
	cmpq	%rdx, %rax
	je	LBB0_22
## %bb.1:
	cmpb	$2, (%rax)
	jne	LBB0_22
## %bb.2:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	incq	%rax
	movq	%rax, (%rsi)
	leaq	-96(%rbp), %rdi
	callq	_secp256k1_der_read_len
	testq	%rax, %rax
	je	LBB0_22
## %bb.3:
	movq	-96(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_22
## %bb.4:
	movq	(%r15), %rsi
	leaq	(%rsi,%rdx), %rax
	cmpq	%rbx, %rax
	ja	LBB0_22
## %bb.5:
	movb	(%rsi), %cl
	testb	%cl, %cl
	jne	LBB0_9
## %bb.6:
	cmpq	$2, %rdx
	jb	LBB0_9
## %bb.7:
	cmpb	$0, 1(%rsi)
	jns	LBB0_22
## %bb.8:
	movb	$1, %al
	jmp	LBB0_15
LBB0_9:
	cmpb	$-1, %cl
	jne	LBB0_12
## %bb.10:
	cmpq	$2, %rdx
	jb	LBB0_12
## %bb.11:
	cmpb	$0, 1(%rsi)
	jns	LBB0_13
	jmp	LBB0_22
LBB0_12:
	movb	$1, %al
	testb	%cl, %cl
	js	LBB0_13
## %bb.14:
	testb	%cl, %cl
	je	LBB0_15
LBB0_16:
	cmpq	$33, %rdx
	jb	LBB0_18
LBB0_17:
	movl	$1, -84(%rbp)
	jmp	LBB0_20
LBB0_13:
	movl	$1, -84(%rbp)
	movb	(%rsi), %cl
	xorl	%eax, %eax
	testb	%cl, %cl
	jne	LBB0_16
LBB0_15:
	decq	%rdx
	movq	%rdx, -96(%rbp)
	incq	%rsi
	movq	%rsi, (%r15)
	cmpq	$33, %rdx
	jae	LBB0_17
LBB0_18:
	testb	%al, %al
	je	LBB0_20
## %bb.19:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	subq	%rdx, %rdi
	addq	$32, %rdi
	callq	_memcpy
	leaq	-84(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scalar_set_b32
	cmpl	$0, -84(%rbp)
	je	LBB0_21
LBB0_20:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_secp256k1_scalar_set_int
LBB0_21:
	movq	-96(%rbp), %rax
	addq	%rax, (%r15)
	movl	$1, %r12d
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%r12d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_der_parse_integer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_der_parse_integer
_secp256k1_der_parse_integer:           ; @secp256k1_der_parse_integer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	wzr, [sp, #12]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	ldr	x8, [x1]
	cmp	x8, x2
	b.eq	LBB0_17
; %bb.1:
	ldrb	w9, [x8]
	cmp	w9, #2
	b.ne	LBB0_17
; %bb.2:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x8, x8, #1
	str	x8, [x1]
	mov	x0, sp
	bl	_secp256k1_der_read_len
	cbz	x0, LBB0_18
; %bb.3:
	ldr	x2, [sp]
	cbz	x2, LBB0_17
; %bb.4:
	ldr	x1, [x19]
	add	x8, x1, x2
	cmp	x8, x21
	b.hi	LBB0_17
; %bb.5:
	ldrb	w9, [x1]
	cmp	w9, #0
	ccmp	x2, #2, #0, eq
	b.hs	LBB0_9
; %bb.6:
	cmp	w9, #255
	ccmp	x2, #2, #0, eq
	b.hs	LBB0_11
; %bb.7:
	tbnz	w9, #7, LBB0_12
; %bb.8:
	mov	w8, #1
	b	LBB0_13
LBB0_9:
	ldrsb	w8, [x1, #1]
	tbz	w8, #31, LBB0_17
; %bb.10:
	mov	w8, #1
	b	LBB0_14
LBB0_11:
	ldrsb	w8, [x1, #1]
	tbnz	w8, #31, LBB0_17
LBB0_12:
	mov	w8, #0
	mov	w9, #1
	str	w9, [sp, #12]
	ldrb	w9, [x1]
LBB0_13:
	cbnz	w9, LBB0_15
LBB0_14:
	sub	x2, x2, #1
	str	x2, [sp]
	add	x1, x1, #1
	str	x1, [x19]
LBB0_15:
	cmp	x2, #33
	b.lo	LBB0_20
; %bb.16:
	mov	w8, #1
	str	w8, [sp, #12]
	b	LBB0_22
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	cbz	w8, LBB0_22
; %bb.21:
	add	x8, sp, #16
	sub	x8, x8, x2
	add	x0, x8, #32
	bl	_memcpy
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x20
	bl	_secp256k1_scalar_set_b32
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_23
LBB0_22:
	mov	x0, x20
	mov	w1, #0
	bl	_secp256k1_scalar_set_int
LBB0_23:
	ldr	x8, [sp]
	ldr	x9, [x19]
	add	x8, x9, x8
	str	x8, [x19]
	mov	w0, #1
	b	LBB0_18
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_der_parse_integer
.subsections_via_symbols
