	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_ecdsa_asn1_to_raw           ## -- Begin function br_ecdsa_asn1_to_raw
	.p2align	4, 0x90
_br_ecdsa_asn1_to_raw:                  ## @br_ecdsa_asn1_to_raw
	.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
	subq	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$8, %rsi
	jb	LBB0_33
## %bb.2:
	movq	%rdi, %r13
	cmpb	$48, (%rdi)
	jne	LBB0_33
## %bb.3:
	movzbl	1(%r13), %ecx
	cmpq	$129, %rcx
	jb	LBB0_8
## %bb.4:
	cmpb	$-127, %cl
	jne	LBB0_33
## %bb.5:
	movzbl	2(%r13), %ecx
	leaq	-3(%rsi), %rdx
	movl	$3, %eax
	cmpq	%rcx, %rdx
	je	LBB0_9
	jmp	LBB0_33
LBB0_8:
	leaq	-2(%rsi), %rdx
	movl	$2, %eax
	cmpq	%rcx, %rdx
	jne	LBB0_33
LBB0_9:
	cmpb	$2, (%r13,%rax)
	jne	LBB0_33
## %bb.10:
	movzbl	1(%rax,%r13), %edi
	testb	%dil, %dil
	js	LBB0_33
## %bb.11:
	leaq	(%rax,%rdi), %r14
	addq	$4, %r14
	cmpq	%rsi, %r14
	ja	LBB0_33
## %bb.17:
	leaq	(%rax,%rdi), %rdx
	addq	$2, %rdx
	cmpb	$2, (%r13,%rdx)
	jne	LBB0_33
## %bb.18:
	movzbl	1(%rdx,%r13), %ecx
	xorl	%ebx, %ebx
	testb	%cl, %cl
	js	LBB0_34
## %bb.19:
	subq	%r14, %rsi
	cmpq	%rcx, %rsi
	jne	LBB0_34
## %bb.20:
	leaq	(%rax,%r13), %r12
	addq	$2, %r12
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.21:
	leaq	(%rax,%rdi), %rdx
	addq	%r13, %rdx
	addq	$2, %rdx
	movq	%rdi, %r15
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r12)
	jne	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%r12
	decq	%r15
	jne	LBB0_22
## %bb.24:
	movq	%rdx, %r12
LBB0_25:
	xorl	%r15d, %r15d
LBB0_26:
	addq	%r13, %r14
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.27:
	addq	%rcx, %rax
	addq	%rdi, %rax
	addq	%r13, %rax
	addq	$4, %rax
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r14)
	jne	LBB0_32
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	incq	%r14
	decq	%rcx
	jne	LBB0_28
## %bb.30:
	movq	%rax, %r14
LBB0_31:
	xorl	%ecx, %ecx
LBB0_32:
	movq	%rcx, -320(%rbp)                ## 8-byte Spill
	cmpq	%rcx, %r15
	movq	%rcx, %rax
	cmovaq	%r15, %rax
	movq	%rax, -312(%rbp)                ## 8-byte Spill
	leaq	(%rax,%rax), %rbx
	leaq	-304(%rbp), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_memset
	movq	-312(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rbp), %rdi
	addq	$-304, %rdi                     ## imm = 0xFED0
	subq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	-312(%rbp), %rax                ## 8-byte Reload
	leaq	-304(,%rax,2), %rdi
	addq	%rbp, %rdi
	movq	-320(%rbp), %rdx                ## 8-byte Reload
	subq	%rdx, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	%r13, %rdi
	leaq	-304(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	jmp	LBB0_34
LBB0_33:
	xorl	%ebx, %ebx
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.35:
	movq	%rbx, %rax
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_ecdsa_asn1_to_raw           ; -- Begin function br_ecdsa_asn1_to_raw
	.p2align	2
_br_ecdsa_asn1_to_raw:                  ; @br_ecdsa_asn1_to_raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cmp	x1, #8
	b.lo	LBB0_19
; %bb.1:
	mov	x19, x0
	ldrb	w8, [x0]
	cmp	w8, #48
	b.ne	LBB0_19
; %bb.2:
	ldrb	w8, [x19, #1]
	cmp	w8, #129
	b.lo	LBB0_6
; %bb.3:
	b.ne	LBB0_19
; %bb.4:
	ldrb	w8, [x19, #2]
	sub	x9, x1, #3
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.5:
	mov	w8, #3
	b	LBB0_8
LBB0_6:
	sub	x9, x1, #2
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.7:
	mov	w8, #2
LBB0_8:
	ldrb	w9, [x19, x8]
	cmp	w9, #2
	b.ne	LBB0_19
; %bb.9:
	add	x9, x8, x19
	ldrsb	w9, [x9, #1]
	tbnz	w9, #31, LBB0_19
; %bb.10:
	and	x9, x9, #0xff
	add	x11, x8, #2
	add	x12, x11, x9
	add	x10, x12, #2
	cmp	x10, x1
	b.hi	LBB0_19
; %bb.11:
	ldrb	w13, [x19, x12]
	cmp	w13, #2
	b.ne	LBB0_19
; %bb.12:
	mov	x24, #0
	add	x12, x12, x19
	ldrsb	w12, [x12, #1]
	tbnz	w12, #31, LBB0_20
; %bb.13:
	and	x20, x12, #0xff
	sub	x12, x1, x10
	cmp	x12, x20
	b.ne	LBB0_20
; %bb.14:
	add	x22, x19, x11
	add	x21, x19, x10
	cbz	w9, LBB0_22
; %bb.15:
	add	x10, x8, x9
	add	x10, x10, x19
	add	x10, x10, #2
	mov	x23, x9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x22]
	cbnz	w11, LBB0_23
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x22, x22, #1
	subs	x23, x23, #1
	b.ne	LBB0_16
; %bb.18:
	mov	x22, x10
	b	LBB0_23
LBB0_19:
	mov	x24, #0
LBB0_20:
	ldur	x8, [x29, #-88]
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_30
; %bb.21:
	mov	x0, x24
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_22:
	mov	x23, #0
LBB0_23:
	cbz	w20, LBB0_28
; %bb.24:
	add	x8, x8, x20
	add	x8, x8, x9
	add	x8, x8, x19
	add	x8, x8, #4
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x21]
	cbnz	w9, LBB0_29
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	add	x21, x21, #1
	subs	x20, x20, #1
	b.ne	LBB0_25
; %bb.27:
	mov	x21, x8
	b	LBB0_29
LBB0_28:
	mov	x20, #0
LBB0_29:
	cmp	x23, x20
	csel	x25, x23, x20, hi
	lsl	x24, x25, #1
	add	x26, sp, #10
	add	x0, sp, #10
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	add	x8, x26, x25
	sub	x0, x8, x23
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	add	x8, x26, x24
	sub	x0, x8, x20
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	add	x1, sp, #10
	mov	x0, x19
	mov	x2, x24
	bl	_memcpy
	b	LBB0_20
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
