	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_ecmult_pippenger_wnaf
_secp256k1_ecmult_pippenger_wnaf:       ## @secp256k1_ecmult_pippenger_wnaf
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r15
	movq	16(%rbp), %r12
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	leal	1(%rsi), %edi
	movl	%edi, -88(%rbp)                 ## 4-byte Spill
	callq	_WNAF_SIZE
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpq	%r15, %r12
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_secp256k1_scalar_is_zero
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_secp256k1_ge_is_infinity
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	%rcx, %rdx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rcx
	shlq	$4, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, (%rax,%rcx)
	movq	%r12, %rdi
	imulq	-80(%rbp), %rdi                 ## 8-byte Folded Reload
	shlq	$2, %rdi
	addq	(%rdx), %rdi
	movq	%rbx, %rsi
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	callq	_secp256k1_wnaf_fixed
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 8(%rcx,%rdx)
	incq	%r12
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r12
	jmp	LBB0_6
LBB0_7:
	movq	%r13, %rdi
	callq	_secp256k1_gej_set_infinity
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_29
## %bb.8:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	decl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	js	LBB0_29
## %bb.9:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leal	2(%rax), %r15d
	movslq	-48(%rbp), %r12                 ## 4-byte Folded Reload
	shlq	$2, %r12
	shlq	$2, -80(%rbp)                   ## 8-byte Folded Spill
	movq	%r13, -128(%rbp)                ## 8-byte Spill
	movl	%r15d, -108(%rbp)               ## 4-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_var
	movq	%r13, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_gej_double_var
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_var
	movq	-136(%rbp), %r12                ## 8-byte Reload
	addq	$-4, %r12
	decl	-48(%rbp)                       ## 4-byte Folded Spill
	js	LBB0_29
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	movl	%r15d, %edi
	callq	_ECMULT_TABLE_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_secp256k1_gej_set_infinity
	incq	%rbx
	movl	%r15d, %edi
	callq	_ECMULT_TABLE_SIZE
	cltq
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	$8, %ebx
	movq	%r12, -136(%rbp)                ## 8-byte Spill
	movq	%r12, %r14
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=2
	decl	%r12d
	shrl	%r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,4), %rdi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r13,4), %rdx
	movq	%rdi, %rsi
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=2
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_ge_var
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=2
	addq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	addq	$16, %rbx
	decq	%r15
	je	LBB0_23
LBB0_14:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx,%r14), %r12d
	movq	-8(%rax,%rbx), %r13
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$0, (%rax,%rbx)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r13,4), %rsi
	leaq	-60(%rbp), %rdi
	callq	_secp256k1_ge_neg
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rsi
	leaq	-60(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_ge_var
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=2
	testl	%r12d, %r12d
	jg	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=2
	jns	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=2
	notl	%r12d
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r13,4), %rsi
	leaq	-60(%rbp), %r12
	movq	%r12, %rdi
	callq	_secp256k1_ge_neg
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdi
	movq	%rdi, %rsi
	movq	%r12, %rdx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-128(%rbp), %r13                ## 8-byte Reload
	jle	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_secp256k1_gej_double_var
	decl	%ebx
	jne	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	-140(%rbp), %r12
	movq	%r12, %rdi
	callq	_secp256k1_gej_set_infinity
	movl	-108(%rbp), %r15d               ## 4-byte Reload
	movl	%r15d, %edi
	callq	_ECMULT_TABLE_SIZE
	cmpl	$2, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jl	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-2(%rbx), %eax
	leaq	(%r14,%rax,4), %rdx
	movq	%r12, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_var
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_secp256k1_gej_add_var
	decq	%rbx
	cmpq	$2, %rbx
	ja	LBB0_27
	jmp	LBB0_28
LBB0_1:
	movq	%r13, %rdi
	callq	_secp256k1_gej_set_infinity
LBB0_29:
	movl	$1, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_ecmult_pippenger_wnaf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_ecmult_pippenger_wnaf
_secp256k1_ecmult_pippenger_wnaf:       ; @secp256k1_ecmult_pippenger_wnaf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x24, x6
	mov	x28, x5
	mov	x26, x4
	mov	x19, x3
	mov	x21, x2
	mov	x23, x0
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	add	w25, w1, #1
	mov	x0, x25
	bl	_WNAF_SIZE
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	cbz	x24, LBB0_28
; %bb.1:
	mov	x22, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	str	x28, [sp, #32]                  ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	add	x28, x28, #4
	add	x26, x26, #4
	cmp	x24, x22
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	bl	_secp256k1_scalar_is_zero
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x28
	bl	_secp256k1_ge_is_infinity
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	lsl	x20, x27, #4
	ldp	x9, x8, [x21]
	str	x22, [x8, x20]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	mul	x8, x27, x8
	add	x0, x9, x8, lsl #2
	mov	x1, x26
	mov	x2, x25
	bl	_secp256k1_wnaf_fixed
	ldr	x8, [x21, #8]
	add	x8, x8, x20
	str	w0, [x8, #8]
	add	x27, x27, #1
	str	x27, [sp, #16]                  ; 8-byte Folded Spill
	b	LBB0_2
LBB0_6:
	mov	x0, x19
	bl	_secp256k1_gej_set_infinity
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_29
; %bb.7:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	subs	w26, w8, #1
	b.mi	LBB0_29
; %bb.8:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w24, w8, #2
	sbfiz	x28, x26, #2, #32
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	lsl	x22, x8, #2
	str	w24, [sp, #8]                   ; 4-byte Folded Spill
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x0, sp, #44
	add	x1, sp, #44
	mov	x2, x23
	mov	x3, #0
	bl	_secp256k1_gej_add_var
	mov	x0, x19
	mov	x1, x19
	mov	x2, #0
	bl	_secp256k1_gej_double_var
	add	x2, sp, #44
	mov	x0, x19
	mov	x1, x19
	mov	x3, #0
	bl	_secp256k1_gej_add_var
	sub	w26, w26, #1
	sub	x28, x28, #4
	tbnz	w26, #31, LBB0_29
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_27 Depth 2
	mov	x0, x24
	bl	_ECMULT_TABLE_SIZE
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x20, #0
	mov	x25, x23
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	bl	_secp256k1_gej_set_infinity
	add	x20, x20, #1
	mov	x0, x24
	bl	_ECMULT_TABLE_SIZE
	add	x25, x25, #4
	cmp	x20, w0, sxtw
	b.lt	LBB0_12
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, #0
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_17 Depth=2
	lsr	w8, w8, #1
	add	x0, x23, w8, uxtw #2
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x2, x8, x24, lsl #2
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=2
	mov	x1, x0
	mov	x3, #0
	bl	_secp256k1_gej_add_ge_var
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	add	x28, x28, x22
	add	x25, x25, #16
	subs	x27, x27, #1
	b.eq	LBB0_23
LBB0_17:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x8, x9, [x21]
	ldr	w20, [x8, x28]
	add	x8, x9, x25
	ldr	x24, [x8]
	cbnz	w26, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x1, x8, x24, lsl #2
	add	x0, sp, #40
	bl	_secp256k1_ge_neg
	add	x2, sp, #40
	mov	x0, x23
	mov	x1, x23
	mov	x3, #0
	bl	_secp256k1_gej_add_ge_var
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=2
	subs	w8, w20, #1
	b.ge	LBB0_14
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=2
	tbz	w20, #31, LBB0_16
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=2
	mvn	w8, w20
	neg	w9, w20
	cmp	w8, #0
	csinv	w8, w9, w20, lt
	asr	w20, w8, #1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x1, x8, x24, lsl #2
	add	x0, sp, #40
	bl	_secp256k1_ge_neg
	add	x0, x23, w20, uxtw #2
	add	x2, sp, #40
	b	LBB0_15
LBB0_23:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	mov	x20, x8
	cmp	w8, #1
	b.lt	LBB0_25
LBB0_24:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x19
	mov	x2, #0
	bl	_secp256k1_gej_double_var
	subs	w20, w20, #1
	b.ne	LBB0_24
LBB0_25:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x0, sp, #44
	bl	_secp256k1_gej_set_infinity
	ldr	w24, [sp, #8]                   ; 4-byte Folded Reload
	mov	x0, x24
	bl	_ECMULT_TABLE_SIZE
	cmp	w0, #1
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
	b.le	LBB0_9
; %bb.26:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w8, w0
	add	x20, x8, #1
LBB0_27:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w8, w20, #2
	add	x2, x23, w8, uxtw #2
	add	x0, sp, #44
	add	x1, sp, #44
	mov	x3, #0
	bl	_secp256k1_gej_add_var
	add	x2, sp, #44
	mov	x0, x19
	mov	x1, x19
	mov	x3, #0
	bl	_secp256k1_gej_add_var
	sub	x20, x20, #1
	cmp	x20, #2
	b.hi	LBB0_27
	b	LBB0_9
LBB0_28:
	mov	x0, x19
	bl	_secp256k1_gej_set_infinity
LBB0_29:
	mov	w0, #1
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_ecmult_pippenger_wnaf
.subsections_via_symbols
