	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_ECDSA_KAT
_test_ECDSA_KAT:                        ## @test_ECDSA_KAT
	.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	$472, %rsp                      ## imm = 0x1D8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -452(%rbp)                ## 4-byte Spill
	movq	%rdx, -448(%rbp)                ## 8-byte Spill
	movq	%rsi, -472(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ECDSA_KAT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	cmpq	$0, (%r15)
	je	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movl	$24, %r12d
	xorl	%ecx, %ecx
	movq	%r15, -440(%rbp)                ## 8-byte Spill
	movq	%rdi, -464(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -480(%rbp)                ## 8-byte Spill
	leaq	(%r15,%r12), %rax
	movq	%rax, -496(%rbp)                ## 8-byte Spill
	movq	-8(%r15,%r12), %rax
	leaq	-504(%rbp), %r13
	movq	%r13, %rdi
	callq	*24(%rax)
	movq	-8(%r15,%r12), %rax
	movq	16(%rax), %r14
	movl	8(%r15,%r12), %ebx
	movl	%ebx, %edi
	callq	_strlen
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r14
	movq	-8(%r15,%r12), %rax
	movq	%r13, %rdi
	leaq	-112(%rbp), %rsi
	callq	*8(%rax)
	movq	-8(%r15,%r12), %rax
	movq	(%rax), %r14
	movq	_BR_HASHDESC_OUT_OFF@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	shrq	%cl, %r14
	movq	_BR_HASHDESC_OUT_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	cmpl	$0, -452(%rbp)                  ## 4-byte Folded Reload
	movq	%r12, -488(%rbp)                ## 8-byte Spill
	leaq	4(%r15,%r12), %rax
	movq	-464(%rbp), %r12                ## 8-byte Reload
	cmoveq	-496(%rbp), %rax                ## 8-byte Folded Reload
	movl	(%rax), %esi
	leaq	-272(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_hextobin
	movq	%rax, %r13
	movq	-440(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rcx
	movq	%r12, %rdi
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdx
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	*-448(%rbp)                     ## 8-byte Folded Reload
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorb	$-128, -112(%rbp)
	movq	-440(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rcx
	movq	%r12, %rdi
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdx
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	*-448(%rbp)                     ## 8-byte Folded Reload
	testl	%eax, %eax
	leaq	-112(%rbp), %rsi
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	xorb	$-128, -112(%rbp)
	movq	-440(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rcx
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%rbx, %r8
	movq	%r13, %r9
	callq	*-448(%rbp)                     ## 8-byte Folded Reload
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-488(%rbp), %rbx                ## 8-byte Reload
	movq	-8(%r15,%rbx), %rsi
	movl	-16(%r15,%rbx), %ecx
	movq	%r12, %rdi
	leaq	-112(%rbp), %rdx
	leaq	-432(%rbp), %r15
	movq	%r15, %r8
	callq	*-472(%rbp)                     ## 8-byte Folded Reload
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r13, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	-272(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$46, %edi
	callq	_putchar
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	-480(%rbp), %rcx                ## 8-byte Reload
	incq	%rcx
	movq	_ECDSA_KAT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	(%rcx,%rcx,4), %rax
	leaq	(%r15,%rax,8), %rax
	movq	%rax, -440(%rbp)                ## 8-byte Spill
	cmpq	$0, 16(%r15,%rbx)
	leaq	40(%rbx), %r12
	jne	LBB0_2
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	addq	$472, %rsp                      ## imm = 0x1D8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_4:
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ECDSA_KAT,8,3                  ## @ECDSA_KAT
	.comm	_BR_HASHDESC_OUT_OFF,8,3        ## @BR_HASHDESC_OUT_OFF
	.comm	_BR_HASHDESC_OUT_MASK,8,3       ## @BR_HASHDESC_OUT_MASK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ECDSA KAT verify failed (1)\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"ECDSA KAT verify shoud have failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"ECDSA KAT verify failed (2)\n"

L_.str.3:                               ## @.str.3
	.asciz	"ECDSA KAT sign failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"ECDSA KAT wrong signature value\n"

	.comm	_stdout,4,2                     ## @stdout
	.no_dead_strip	_test_ECDSA_KAT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_ECDSA_KAT
_test_ECDSA_KAT:                        ; @test_ECDSA_KAT
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #496
	.cfi_def_cfa_offset 496
	stp	x28, x27, [sp, #400]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #416]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #432]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #448]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #464]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #480]            ; 16-byte Folded Spill
	add	x29, sp, #480
	.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
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x8, _ECDSA_KAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ECDSA_KAT@GOTPAGEOFF]
Lloh5:
	ldr	x28, [x8]
	ldr	x8, [x28]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x26, #0
	mov	x27, #0
	mov	x25, x28
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x19, x25, x26
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #24]
	add	x0, sp, #16
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x24, [x8, #16]
	ldr	w23, [x19, #32]
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	add	x0, sp, #16
	mov	x1, x23
	blr	x24
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	add	x0, sp, #16
	sub	x1, x29, #160
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _BR_HASHDESC_OUT_OFF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BR_HASHDESC_OUT_OFF@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsr	x8, x8, x9
Lloh9:
	adrp	x9, _BR_HASHDESC_OUT_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BR_HASHDESC_OUT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	and	x24, x8, x9
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #0
	mov	w8, #28
	mov	w9, #24
	csel	x8, x9, x8, eq
	ldr	w1, [x19, x8]
	add	x0, sp, #170
	bl	_hextobin
	mov	x23, x0
	ldr	x3, [x28]
	sub	x1, x29, #160
	add	x4, sp, #170
	mov	x0, x22
	mov	x2, x24
	mov	x5, x23
	blr	x20
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldurb	w8, [x29, #-160]
	eor	w8, w8, #0x80
	sturb	w8, [x29, #-160]
	ldr	x3, [x28]
	sub	x1, x29, #160
	add	x4, sp, #170
	mov	x0, x22
	mov	x2, x24
	mov	x5, x23
	blr	x20
	cbnz	w0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldurb	w8, [x29, #-160]
	eor	w8, w8, #0x80
	sturb	w8, [x29, #-160]
	ldr	x3, [x28]
	sub	x1, x29, #160
	add	x4, sp, #170
	mov	x0, x22
	mov	x2, x24
	mov	x5, x23
	blr	x20
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x19, #16]
	add	x8, x25, x26
	ldr	w3, [x8, #8]
	sub	x2, x29, #160
	add	x4, sp, #20
	mov	x0, x22
	blr	x21
	cbz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x0, x23
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #170
	add	x1, sp, #20
	mov	x2, x23
	bl	_memcmp
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #46
	bl	_putchar
Lloh12:
	adrp	x8, _stdout@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_fflush
	add	x27, x27, #1
Lloh15:
	adrp	x8, _ECDSA_KAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ECDSA_KAT@GOTPAGEOFF]
Lloh17:
	ldr	x25, [x8]
	mov	w8, #40
	madd	x28, x27, x8, x25
	add	x8, x25, x26
	ldr	x8, [x8, #40]
	add	x26, x26, #40
	cbnz	x8, LBB0_2
LBB0_9:
	ldur	x8, [x29, #-96]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.10:
	ldp	x29, x30, [sp, #480]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #464]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #448]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #432]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #416]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #400]            ; 16-byte Folded Reload
	add	sp, sp, #496
	ret
LBB0_11:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_12:
Lloh26:
	adrp	x8, _stderr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh36:
	adrp	x8, _stderr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh41:
	adrp	x8, _stderr@GOTPAGE
Lloh42:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str.3@PAGE
Lloh45:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_16:
	bl	_fprintf
Lloh46:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	bl	_exit
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_ECDSA_KAT,8,3                  ; @ECDSA_KAT
	.comm	_BR_HASHDESC_OUT_OFF,8,3        ; @BR_HASHDESC_OUT_OFF
	.comm	_BR_HASHDESC_OUT_MASK,8,3       ; @BR_HASHDESC_OUT_MASK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ECDSA KAT verify failed (1)\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"ECDSA KAT verify shoud have failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"ECDSA KAT verify failed (2)\n"

l_.str.3:                               ; @.str.3
	.asciz	"ECDSA KAT sign failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"ECDSA KAT wrong signature value\n"

	.comm	_stdout,4,2                     ; @stdout
	.no_dead_strip	_test_ECDSA_KAT
.subsections_via_symbols
