	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_ecdsa_sign
_test_ecdsa_sign:                       ## @test_ecdsa_sign
	.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
	movl	$4128, %eax                     ## imm = 0x1020
	callq	____chkstk_darwin
	subq	%rax, %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)
	movq	_NID_X9_62_prime256v1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_EC_KEY_new_by_curve_name
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_EC_KEY_generate_key
	xorl	%eax, %eax
	callq	_EVP_PKEY_new
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_EVP_PKEY_set1_EC_KEY
	movq	%rbx, %rdi
	callq	_EC_KEY_free
	leaq	-4160(%rbp), %r14
	leaq	-4144(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_ptls_buffer_init
	leaq	L_.str(%rip), %r15
	movq	%r15, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ptls_iovec_init
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_EVP_sha256
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_do_sign
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ok
	movq	%r12, %rdi
	callq	_EVP_PKEY_up_ref
	movq	%r15, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ptls_iovec_init
	movl	%eax, %ebx
	movq	-4160(%rbp), %rdi
	movl	-4152(%rbp), %esi
	callq	_ptls_iovec_init
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_verify_sign
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ok
	movq	%r14, %rdi
	callq	_ptls_buffer_dispose
	movq	%r12, %rdi
	callq	_EVP_PKEY_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$4128, %rsp                     ## imm = 0x1020
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NID_X9_62_prime256v1,4,2       ## @NID_X9_62_prime256v1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hello world"

	.no_dead_strip	_test_ecdsa_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_ecdsa_sign
_test_ecdsa_sign:                       ; @test_ecdsa_sign
	.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	w9, #4128
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, #32
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh5:
	adrp	x8, _NID_X9_62_prime256v1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NID_X9_62_prime256v1@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_EC_KEY_new_by_curve_name
	mov	x20, x0
	bl	_EC_KEY_generate_key
	bl	_EVP_PKEY_new
	mov	x19, x0
	mov	x1, x20
	bl	_EVP_PKEY_set1_EC_KEY
	mov	x0, x20
	bl	_EC_KEY_free
	add	x0, sp, #8
	add	x1, sp, #24
	mov	w2, #4096
	bl	_ptls_buffer_init
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_ptls_iovec_init
	mov	x21, x0
	bl	_EVP_sha256
	mov	x3, x0
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_do_sign
	cmp	x0, #0
	cset	w0, eq
	bl	_ok
	mov	x0, x19
	bl	_EVP_PKEY_up_ref
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_ptls_iovec_init
	mov	x20, x0
	ldr	x0, [sp, #8]
	ldr	w1, [sp, #16]
	bl	_ptls_iovec_init
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_verify_sign
	cmp	x0, #0
	cset	w0, eq
	bl	_ok
	add	x0, sp, #8
	bl	_ptls_buffer_dispose
	mov	x0, x19
	bl	_EVP_PKEY_free
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #32
	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_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NID_X9_62_prime256v1,4,2       ; @NID_X9_62_prime256v1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hello world"

	.no_dead_strip	_test_ecdsa_sign
.subsections_via_symbols
