	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GF2m_simple_group_set_curve ## -- Begin function ec_GF2m_simple_group_set_curve
	.p2align	4, 0x90
_ec_GF2m_simple_group_set_curve:        ## @ec_GF2m_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_BN_copy
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	movl	$6, %edx
	callq	_BN_GF2m_poly2arr
	orl	$2, %eax
	cmpl	$6, %eax
	jne	LBB0_2
## %bb.3:
	movl	12(%rbx), %edi
	movq	(%rbx), %rdx
	movq	%r12, %rsi
	callq	_BN_GF2m_mod_arr
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movl	12(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	_BN_BITS2@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %esi
	callq	_bn_wexpand
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movl	12(%rbx), %edi
	callq	_bn_set_all_zero
	movl	8(%rbx), %edi
	movq	(%rbx), %rdx
	movq	%r15, %rsi
	callq	_BN_GF2m_mod_arr
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	(%r12), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %esi
	callq	_bn_wexpand
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	8(%rbx), %edi
	callq	_bn_set_all_zero
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_2:
	movq	_EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_UNSUPPORTED_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE,4,2 ## @EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE
	.comm	_EC_R_UNSUPPORTED_FIELD,4,2     ## @EC_R_UNSUPPORTED_FIELD
	.comm	_BN_BITS2,4,2                   ## @BN_BITS2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GF2m_simple_group_set_curve ; -- Begin function ec_GF2m_simple_group_set_curve
	.p2align	2
_ec_GF2m_simple_group_set_curve:        ; @ec_GF2m_simple_group_set_curve
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_BN_copy
	cbz	w0, LBB0_8
; %bb.1:
	ldr	w0, [x19, #16]
	ldr	x1, [x19]
	mov	w2, #6
	bl	_BN_GF2m_poly2arr
	orr	w8, w0, #0x2
	cmp	w8, #6
	b.ne	LBB0_7
; %bb.2:
	ldr	w0, [x19, #12]
	ldr	x2, [x19]
	mov	x1, x21
	bl	_BN_GF2m_mod_arr
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w0, [x19, #12]
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh0:
	adrp	x21, _BN_BITS2@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BN_BITS2@GOTPAGEOFF]
	ldr	w9, [x21]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w1, w8, w9
	bl	_bn_wexpand
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x19, #12]
	bl	_bn_set_all_zero
	ldr	w0, [x19, #8]
	ldr	x2, [x19]
	mov	x1, x20
	bl	_BN_GF2m_mod_arr
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w1, w8, w9
	bl	_bn_wexpand
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w0, [x19, #8]
	bl	_bn_set_all_zero
	mov	w0, #1
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _EC_R_UNSUPPORTED_FIELD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EC_R_UNSUPPORTED_FIELD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE,4,2 ; @EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE
	.comm	_EC_R_UNSUPPORTED_FIELD,4,2     ; @EC_R_UNSUPPORTED_FIELD
	.comm	_BN_BITS2,4,2                   ; @BN_BITS2
.subsections_via_symbols
