	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BN_to_felem
_BN_to_felem:                           ## @BN_to_felem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	%rsi, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EC_F_BN_TO_FELEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_BIGNUM_OUT_OF_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_BN_bn2lebinpad
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%r14d, %edi
	callq	_bin28_to_felem
	movl	$1, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_BN_TO_FELEM,4,2           ## @EC_F_BN_TO_FELEM
	.comm	_EC_R_BIGNUM_OUT_OF_RANGE,4,2   ## @EC_R_BIGNUM_OUT_OF_RANGE
	.no_dead_strip	_BN_to_felem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BN_to_felem
_BN_to_felem:                           ; @BN_to_felem
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_BN_is_negative
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EC_F_BN_TO_FELEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_F_BN_TO_FELEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _EC_R_BIGNUM_OUT_OF_RANGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_R_BIGNUM_OUT_OF_RANGE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	mov	w2, #4
	bl	_BN_bn2lebinpad
	tbnz	w0, #31, LBB0_1
; %bb.3:
	mov	x0, x19
	bl	_bin28_to_felem
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_BN_TO_FELEM,4,2           ; @EC_F_BN_TO_FELEM
	.comm	_EC_R_BIGNUM_OUT_OF_RANGE,4,2   ; @EC_R_BIGNUM_OUT_OF_RANGE
	.no_dead_strip	_BN_to_felem
.subsections_via_symbols
