	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_ecdsa_der_parse           ## -- Begin function test_ecdsa_der_parse
	.p2align	4, 0x90
_test_ecdsa_der_parse:                  ## @test_ecdsa_der_parse
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	movl	$4312, %eax                     ## imm = 0x10D8
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, -4348(%rbp)               ## 4-byte Spill
	movq	%rsi, %rcx
	movq	%rdi, %rdx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$2048, -4344(%rbp)              ## imm = 0x800
	movq	$2048, -4336(%rbp)              ## imm = 0x800
	movq	_ctx@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-4308(%rbp), %rsi
	movq	%rdx, -4328(%rbp)               ## 8-byte Spill
	movq	%rcx, -4296(%rbp)               ## 8-byte Spill
	callq	_secp256k1_ecdsa_signature_parse_der
	movl	%eax, %ecx
	xorl	%r13d, %r13d
	movb	$1, %al
	movl	%eax, -4284(%rbp)               ## 4-byte Spill
	movl	%ecx, -4300(%rbp)               ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	leaq	-2160(%rbp), %r12
	leaq	-4308(%rbp), %rdx
	movq	%r12, %rsi
	callq	_secp256k1_ecdsa_signature_serialize_compact
	xorl	%r14d, %r14d
	testl	%eax, %eax
	sete	%r14b
	leaq	_test_ecdsa_der_parse.zeroes(%rip), %rsi
	movl	$32, %edx
	movq	%r12, %rdi
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	-2128(%rbp), %rdi
	leaq	_test_ecdsa_der_parse.zeroes(%rip), %rsi
	movl	$32, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-2096(%rbp), %rsi
	leaq	-4344(%rbp), %rdx
	leaq	-4308(%rbp), %rcx
	callq	_secp256k1_ecdsa_signature_serialize_der
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	leal	(%r14,%rcx,2), %r14d
	movq	-4296(%rbp), %rcx               ## 8-byte Reload
	cmpq	%rcx, -4344(%rbp)
	jne	LBB0_6
## %bb.7:
	leaq	-2096(%rbp), %rdi
	movq	-4328(%rbp), %rsi               ## 8-byte Reload
	movq	%rcx, %rdx
	callq	_memcmp
	movq	-4296(%rbp), %rcx               ## 8-byte Reload
	xorl	%r12d, %r12d
	testq	%rax, %rax
	sete	%r12b
	movl	$0, -4284(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	xorl	%r12d, %r12d
	movq	-4296(%rbp), %rcx               ## 8-byte Reload
LBB0_8:
	movq	_ctx@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-4304(%rbp), %rsi
	movq	-4328(%rbp), %rdx               ## 8-byte Reload
	callq	_ecdsa_signature_parse_der_lax
	movl	%eax, %edi
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	%edi, -4276(%rbp)               ## 4-byte Spill
	movq	%r12, -4320(%rbp)               ## 8-byte Spill
	movl	%r15d, -4280(%rbp)              ## 4-byte Spill
	movl	(%rbx), %edi
	leaq	-4272(%rbp), %rbx
	leaq	-4304(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_secp256k1_ecdsa_signature_serialize_compact
	xorl	%r12d, %r12d
	testl	%eax, %eax
	sete	%r12b
	shll	$10, %r12d
	orl	%r14d, %r12d
	leaq	_test_ecdsa_der_parse.zeroes(%rip), %rsi
	movl	$32, %edx
	movq	%rbx, %rdi
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	leaq	-4240(%rbp), %rdi
	leaq	_test_ecdsa_der_parse.zeroes(%rip), %rsi
	movl	$32, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	movq	_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-4208(%rbp), %rsi
	leaq	-4336(%rbp), %rdx
	leaq	-4304(%rbp), %rcx
	callq	_secp256k1_ecdsa_signature_serialize_der
	xorl	%r14d, %r14d
	testl	%eax, %eax
	sete	%r14b
	shll	$11, %r14d
	orl	%r12d, %r14d
	movq	-4296(%rbp), %rdx               ## 8-byte Reload
	cmpq	%rdx, -4336(%rbp)
	jne	LBB0_14
## %bb.13:
	leaq	-4208(%rbp), %rdi
	movq	-4328(%rbp), %rsi               ## 8-byte Reload
	callq	_memcmp
	xorl	%r13d, %r13d
	testq	%rax, %rax
	sete	%r13b
	jmp	LBB0_14
LBB0_10:
	movl	%r12d, %r14d
LBB0_14:
	movl	-4280(%rbp), %r15d              ## 4-byte Reload
	movq	-4320(%rbp), %r12               ## 8-byte Reload
	movl	-4276(%rbp), %edi               ## 4-byte Reload
LBB0_15:
	xorl	%eax, %eax
	movl	-4300(%rbp), %esi               ## 4-byte Reload
	testl	%esi, %esi
	sete	%al
	shll	$2, %eax
	movl	-4348(%rbp), %ecx               ## 4-byte Reload
	testl	%ecx, %ecx
	cmovel	%ecx, %eax
	movl	%esi, %ecx
	shll	$17, %ecx
	testl	%r15d, %r15d
	cmovel	%r15d, %ecx
	orl	%r14d, %ecx
	orl	%eax, %ecx
	cmpb	$0, -4284(%rbp)                 ## 1-byte Folded Reload
	jne	LBB0_19
## %bb.16:
	leal	(,%r12,8), %eax
	xorl	$8, %eax
	orl	%eax, %ecx
	movl	%r13d, %eax
	xorl	$1, %eax
	shll	$12, %eax
	movq	-4344(%rbp), %rdx
	movq	-4336(%rbp), %r8
	xorl	%ebx, %ebx
	cmpq	%r8, %rdx
	setne	%bl
	shll	$13, %ebx
	orl	%eax, %ebx
	orl	%ecx, %ebx
	movl	$16384, %ecx                    ## imm = 0x4000
	cmpq	%r8, %rdx
	jne	LBB0_18
## %bb.17:
	movl	%edi, %r14d
	leaq	-4208(%rbp), %rdi
	leaq	-2096(%rbp), %rsi
	callq	_memcmp
	movl	-4300(%rbp), %esi               ## 4-byte Reload
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	shll	$14, %ecx
LBB0_18:
	orl	%ecx, %ebx
	movl	%ebx, %ecx
LBB0_19:
	xorl	%eax, %eax
	testl	%edi, %edi
	sete	%al
	shll	$16, %eax
	testl	%esi, %esi
	cmovel	%esi, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	-48(%rbp), %rdx
	jne	LBB0_21
## %bb.20:
	xorl	%r12d, %r13d
	shll	$15, %r13d
	orl	%ecx, %r13d
	orl	%r13d, %eax
	addq	$4312, %rsp                     ## imm = 0x10D8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$0, -4284(%rbp)                 ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @test_ecdsa_der_parse.zeroes
_test_ecdsa_der_parse.zeroes:
	.space	32

	.comm	_ctx,4,2                        ## @ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_ecdsa_der_parse           ; -- Begin function test_ecdsa_der_parse
	.p2align	2
_test_ecdsa_der_parse:                  ; @test_ecdsa_der_parse
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w9, #4288
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #192
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	mov	w8, #2048
	str	x8, [sp, #32]
	str	x8, [sp, #16]
Lloh5:
	adrp	x27, _ctx@GOTPAGE
Lloh6:
	ldr	x27, [x27, _ctx@GOTPAGEOFF]
	ldr	w0, [x27]
	add	x1, sp, #44
	mov	x2, x23
	mov	x3, x22
	bl	_secp256k1_ecdsa_signature_parse_der
	mov	x19, x0
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x27]
	add	x20, sp, #2160
	add	x1, sp, #2160
	add	x2, sp, #44
	bl	_secp256k1_ecdsa_signature_serialize_compact
	cmp	w0, #0
	cset	w25, eq
Lloh7:
	adrp	x1, _test_ecdsa_der_parse.zeroes@PAGE
Lloh8:
	add	x1, x1, _test_ecdsa_der_parse.zeroes@PAGEOFF
	add	x0, sp, #2160
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_6
; %bb.2:
	add	x0, x20, #32
Lloh9:
	adrp	x1, _test_ecdsa_der_parse.zeroes@PAGE
Lloh10:
	add	x1, x1, _test_ecdsa_der_parse.zeroes@PAGEOFF
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x27]
	add	x1, sp, #2224
	add	x2, sp, #32
	add	x3, sp, #44
	bl	_secp256k1_ecdsa_signature_serialize_der
	cmp	w0, #0
	cset	w8, eq
	bfi	w25, w8, #1, #1
	ldr	x8, [sp, #32]
	cmp	x8, x22
	b.ne	LBB0_20
; %bb.4:
	add	x0, sp, #2224
	mov	x1, x23
	mov	x2, x22
	bl	_memcmp
	mov	w28, #0
	cmp	x0, #0
	cset	w26, eq
	b	LBB0_7
LBB0_5:
	mov	w25, #0
LBB0_6:
	mov	w26, #0
	mov	w28, #1
LBB0_7:
	ldr	w0, [x27]
	add	x1, sp, #28
	mov	x2, x23
	mov	x3, x22
	bl	_ecdsa_signature_parse_der_lax
	mov	x24, x0
	cbz	w0, LBB0_12
; %bb.8:
	ldr	w0, [x27]
	add	x20, sp, #48
	add	x1, sp, #48
	add	x2, sp, #28
	bl	_secp256k1_ecdsa_signature_serialize_compact
	cmp	w0, #0
	cset	w8, eq
	bfi	w25, w8, #10, #1
Lloh11:
	adrp	x1, _test_ecdsa_der_parse.zeroes@PAGE
Lloh12:
	add	x1, x1, _test_ecdsa_der_parse.zeroes@PAGEOFF
	add	x0, sp, #48
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_12
; %bb.9:
	add	x0, x20, #32
Lloh13:
	adrp	x1, _test_ecdsa_der_parse.zeroes@PAGE
Lloh14:
	add	x1, x1, _test_ecdsa_der_parse.zeroes@PAGEOFF
	mov	w2, #32
	bl	_memcmp
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w0, [x27]
	add	x1, sp, #112
	add	x2, sp, #16
	add	x3, sp, #28
	bl	_secp256k1_ecdsa_signature_serialize_der
	cmp	w0, #0
	cset	w8, eq
	bfi	w25, w8, #11, #1
	ldr	x8, [sp, #16]
	cmp	x8, x22
	b.ne	LBB0_12
; %bb.11:
	add	x0, sp, #112
	mov	x1, x23
	mov	x2, x22
	bl	_memcmp
	cmp	x0, #0
	cset	w22, eq
	b	LBB0_13
LBB0_12:
	mov	w22, #0
LBB0_13:
	cmp	w19, #0
	cset	w8, eq
	lsl	w8, w8, #2
	cmp	w21, #0
	csel	w8, wzr, w8, eq
	lsl	w9, w19, #17
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
	orr	w8, w8, w25
	tbnz	w28, #0, LBB0_18
; %bb.14:
	lsl	w9, w26, #3
	eor	w9, w9, #0x8
	orr	w8, w8, w9
	lsl	w9, w22, #12
	eor	w9, w9, #0x1000
	orr	w8, w8, w9
	ldr	x2, [sp, #32]
	ldr	x9, [sp, #16]
	cmp	x2, x9
	cset	w9, ne
	orr	w20, w8, w9, lsl #13
	b.ne	LBB0_16
; %bb.15:
	add	x0, sp, #112
	add	x1, sp, #2224
	bl	_memcmp
	cmp	x0, #0
	cset	w8, ne
	lsl	w8, w8, #14
	b	LBB0_17
LBB0_16:
	mov	w8, #16384
LBB0_17:
	orr	w8, w20, w8
LBB0_18:
	cmp	w24, #0
	cset	w9, eq
	lsl	w9, w9, #16
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	ldur	x10, [x29, #-96]
Lloh15:
	adrp	x11, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x11, [x11, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x11, x10
	b.ne	LBB0_21
; %bb.19:
	eor	w10, w22, w26
	bfi	w9, w10, #15, #1
	orr	w0, w9, w8
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #192
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	w28, #0
	mov	w26, #0
	b	LBB0_7
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_test_ecdsa_der_parse.zeroes:           ; @test_ecdsa_der_parse.zeroes
	.space	32

	.comm	_ctx,4,2                        ; @ctx
.subsections_via_symbols
