	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_key
_generate_key:                          ## @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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_BN_num_bits
	movq	_OPENSSL_DH_MAX_MODULUS_BITS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_2
## %bb.1:
	movq	_DH_F_GENERATE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_MODULUS_TOO_LARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DHerr
	xorl	%r14d, %r14d
	jmp	LBB0_33
LBB0_2:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	8(%rbx), %r15
	movq	%r15, %r12
	testq	%r15, %r15
	jne	LBB0_9
## %bb.8:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_secure_new
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_4
LBB0_9:
	movq	16(%rbx), %r13
	testq	%r13, %r13
	jne	LBB0_12
## %bb.10:
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_11
LBB0_12:
	movq	_DH_FLAG_CACHE_MONT_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_13
## %bb.14:
	leaq	48(%rbx), %rdi
	movl	24(%rbx), %edx
	movl	44(%rbx), %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_BN_MONT_CTX_set_locked
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_5
LBB0_3:
	xorl	%r13d, %r13d
LBB0_4:
	xorl	%r12d, %r12d
LBB0_5:
	movq	_DH_F_GENERATE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_BN_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DHerr
	cmpq	16(%rbx), %r13
	je	LBB0_30
## %bb.6:
	movq	%r13, %rdi
	callq	_BN_free
LBB0_30:
	cmpq	8(%rbx), %r12
	je	LBB0_32
LBB0_31:
	movq	%r12, %rdi
	callq	_BN_free
LBB0_32:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
LBB0_33:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%eax, %eax
LBB0_15:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_16
LBB0_27:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.28:
	movq	%rax, %r15
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_BN_with_flags
	movq	32(%rbx), %rax
	movl	24(%rbx), %r8d
	movl	28(%rbx), %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rsp)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rcx
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	callq	*(%rax)
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_BN_clear_free
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.29:
	movq	%r13, 16(%rbx)
	movq	%r12, 8(%rbx)
	movl	$1, %r14d
	cmpq	8(%rbx), %r12
	jne	LBB0_31
	jmp	LBB0_32
LBB0_16:
	movl	40(%rbx), %esi
	testl	%esi, %esi
	jne	LBB0_17
## %bb.21:
	movl	4(%rbx), %esi
	testl	%esi, %esi
	jne	LBB0_23
## %bb.22:
	movl	24(%rbx), %edi
	callq	_BN_num_bits
	movl	%eax, %esi
	decl	%esi
LBB0_23:
	movq	_BN_RAND_TOP_ONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BN_RAND_BOTTOM_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_BN_priv_rand
	testl	%eax, %eax
	je	LBB0_5
## %bb.24:
	movl	28(%rbx), %edi
	movq	_DH_GENERATOR_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BN_is_word
	testq	%rax, %rax
	je	LBB0_27
## %bb.25:
	movl	24(%rbx), %edi
	movl	$2, %esi
	callq	_BN_is_bit_set
	testl	%eax, %eax
	jne	LBB0_27
## %bb.26:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_BN_clear_bit
	testl	%eax, %eax
	jne	LBB0_27
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	40(%rbx), %esi
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_BN_priv_rand_range
	testl	%eax, %eax
	je	LBB0_5
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r12, %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r12, %rdi
	callq	_BN_is_one
	testq	%rax, %rax
	jne	LBB0_20
	jmp	LBB0_27
LBB0_11:
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_OPENSSL_DH_MAX_MODULUS_BITS,4,2 ## @OPENSSL_DH_MAX_MODULUS_BITS
	.comm	_DH_F_GENERATE_KEY,4,2          ## @DH_F_GENERATE_KEY
	.comm	_DH_R_MODULUS_TOO_LARGE,4,2     ## @DH_R_MODULUS_TOO_LARGE
	.comm	_DH_FLAG_CACHE_MONT_P,4,2       ## @DH_FLAG_CACHE_MONT_P
	.comm	_BN_RAND_TOP_ONE,4,2            ## @BN_RAND_TOP_ONE
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ## @BN_RAND_BOTTOM_ANY
	.comm	_DH_GENERATOR_2,4,2             ## @DH_GENERATOR_2
	.comm	_BN_FLG_CONSTTIME,4,2           ## @BN_FLG_CONSTTIME
	.comm	_ERR_R_BN_LIB,4,2               ## @ERR_R_BN_LIB
	.no_dead_strip	_generate_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_key
_generate_key:                          ; @generate_key
	.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
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_BN_num_bits
Lloh0:
	adrp	x8, _OPENSSL_DH_MAX_MODULUS_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPENSSL_DH_MAX_MODULUS_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DH_F_GENERATE_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DH_F_GENERATE_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _DH_R_MODULUS_TOO_LARGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DH_R_MODULUS_TOO_LARGE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_DHerr
	mov	w22, #0
	b	LBB0_33
LBB0_2:
	bl	_BN_CTX_new
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.3:
	ldr	x24, [x19, #8]
	mov	x21, x24
	cbnz	x24, LBB0_5
; %bb.4:
	bl	_BN_secure_new
	mov	x21, x0
	cbz	x0, LBB0_26
LBB0_5:
	ldr	x22, [x19, #16]
	cbnz	x22, LBB0_7
; %bb.6:
	bl	_BN_new
	mov	x22, x0
	cbz	x0, LBB0_27
LBB0_7:
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _DH_FLAG_CACHE_MONT_P@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DH_FLAG_CACHE_MONT_P@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	add	x0, x19, #48
	ldr	w1, [x19, #44]
	ldr	w2, [x19, #24]
	mov	x3, x20
	bl	_BN_MONT_CTX_set_locked
	mov	x23, x0
	cbz	x0, LBB0_27
; %bb.9:
	cbnz	x24, LBB0_12
	b	LBB0_15
LBB0_10:
	mov	x22, #0
	mov	x21, #0
	b	LBB0_27
LBB0_11:
	mov	x23, #0
	cbz	x24, LBB0_15
LBB0_12:
	bl	_BN_new
	cbz	x0, LBB0_27
; %bb.13:
	mov	x24, x0
Lloh12:
	adrp	x8, _BN_FLG_CONSTTIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BN_FLG_CONSTTIME@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_BN_with_flags
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldp	w4, w2, [x19, #24]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x24
	mov	x5, x20
	mov	x6, x23
	blr	x8
	mov	x23, x0
	mov	x0, x24
	bl	_BN_clear_free
	cbz	w23, LBB0_27
; %bb.14:
	stp	x21, x22, [x19, #8]
	mov	w22, #1
	b	LBB0_30
LBB0_15:
	ldr	w1, [x19, #40]
	cbnz	w1, LBB0_23
; %bb.16:
	ldr	w1, [x19, #4]
	cbnz	w1, LBB0_18
; %bb.17:
	ldr	w0, [x19, #24]
	bl	_BN_num_bits
	sub	w1, w0, #1
LBB0_18:
Lloh15:
	adrp	x8, _BN_RAND_TOP_ONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BN_RAND_TOP_ONE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _BN_RAND_BOTTOM_ANY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BN_RAND_BOTTOM_ANY@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_BN_priv_rand
	cbz	w0, LBB0_27
; %bb.19:
	ldr	w0, [x19, #28]
Lloh21:
	adrp	x8, _DH_GENERATOR_2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DH_GENERATOR_2@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_BN_is_word
	cbz	x0, LBB0_12
; %bb.20:
	ldr	w0, [x19, #24]
	mov	w1, #2
	bl	_BN_is_bit_set
	cbnz	w0, LBB0_12
; %bb.21:
	mov	x0, x21
	mov	w1, #0
	bl	_BN_clear_bit
	cbnz	w0, LBB0_12
	b	LBB0_27
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	w1, [x19, #40]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_BN_priv_rand_range
	cbz	w0, LBB0_27
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x21
	bl	_BN_is_zero
	cbnz	x0, LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x21
	bl	_BN_is_one
	cbnz	x0, LBB0_22
	b	LBB0_12
LBB0_26:
	mov	x22, #0
LBB0_27:
Lloh24:
	adrp	x8, _DH_F_GENERATE_KEY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DH_F_GENERATE_KEY@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _ERR_R_BN_LIB@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ERR_R_BN_LIB@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_DHerr
	ldr	x8, [x19, #16]
	cmp	x22, x8
	b.eq	LBB0_29
; %bb.28:
	mov	x0, x22
	bl	_BN_free
LBB0_29:
	mov	w22, #0
LBB0_30:
	ldr	x8, [x19, #8]
	cmp	x21, x8
	b.eq	LBB0_32
; %bb.31:
	mov	x0, x21
	bl	_BN_free
LBB0_32:
	mov	x0, x20
	bl	_BN_CTX_free
LBB0_33:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OPENSSL_DH_MAX_MODULUS_BITS,4,2 ; @OPENSSL_DH_MAX_MODULUS_BITS
	.comm	_DH_F_GENERATE_KEY,4,2          ; @DH_F_GENERATE_KEY
	.comm	_DH_R_MODULUS_TOO_LARGE,4,2     ; @DH_R_MODULUS_TOO_LARGE
	.comm	_DH_FLAG_CACHE_MONT_P,4,2       ; @DH_FLAG_CACHE_MONT_P
	.comm	_BN_RAND_TOP_ONE,4,2            ; @BN_RAND_TOP_ONE
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ; @BN_RAND_BOTTOM_ANY
	.comm	_DH_GENERATOR_2,4,2             ; @DH_GENERATOR_2
	.comm	_BN_FLG_CONSTTIME,4,2           ; @BN_FLG_CONSTTIME
	.comm	_ERR_R_BN_LIB,4,2               ; @ERR_R_BN_LIB
	.no_dead_strip	_generate_key
.subsections_via_symbols
