	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GFp_simple_group_set_curve  ## -- Begin function ec_GFp_simple_group_set_curve
	.p2align	4, 0x90
_ec_GFp_simple_group_set_curve:         ## @ec_GFp_simple_group_set_curve
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_BN_num_bits
	cmpl	$3, %eax
	jl	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_BN_is_odd
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_INVALID_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_5:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_20
LBB0_6:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_BN_CTX_start
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	callq	_BN_copy
	testl	%eax, %eax
	movl	$0, %r12d
	je	LBB0_19
## %bb.9:
	movq	8(%rbx), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_BN_set_negative
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_BN_nnmod
	testl	%eax, %eax
	je	LBB0_19
## %bb.10:
	movq	24(%rbx), %rax
	movq	32(%rbx), %rsi
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	*%rax
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_19
LBB0_7:
	xorl	%r12d, %r12d
LBB0_19:
	movq	%r13, %rdi
	callq	_BN_CTX_end
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
                                        ## kill: def $r12d killed $r12d killed $r12
LBB0_20:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rsi, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_BN_copy
	testl	%eax, %eax
	je	LBB0_19
LBB0_14:
	movq	16(%rbx), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_BN_nnmod
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	16(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movq	%r13, %rcx
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_19
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$3, %esi
	callq	_BN_add_word
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movq	8(%rbx), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_cmp
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, (%rbx)
	movl	$1, %r12d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE,4,2 ## @EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE
	.comm	_EC_R_INVALID_FIELD,4,2         ## @EC_R_INVALID_FIELD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GFp_simple_group_set_curve  ; -- Begin function ec_GFp_simple_group_set_curve
	.p2align	2
_ec_GFp_simple_group_set_curve:         ; @ec_GFp_simple_group_set_curve
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x25, x2
	mov	x23, x1
	mov	x21, x0
	mov	x0, x1
	bl	_BN_num_bits
	cmp	w0, #3
	b.lt	LBB0_4
; %bb.1:
	mov	x0, x23
	bl	_BN_is_odd
	cbz	w0, LBB0_4
; %bb.2:
	cbz	x19, LBB0_5
; %bb.3:
	mov	x20, #0
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _EC_R_INVALID_FIELD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_R_INVALID_FIELD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w21, #0
	b	LBB0_20
LBB0_5:
	bl	_BN_CTX_new
	mov	x19, x0
	mov	x20, x0
	cbz	x0, LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	cbz	x0, LBB0_18
; %bb.7:
	mov	x24, x0
	ldr	x0, [x21, #8]
	mov	x1, x23
	bl	_BN_copy
	cbz	w0, LBB0_18
; %bb.8:
	ldr	x0, [x21, #8]
	mov	w1, #0
	bl	_BN_set_negative
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x3, x19
	bl	_BN_nnmod
	cbz	w0, LBB0_18
; %bb.9:
	ldp	x8, x1, [x21, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.10:
	mov	x0, x21
	mov	x2, x24
	mov	x3, x19
	blr	x8
	cbnz	w0, LBB0_13
	b	LBB0_18
LBB0_11:
	mov	w21, #0
	b	LBB0_20
LBB0_12:
	mov	x0, x1
	mov	x1, x24
	bl	_BN_copy
	cbz	w0, LBB0_18
LBB0_13:
	ldr	x0, [x21, #16]
	mov	x1, x22
	mov	x2, x23
	mov	x3, x19
	bl	_BN_nnmod
	cbz	w0, LBB0_18
; %bb.14:
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x1, [x21, #16]
	mov	x0, x21
	mov	x2, x1
	mov	x3, x19
	blr	x8
	cbz	w0, LBB0_18
LBB0_16:
	mov	x0, x24
	mov	w1, #3
	bl	_BN_add_word
	cbz	w0, LBB0_18
; %bb.17:
	ldr	x1, [x21, #8]
	mov	x0, x24
	bl	_BN_cmp
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x21]
	mov	w21, #1
	b	LBB0_19
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x20
	bl	_BN_CTX_free
LBB0_20:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE,4,2 ; @EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE
	.comm	_EC_R_INVALID_FIELD,4,2         ; @EC_R_INVALID_FIELD
.subsections_via_symbols
