	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DH_check                       ## -- Begin function DH_check
	.p2align	4, 0x90
_DH_check:                              ## @DH_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	%rsi, %r14
	movq	%rdi, %r15
	callq	_DH_check_params
	xorl	%r13d, %r13d
	testl	%eax, %eax
	je	LBB0_30
## %bb.1:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_29
## %bb.2:
	movq	%rbx, %rdi
	callq	_BN_CTX_start
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	testq	%rax, %rax
	je	LBB0_29
## %bb.3:
	cmpq	$0, 8(%r15)
	je	LBB0_19
## %bb.4:
	movq	%rax, %r12
	movq	24(%r15), %r13
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_BN_cmp
	testq	%rax, %rax
	jle	LBB0_9
## %bb.5:
	movq	(%r15), %rsi
	movq	24(%r15), %rdi
	callq	_BN_cmp
	testq	%rax, %rax
	js	LBB0_6
LBB0_9:
	movq	_DH_NOT_SUITABLE_GENERATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_10:
	movq	8(%r15), %rdi
	movq	_DH_NUMBER_ITERATIONS_FOR_PRIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_BN_is_prime_ex
	testl	%eax, %eax
	js	LBB0_29
## %bb.11:
	jne	LBB0_13
## %bb.12:
	movq	_DH_CHECK_Q_NOT_PRIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_13:
	movq	(%r15), %rdx
	movq	8(%r15), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %r8
	callq	_BN_div
	testl	%eax, %eax
	je	LBB0_29
## %bb.14:
	movq	%r12, %rdi
	callq	_BN_is_one
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	_DH_CHECK_INVALID_Q_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_16:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.17:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_BN_cmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	_DH_CHECK_INVALID_J_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_19:
	movq	(%r15), %rdi
	movq	_DH_NUMBER_ITERATIONS_FOR_PRIME@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%r13d, %r13d
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_BN_is_prime_ex
	testl	%eax, %eax
	js	LBB0_29
## %bb.20:
	je	LBB0_21
## %bb.22:
	cmpq	$0, 8(%r15)
	jne	LBB0_28
## %bb.23:
	movq	(%r15), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_rshift1
	testl	%eax, %eax
	je	LBB0_29
## %bb.24:
	movl	(%r12), %esi
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_BN_is_prime_ex
	testl	%eax, %eax
	js	LBB0_29
## %bb.25:
	movl	$1, %r13d
	jne	LBB0_29
## %bb.26:
	movq	_DH_CHECK_P_NOT_SAFE_PRIME@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_6:
	movq	24(%r15), %rsi
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%rbx, %r8
	callq	_BN_mod_exp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	callq	_BN_is_one
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_9
LBB0_21:
	movq	_DH_CHECK_P_NOT_PRIME@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_28:
	movl	$1, %r13d
LBB0_29:
	movq	%rbx, %rdi
	callq	_BN_CTX_end
	movq	%rbx, %rdi
	callq	_BN_CTX_free
LBB0_30:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r13d, %r13d
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_DH_NOT_SUITABLE_GENERATOR,4,2  ## @DH_NOT_SUITABLE_GENERATOR
	.comm	_DH_NUMBER_ITERATIONS_FOR_PRIME,4,2 ## @DH_NUMBER_ITERATIONS_FOR_PRIME
	.comm	_DH_CHECK_Q_NOT_PRIME,4,2       ## @DH_CHECK_Q_NOT_PRIME
	.comm	_DH_CHECK_INVALID_Q_VALUE,4,2   ## @DH_CHECK_INVALID_Q_VALUE
	.comm	_DH_CHECK_INVALID_J_VALUE,4,2   ## @DH_CHECK_INVALID_J_VALUE
	.comm	_DH_CHECK_P_NOT_PRIME,4,2       ## @DH_CHECK_P_NOT_PRIME
	.comm	_DH_CHECK_P_NOT_SAFE_PRIME,4,2  ## @DH_CHECK_P_NOT_SAFE_PRIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DH_check                       ; -- Begin function DH_check
	.p2align	2
_DH_check:                              ; @DH_check
	.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	x20, x1
	mov	x21, x0
	bl	_DH_check_params
	cbz	w0, LBB0_23
; %bb.1:
	bl	_BN_CTX_new
	mov	x19, x0
	cbz	x0, LBB0_26
; %bb.2:
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x22, x0
	mov	x0, x19
	bl	_BN_CTX_get
	cbz	x0, LBB0_26
; %bb.3:
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x25, _DH_NUMBER_ITERATIONS_FOR_PRIME@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DH_NUMBER_ITERATIONS_FOR_PRIME@GOTPAGEOFF]
	cbz	x8, LBB0_16
; %bb.4:
	mov	x23, x0
	ldr	x24, [x21, #24]
	bl	_BN_value_one
	mov	x1, x0
	mov	x0, x24
	bl	_BN_cmp
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.5:
	ldr	x0, [x21, #24]
	ldr	x1, [x21]
	bl	_BN_cmp
	tbnz	x0, #63, LBB0_24
LBB0_6:
Lloh2:
	adrp	x8, _DH_NOT_SUITABLE_GENERATOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DH_NOT_SUITABLE_GENERATOR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_7:
	ldr	x0, [x21, #8]
	ldr	w1, [x25]
	mov	x2, x19
	mov	x3, #0
	bl	_BN_is_prime_ex
	tbnz	w0, #31, LBB0_26
; %bb.8:
	cbnz	w0, LBB0_10
; %bb.9:
Lloh5:
	adrp	x8, _DH_CHECK_Q_NOT_PRIME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DH_CHECK_Q_NOT_PRIME@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_10:
	ldp	x2, x3, [x21]
	mov	x0, x22
	mov	x1, x23
	mov	x4, x19
	bl	_BN_div
	cbz	w0, LBB0_26
; %bb.11:
	mov	x0, x23
	bl	_BN_is_one
	cbnz	w0, LBB0_13
; %bb.12:
Lloh8:
	adrp	x8, _DH_CHECK_INVALID_Q_VALUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DH_CHECK_INVALID_Q_VALUE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_13:
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_16
; %bb.14:
	mov	x1, x22
	bl	_BN_cmp
	cbz	x0, LBB0_16
; %bb.15:
Lloh11:
	adrp	x8, _DH_CHECK_INVALID_J_VALUE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DH_CHECK_INVALID_J_VALUE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_16:
	ldr	x0, [x21]
	ldr	w1, [x25]
	mov	x2, x19
	mov	x3, #0
	bl	_BN_is_prime_ex
	tbnz	w0, #31, LBB0_26
; %bb.17:
	cbz	w0, LBB0_29
; %bb.18:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_31
; %bb.19:
	ldr	x1, [x21]
	mov	x0, x22
	bl	_BN_rshift1
	cbz	w0, LBB0_26
; %bb.20:
	ldr	w1, [x25]
	mov	x0, x22
	mov	x2, x19
	mov	x3, #0
	bl	_BN_is_prime_ex
	tbnz	w0, #31, LBB0_26
; %bb.21:
	cbnz	w0, LBB0_31
; %bb.22:
Lloh14:
	adrp	x8, _DH_CHECK_P_NOT_SAFE_PRIME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DH_CHECK_P_NOT_SAFE_PRIME@GOTPAGEOFF]
	b	LBB0_30
LBB0_23:
	mov	w20, #0
	b	LBB0_28
LBB0_24:
	ldr	x1, [x21, #24]
	ldp	x3, x2, [x21]
	mov	x0, x22
	mov	x4, x19
	bl	_BN_mod_exp
	cbz	w0, LBB0_26
; %bb.25:
	mov	x0, x22
	bl	_BN_is_one
	cbnz	w0, LBB0_7
	b	LBB0_6
LBB0_26:
	mov	w20, #0
LBB0_27:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x19
	bl	_BN_CTX_free
LBB0_28:
	mov	x0, x20
	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
LBB0_29:
Lloh16:
	adrp	x8, _DH_CHECK_P_NOT_PRIME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DH_CHECK_P_NOT_PRIME@GOTPAGEOFF]
LBB0_30:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_31:
	mov	w20, #1
	b	LBB0_27
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DH_NOT_SUITABLE_GENERATOR,4,2  ; @DH_NOT_SUITABLE_GENERATOR
	.comm	_DH_NUMBER_ITERATIONS_FOR_PRIME,4,2 ; @DH_NUMBER_ITERATIONS_FOR_PRIME
	.comm	_DH_CHECK_Q_NOT_PRIME,4,2       ; @DH_CHECK_Q_NOT_PRIME
	.comm	_DH_CHECK_INVALID_Q_VALUE,4,2   ; @DH_CHECK_INVALID_Q_VALUE
	.comm	_DH_CHECK_INVALID_J_VALUE,4,2   ; @DH_CHECK_INVALID_J_VALUE
	.comm	_DH_CHECK_P_NOT_PRIME,4,2       ; @DH_CHECK_P_NOT_PRIME
	.comm	_DH_CHECK_P_NOT_SAFE_PRIME,4,2  ; @DH_CHECK_P_NOT_SAFE_PRIME
.subsections_via_symbols
