	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dragonfly_is_quadratic_residue_blind ## -- Begin function dragonfly_is_quadratic_residue_blind
	.p2align	4, 0x90
_dragonfly_is_quadratic_residue_blind:  ## @dragonfly_is_quadratic_residue_blind
	.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
	movq	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_DRAGONFLY_MAX_ECC_PRIME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_crypto_ec_get_prime
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_crypto_ec_prime_len
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_dragonfly_get_rand_1_to_p_1
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r13
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	xorl	%eax, %eax
	callq	_crypto_bignum_init
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_crypto_bignum_mulmod
	testq	%rax, %rax
	js	LBB0_8
## %bb.3:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_crypto_bignum_mulmod
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	movq	%r13, %rdi
	callq	_crypto_bignum_is_odd
	movl	%eax, %edi
	callq	_const_time_is_zero
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_const_time_select_bin
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_crypto_bignum_init_set
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_crypto_bignum_mulmod
	testq	%rax, %rax
	js	LBB0_9
## %bb.6:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	$-1, %esi
	movl	$1, %edx
	callq	_const_time_select_int
	movl	%eax, %r14d
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_crypto_bignum_legendre
	cmpl	$-2, %eax
	jne	LBB0_15
## %bb.7:
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movl	$-1, %ebx
LBB0_10:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_crypto_bignum_deinit
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_crypto_bignum_deinit
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_crypto_bignum_deinit
	jmp	LBB0_12
LBB0_11:
	movl	$-1, %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.13:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_const_time_eq
	movl	%eax, %edi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_const_time_select_int
	movl	%eax, %ebx
LBB0_16:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DRAGONFLY_MAX_ECC_PRIME_LEN,4,2 ## @DRAGONFLY_MAX_ECC_PRIME_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dragonfly_is_quadratic_residue_blind ; -- Begin function dragonfly_is_quadratic_residue_blind
	.p2align	2
_dragonfly_is_quadratic_residue_blind:  ; @dragonfly_is_quadratic_residue_blind
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x26, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _DRAGONFLY_MAX_ECC_PRIME_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRAGONFLY_MAX_ECC_PRIME_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	bl	_crypto_ec_get_prime
	mov	x22, x0
	mov	x0, x19
	bl	_crypto_ec_prime_len
	mov	x25, x0
	mov	x0, x22
	bl	_dragonfly_get_rand_1_to_p_1
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	bl	_crypto_bignum_init
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.2:
	mov	x0, x26
	mov	x1, x19
	mov	x2, x22
	mov	x3, x20
	bl	_crypto_bignum_mulmod
	tbnz	x0, #63, LBB0_8
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x20
	bl	_crypto_bignum_mulmod
	tbnz	x0, #63, LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_crypto_bignum_is_odd
	bl	_const_time_is_zero
	mov	x26, x0
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	mov	x4, x24
	bl	_const_time_select_bin
	mov	x0, x24
	mov	x1, x25
	bl	_crypto_bignum_init_set
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_crypto_bignum_mulmod
	mov	w23, #-1
	tbnz	x0, #63, LBB0_10
; %bb.6:
	mov	x0, x26
	mov	w1, #-1
	mov	w2, #1
	bl	_const_time_select_int
	mov	x24, x0
	mov	x0, x20
	mov	x1, x22
	bl	_crypto_bignum_legendre
	cmn	w0, #2
	b.eq	LBB0_10
; %bb.7:
	mov	x1, x24
	bl	_const_time_eq
	mov	w1, #1
	mov	w2, #0
	bl	_const_time_select_int
	mov	x23, x0
	b	LBB0_10
LBB0_8:
	mov	x21, #0
LBB0_9:
	mov	w23, #-1
LBB0_10:
	mov	x0, x20
	mov	w1, #1
	bl	_crypto_bignum_deinit
	mov	x0, x19
	mov	w1, #1
	bl	_crypto_bignum_deinit
	mov	x0, x21
	mov	w1, #1
	bl	_crypto_bignum_deinit
	b	LBB0_12
LBB0_11:
	mov	w23, #-1
LBB0_12:
	ldur	x8, [x29, #-72]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x23
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DRAGONFLY_MAX_ECC_PRIME_LEN,4,2 ; @DRAGONFLY_MAX_ECC_PRIME_LEN
.subsections_via_symbols
