	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EC_GROUP_check                 ## -- Begin function EC_GROUP_check
	.p2align	4, 0x90
_EC_GROUP_check:                        ## @EC_GROUP_check
	.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
	movq	8(%rdi), %rax
	movq	_EC_FLAGS_CUSTOM_CURVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$1, %ebx
	testl	%ecx, (%rax)
	jne	LBB0_18
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %r13
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_3:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r12
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_13
LBB0_4:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_EC_GROUP_check_discriminant
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.6:
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_EC_POINT_is_on_curve
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jle	LBB0_14
## %bb.7:
	movq	%r13, %rdi
	callq	_EC_POINT_new
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_EC_GROUP_get0_order
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	je	LBB0_20
## %bb.10:
	movq	_EC_R_UNDEFINED_ORDER@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_11:
	movq	_EC_R_DISCRIMINANT_IS_ZERO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_EC_R_UNDEFINED_GENERATOR@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_14:
	movq	_EC_R_POINT_IS_NOT_ON_CURVE@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r15d, %r15d
LBB0_16:
	movq	_EC_F_EC_GROUP_CHECK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%ebx, %ebx
LBB0_17:
	movq	%r14, %rdi
	callq	_BN_CTX_free
	movq	%r15, %rdi
	callq	_EC_POINT_free
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_20:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_EC_POINT_mul
	testl	%eax, %eax
	je	LBB0_17
## %bb.21:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_EC_POINT_is_at_infinity
	movl	$1, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.22:
	movq	_EC_R_INVALID_GROUP_ORDER@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_FLAGS_CUSTOM_CURVE,4,2      ## @EC_FLAGS_CUSTOM_CURVE
	.comm	_EC_F_EC_GROUP_CHECK,4,2        ## @EC_F_EC_GROUP_CHECK
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_EC_R_DISCRIMINANT_IS_ZERO,4,2  ## @EC_R_DISCRIMINANT_IS_ZERO
	.comm	_EC_R_UNDEFINED_GENERATOR,4,2   ## @EC_R_UNDEFINED_GENERATOR
	.comm	_EC_R_POINT_IS_NOT_ON_CURVE,4,2 ## @EC_R_POINT_IS_NOT_ON_CURVE
	.comm	_EC_R_UNDEFINED_ORDER,4,2       ## @EC_R_UNDEFINED_ORDER
	.comm	_EC_R_INVALID_GROUP_ORDER,4,2   ## @EC_R_INVALID_GROUP_ORDER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EC_GROUP_check                 ; -- Begin function EC_GROUP_check
	.p2align	2
_EC_GROUP_check:                        ; @EC_GROUP_check
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _EC_FLAGS_CUSTOM_CURVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EC_FLAGS_CUSTOM_CURVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w21, #1
	b	LBB0_19
LBB0_2:
	mov	x22, x1
	mov	x21, x0
	cbz	x1, LBB0_4
; %bb.3:
	mov	x19, #0
	b	LBB0_5
LBB0_4:
	bl	_BN_CTX_new
	mov	x22, x0
	mov	x19, x0
	cbz	x0, LBB0_14
LBB0_5:
	mov	x0, x21
	mov	x1, x22
	bl	_EC_GROUP_check_discriminant
	cbz	w0, LBB0_12
; %bb.6:
	ldr	x1, [x21]
	cbz	x1, LBB0_13
; %bb.7:
	mov	x0, x21
	mov	x2, x22
	bl	_EC_POINT_is_on_curve
	cmp	x0, #1
	b.lt	LBB0_15
; %bb.8:
	mov	x0, x21
	bl	_EC_POINT_new
	mov	x20, x0
	cbz	x0, LBB0_17
; %bb.9:
	mov	x0, x21
	bl	_EC_GROUP_get0_order
	cbz	x0, LBB0_17
; %bb.10:
	mov	x23, x0
	bl	_BN_is_zero
	cbz	x0, LBB0_20
; %bb.11:
Lloh3:
	adrp	x8, _EC_R_UNDEFINED_ORDER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_R_UNDEFINED_ORDER@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
	mov	x20, #0
Lloh5:
	adrp	x8, _EC_R_DISCRIMINANT_IS_ZERO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EC_R_DISCRIMINANT_IS_ZERO@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	mov	x20, #0
Lloh7:
	adrp	x8, _EC_R_UNDEFINED_GENERATOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EC_R_UNDEFINED_GENERATOR@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	mov	x20, #0
Lloh9:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
	mov	x20, #0
Lloh11:
	adrp	x8, _EC_R_POINT_IS_NOT_ON_CURVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EC_R_POINT_IS_NOT_ON_CURVE@GOTPAGEOFF]
LBB0_16:
Lloh13:
	adrp	x9, _EC_F_EC_GROUP_CHECK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EC_F_EC_GROUP_CHECK@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x9]
	ldr	w1, [x8]
	bl	_ECerr
LBB0_17:
	mov	w21, #0
LBB0_18:
	mov	x0, x19
	bl	_BN_CTX_free
	mov	x0, x20
	bl	_EC_POINT_free
LBB0_19:
	mov	x0, x21
	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_20:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, #0
	mov	x4, #0
	mov	x5, x22
	bl	_EC_POINT_mul
	cbz	w0, LBB0_17
; %bb.21:
	mov	x0, x21
	mov	x1, x20
	bl	_EC_POINT_is_at_infinity
	cbz	w0, LBB0_23
; %bb.22:
	mov	w21, #1
	b	LBB0_18
LBB0_23:
Lloh16:
	adrp	x8, _EC_R_INVALID_GROUP_ORDER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EC_R_INVALID_GROUP_ORDER@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_FLAGS_CUSTOM_CURVE,4,2      ; @EC_FLAGS_CUSTOM_CURVE
	.comm	_EC_F_EC_GROUP_CHECK,4,2        ; @EC_F_EC_GROUP_CHECK
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_EC_R_DISCRIMINANT_IS_ZERO,4,2  ; @EC_R_DISCRIMINANT_IS_ZERO
	.comm	_EC_R_UNDEFINED_GENERATOR,4,2   ; @EC_R_UNDEFINED_GENERATOR
	.comm	_EC_R_POINT_IS_NOT_ON_CURVE,4,2 ; @EC_R_POINT_IS_NOT_ON_CURVE
	.comm	_EC_R_UNDEFINED_ORDER,4,2       ; @EC_R_UNDEFINED_ORDER
	.comm	_EC_R_INVALID_GROUP_ORDER,4,2   ; @EC_R_INVALID_GROUP_ORDER
.subsections_via_symbols
