	.file	"extr_ec_lib.c_EC_GROUP_set_generator.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	EC_GROUP_set_generator
	.type	EC_GROUP_set_generator, @function
EC_GROUP_set_generator:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	test	rsi, rsi
	je	.L34
	mov	rbp, rdi
	mov	rdi, QWORD PTR 24[rdi]
	test	rdi, rdi
	je	.L5
	mov	r14, rdx
	mov	r13, rcx
	call	BN_is_zero@PLT
	test	rax, rax
	je	.L35
.L5:
	mov	esi, DWORD PTR EC_R_INVALID_FIELD[rip]
	mov	edi, DWORD PTR EC_F_EC_GROUP_SET_GENERATOR[rip]
	xor	r12d, r12d
	call	ECerr@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	mov	rdi, QWORD PTR 24[rbp]
	call	BN_is_negative@PLT
	test	rax, rax
	jne	.L5
	test	r14, r14
	je	.L7
	mov	rdi, r14
	call	BN_is_zero@PLT
	test	rax, rax
	jne	.L7
	mov	rdi, r14
	call	BN_is_negative@PLT
	test	rax, rax
	je	.L36
.L7:
	mov	esi, DWORD PTR EC_R_INVALID_GROUP_ORDER[rip]
	mov	edi, DWORD PTR EC_F_EC_GROUP_SET_GENERATOR[rip]
	xor	r12d, r12d
	call	ECerr@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	mov	esi, DWORD PTR ERR_R_PASSED_NULL_PARAMETER[rip]
	mov	edi, DWORD PTR EC_F_EC_GROUP_SET_GENERATOR[rip]
	call	ECerr@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rdi, r14
	call	BN_num_bits@PLT
	mov	rdi, QWORD PTR 24[rbp]
	mov	rbx, rax
	call	BN_num_bits@PLT
	add	rax, 1
	cmp	rbx, rax
	jg	.L7
	test	r13, r13
	je	.L8
	mov	rdi, r13
	call	BN_is_negative@PLT
	test	rax, rax
	jne	.L37
.L8:
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L38
.L9:
	mov	rsi, r12
	call	EC_POINT_copy@PLT
	test	eax, eax
	je	.L10
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r14
	call	BN_copy@PLT
	test	eax, eax
	je	.L10
	test	r13, r13
	je	.L11
	mov	rdi, r13
	call	BN_is_zero@PLT
	test	rax, rax
	je	.L39
.L11:
	mov	rdi, rbp
	call	ec_guess_cofactor@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L40
.L12:
	mov	edi, DWORD PTR 8[rbp]
	call	BN_is_odd@PLT
	test	rax, rax
	jne	.L41
	mov	rdi, QWORD PTR 0[rbp]
	mov	r12d, 1
	call	BN_MONT_CTX_free@PLT
	mov	QWORD PTR 0[rbp], 0
	jmp	.L1
.L39:
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, r13
	call	BN_copy@PLT
	test	eax, eax
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	xor	r12d, r12d
	jmp	.L1
.L38:
	mov	rdi, rbp
	call	EC_POINT_new@PLT
	mov	QWORD PTR 16[rbp], rax
	mov	rdi, rax
	test	rax, rax
	jne	.L9
	jmp	.L10
.L37:
	mov	esi, DWORD PTR EC_R_UNKNOWN_COFACTOR[rip]
	mov	edi, DWORD PTR EC_F_EC_GROUP_SET_GENERATOR[rip]
	xor	r12d, r12d
	call	ECerr@PLT
	jmp	.L1
.L41:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	ec_precompute_mont_data@PLT
.L40:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	call	BN_zero@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	EC_GROUP_set_generator, .-EC_GROUP_set_generator
	.comm	ERR_R_PASSED_NULL_PARAMETER,4,4
	.comm	EC_R_UNKNOWN_COFACTOR,4,4
	.comm	EC_R_INVALID_GROUP_ORDER,4,4
	.comm	EC_R_INVALID_FIELD,4,4
	.comm	EC_F_EC_GROUP_SET_GENERATOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ec_lib.c_EC_GROUP_set_generator.c"
	.text
	.align	2
	.global	EC_GROUP_set_generator
	.syntax unified
	.arm
	.fpu softvfp
	.type	EC_GROUP_set_generator, %function
EC_GROUP_set_generator:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r7, r1, #0
	beq	.L36
	mov	r4, r0
	ldr	r0, [r0, #16]
	cmp	r0, #0
	beq	.L5
	mov	r6, r2
	mov	r8, r3
	bl	BN_is_zero
	cmp	r0, #0
	beq	.L37
.L5:
	ldr	r2, .L44
.L33:
	ldr	r3, .L44+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
.L34:
	mov	r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L37:
	ldr	r0, [r4, #16]
	bl	BN_is_negative
	subs	r5, r0, #0
	bne	.L5
	cmp	r6, #0
	beq	.L7
	mov	r0, r6
	bl	BN_is_zero
	cmp	r0, #0
	bne	.L7
	mov	r0, r6
	bl	BN_is_negative
	cmp	r0, #0
	beq	.L38
.L7:
	ldr	r2, .L44+8
	ldr	r3, .L44+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	ECerr
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L36:
	ldr	r2, .L44+12
	ldr	r3, .L44+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r5, r7
	bl	ECerr
	b	.L1
.L38:
	mov	r0, r6
	bl	BN_num_bits
	mov	r9, r0
	ldr	r0, [r4, #16]
	bl	BN_num_bits
	add	r3, r0, #1
	cmp	r9, r3
	bgt	.L7
	cmp	r8, #0
	beq	.L8
	mov	r0, r8
	bl	BN_is_negative
	cmp	r0, #0
	bne	.L39
.L8:
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L40
.L9:
	mov	r1, r7
	bl	EC_POINT_copy
	cmp	r0, #0
	beq	.L34
	mov	r1, r6
	ldr	r0, [r4, #4]
	bl	BN_copy
	cmp	r0, #0
	beq	.L34
	cmp	r8, #0
	beq	.L11
	mov	r0, r8
	bl	BN_is_zero
	cmp	r0, #0
	beq	.L41
.L11:
	mov	r0, r4
	bl	ec_guess_cofactor
	subs	r5, r0, #0
	beq	.L42
.L12:
	ldr	r0, [r4, #4]
	bl	BN_is_odd
	subs	r6, r0, #0
	bne	.L43
	ldr	r0, [r4]
	bl	BN_MONT_CTX_free
	mov	r5, #1
	str	r6, [r4]
	b	.L1
.L40:
	mov	r0, r4
	bl	EC_POINT_new
	cmp	r0, #0
	str	r0, [r4, #12]
	bne	.L9
	b	.L34
.L39:
	ldr	r2, .L44+16
	b	.L33
.L43:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	ec_precompute_mont_data
.L41:
	mov	r1, r8
	ldr	r0, [r4, #8]
	bl	BN_copy
	cmp	r0, #0
	bne	.L12
	b	.L34
.L42:
	ldr	r0, [r4, #8]
	bl	BN_zero
	b	.L1
.L45:
	.align	2
.L44:
	.word	EC_R_INVALID_FIELD
	.word	EC_F_EC_GROUP_SET_GENERATOR
	.word	EC_R_INVALID_GROUP_ORDER
	.word	ERR_R_PASSED_NULL_PARAMETER
	.word	EC_R_UNKNOWN_COFACTOR
	.size	EC_GROUP_set_generator, .-EC_GROUP_set_generator
	.comm	ERR_R_PASSED_NULL_PARAMETER,4,4
	.comm	EC_R_UNKNOWN_COFACTOR,4,4
	.comm	EC_R_INVALID_GROUP_ORDER,4,4
	.comm	EC_R_INVALID_FIELD,4,4
	.comm	EC_F_EC_GROUP_SET_GENERATOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
