	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_key
_compute_key:                           ## @compute_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	4(%rdx), %edi
	callq	_BN_num_bits
	movq	_OPENSSL_DH_MAX_MODULUS_BITS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.1:
	movq	_DH_F_COMPUTE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_MODULUS_TOO_LARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DHerr
	movl	$-1, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_2:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_BN_CTX_start
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	cmpq	$0, 8(%r13)
	je	LBB0_6
## %bb.8:
	movq	_DH_FLAG_CACHE_MONT_P@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13)
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.10:
	leaq	28(%r13), %rdi
	movl	4(%r13), %edx
	movl	24(%r13), %esi
	movq	%rbx, %rcx
	callq	_BN_MONT_CTX_set_locked
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rdi
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BN_set_flags
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_17
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_6:
	movq	_DH_F_COMPUTE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_NO_PRIVATE_VALUE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_11:
	leaq	-52(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_DH_check_pub_key
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	cmpl	$0, -52(%rbp)
	jne	LBB0_13
## %bb.14:
	movq	16(%r13), %rax
	movq	8(%r13), %rcx
	movl	4(%r13), %r8d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rsp)
	movq	%r13, %rdi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%rbx, %r9
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_BN_bn2bin
	movl	%eax, %r14d
	jmp	LBB0_17
LBB0_13:
	movq	_DH_F_COMPUTE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_INVALID_PUBKEY@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_15:
	movq	_DH_F_COMPUTE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_BN_LIB@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	callq	_DHerr
LBB0_17:
	movq	%rbx, %rdi
	callq	_BN_CTX_end
	movq	%rbx, %rdi
	callq	_BN_CTX_free
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPENSSL_DH_MAX_MODULUS_BITS,8,3 ## @OPENSSL_DH_MAX_MODULUS_BITS
	.comm	_DH_F_COMPUTE_KEY,4,2           ## @DH_F_COMPUTE_KEY
	.comm	_DH_R_MODULUS_TOO_LARGE,4,2     ## @DH_R_MODULUS_TOO_LARGE
	.comm	_DH_R_NO_PRIVATE_VALUE,4,2      ## @DH_R_NO_PRIVATE_VALUE
	.comm	_DH_FLAG_CACHE_MONT_P,4,2       ## @DH_FLAG_CACHE_MONT_P
	.comm	_BN_FLG_CONSTTIME,4,2           ## @BN_FLG_CONSTTIME
	.comm	_DH_R_INVALID_PUBKEY,4,2        ## @DH_R_INVALID_PUBKEY
	.comm	_ERR_R_BN_LIB,4,2               ## @ERR_R_BN_LIB
	.no_dead_strip	_compute_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_key
_compute_key:                           ; @compute_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x2, #4]
	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	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DH_F_COMPUTE_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DH_F_COMPUTE_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	x19, #0
	b	LBB0_16
LBB0_2:
	bl	_BN_CTX_new
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.3:
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	cbz	x0, LBB0_16
; %bb.4:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x23, x0
	ldr	w8, [x22]
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_8
; %bb.6:
	add	x0, x22, #28
	ldr	w1, [x22, #24]
	ldr	w2, [x22, #4]
	mov	x3, x19
	bl	_BN_MONT_CTX_set_locked
	mov	x24, x0
	ldr	x0, [x22, #8]
Lloh12:
	adrp	x8, _BN_FLG_CONSTTIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BN_FLG_CONSTTIME@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_BN_set_flags
	cbnz	x24, LBB0_9
	b	LBB0_16
LBB0_7:
Lloh15:
	adrp	x8, _DH_F_COMPUTE_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DH_F_COMPUTE_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _DH_R_NO_PRIVATE_VALUE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DH_R_NO_PRIVATE_VALUE@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	mov	x24, #0
LBB0_9:
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x21
	bl	_DH_check_pub_key
	cbz	w0, LBB0_13
; %bb.10:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_13
; %bb.11:
	ldp	x3, x8, [x22, #8]
	ldr	x8, [x8]
	ldr	w4, [x22, #4]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x5, x19
	mov	x6, x24
	blr	x8
	cbz	w0, LBB0_14
; %bb.12:
	mov	x0, x23
	mov	x1, x20
	bl	_BN_bn2bin
	mov	x20, x0
	b	LBB0_17
LBB0_13:
Lloh20:
	adrp	x8, _DH_F_COMPUTE_KEY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DH_F_COMPUTE_KEY@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _DH_R_INVALID_PUBKEY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DH_R_INVALID_PUBKEY@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh25:
	adrp	x8, _DH_F_COMPUTE_KEY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DH_F_COMPUTE_KEY@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _ERR_R_BN_LIB@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERR_R_BN_LIB@GOTPAGEOFF]
LBB0_15:
	ldr	w1, [x8]
	bl	_DHerr
LBB0_16:
	mov	w20, #-1
LBB0_17:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x19
	bl	_BN_CTX_free
	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
	add	sp, sp, #80
	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 AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_OPENSSL_DH_MAX_MODULUS_BITS,8,3 ; @OPENSSL_DH_MAX_MODULUS_BITS
	.comm	_DH_F_COMPUTE_KEY,4,2           ; @DH_F_COMPUTE_KEY
	.comm	_DH_R_MODULUS_TOO_LARGE,4,2     ; @DH_R_MODULUS_TOO_LARGE
	.comm	_DH_R_NO_PRIVATE_VALUE,4,2      ; @DH_R_NO_PRIVATE_VALUE
	.comm	_DH_FLAG_CACHE_MONT_P,4,2       ; @DH_FLAG_CACHE_MONT_P
	.comm	_BN_FLG_CONSTTIME,4,2           ; @BN_FLG_CONSTTIME
	.comm	_DH_R_INVALID_PUBKEY,4,2        ; @DH_R_INVALID_PUBKEY
	.comm	_ERR_R_BN_LIB,4,2               ; @ERR_R_BN_LIB
	.no_dead_strip	_compute_key
.subsections_via_symbols
