	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_encode_ec_pkcs8_der         ## -- Begin function br_encode_ec_pkcs8_der
	.p2align	4, 0x90
_br_encode_ec_pkcs8_der:                ## @br_encode_ec_pkcs8_der
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_br_get_curve_OID
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movzbl	(%rax), %r15d
	xorl	%edi, %edi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_br_encode_ec_raw_der_inner
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_len_of_len
	cltq
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	%rbx, %r15
	leaq	(%rax,%r15), %rbx
	addq	$17, %rbx
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	leaq	1(%r14), %rdi
	movb	$48, (%r14)
	movq	%rbx, %rsi
	callq	_br_asn1_encode_length
	movq	%rax, %r15
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rax), %r12
	incq	%r12
	movl	$805306626, 1(%r14,%rax)        ## imm = 0x30000102
	movb	(%r13), %al
	addb	$11, %al
	leaq	(%r14,%r15), %rdi
	addq	$6, %rdi
	movb	%al, 5(%r14,%r15)
	leaq	_br_encode_ec_pkcs8_der.OID_ECPUBKEY(%rip), %rsi
	movl	$9, %edx
	callq	_memcpy
	leaq	(%r14,%r15), %rdi
	addq	$16, %rdi
	movb	$6, 15(%r14,%r15)
	movzbl	(%r13), %edx
	incl	%edx
	movq	%r13, %rsi
	callq	_memcpy
	movzbl	(%r13), %eax
	leaq	(%rax,%r12), %r14
	addq	$15, %r14
	leaq	(%rax,%r12), %rdi
	addq	$17, %rdi
	movb	$4, 16(%rax,%r12)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_br_asn1_encode_length
	leaq	(%rax,%r14), %rdi
	addq	$2, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_br_encode_ec_raw_der_inner
	leaq	(%rbx,%r15), %rax
	incq	%rax
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_len_of_len
	cltq
	addq	%rbx, %rax
	incq	%rax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_br_encode_ec_pkcs8_der.OID_ECPUBKEY:   ## @br_encode_ec_pkcs8_der.OID_ECPUBKEY
	.ascii	"\006\007*\206H\316=\002\001"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_encode_ec_pkcs8_der         ; -- Begin function br_encode_ec_pkcs8_der
	.p2align	2
_br_encode_ec_pkcs8_der:                ; @br_encode_ec_pkcs8_der
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x24, x0
	ldr	w0, [x1]
	bl	_br_get_curve_OID
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	ldrb	w21, [x0]
	mov	x0, #0
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_br_encode_ec_raw_der_inner
	mov	x23, x0
	bl	_len_of_len
	add	w8, w0, #1
	add	x9, x21, x23
	add	x8, x9, w8, sxtw
	add	x21, x8, #16
	cbz	x24, LBB0_3
; %bb.2:
	mov	w8, #48
	strb	w8, [x24], #1
	mov	x0, x24
	mov	x1, x21
	bl	_br_asn1_encode_length
	mov	x25, x0
	add	x26, x24, x0
	mov	w8, #258
	movk	w8, #12288, lsl #16
	str	w8, [x26]
	ldrb	w8, [x22]
	add	w8, w8, #11
	add	x0, x26, #5
	strb	w8, [x26, #4]
Lloh0:
	adrp	x1, _br_encode_ec_pkcs8_der.OID_ECPUBKEY@PAGE
Lloh1:
	add	x1, x1, _br_encode_ec_pkcs8_der.OID_ECPUBKEY@PAGEOFF
	mov	w2, #9
	bl	_memcpy
	add	x24, x26, #15
	mov	w8, #6
	strb	w8, [x26, #14]
	ldrb	w8, [x22]
	add	w2, w8, #1
	mov	x0, x24
	mov	x1, x22
	bl	_memcpy
	ldrb	w8, [x22]
	add	x8, x8, x24
	add	x22, x8, #2
	mov	w9, #4
	strb	w9, [x8, #1]
	mov	x0, x22
	mov	x1, x23
	bl	_br_asn1_encode_length
	add	x0, x22, x0
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_br_encode_ec_raw_der_inner
	add	x8, x21, x25
	add	x0, x8, #1
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	bl	_len_of_len
	add	w8, w0, #1
	add	x0, x21, w8, sxtw
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_br_encode_ec_pkcs8_der.OID_ECPUBKEY:   ; @br_encode_ec_pkcs8_der.OID_ECPUBKEY
	.ascii	"\006\007*\206H\316=\002\001"

.subsections_via_symbols
