	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EC_GROUP_set_generator         ## -- Begin function EC_GROUP_set_generator
	.p2align	4, 0x90
_EC_GROUP_set_generator:                ## @EC_GROUP_set_generator
	.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
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r12
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	24(%r12), %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:
	movq	_EC_F_EC_GROUP_SET_GENERATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_INVALID_FIELD@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_EC_F_EC_GROUP_SET_GENERATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_PASSED_NULL_PARAMETER@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	callq	_ECerr
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	testq	%r15, %r15
	je	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:
	movq	%r15, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_BN_num_bits
	movq	%rax, %r13
	movq	24(%r12), %rdi
	callq	_BN_num_bits
	incq	%rax
	cmpq	%rax, %r13
	jle	LBB0_14
LBB0_13:
	movq	_EC_F_EC_GROUP_SET_GENERATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_INVALID_GROUP_ORDER@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_14:
	testq	%r14, %r14
	je	LBB0_17
## %bb.15:
	movq	%r14, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_EC_F_EC_GROUP_SET_GENERATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_UNKNOWN_COFACTOR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_17:
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	callq	_EC_POINT_new
	movq	%rax, %rdi
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_7
LBB0_19:
	movq	%rbx, %rsi
	callq	_EC_POINT_copy
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.20:
	movl	8(%r12), %edi
	movq	%r15, %rsi
	callq	_BN_copy
	testl	%eax, %eax
	je	LBB0_8
## %bb.21:
	testq	%r14, %r14
	je	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	je	LBB0_26
LBB0_23:
	movq	%r12, %rdi
	callq	_ec_guess_cofactor
	testl	%eax, %eax
	jne	LBB0_27
## %bb.24:
	movl	12(%r12), %edi
	callq	_BN_zero
	jmp	LBB0_8
LBB0_26:
	movl	12(%r12), %edi
	movq	%r14, %rsi
	callq	_BN_copy
	testl	%eax, %eax
	je	LBB0_8
LBB0_27:
	movl	8(%r12), %edi
	callq	_BN_is_odd
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ec_precompute_mont_data        ## TAILCALL
LBB0_29:
	movq	(%r12), %rdi
	callq	_BN_MONT_CTX_free
	movq	$0, (%r12)
	movl	$1, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_EC_GROUP_SET_GENERATOR,4,2 ## @EC_F_EC_GROUP_SET_GENERATOR
	.comm	_ERR_R_PASSED_NULL_PARAMETER,4,2 ## @ERR_R_PASSED_NULL_PARAMETER
	.comm	_EC_R_INVALID_FIELD,4,2         ## @EC_R_INVALID_FIELD
	.comm	_EC_R_INVALID_GROUP_ORDER,4,2   ## @EC_R_INVALID_GROUP_ORDER
	.comm	_EC_R_UNKNOWN_COFACTOR,4,2      ## @EC_R_UNKNOWN_COFACTOR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EC_GROUP_set_generator         ; -- Begin function EC_GROUP_set_generator
	.p2align	2
_EC_GROUP_set_generator:                ; @EC_GROUP_set_generator
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_BN_is_zero
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #24]
	bl	_BN_is_negative
	cbz	x0, LBB0_9
LBB0_4:
Lloh0:
	adrp	x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _EC_R_INVALID_FIELD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_R_INVALID_FIELD@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ERR_R_PASSED_NULL_PARAMETER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_R_PASSED_NULL_PARAMETER@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	bl	_ECerr
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	cbz	x21, LBB0_13
; %bb.10:
	mov	x0, x21
	bl	_BN_is_zero
	cbnz	x0, LBB0_13
; %bb.11:
	mov	x0, x21
	bl	_BN_is_negative
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_BN_num_bits
	mov	x23, x0
	ldr	x0, [x19, #24]
	bl	_BN_num_bits
	add	x8, x0, #1
	cmp	x23, x8
	b.le	LBB0_14
LBB0_13:
Lloh10:
	adrp	x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _EC_R_INVALID_GROUP_ORDER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EC_R_INVALID_GROUP_ORDER@GOTPAGEOFF]
	b	LBB0_6
LBB0_14:
	cbz	x20, LBB0_17
; %bb.15:
	mov	x0, x20
	bl	_BN_is_negative
	cbz	x0, LBB0_17
; %bb.16:
Lloh15:
	adrp	x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EC_F_EC_GROUP_SET_GENERATOR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _EC_R_UNKNOWN_COFACTOR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EC_R_UNKNOWN_COFACTOR@GOTPAGEOFF]
	b	LBB0_6
LBB0_17:
	ldr	x0, [x19, #16]
	cbnz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_EC_POINT_new
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
LBB0_19:
	mov	x1, x22
	bl	_EC_POINT_copy
	cbz	w0, LBB0_8
; %bb.20:
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_BN_copy
	cbz	w0, LBB0_8
; %bb.21:
	cbz	x20, LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_BN_is_zero
	cbz	x0, LBB0_25
LBB0_23:
	mov	x0, x19
	bl	_ec_guess_cofactor
	cbnz	w0, LBB0_26
; %bb.24:
	ldr	w0, [x19, #12]
	bl	_BN_zero
	b	LBB0_7
LBB0_25:
	ldr	w0, [x19, #12]
	mov	x1, x20
	bl	_BN_copy
	cbz	w0, LBB0_8
LBB0_26:
	ldr	w0, [x19, #8]
	bl	_BN_is_odd
	cbz	x0, LBB0_28
; %bb.27:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ec_precompute_mont_data
LBB0_28:
	ldr	x0, [x19]
	bl	_BN_MONT_CTX_free
	str	xzr, [x19]
	mov	w0, #1
	b	LBB0_8
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_EC_GROUP_SET_GENERATOR,4,2 ; @EC_F_EC_GROUP_SET_GENERATOR
	.comm	_ERR_R_PASSED_NULL_PARAMETER,4,2 ; @ERR_R_PASSED_NULL_PARAMETER
	.comm	_EC_R_INVALID_FIELD,4,2         ; @EC_R_INVALID_FIELD
	.comm	_EC_R_INVALID_GROUP_ORDER,4,2   ; @EC_R_INVALID_GROUP_ORDER
	.comm	_EC_R_UNKNOWN_COFACTOR,4,2      ; @EC_R_UNKNOWN_COFACTOR
.subsections_via_symbols
