	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_run_scratch_tests              ## -- Begin function run_scratch_tests
	.p2align	4, 0x90
_run_scratch_tests:                     ## @run_scratch_tests
	.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	_ALIGNMENT@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leal	499(%rcx), %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	negl	%edx
	leal	(%rcx,%rdx), %eax
	addl	$499, %eax                      ## imm = 0x1F3
	cltq
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)
	movq	_SECP256K1_CONTEXT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_secp256k1_context_create
	movq	%rax, %r14
	movq	_counting_illegal_callback_fn@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %r15
	movq	%rax, %rdi
	movq	%r15, %rdx
	callq	_secp256k1_context_set_illegal_callback
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_secp256k1_context_set_error_callback
	movq	%r14, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_secp256k1_scratch_space_create
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_scratch_max_allocation
	xorl	%edi, %edi
	cmpl	$1000, %eax                     ## imm = 0x3E8
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_secp256k1_scratch_max_allocation
	movl	$1001, %ecx                     ## imm = 0x3E9
	subl	(%r12), %ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_CHECK
	movl	(%rbx), %eax
	cltd
	idivl	(%r12)
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scratch_checkpoint
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$500, %edx                      ## imm = 0x1F4
	callq	_secp256k1_scratch_alloc
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_scratch_max_allocation
	cltq
	movl	$1000, %r13d                    ## imm = 0x3E8
	subq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	xorl	%edi, %edi
	cmpq	%rax, %r13
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_secp256k1_scratch_max_allocation
	cltq
	movslq	(%r12), %rcx
	movq	%r13, %rdx
	subq	%rcx, %rdx
	incq	%rdx
	xorl	%edi, %edi
	cmpq	%rax, %rdx
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	setne	%dil
	callq	_CHECK
	movl	(%rbx), %eax
	cltd
	idivl	(%r12)
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$500, %edx                      ## imm = 0x1F4
	callq	_secp256k1_scratch_alloc
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_scratch_max_allocation
	cltq
	xorl	%edi, %edi
	cmpq	%rax, %r13
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_secp256k1_scratch_max_allocation
	cltq
	movslq	(%r12), %rcx
	subq	%rcx, %r13
	incq	%r13
	xorl	%edi, %edi
	cmpq	%rax, %r13
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	setne	%dil
	callq	_CHECK
	movl	(%rbx), %eax
	cltd
	idivl	(%r12)
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_secp256k1_scratch_apply_checkpoint
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_scratch_max_allocation
	xorl	%edi, %edi
	cmpl	$1000, %eax                     ## imm = 0x3E8
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$500, %edx                      ## imm = 0x1F4
	callq	_secp256k1_scratch_alloc
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	setne	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scratch_checkpoint
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_secp256k1_scratch_apply_checkpoint
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_secp256k1_scratch_apply_checkpoint
	xorl	%edi, %edi
	cmpl	$1, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	$-1, %rdx
	callq	_secp256k1_scratch_apply_checkpoint
	xorl	%edi, %edi
	cmpl	$2, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scratch_space_destroy
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_scratch_max_allocation
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$3, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$500, %edx                      ## imm = 0x1F4
	callq	_secp256k1_scratch_alloc
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$4, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scratch_space_destroy
	xorl	%edi, %edi
	cmpl	$5, -44(%rbp)
	sete	%dil
	callq	_CHECK
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_secp256k1_scratch_space_destroy
	movq	%r14, %rdi
	callq	_secp256k1_context_destroy
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALIGNMENT,4,2                  ## @ALIGNMENT
	.comm	_SECP256K1_CONTEXT_NONE,4,2     ## @SECP256K1_CONTEXT_NONE
	.comm	_counting_illegal_callback_fn,4,2 ## @counting_illegal_callback_fn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_run_scratch_tests              ; -- Begin function run_scratch_tests
	.p2align	2
_run_scratch_tests:                     ; @run_scratch_tests
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x22, _ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ALIGNMENT@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w9, w8, #499
	sdiv	w9, w9, w8
	mul	w23, w9, w8
	str	wzr, [sp, #12]
Lloh2:
	adrp	x8, _SECP256K1_CONTEXT_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SECP256K1_CONTEXT_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_secp256k1_context_create
	mov	x19, x0
Lloh5:
	adrp	x20, _counting_illegal_callback_fn@GOTPAGE
Lloh6:
	ldr	x20, [x20, _counting_illegal_callback_fn@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_secp256k1_context_set_illegal_callback
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_secp256k1_context_set_error_callback
	mov	w24, #1000
	mov	x0, x19
	mov	w1, #1000
	bl	_secp256k1_scratch_space_create
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_secp256k1_scratch_max_allocation
	cmp	w0, #1000
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_secp256k1_scratch_max_allocation
	ldr	w8, [x22]
	mov	w9, #1001
	sub	w8, w9, w8
	cmp	w0, w8
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [x20]
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	bl	_secp256k1_scratch_checkpoint
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	w2, #500
	bl	_secp256k1_scratch_alloc
	cmp	x0, #0
	cset	w0, ne
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_secp256k1_scratch_max_allocation
	sub	x23, x24, w23, sxtw
	cmp	x23, w0, sxtw
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_secp256k1_scratch_max_allocation
	ldrsw	x8, [x22]
	sub	x8, x23, x8
	add	x8, x8, #1
	cmp	x8, w0, sxtw
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [x20]
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #500
	bl	_secp256k1_scratch_alloc
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_secp256k1_scratch_max_allocation
	cmp	x23, w0, sxtw
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_secp256k1_scratch_max_allocation
	ldrsw	x8, [x22]
	sub	x8, x23, x8
	add	x8, x8, #1
	cmp	x8, w0, sxtw
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [x20]
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_secp256k1_scratch_apply_checkpoint
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_secp256k1_scratch_max_allocation
	cmp	w0, #1000
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	w2, #500
	bl	_secp256k1_scratch_alloc
	cmp	x0, #0
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, ne
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	bl	_secp256k1_scratch_checkpoint
	mov	x22, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_secp256k1_scratch_apply_checkpoint
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_secp256k1_scratch_apply_checkpoint
	ldr	w8, [sp, #12]
	cmp	w8, #1
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	mov	x2, #-1
	bl	_secp256k1_scratch_apply_checkpoint
	ldr	w8, [sp, #12]
	cmp	w8, #2
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, x20
	bl	_secp256k1_scratch_space_destroy
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_secp256k1_scratch_max_allocation
	cmp	w0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #3
	cset	w0, eq
	bl	_CHECK
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #500
	bl	_secp256k1_scratch_alloc
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #4
	cset	w0, eq
	bl	_CHECK
	add	x1, sp, #8
	mov	x0, x19
	bl	_secp256k1_scratch_space_destroy
	ldr	w8, [sp, #12]
	cmp	w8, #5
	cset	w0, eq
	bl	_CHECK
	mov	x0, x19
	mov	x1, #0
	bl	_secp256k1_scratch_space_destroy
	mov	x0, x19
	bl	_secp256k1_context_destroy
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ALIGNMENT,4,2                  ; @ALIGNMENT
	.comm	_SECP256K1_CONTEXT_NONE,4,2     ; @SECP256K1_CONTEXT_NONE
	.comm	_counting_illegal_callback_fn,4,2 ; @counting_illegal_callback_fn
.subsections_via_symbols
