	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dh_generate_key
_dh_generate_key:                       ## @dh_generate_key
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_bn_num_bytes
	movl	%eax, %ebx
	xorl	%eax, %eax
	cmpl	$2, %ebx
	jl	LBB0_9
## %bb.1:
	decl	%ebx
	movq	_MAX_BYTES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jg	LBB0_9
## %bb.2:
	movq	16(%r14), %rdi
	callq	_bn_new
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.3:
	shll	$3, %ebx
	movl	%ebx, %esi
	callq	_bn_random
	movq	(%r14), %rdi
	callq	_bn_new
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.4:
	movl	24(%r14), %esi
	movq	16(%r14), %rdx
	movl	8(%r14), %ecx
	callq	_bn_modexp
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	movq	(%r14), %rax
	jmp	LBB0_9
LBB0_7:
	movq	16(%r14), %rdi
	callq	_bn_free
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BYTES,4,2                  ## @MAX_BYTES
	.no_dead_strip	_dh_generate_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dh_generate_key
_dh_generate_key:                       ; @dh_generate_key
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_bn_num_bytes
	sub	w20, w0, #1
Lloh0:
	adrp	x8, _MAX_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #2
	ccmp	w20, w8, #0, ge
	b.le	LBB0_2
LBB0_1:
	mov	x0, #0
	b	LBB0_6
LBB0_2:
	ldr	x0, [x19, #16]
	bl	_bn_new
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.3:
	lsl	w1, w20, #3
	bl	_bn_random
	ldr	x0, [x19]
	bl	_bn_new
	ldr	x0, [x19]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w1, [x19, #24]
	ldr	x2, [x19, #16]
	ldr	w3, [x19, #8]
	bl	_bn_modexp
	tbnz	x0, #63, LBB0_1
; %bb.5:
	ldr	x0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x0, [x19, #16]
	bl	_bn_free
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BYTES,4,2                  ; @MAX_BYTES
	.no_dead_strip	_dh_generate_key
.subsections_via_symbols
