	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_scalar_reduce_512
_secp256k1_scalar_reduce_512:           ## @secp256k1_scalar_reduce_512
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	32(%rsi), %r14d
	movl	36(%rsi), %r13d
	movl	40(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	44(%rsi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	48(%rsi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	52(%rsi), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	56(%rsi), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	60(%rsi), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movl	%r14d, %edi
	callq	_muladd_fast
	callq	_extract_fast
	movl	4(%r12), %edi
	callq	_sumadd_fast
	movq	(%rbx), %rsi
	movl	%r13d, %edi
	movl	%r13d, %r15d
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movl	%r14d, %edi
	callq	_muladd
	callq	_extract
	movl	8(%r12), %edi
	callq	_sumadd
	movq	(%rbx), %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_muladd
	movq	(%r13), %rsi
	movl	%r15d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	callq	_muladd
	callq	_extract
	movl	12(%r12), %edi
	callq	_sumadd
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_muladd
	callq	_extract
	movl	16(%r12), %edi
	callq	_sumadd
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r13d, %edi
	callq	_muladd
	movq	(%rbx), %rsi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_muladd
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_sumadd
	callq	_extract
	movl	20(%r12), %edi
	callq	_sumadd
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r13d, %edi
	callq	_muladd
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_sumadd
	callq	_extract
	movl	24(%r12), %edi
	callq	_sumadd
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_muladd
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_sumadd
	callq	_extract
	movl	28(%r12), %edi
	callq	_sumadd
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %r12d
	movl	%r14d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_2@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r13d, %edi
	callq	_muladd
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_sumadd
	callq	_extract
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	(%r15), %rsi
	movl	%r12d, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_muladd
	movl	%r13d, %edi
	callq	_sumadd
	callq	_extract
	movq	(%r15), %rsi
	movq	%r15, %r13
	movl	%ebx, %edi
	callq	_muladd
	movq	_SECP256K1_N_C_3@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movl	%r12d, %edi
	callq	_muladd
	movl	%r14d, %edi
	callq	_sumadd
	callq	_extract
	movq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movl	%r12d, %edi
	callq	_sumadd
	callq	_extract
	movl	%ebx, %edi
	callq	_sumadd_fast
	callq	_extract_fast
	xorl	%edi, %edi
	movl	-76(%rbp), %ebx                 ## 4-byte Reload
	cmpl	$2, %ebx
	setl	%dil
	callq	_VERIFY_CHECK
	movq	_SECP256K1_N_C_0@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	_muladd_fast
	callq	_extract_fast
	callq	_sumadd_fast
	movq	(%r12), %rsi
	callq	_muladd
	movq	_SECP256K1_N_C_1@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	callq	_muladd
	callq	_extract
	callq	_sumadd
	movq	(%r12), %rsi
	callq	_muladd
	movq	(%r14), %rsi
	callq	_muladd
	movq	(%r13), %rsi
	callq	_muladd
	callq	_extract
	callq	_sumadd
	movq	(%r12), %rsi
	callq	_muladd
	movq	(%r14), %rsi
	callq	_muladd
	movq	(%r13), %rsi
	callq	_muladd
	movq	(%r15), %rsi
	callq	_muladd
	callq	_extract
	callq	_sumadd
	movq	(%r12), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	(%r14), %rsi
	callq	_muladd
	movq	(%r13), %rsi
	callq	_muladd
	movq	(%r15), %rsi
	callq	_muladd
	callq	_sumadd
	callq	_extract
	callq	_sumadd
	movq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	(%r13), %rsi
	callq	_muladd
	movq	(%r15), %rsi
	callq	_muladd
	callq	_sumadd
	callq	_extract
	callq	_sumadd
	movq	(%r13), %rsi
	movl	%ebx, %edi
	callq	_muladd
	movq	(%r15), %rsi
	callq	_muladd
	callq	_sumadd
	callq	_extract
	callq	_sumadd_fast
	movq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_muladd_fast
	callq	_sumadd_fast
	callq	_extract_fast
	movl	$1, %edi
	callq	_VERIFY_CHECK
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movq	%rbx, %rdi
	callq	_secp256k1_scalar_check_overflow
	movq	%rbx, %rdi
	movq	%rax, %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_secp256k1_scalar_reduce        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SECP256K1_N_C_0,8,3            ## @SECP256K1_N_C_0
	.comm	_SECP256K1_N_C_1,8,3            ## @SECP256K1_N_C_1
	.comm	_SECP256K1_N_C_2,8,3            ## @SECP256K1_N_C_2
	.comm	_SECP256K1_N_C_3,8,3            ## @SECP256K1_N_C_3
	.no_dead_strip	_secp256k1_scalar_reduce_512
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_scalar_reduce_512
_secp256k1_scalar_reduce_512:           ; @secp256k1_scalar_reduce_512
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x26, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	ldp	w19, w28, [x1, #32]
	ldp	w27, w24, [x1, #40]
	ldp	w25, w9, [x1, #48]
	ldr	w8, [x1, #56]
	stp	w9, w8, [sp, #8]                ; 8-byte Folded Spill
	ldr	w9, [x1, #60]
	ldr	w8, [x1]
	stp	w9, w8, [sp, #16]               ; 8-byte Folded Spill
Lloh0:
	adrp	x20, _SECP256K1_N_C_0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SECP256K1_N_C_0@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	bl	_muladd_fast
	bl	_extract_fast
	ldr	w0, [x26, #4]
	bl	_sumadd_fast
	ldr	x1, [x20]
	mov	x0, x28
	bl	_muladd
Lloh2:
	adrp	x21, _SECP256K1_N_C_1@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SECP256K1_N_C_1@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_muladd
	bl	_extract
	ldr	w0, [x26, #8]
	bl	_sumadd
	ldr	x1, [x20]
	mov	x0, x27
	bl	_muladd
	ldr	x1, [x21]
	mov	x0, x28
	bl	_muladd
Lloh4:
	adrp	x22, _SECP256K1_N_C_2@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SECP256K1_N_C_2@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_muladd
	bl	_extract
	ldr	w0, [x26, #12]
	bl	_sumadd
	ldr	x1, [x20]
	mov	x0, x24
	bl	_muladd
	ldr	x1, [x21]
	mov	x0, x27
	bl	_muladd
	ldr	x1, [x22]
	mov	x0, x28
	bl	_muladd
Lloh6:
	adrp	x23, _SECP256K1_N_C_3@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SECP256K1_N_C_3@GOTPAGEOFF]
	ldr	x1, [x23]
	mov	x0, x19
	bl	_muladd
	bl	_extract
	ldr	w0, [x26, #16]
	bl	_sumadd
	ldr	x1, [x20]
	mov	x0, x25
	bl	_muladd
	ldr	x1, [x21]
	mov	x0, x24
	bl	_muladd
	ldr	x1, [x22]
	mov	x0, x27
	bl	_muladd
	ldr	x1, [x23]
	mov	x0, x28
	bl	_muladd
	mov	x0, x19
	bl	_sumadd
	bl	_extract
	ldr	w0, [x26, #20]
	bl	_sumadd
	ldr	x1, [x20]
	ldr	w23, [sp, #8]                   ; 4-byte Folded Reload
	mov	x0, x23
	bl	_muladd
	ldr	x1, [x21]
	mov	x0, x25
	bl	_muladd
	ldr	x1, [x22]
	mov	x21, x22
	mov	x0, x24
	bl	_muladd
Lloh8:
	adrp	x19, _SECP256K1_N_C_3@GOTPAGE
Lloh9:
	ldr	x19, [x19, _SECP256K1_N_C_3@GOTPAGEOFF]
	ldr	x1, [x19]
	mov	x0, x27
	bl	_muladd
	mov	x0, x28
	bl	_sumadd
	bl	_extract
	ldr	w0, [x26, #24]
	bl	_sumadd
	ldr	x1, [x20]
	ldr	w22, [sp, #12]                  ; 4-byte Folded Reload
	mov	x0, x22
	bl	_muladd
Lloh10:
	adrp	x8, _SECP256K1_N_C_1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SECP256K1_N_C_1@GOTPAGEOFF]
Lloh12:
	ldr	x1, [x8]
	mov	x0, x23
	bl	_muladd
	ldr	x1, [x21]
	mov	x28, x21
	mov	x0, x25
	bl	_muladd
	ldr	x1, [x19]
	mov	x0, x24
	bl	_muladd
	mov	x0, x27
	bl	_sumadd
	bl	_extract
	ldr	w0, [x26, #28]
	bl	_sumadd
	ldr	x1, [x20]
	mov	x27, x20
	ldr	w21, [sp, #16]                  ; 4-byte Folded Reload
	mov	x0, x21
	bl	_muladd
Lloh13:
	adrp	x19, _SECP256K1_N_C_1@GOTPAGE
Lloh14:
	ldr	x19, [x19, _SECP256K1_N_C_1@GOTPAGEOFF]
	ldr	x1, [x19]
	mov	x0, x22
	bl	_muladd
	ldr	x1, [x28]
	mov	x0, x23
	bl	_muladd
Lloh15:
	adrp	x20, _SECP256K1_N_C_3@GOTPAGE
Lloh16:
	ldr	x20, [x20, _SECP256K1_N_C_3@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x25
	bl	_muladd
	mov	x0, x24
	bl	_sumadd
	bl	_extract
	ldr	x1, [x19]
	mov	x24, x19
	mov	x0, x21
	bl	_muladd
	ldr	x1, [x28]
	mov	x0, x22
	bl	_muladd
	ldr	x1, [x20]
	mov	x0, x23
	bl	_muladd
	mov	x0, x25
	bl	_sumadd
	bl	_extract
	ldr	x1, [x28]
	mov	x0, x21
	bl	_muladd
	ldr	x1, [x20]
	mov	x0, x22
	bl	_muladd
	mov	x0, x23
	bl	_sumadd
	bl	_extract
	ldr	x1, [x20]
	mov	x0, x21
	bl	_muladd
	mov	x0, x22
	bl	_sumadd
	bl	_extract
	mov	x0, x21
	bl	_sumadd_fast
	bl	_extract_fast
	ldr	w19, [sp, #20]                  ; 4-byte Folded Reload
	cmp	w19, #2
	cset	w0, lt
	bl	_VERIFY_CHECK
	ldr	x1, [x27]
	bl	_muladd_fast
	bl	_extract_fast
	bl	_sumadd_fast
	ldr	x1, [x27]
	bl	_muladd
	ldr	x1, [x24]
	bl	_muladd
	bl	_extract
	bl	_sumadd
	ldr	x1, [x27]
	bl	_muladd
	ldr	x1, [x24]
	bl	_muladd
	ldr	x1, [x28]
	bl	_muladd
	bl	_extract
	bl	_sumadd
	ldr	x1, [x27]
	bl	_muladd
	ldr	x1, [x24]
	bl	_muladd
	ldr	x1, [x28]
	bl	_muladd
	ldr	x1, [x20]
	bl	_muladd
	bl	_extract
	bl	_sumadd
	ldr	x1, [x27]
	mov	x0, x19
	bl	_muladd
	ldr	x1, [x24]
	bl	_muladd
	ldr	x1, [x28]
	bl	_muladd
	ldr	x1, [x20]
	bl	_muladd
	bl	_sumadd
	bl	_extract
	bl	_sumadd
	ldr	x1, [x24]
	mov	x0, x19
	bl	_muladd
	ldr	x1, [x28]
	bl	_muladd
	ldr	x1, [x20]
	bl	_muladd
	bl	_sumadd
	bl	_extract
	bl	_sumadd
	ldr	x1, [x28]
	mov	x0, x19
	bl	_muladd
	ldr	x1, [x20]
	bl	_muladd
	bl	_sumadd
	bl	_extract
	bl	_sumadd_fast
	ldr	x1, [x20]
	mov	x0, x19
	bl	_muladd_fast
	bl	_sumadd_fast
	bl	_extract_fast
	mov	w0, #1
	bl	_VERIFY_CHECK
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	ldr	x8, [x19]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x8]
	mov	x0, x19
	bl	_secp256k1_scalar_check_overflow
	mov	x1, x0
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_secp256k1_scalar_reduce
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SECP256K1_N_C_0,8,3            ; @SECP256K1_N_C_0
	.comm	_SECP256K1_N_C_1,8,3            ; @SECP256K1_N_C_1
	.comm	_SECP256K1_N_C_2,8,3            ; @SECP256K1_N_C_2
	.comm	_SECP256K1_N_C_3,8,3            ; @SECP256K1_N_C_3
	.no_dead_strip	_secp256k1_scalar_reduce_512
.subsections_via_symbols
