#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int EOF;
int /*<<< orphan*/ IsPrime(unsigned long);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
unsigned int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned long);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, unsigned long *,
                          unsigned long *, unsigned long *, unsigned long *);
int gcd(unsigned long, unsigned long);
scalar_t__ isalpha(unsigned int);
unsigned long mexp(unsigned long, unsigned long, unsigned long);
int /*<<< orphan*/ printf(char *, ...);
unsigned long strTolong(char *);
char tolower(unsigned int);
void fnEncryption() {
  FILE *pf, *pfo;
  unsigned int ch, i;
  unsigned long p, q, n, e, m, c;
  char str[5];
  pfo = fopen("out.dat", "w");
  if (!pfo) {
    printf("Can not create the file\n");
    return;
  }
  pf = fopen("in.dat", "r");
  if (!pf) {
    printf("Can not open the file\n");
    fclose(pfo);
    return;
  }
  fscanf(pf, "%d%d%d%d", &p, &q, &n, &e);
  if (p * q != n || !IsPrime(p) || !IsPrime(q) ||
      gcd((p - 1) * (q - 1), e) != 1 || n <= 25252525) {
    printf("Invalid data\n");
    fclose(pfo);
    fclose(pf);
    return;
  }
  ch = fgetc(pf);
  i = 0;
  while (ch != EOF) {
    if (isalpha(ch)) {
      str[i] = tolower(ch);
      i++;
    }
    if (i == 4) {
      str[i] = 0;
      i = 0;
      m = strTolong(str);
      c = mexp(m, e, n);
      fprintf(pfo, "%08d", c);
      printf("%08d\n", c);
    }
    ch = fgetc(pf);
  }
  if (i != 0) {
    while (i < 4)
      str[i++] = 'z';
    str[i] = 0;
    m = strTolong(str);
    c = mexp(m, e, n);
    fprintf(pfo, "%08d", c);
    printf("%08d\n", c);
  }
  fclose(pfo);
  fclose(pf);
}


x86 assembly (clang, -O0):
<fnEncryption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xe31(%rip),%rdi
lea    0xe32(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11fd <fnEncryption+0x3d>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1440 <fnEncryption+0x280>
lea    0xe1f(%rip),%rdi
lea    0xe1f(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    123b <fnEncryption+0x7b>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1440 <fnEncryption+0x280>
mov    -0x8(%rbp),%rdi
lea    0xdfd(%rip),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    -0x38(%rbp),%r9
call   1060 <fscanf@plt>
mov    -0x20(%rbp),%rax
imul   -0x28(%rbp),%rax
cmp    -0x30(%rbp),%rax
jne    12c6 <fnEncryption+0x106>
mov    -0x20(%rbp),%rdi
call   10c0 <IsPrime@plt>
cmp    $0x0,%eax
je     12c6 <fnEncryption+0x106>
mov    -0x28(%rbp),%rdi
call   10c0 <IsPrime@plt>
cmp    $0x0,%eax
je     12c6 <fnEncryption+0x106>
mov    -0x20(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x28(%rbp),%rax
sub    $0x1,%rax
imul   %rax,%rdi
mov    -0x38(%rbp),%rsi
call   10e0 <gcd@plt>
cmp    $0x1,%eax
jne    12c6 <fnEncryption+0x106>
cmpq   $0x18152ad,-0x30(%rbp)
01
ja     12eb <fnEncryption+0x12b>
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1440 <fnEncryption+0x280>
mov    -0x8(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2ce0(%rip),%rcx
cmp    (%rcx),%eax
je     13ae <fnEncryption+0x1ee>
mov    -0x14(%rbp),%edi
call   10b0 <isalpha@plt>
cmp    $0x0,%rax
je     133c <fnEncryption+0x17c>
mov    -0x14(%rbp),%edi
call   10a0 <tolower@plt>
mov    %al,%cl
mov    -0x18(%rbp),%eax
mov    %cl,-0x4d(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jne    139d <fnEncryption+0x1dd>
mov    -0x18(%rbp),%eax
movb   $0x0,-0x4d(%rbp,%rax,1)
movl   $0x0,-0x18(%rbp)
lea    -0x4d(%rbp),%rdi
call   1030 <strTolong@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1090 <mexp@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0xcd4(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x48(%rbp),%rsi
lea    0xcc9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %eax,-0x14(%rbp)
jmp    12fe <fnEncryption+0x13e>
cmpl   $0x0,-0x18(%rbp)
je     142e <fnEncryption+0x26e>
jmp    13bd <fnEncryption+0x1fd>
cmpl   $0x4,-0x18(%rbp)
jae    13de <fnEncryption+0x21e>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
mov    %eax,%eax
movb   $0x7a,-0x4d(%rbp,%rax,1)
jmp    13bd <fnEncryption+0x1fd>
mov    -0x18(%rbp),%eax
movb   $0x0,-0x4d(%rbp,%rax,1)
lea    -0x4d(%rbp),%rdi
call   1030 <strTolong@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1090 <mexp@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x48(%rbp),%rdx
lea    0xc43(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x48(%rbp),%rsi
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnEncryption>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe0b(%rip),%rdi
lea    0xe0c(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     136f <fnEncryption+0x18f>
mov    %rax,%r14
lea    0xdf6(%rip),%rdi
lea    0xdf6(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     13b4 <fnEncryption+0x1d4>
mov    %rax,%rbx
lea    0xde0(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %rax,%rdi
call   1080 <fscanf@plt>
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%rax
imul   %rdi,%rax
cmp    0x8(%rsp),%rax
jne    1389 <fnEncryption+0x1a9>
call   10e0 <IsPrime@plt>
test   %eax,%eax
je     1389 <fnEncryption+0x1a9>
mov    0x18(%rsp),%rdi
call   10e0 <IsPrime@plt>
test   %eax,%eax
je     1389 <fnEncryption+0x1a9>
mov    0x20(%rsp),%rax
add    $0xffffffffffffffff,%rax
mov    0x18(%rsp),%rdi
add    $0xffffffffffffffff,%rdi
imul   %rax,%rdi
mov    0x10(%rsp),%rsi
call   1100 <gcd@plt>
cmp    $0x1,%eax
jne    1389 <fnEncryption+0x1a9>
cmpq   $0x18152ad,0x8(%rsp)
81 01
jbe    1389 <fnEncryption+0x1a9>
mov    %rbx,%rdi
call   1090 <fgetc@plt>
mov    0x2d1a(%rip),%r15
cmp    (%r15),%eax
je     1395 <fnEncryption+0x1b5>
mov    %eax,%ebp
xor    %r12d,%r12d
lea    0xd3e(%rip),%r13
jmp    1303 <fnEncryption+0x123>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1090 <fgetc@plt>
mov    %eax,%ebp
cmp    (%r15),%eax
je     13d6 <fnEncryption+0x1f6>
mov    %ebp,%edi
call   10d0 <isalpha@plt>
test   %rax,%rax
je     12f0 <fnEncryption+0x110>
mov    %ebp,%edi
call   10c0 <tolower@plt>
mov    %r12d,%ecx
mov    %al,0x3(%rsp,%rcx,1)
add    $0x1,%r12d
cmp    $0x4,%r12d
jne    12f0 <fnEncryption+0x110>
movb   $0x0,0x7(%rsp)
lea    0x3(%rsp),%rdi
call   1030 <strTolong@plt>
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdx
mov    %rax,%rdi
call   10b0 <mexp@plt>
mov    %rax,%rbp
mov    %r14,%rdi
lea    0xcc7(%rip),%rsi
mov    %rax,%rdx
call   10a0 <fprintf@plt>
xor    %r12d,%r12d
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12f0 <fnEncryption+0x110>
lea    0xcb1(%rip),%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>
lea    0xcc5(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc84(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fclose@plt>
test   %r12d,%r12d
je     1395 <fnEncryption+0x1b5>
cmp    $0x3,%r12d
ja     1408 <fnEncryption+0x228>
mov    %r12d,%eax
lea    (%rsp,%rax,1),%rdi
add    $0x3,%rdi
mov    $0x3,%edx
sub    %r12d,%edx
add    $0x1,%rdx
mov    $0x7a,%esi
call   1070 <memset@plt>
mov    $0x4,%r12d
mov    %r12d,%eax
movb   $0x0,0x3(%rsp,%rax,1)
lea    0x3(%rsp),%rdi
call   1030 <strTolong@plt>
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdx
mov    %rax,%rdi
call   10b0 <mexp@plt>
mov    %rax,%rbp
lea    0xbe6(%rip),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
call   10a0 <fprintf@plt>
lea    0xbd9(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1395 <fnEncryption+0x1b5>

LLVM IR (-O0):
@.str = [8 x i8] c"out.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [25 x i8] c"Can not create the file\0A\00"
@.str.3 = [7 x i8] c"in.dat\00"
@.str.4 = [2 x i8] c"r\00"
@.str.5 = [23 x i8] c"Can not open the file\0A\00"
@.str.6 = [9 x i8] c"%d%d%d%d\00"
@.str.7 = [14 x i8] c"Invalid data\0A\00"
@EOF = global i32 0
@.str.8 = [5 x i8] c"%08d\00"
@.str.9 = [6 x i8] c"%08d\0A\00"
define void @fnEncryption() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca [5 x i8]
%12 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %12, i32** %2
%13 = load i32*, i32** %2
%14 = icmp ne i32* %13, null
br i1 %14, label %17, label %15
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %131
17: ; preds = %0
%18 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %18, i32** %1
%19 = load i32*, i32** %1
%20 = icmp ne i32* %19, null
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @fclose(i32* %23)
br label %131
25: ; preds = %17
%26 = load i32*, i32** %1
%27 = call i32 @fscanf(i32* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i64* %5, i64* %6, i64* %7, i64* %8)
%28 = load i64, i64* %5
%29 = load i64, i64* %6
%30 = mul i64 %28, %29
%31 = load i64, i64* %7
%32 = icmp ne i64 %30, %31
br i1 %32, label %53, label %33
33: ; preds = %25
%34 = load i64, i64* %5
%35 = call i32 @IsPrime(i64 %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %53
37: ; preds = %33
%38 = load i64, i64* %6
%39 = call i32 @IsPrime(i64 %38)
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %53
41: ; preds = %37
%42 = load i64, i64* %5
%43 = sub i64 %42, 1
%44 = load i64, i64* %6
%45 = sub i64 %44, 1
%46 = mul i64 %43, %45
%47 = load i64, i64* %8
%48 = call i32 @gcd(i64 %46, i64 %47)
%49 = icmp ne i32 %48, 1
br i1 %49, label %53, label %50
50: ; preds = %41
%51 = load i64, i64* %7
%52 = icmp ule i64 %51, 25252525
br i1 %52, label %53, label %59
53: ; preds = %50, %41, %37, %33, %25
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%55 = load i32*, i32** %2
%56 = call i32 @fclose(i32* %55)
%57 = load i32*, i32** %1
%58 = call i32 @fclose(i32* %57)
br label %131
59: ; preds = %50
%60 = load i32*, i32** %1
%61 = call i32 @fgetc(i32* %60)
store i32 %61, i32* %3
store i32 0, i32* %4
br label %62
62: ; preds = %96, %59
%63 = load i32, i32* %3
%64 = load i32, i32* @EOF
%65 = icmp ne i32 %63, %64
br i1 %65, label %66, label %99
66: ; preds = %62
%67 = load i32, i32* %3
%68 = call i64 @isalpha(i32 %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %78
70: ; preds = %66
%71 = load i32, i32* %3
%72 = call signext i8 @tolower(i32 %71)
%73 = load i32, i32* %4
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 %74
store i8 %72, i8* %75
%76 = load i32, i32* %4
%77 = add i32 %76, 1
store i32 %77, i32* %4
br label %78
78: ; preds = %70, %66
%79 = load i32, i32* %4
%80 = icmp eq i32 %79, 4
br i1 %80, label %81, label %96
81: ; preds = %78
%82 = load i32, i32* %4
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 %83
store i8 0, i8* %84
store i32 0, i32* %4
%85 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%86 = call i64 @strTolong(i8* %85)
store i64 %86, i64* %9
%87 = load i64, i64* %9
%88 = load i64, i64* %8
%89 = load i64, i64* %7
%90 = call i64 @mexp(i64 %87, i64 %88, i64 %89)
store i64 %90, i64* %10
%91 = load i32*, i32** %2
%92 = load i64, i64* %10
%93 = call i32 @fprintf(i32* %91, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %92)
%94 = load i64, i64* %10
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i64 %94)
br label %96
96: ; preds = %81, %78
%97 = load i32*, i32** %1
%98 = call i32 @fgetc(i32* %97)
store i32 %98, i32* %3
br label %62
99: ; preds = %62
%100 = load i32, i32* %4
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %126
102: ; preds = %99
br label %103
103: ; preds = %106, %102
%104 = load i32, i32* %4
%105 = icmp ult i32 %104, 4
br i1 %105, label %106, label %111
106: ; preds = %103
%107 = load i32, i32* %4
%108 = add i32 %107, 1
store i32 %108, i32* %4
%109 = zext i32 %107 to i64
%110 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 %109
store i8 122, i8* %110
br label %103
111: ; preds = %103
%112 = load i32, i32* %4
%113 = zext i32 %112 to i64
%114 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 %113
store i8 0, i8* %114
%115 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%116 = call i64 @strTolong(i8* %115)
store i64 %116, i64* %9
%117 = load i64, i64* %9
%118 = load i64, i64* %8
%119 = load i64, i64* %7
%120 = call i64 @mexp(i64 %117, i64 %118, i64 %119)
store i64 %120, i64* %10
%121 = load i32*, i32** %2
%122 = load i64, i64* %10
%123 = call i32 @fprintf(i32* %121, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %122)
%124 = load i64, i64* %10
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i64 %124)
br label %126
126: ; preds = %111, %99
%127 = load i32*, i32** %2
%128 = call i32 @fclose(i32* %127)
%129 = load i32*, i32** %1
%130 = call i32 @fclose(i32* %129)
br label %131
131: ; preds = %126, %53, %21, %15
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"out.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.3 = [7 x i8] c"in.dat\00"
@.str.4 = [2 x i8] c"r\00"
@.str.6 = [9 x i8] c"%d%d%d%d\00"
@EOF = global i32 0
@.str.8 = [5 x i8] c"%08d\00"
@.str.9 = [6 x i8] c"%08d\0A\00"
@str = [24 x i8] c"Can not create the file\00"
@str.10 = [22 x i8] c"Can not open the file\00"
@str.11 = [13 x i8] c"Invalid data\00"
define void @fnEncryption() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca [5 x i8]
%6 = bitcast i64* %1 to i8*
%7 = bitcast i64* %2 to i8*
%8 = bitcast i64* %3 to i8*
%9 = bitcast i64* %4 to i8*
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %103
15: ; preds = %0
%16 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.10, i64 0, i64 0))
%20 = tail call i32 @fclose(i32* %11)
br label %103
21: ; preds = %15
%22 = call i32 @fscanf(i32* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i64* %1, i64* %2, i64* %3, i64* %4)
%23 = load i64, i64* %1
%24 = load i64, i64* %2
%25 = mul i64 %24, %23
%26 = load i64, i64* %3
%27 = icmp eq i64 %25, %26
br i1 %27, label %28, label %47
28: ; preds = %21
%29 = call i32 @IsPrime(i64 %23)
%30 = icmp eq i32 %29, 0
br i1 %30, label %47, label %31
31: ; preds = %28
%32 = load i64, i64* %2
%33 = call i32 @IsPrime(i64 %32)
%34 = icmp eq i32 %33, 0
br i1 %34, label %47, label %35
35: ; preds = %31
%36 = load i64, i64* %1
%37 = add i64 %36, -1
%38 = load i64, i64* %2
%39 = add i64 %38, -1
%40 = mul i64 %39, %37
%41 = load i64, i64* %4
%42 = call i32 @gcd(i64 %40, i64 %41)
%43 = icmp ne i32 %42, 1
%44 = load i64, i64* %3
%45 = icmp ult i64 %44, 25252526
%46 = select i1 %43, i1 true, i1 %45
br i1 %46, label %47, label %51
47: ; preds = %35, %31, %28, %21
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.11, i64 0, i64 0))
%49 = call i32 @fclose(i32* %11)
%50 = call i32 @fclose(i32* %16)
br label %103
51: ; preds = %35
%52 = call i32 @fgetc(i32* %16)
%53 = load i32, i32* @EOF
%54 = icmp eq i32 %52, %53
br i1 %54, label %100, label %55
55: ; preds = %51
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
br label %57
57: ; preds = %55, %75
%58 = phi i32 [ 0, %55 ], [ %76, %75 ]
%59 = phi i32 [ %52, %55 ], [ %77, %75 ]
%60 = call i64 @isalpha(i32 %59)
%61 = icmp eq i64 %60, 0
br i1 %61, label %75, label %62
62: ; preds = %57
%63 = call signext i8 @tolower(i32 %59)
%64 = zext i32 %58 to i64
%65 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 %64
store i8 %63, i8* %65
%66 = add i32 %58, 1
%67 = icmp eq i32 %66, 4
br i1 %67, label %68, label %75
68: ; preds = %62
store i8 0, i8* %56
%69 = call i64 @strTolong(i8* %10)
%70 = load i64, i64* %4
%71 = load i64, i64* %3
%72 = call i64 @mexp(i64 %69, i64 %70, i64 %71)
%73 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %72)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i64 %72)
br label %75
75: ; preds = %57, %68, %62
%76 = phi i32 [ 0, %68 ], [ %66, %62 ], [ %58, %57 ]
%77 = call i32 @fgetc(i32* %16)
%78 = load i32, i32* @EOF
%79 = icmp eq i32 %77, %78
br i1 %79, label %80, label %57
80: ; preds = %75
%81 = icmp eq i32 %76, 0
br i1 %81, label %100, label %82
82: ; preds = %80
%83 = icmp ult i32 %76, 4
br i1 %83, label %84, label %90
84: ; preds = %82
%85 = zext i32 %76 to i64
%86 = getelementptr [5 x i8], [5 x i8]* %5, i64 0, i64 %85
%87 = sub nuw nsw i32 3, %76
%88 = zext i32 %87 to i64
%89 = add nuw nsw i64 %88, 1
br label %90
90: ; preds = %84, %82
%91 = phi i32 [ %76, %82 ], [ 4, %84 ]
%92 = zext i32 %91 to i64
%93 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 %92
store i8 0, i8* %93
%94 = call i64 @strTolong(i8* %10)
%95 = load i64, i64* %4
%96 = load i64, i64* %3
%97 = call i64 @mexp(i64 %94, i64 %95, i64 %96)
%98 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %97)
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i64 %97)
br label %100
100: ; preds = %51, %90, %80
%101 = call i32 @fclose(i32* %11)
%102 = call i32 @fclose(i32* %16)
br label %103
103: ; preds = %100, %47, %18, %13
ret void
}