	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_elgamal_encrypt            ## -- Begin function pgp_elgamal_encrypt
	.p2align	4, 0x90
_pgp_elgamal_encrypt:                   ## @pgp_elgamal_encrypt
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	_PXE_PGP_MATH_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rdi
	callq	_mpi_to_bn
	movq	%rax, %r12
	movq	16(%rbx), %rdi
	callq	_mpi_to_bn
	movq	%rax, %r15
	movq	8(%rbx), %rdi
	callq	_mpi_to_bn
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_mpi_to_bn
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %rbx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_34
## %bb.1:
	testq	%r15, %r15
	je	LBB0_34
## %bb.2:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_14
## %bb.3:
	testq	%r13, %r13
	je	LBB0_14
## %bb.4:
	testq	%r14, %r14
	je	LBB0_14
## %bb.5:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_14
## %bb.6:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_14
## %bb.7:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_14
## %bb.8:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.9:
	movq	%r15, %rdi
	callq	_BN_num_bits
	movl	%eax, %edi
	callq	_decide_k_bits
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_BN_rand
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%rbx, %r8
	callq	_BN_mod_exp
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%rbx, %r8
	callq	_BN_mod_exp
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%rbx, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_bn_to_mpi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_bn_to_mpi
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%ecx, %ecx
	testq	%rax, %rax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmovel	%eax, %ecx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	cmpq	$0, (%rdx)
	cmovnel	%ecx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_14:
	testq	%rbx, %rbx
	je	LBB0_16
LBB0_15:
	movq	%rbx, %rdi
	callq	_BN_CTX_free
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_BN_clear_free
LBB0_18:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_20
## %bb.19:
	callq	_BN_clear_free
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	callq	_BN_clear_free
LBB0_22:
	testq	%r14, %r14
	je	LBB0_24
## %bb.23:
	movq	%r14, %rdi
	callq	_BN_clear_free
LBB0_24:
	testq	%r13, %r13
	je	LBB0_26
## %bb.25:
	movq	%r13, %rdi
	callq	_BN_clear_free
LBB0_26:
	testq	%r12, %r12
	je	LBB0_28
## %bb.27:
	movq	%r12, %rdi
	callq	_BN_clear_free
LBB0_28:
	testq	%r15, %r15
	je	LBB0_30
## %bb.29:
	movq	%r15, %rdi
	callq	_BN_clear_free
LBB0_30:
	testq	%rbx, %rbx
	je	LBB0_32
## %bb.31:
	movq	%rbx, %rdi
	callq	_BN_clear_free
LBB0_32:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	testq	%rbx, %rbx
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_PXE_PGP_MATH_FAILED,4,2        ## @PXE_PGP_MATH_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_elgamal_encrypt            ; -- Begin function pgp_elgamal_encrypt
	.p2align	2
_pgp_elgamal_encrypt:                   ; @pgp_elgamal_encrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x3, x2, [sp]                    ; 16-byte Folded Spill
	mov	x23, x0
Lloh0:
	adrp	x8, _PXE_PGP_MATH_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PXE_PGP_MATH_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	mov	x0, x1
	bl	_mpi_to_bn
	mov	x20, x0
	ldr	x0, [x23, #16]
	bl	_mpi_to_bn
	mov	x21, x0
	ldr	x0, [x23, #8]
	bl	_mpi_to_bn
	mov	x22, x0
	ldr	x0, [x23]
	bl	_mpi_to_bn
	mov	x23, x0
	bl	_BN_new
	mov	x24, x0
	bl	_BN_new
	mov	x25, x0
	bl	_BN_new
	mov	x26, x0
	bl	_BN_new
	mov	x27, x0
	bl	_BN_CTX_new
	mov	x28, x0
	cbz	x20, LBB0_14
; %bb.1:
	cbz	x21, LBB0_14
; %bb.2:
	cbz	x22, LBB0_14
; %bb.3:
	cbz	x23, LBB0_14
; %bb.4:
	cbz	x24, LBB0_14
; %bb.5:
	cbz	x25, LBB0_14
; %bb.6:
	cbz	x26, LBB0_14
; %bb.7:
	cbz	x27, LBB0_14
; %bb.8:
	cbz	x28, LBB0_14
; %bb.9:
	mov	x0, x21
	bl	_BN_num_bits
	bl	_decide_k_bits
	mov	x1, x0
	mov	x0, x24
	mov	w2, #0
	mov	w3, #0
	bl	_BN_rand
	cbz	w0, LBB0_14
; %bb.10:
	mov	x0, x26
	mov	x1, x22
	mov	x2, x24
	mov	x3, x21
	mov	x4, x28
	bl	_BN_mod_exp
	cbz	w0, LBB0_14
; %bb.11:
	mov	x0, x25
	mov	x1, x23
	mov	x2, x24
	mov	x3, x21
	mov	x4, x28
	bl	_BN_mod_exp
	cbz	w0, LBB0_14
; %bb.12:
	mov	x0, x27
	mov	x1, x20
	mov	x2, x25
	mov	x3, x21
	mov	x4, x28
	bl	_BN_mod_mul
	cbz	w0, LBB0_14
; %bb.13:
	mov	x0, x26
	bl	_bn_to_mpi
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x0, [x8]
	mov	x0, x27
	bl	_bn_to_mpi
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x0, [x8]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8]
	cmp	x0, #0
	ccmp	x8, #0, #4, ne
	csel	w19, w19, wzr, eq
LBB0_14:
	cbz	x28, LBB0_16
; %bb.15:
	mov	x0, x28
	bl	_BN_CTX_free
LBB0_16:
	cbz	x27, LBB0_18
; %bb.17:
	mov	x0, x27
	bl	_BN_clear_free
LBB0_18:
	cbz	x26, LBB0_20
; %bb.19:
	mov	x0, x26
	bl	_BN_clear_free
LBB0_20:
	cbz	x25, LBB0_22
; %bb.21:
	mov	x0, x25
	bl	_BN_clear_free
LBB0_22:
	cbz	x24, LBB0_24
; %bb.23:
	mov	x0, x24
	bl	_BN_clear_free
LBB0_24:
	cbz	x23, LBB0_26
; %bb.25:
	mov	x0, x23
	bl	_BN_clear_free
LBB0_26:
	cbz	x22, LBB0_28
; %bb.27:
	mov	x0, x22
	bl	_BN_clear_free
LBB0_28:
	cbz	x21, LBB0_30
; %bb.29:
	mov	x0, x21
	bl	_BN_clear_free
LBB0_30:
	cbz	x20, LBB0_32
; %bb.31:
	mov	x0, x20
	bl	_BN_clear_free
LBB0_32:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PXE_PGP_MATH_FAILED,4,2        ; @PXE_PGP_MATH_FAILED
.subsections_via_symbols
