	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_ecdsa_sig_sign
_secp256k1_ecdsa_sig_sign:              ## @secp256k1_ecdsa_sig_sign
	.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	%r8, -120(%rbp)                 ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -84(%rbp)
	leaq	-100(%rbp), %r15
	movq	%r15, %rsi
	movq	%r9, -128(%rbp)                 ## 8-byte Spill
	movq	%r9, %rdx
	callq	_secp256k1_ecmult_gen
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_secp256k1_ge_set_gej
	leaq	-92(%rbp), %r15
	movq	%r15, %rdi
	callq	_secp256k1_fe_normalize
	movq	%r12, %rdi
	callq	_secp256k1_fe_normalize
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	16(%rbp), %r15
	callq	_secp256k1_fe_get_b32
	leaq	-84(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secp256k1_scalar_set_b32
	movq	%r14, %rdi
	callq	_secp256k1_scalar_is_zero
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_VERIFY_CHECK
	xorl	%edi, %edi
	cmpl	$0, -84(%rbp)
	sete	%dil
	callq	_VERIFY_CHECK
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	$0, -84(%rbp)
	setne	%bl
	leaq	-96(%rbp), %rdi
	callq	_secp256k1_fe_is_odd
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leal	(%rcx,%rbx,2), %eax
	movl	%eax, (%r15)
LBB0_2:
	leaq	-132(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	callq	_secp256k1_scalar_mul
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	callq	_secp256k1_scalar_add
	movq	%r13, %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	callq	_secp256k1_scalar_inverse
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_secp256k1_scalar_mul
	movq	%rbx, %rdi
	callq	_secp256k1_scalar_clear
	leaq	-100(%rbp), %rdi
	callq	_secp256k1_gej_clear
	leaq	-96(%rbp), %rdi
	callq	_secp256k1_ge_clear
	movq	%r13, %rdi
	callq	_secp256k1_scalar_is_zero
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r13, %rdi
	callq	_secp256k1_scalar_is_high
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	movq	%r13, %rsi
	callq	_secp256k1_scalar_negate
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	xorb	$1, (%r15)
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_secp256k1_ecdsa_sig_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_ecdsa_sig_sign
_secp256k1_ecdsa_sig_sign:              ; @secp256k1_ecdsa_sig_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x19, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x24, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	str	wzr, [sp]
	add	x1, sp, #20
	mov	x2, x5
	bl	_secp256k1_ecmult_gen
	add	x25, sp, #8
	add	x0, sp, #8
	add	x1, sp, #20
	bl	_secp256k1_ge_set_gej
	orr	x25, x25, #0x4
	mov	x0, x25
	bl	_secp256k1_fe_normalize
	add	x0, sp, #8
	bl	_secp256k1_fe_normalize
	add	x0, sp, #24
	mov	x1, x25
	bl	_secp256k1_fe_get_b32
	add	x1, sp, #24
	mov	x2, sp
	mov	x0, x24
	bl	_secp256k1_scalar_set_b32
	mov	x0, x24
	bl	_secp256k1_scalar_is_zero
	cmp	x0, #0
	cset	w0, eq
	bl	_VERIFY_CHECK
	ldr	w8, [sp]
	cmp	w8, #0
	cset	w0, eq
	bl	_VERIFY_CHECK
	cbz	x19, LBB0_2
; %bb.1:
	ldr	w8, [sp]
	cmp	w8, #0
	cset	w25, ne
	add	x0, sp, #8
	bl	_secp256k1_fe_is_odd
	cmp	x0, #0
	cset	w8, ne
	bfi	w8, w25, #1, #1
	str	w8, [x19]
LBB0_2:
	add	x0, sp, #4
	mov	x1, x24
	mov	x2, x23
	bl	_secp256k1_scalar_mul
	add	x0, sp, #4
	add	x1, sp, #4
	mov	x2, x22
	bl	_secp256k1_scalar_add
	mov	x0, x20
	mov	x1, x21
	bl	_secp256k1_scalar_inverse
	add	x2, sp, #4
	mov	x0, x20
	mov	x1, x20
	bl	_secp256k1_scalar_mul
	add	x0, sp, #4
	bl	_secp256k1_scalar_clear
	add	x0, sp, #20
	bl	_secp256k1_gej_clear
	add	x0, sp, #8
	bl	_secp256k1_ge_clear
	mov	x0, x20
	bl	_secp256k1_scalar_is_zero
	cbz	x0, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	mov	x0, x20
	bl	_secp256k1_scalar_is_high
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	x1, x20
	bl	_secp256k1_scalar_negate
	cbz	x19, LBB0_7
; %bb.6:
	ldr	w8, [x19]
	eor	w8, w8, #0x1
	str	w8, [x19]
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldr	x8, [sp, #56]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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
	add	sp, sp, #144
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_secp256k1_ecdsa_sig_sign
.subsections_via_symbols
