	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_ecmult_wnaf
_secp256k1_ecmult_wnaf:                 ## @secp256k1_ecmult_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_VERIFY_CHECK
	xorl	%edi, %edi
	cmpl	$257, %ebx                      ## imm = 0x101
	setb	%dil
	callq	_VERIFY_CHECK
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_VERIFY_CHECK
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	leal	-2(%r15), %eax
	xorl	%edi, %edi
	cmpl	$30, %eax
	setb	%dil
	callq	_VERIFY_CHECK
	movq	%rbx, %r15
	leal	(,%rbx,4), %edx
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%r14), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdi
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$255, %esi
	movl	$1, %edx
	callq	_secp256k1_scalar_get_bits
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	-44(%rbp), %rdi
	movq	%rdi, %rsi
	callq	_secp256k1_scalar_negate
	movl	$-1, -52(%rbp)                  ## 4-byte Folded Spill
LBB0_2:
	movq	%r15, %r14
	testl	%r14d, %r14d
	jle	LBB0_3
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
	leaq	-44(%rbp), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %ebx
	subl	%r15d, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_secp256k1_scalar_get_bits_var
	addl	%r12d, %eax
	xorl	%edx, %edx
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	btl	%ecx, %eax
	setb	%dl
	movl	%edx, %r12d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %edx
	subl	%edx, %eax
	imull	-52(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%r15d, %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	addl	%r15d, %ebx
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%ebx, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r14d, %ebx
	leaq	-44(%rbp), %r13
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_secp256k1_scalar_get_bits
	cmpl	%r12d, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	movl	%r15d, %ebx
	jmp	LBB0_8
LBB0_3:
	movl	$-1, -48(%rbp)                  ## 4-byte Folded Spill
LBB0_9:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_ecmult_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_wnaf
_secp256k1_ecmult_wnaf:                 ; @secp256k1_ecmult_wnaf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_VERIFY_CHECK
	cmp	w20, #257
	cset	w0, lo
	bl	_VERIFY_CHECK
	cmp	x22, #0
	cset	w0, ne
	bl	_VERIFY_CHECK
	sub	w8, w19, #2
	cmp	w8, #30
	cset	w0, lo
	bl	_VERIFY_CHECK
	lsl	w2, w20, #2
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #12]
	mov	w24, #1
	add	x0, sp, #12
	mov	w1, #255
	mov	w2, #1
	bl	_secp256k1_scalar_get_bits
	cbz	w0, LBB0_2
; %bb.1:
	add	x0, sp, #12
	add	x1, sp, #12
	bl	_secp256k1_scalar_negate
	mov	w24, #-1
LBB0_2:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w26, #0
	mov	w22, #0
	sub	w25, w19, #1
	mov	w23, #-1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	w8, w20, w22
	cmp	w8, w19
	csel	w23, w8, w19, lt
	add	x0, sp, #12
	mov	x1, x22
	mov	x2, x23
	bl	_secp256k1_scalar_get_bits_var
	add	w8, w0, w26
	lsr	w9, w8, w25
	and	w26, w9, #0x1
	lsl	w9, w26, w19
	sub	w8, w8, w9
	mul	w8, w8, w24
	str	w8, [x21, w22, sxtw #2]
	add	w8, w23, w22
	mov	x23, x22
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, x8
	cmp	w8, w20
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	mov	x1, x22
	mov	w2, #1
	bl	_secp256k1_scalar_get_bits
	cmp	w0, w26
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w22, #1
	b	LBB0_5
LBB0_8:
	mov	w23, #-1
LBB0_9:
	add	w0, w23, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_ecmult_wnaf
.subsections_via_symbols
