	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_ecmult_pippenger_batch
_secp256k1_ecmult_pippenger_batch:      ## @secp256k1_ecmult_pippenger_batch
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -144(%rbp)                 ## 8-byte Spill
	movq	%r8, %rbx
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rdi, %r13
	movq	24(%rbp), %r15
	movq	%rdx, %rsi
	callq	_secp256k1_scratch_checkpoint
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_secp256k1_gej_set_infinity
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movl	$1, %eax
	testq	%r15, %r15
	je	LBB0_26
LBB0_2:
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_secp256k1_pippenger_bucket_window
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	4(,%r15,4), %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_secp256k1_scratch_alloc
	movq	%r14, %r12
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_secp256k1_scratch_alloc
	movq	%rax, %r15
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_secp256k1_scratch_alloc
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	je	LBB0_23
## %bb.3:
	testq	%r15, %r15
	je	LBB0_23
## %bb.4:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_23
## %bb.5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %rax
	leal	1(%rax), %edx
	shll	$3, %edx
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_secp256k1_scratch_alloc
	movq	%rax, 8(%r12)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %r15d
	movl	%r15d, %edi
	callq	_WNAF_SIZE
	imull	%eax, %ebx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_secp256k1_scratch_alloc
	movq	%rax, (%r12)
	movl	$1, %ebx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %ebx
	leal	(,%rbx,4), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_secp256k1_scratch_alloc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%r12)
	je	LBB0_24
## %bb.6:
	cmpq	$0, (%r12)
	movl	$0, %eax
	je	LBB0_25
## %bb.7:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_25
## %bb.8:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_secp256k1_ge_const_g@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx)
	movl	$1, %r13d
	jmp	LBB0_12
LBB0_11:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_12:
	movq	24(%rbp), %rax
	testq	%rax, %rax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	je	LBB0_17
## %bb.13:
	movq	32(%rbp), %rdx
	negq	%rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%r13,4), %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r13,4), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	movq	%rdx, %r14
	movq	16(%rbp), %rcx
	callq	*-144(%rbp)                     ## 8-byte Folded Reload
	testl	%eax, %eax
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	decq	%rbx
	movq	%r14, %rdx
	incq	%rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	addq	$4, %r13
	cmpq	%rbx, -128(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_14
## %bb.16:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	subq	%rbx, %r13
LBB0_17:
	movq	%r13, (%rsp)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r12, %rdx
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	callq	_secp256k1_ecmult_pippenger_wnaf
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_27
## %bb.18:
	xorl	%r14d, %r14d
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%r14
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_27
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_22 Depth 2
	leaq	(%rax,%r14,4), %rdi
	callq	_secp256k1_scalar_clear
	movq	8(%r12), %rax
	movq	$0, (%rax,%r14,8)
	movl	%r15d, %edi
	callq	_WNAF_SIZE
	testl	%eax, %eax
	jle	LBB0_19
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %r13
	movl	%r15d, %edi
	callq	_WNAF_SIZE
	imull	%r14d, %eax
	addl	%ebx, %eax
	cltq
	movl	$0, (%r13,%rax,4)
	incl	%ebx
	movl	%r15d, %edi
	callq	_WNAF_SIZE
	cmpl	%eax, %ebx
	jl	LBB0_22
	jmp	LBB0_19
LBB0_23:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	movq	%rax, %rbx
	callq	_secp256k1_scratch_apply_checkpoint
	movq	%rbx, %rax
LBB0_26:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movl	$1, %eax
	cmpl	$31, -64(%rbp)                  ## 4-byte Folded Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-112(%rbp), %r15                ## 8-byte Reload
	je	LBB0_25
## %bb.28:
	cmpl	$2, %r15d
	movl	$1, %eax
	cmovll	%eax, %r15d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_secp256k1_gej_clear
	addq	$4, %rbx
	decq	%r15
	jne	LBB0_29
## %bb.30:
	movl	$1, %eax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_secp256k1_ge_const_g,4,2       ## @secp256k1_ge_const_g
	.no_dead_strip	_secp256k1_ecmult_pippenger_batch
.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_batch
_secp256k1_ecmult_pippenger_batch:      ; @secp256k1_ecmult_pippenger_batch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x28, x7
	stp	x5, x6, [sp, #64]               ; 16-byte Folded Spill
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x20, x0
	mov	x1, x2
	bl	_secp256k1_scratch_checkpoint
	mov	x19, x0
	mov	x0, x21
	bl	_secp256k1_gej_set_infinity
	cbnz	x22, LBB0_3
; %bb.1:
	cbnz	x28, LBB0_3
; %bb.2:
	mov	w21, #1
	b	LBB0_30
LBB0_3:
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x28
	bl	_secp256k1_pippenger_bucket_window
	str	w0, [sp, #52]                   ; 4-byte Folded Spill
	add	w23, w28, #1
	lsl	w26, w23, #2
	mov	x0, x20
	mov	x1, x24
	mov	x2, x26
	bl	_secp256k1_scratch_alloc
	mov	x25, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x26
	bl	_secp256k1_scratch_alloc
	mov	x27, x0
	mov	x0, x20
	str	x24, [sp, #56]                  ; 8-byte Folded Spill
	mov	x1, x24
	mov	w2, #16
	bl	_secp256k1_scratch_alloc
	mov	w21, #0
	str	x25, [sp, #40]                  ; 8-byte Folded Spill
	cbz	x25, LBB0_21
; %bb.4:
	str	x27, [sp, #32]                  ; 8-byte Folded Spill
	cbz	x27, LBB0_21
; %bb.5:
	mov	x24, x0
	mov	x25, x19
	cbz	x0, LBB0_29
; %bb.6:
	lsl	w2, w23, #3
	mov	x0, x20
	ldr	x19, [sp, #56]                  ; 8-byte Folded Reload
	mov	x1, x19
	bl	_secp256k1_scratch_alloc
	str	x0, [x24, #8]
	ldr	w21, [sp, #52]                  ; 4-byte Folded Reload
	add	w27, w21, #1
	mov	x0, x27
	bl	_WNAF_SIZE
	mul	w2, w26, w0
	mov	x0, x20
	mov	x1, x19
	bl	_secp256k1_scratch_alloc
	str	x0, [x24]
	mov	w8, #1
	lsl	w23, w8, w21
	lsl	w2, w23, #2
	mov	x0, x20
	mov	x1, x19
	bl	_secp256k1_scratch_alloc
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_22
; %bb.7:
	mov	w21, #0
	ldr	x8, [x24]
	cbz	x8, LBB0_29
; %bb.8:
	mov	x26, x0
	cbz	x0, LBB0_29
; %bb.9:
	cbz	x22, LBB0_11
; %bb.10:
	ldr	w8, [x22]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	str	w8, [x9]
Lloh0:
	adrp	x8, _secp256k1_ge_const_g@GOTPAGE
Lloh1:
	ldr	x8, [x8, _secp256k1_ge_const_g@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	w8, [x9]
	mov	w22, #1
LBB0_11:
	str	x25, [sp, #16]                  ; 8-byte Folded Spill
	str	w23, [sp, #12]                  ; 4-byte Folded Spill
	cbz	x28, LBB0_15
; %bb.12:
	ldr	x21, [x29, #16]
	lsl	x8, x22, #2
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	add	x23, x9, x8
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x25, x9, x8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x25
	mov	x2, x21
	ldp	x8, x3, [sp, #64]               ; 16-byte Folded Reload
	blr	x8
	cbz	w0, LBB0_27
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	add	x21, x21, #1
	add	x23, x23, #4
	add	x25, x25, #4
	subs	x28, x28, #1
	b.ne	LBB0_13
LBB0_15:
	mov	x0, x26
	ldr	w1, [sp, #52]                   ; 4-byte Folded Reload
	mov	x2, x24
	ldp	x3, x28, [sp, #24]              ; 16-byte Folded Reload
	mov	x4, x28
	ldr	x5, [sp, #40]                   ; 8-byte Folded Reload
	mov	x6, x22
	bl	_secp256k1_ecmult_pippenger_wnaf
	cbz	x22, LBB0_23
; %bb.16:
	mov	x21, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x21, x21, #1
	cmp	x21, x22
	b.eq	LBB0_23
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	add	x0, x28, x21, lsl #2
	bl	_secp256k1_scalar_clear
	ldr	x8, [x24, #8]
	str	xzr, [x8, x21, lsl #3]
	mov	x0, x27
	bl	_WNAF_SIZE
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	w23, #0
LBB0_20:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x25, [x24]
	mov	x0, x27
	bl	_WNAF_SIZE
	madd	w8, w21, w0, w23
	str	wzr, [x25, w8, sxtw #2]
	add	w23, w23, #1
	mov	x0, x27
	bl	_WNAF_SIZE
	cmp	w23, w0
	b.lt	LBB0_20
	b	LBB0_17
LBB0_21:
	mov	x25, x19
	b	LBB0_29
LBB0_22:
	mov	w21, #0
	b	LBB0_29
LBB0_23:
	ldr	w8, [sp, #52]                   ; 4-byte Folded Reload
	cmp	w8, #31
	b.eq	LBB0_26
; %bb.24:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1
	csinc	w21, w8, wzr, gt
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	bl	_secp256k1_gej_clear
	add	x26, x26, #4
	subs	x21, x21, #1
	b.ne	LBB0_25
LBB0_26:
	mov	w21, #1
	b	LBB0_28
LBB0_27:
	mov	w21, #0
LBB0_28:
	ldr	x25, [sp, #16]                  ; 8-byte Folded Reload
LBB0_29:
	mov	x0, x20
	ldr	x1, [sp, #56]                   ; 8-byte Folded Reload
	mov	x2, x25
	bl	_secp256k1_scratch_apply_checkpoint
LBB0_30:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_secp256k1_ge_const_g,4,2       ; @secp256k1_ge_const_g
	.no_dead_strip	_secp256k1_ecmult_pippenger_batch
.subsections_via_symbols
