	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_bignum_legendre         ## -- Begin function crypto_bignum_legendre
	.p2align	4, 0x90
_crypto_bignum_legendre:                ## @crypto_bignum_legendre
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_TEST_FAIL
	movl	$-2, %ebx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	leaq	-44(%rbp), %rdi
	callq	_mp_init
	movq	_MP_OKAY@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_10
## %bb.2:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_mp_sub_d
	movl	%eax, %r12d
	movl	(%r13), %eax
	cmpl	%eax, %r12d
	jne	LBB0_4
## %bb.3:
	leaq	-44(%rbp), %rdi
	movl	$1, %esi
	callq	_mp_rshb
	movl	(%r13), %eax
LBB0_4:
	cmpl	%eax, %r12d
	jne	LBB0_6
## %bb.5:
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rcx, %rsi
	movq	%r15, %rdx
	callq	_mp_exptmod
	movl	%eax, %r12d
	movl	(%r13), %eax
LBB0_6:
	movl	$-2, %ebx
	cmpl	%eax, %r12d
	jne	LBB0_9
## %bb.7:
	leaq	-44(%rbp), %rdi
	callq	_mp_isone
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	-44(%rbp), %rdi
	callq	_mp_iszero
	xorl	%ebx, %ebx
	cmpq	$1, %rax
	sbbl	%ebx, %ebx
LBB0_9:
	leaq	-44(%rbp), %rdi
	callq	_mp_clear
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP_OKAY,4,2                    ## @MP_OKAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_bignum_legendre         ; -- Begin function crypto_bignum_legendre
	.p2align	2
_crypto_bignum_legendre:                ; @crypto_bignum_legendre
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_TEST_FAIL
	cbnz	x0, LBB0_7
; %bb.1:
	add	x0, sp, #12
	bl	_mp_init
Lloh0:
	adrp	x22, _MP_OKAY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MP_OKAY@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.2:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #1
	bl	_mp_sub_d
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.3:
	add	x0, sp, #12
	mov	w1, #1
	bl	_mp_rshb
	ldr	w8, [x22]
	cmp	w21, w8
	b.eq	LBB0_10
LBB0_4:
	cmp	w21, w8
	b.ne	LBB0_11
LBB0_5:
	add	x0, sp, #12
	bl	_mp_isone
	cbz	x0, LBB0_12
; %bb.6:
	mov	w19, #1
	b	LBB0_13
LBB0_7:
	mov	w19, #-2
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	cmp	w21, w8
	b.ne	LBB0_4
LBB0_10:
	add	x1, sp, #12
	add	x3, sp, #12
	mov	x0, x20
	mov	x2, x19
	bl	_mp_exptmod
	mov	x21, x0
	ldr	w8, [x22]
	cmp	w21, w8
	b.eq	LBB0_5
LBB0_11:
	mov	w19, #-2
	b	LBB0_13
LBB0_12:
	add	x0, sp, #12
	bl	_mp_iszero
	cmp	x0, #0
	csetm	w19, eq
LBB0_13:
	add	x0, sp, #12
	bl	_mp_clear
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MP_OKAY,4,2                    ; @MP_OKAY
.subsections_via_symbols
