#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*/ mpz_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ *fopen(char *, char *);
size_t fread(unsigned char *, int, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ memcmp(unsigned char *, unsigned char *, size_t);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ mpz_add_ui(int /*<<< orphan*/, int /*<<< orphan*/,
                              unsigned char);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_inp_str(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ mpz_mul_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_out_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_powm(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  if (argc != 4) {
    printf("Usage: %s modulus d input\n", argv[0]);
    return 0;
  }
  FILE *Nfile = fopen(argv[1], "r");
  FILE *dfile = fopen(argv[2], "r");
  FILE *infile = fopen(argv[3], "rb");
  mpz_t N;
  mpz_t d;
  mpz_init(N);
  mpz_init(d);
  mpz_inp_str(N, Nfile, 16);
  mpz_inp_str(d, dfile, 16);
  mpz_t tmp;
  mpz_init(tmp);
  size_t siglen = 1024;
  unsigned char forbidden[siglen];
  memset(forbidden, 0, siglen);
  forbidden[siglen - 6] = 'F';
  forbidden[siglen - 5] = 'l';
  forbidden[siglen - 4] = 'a';
  forbidden[siglen - 3] = 'g';
  forbidden[siglen - 2] = 'M';
  forbidden[siglen - 1] = 'e';
  unsigned char input[siglen];
  memset(input, 0, siglen);
  size_t insize = 0;
  fseek(infile, 0L, SEEK_END);
  insize = ftell(infile);
  fseek(infile, 0L, SEEK_SET);
  if (insize > siglen) {
    printf("Error: Input too long.\n");
    return 0;
  }
  if (fread(&input[siglen - insize], sizeof(char), insize, infile) < insize) {
    printf("Error: Input too short.\n");
    return 0;
  }
  if (!memcmp(input, forbidden, siglen)) {
    printf("Request denied.\n");
    return 0;
  }
  mpz_t input_mpz;
  mpz_init(input_mpz);
  for (int i = 0; i < siglen; i++) {
    mpz_mul_ui(tmp, input_mpz, 256);
    mpz_add_ui(input_mpz, tmp, input[i]);
  }
  unsigned char signature[siglen];
  memset(signature, 0, siglen);
  mpz_powm(tmp, input_mpz, d, N);
  mpz_out_str(stdout, 16, tmp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     1214 <main+0x44>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f1 <main+0x321>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf8(%rip),%rsi
mov    %rsi,-0x98(%rbp)
call   10e0 <fopen@plt>
mov    -0x98(%rbp),%rsi
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10e0 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xdc3(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x30(%rbp),%edi
call   1090 <mpz_init@plt>
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x10,%edx
mov    %edx,-0x8c(%rbp)
call   10d0 <mpz_inp_str@plt>
mov    -0x8c(%rbp),%edx
mov    -0x30(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   10d0 <mpz_inp_str@plt>
mov    -0x34(%rbp),%edi
call   1090 <mpz_init@plt>
movq   $0x400,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x88(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rdx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x88(%rbp),%rcx
mov    -0x40(%rbp),%rax
movb   $0x46,-0x6(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
movb   $0x6c,-0x5(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
movb   $0x61,-0x4(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
movb   $0x67,-0x3(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
movb   $0x4d,-0x2(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
movb   $0x65,-0x1(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x80(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rdx
xor    %esi,%esi
call   1070 <memset@plt>
movq   $0x0,-0x60(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2c8c(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10c0 <fseek@plt>
mov    -0x28(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2c59(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10c0 <fseek@plt>
mov    -0x60(%rbp),%rax
cmp    -0x40(%rbp),%rax
jbe    13b9 <main+0x1e9>
lea    0xc81(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    14ea <main+0x31a>
mov    -0x80(%rbp),%rdi
mov    -0x40(%rbp),%rax
sub    -0x60(%rbp),%rax
add    %rax,%rdi
mov    -0x60(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
cmp    -0x60(%rbp),%rax
jae    1405 <main+0x235>
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    14ea <main+0x31a>
mov    -0x88(%rbp),%rsi
mov    -0x80(%rbp),%rdi
mov    -0x40(%rbp),%rdx
call   1080 <memcmp@plt>
cmp    $0x0,%eax
jne    1443 <main+0x273>
lea    0xc28(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    14ea <main+0x31a>
mov    -0x68(%rbp),%edi
call   1090 <mpz_init@plt>
movl   $0x0,-0x6c(%rbp)
movslq -0x6c(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    1495 <main+0x2c5>
mov    -0x34(%rbp),%edi
mov    -0x68(%rbp),%esi
mov    $0x100,%edx
call   10f0 <mpz_mul_ui@plt>
mov    -0x80(%rbp),%rax
mov    -0x68(%rbp),%edi
mov    -0x34(%rbp),%esi
movslq -0x6c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
call   1050 <mpz_add_ui@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1452 <main+0x282>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x78(%rbp)
mov    -0x40(%rbp),%rdx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x34(%rbp),%edi
mov    -0x68(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
call   1030 <mpz_powm@plt>
mov    0x2afc(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%edx
mov    $0x10,%esi
call   10b0 <mpz_out_str@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x4,%edi
jne    12ea <main+0x10a>
mov    0x8(%rbx),%rdi
lea    0xe16(%rip),%r14
mov    %r14,%rsi
call   10f0 <fopen@plt>
mov    %rax,%r15
mov    0x10(%rbx),%rdi
mov    %r14,%rsi
call   10f0 <fopen@plt>
mov    %rax,%r12
mov    0x18(%rbx),%rdi
lea    0xdf3(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,%r14
call   1090 <mpz_init@plt>
call   1090 <mpz_init@plt>
mov    %r15,%rsi
mov    $0x10,%edx
call   10e0 <mpz_inp_str@plt>
mov    %r12,%rsi
mov    $0x10,%edx
call   10e0 <mpz_inp_str@plt>
call   1090 <mpz_init@plt>
mov    %rsp,-0x30(%rbp)
mov    %rsp,%rbx
lea    -0x400(%rbx),%r15
mov    %r15,%rsp
mov    $0x400,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
movl   $0x67616c46,-0x6(%rbx)
movw   $0x654d,-0x2(%rbx)
mov    %rsp,%r13
add    $0xfffffffffffffc00,%r13
mov    %r13,%rsp
mov    $0x400,%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1080 <memset@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10d0 <fseek@plt>
mov    %r14,%rdi
call   10a0 <ftell@plt>
mov    %rax,%r12
mov    0x2d0f(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10d0 <fseek@plt>
cmp    $0x401,%r12
jb     1300 <main+0x120>
lea    0xd63(%rip),%rdi
jmp    13aa <main+0x1ca>
mov    (%rbx),%rsi
lea    0xd0c(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13b6 <main+0x1d6>
mov    %r13,%rdi
sub    %r12,%rdi
add    $0x400,%rdi
mov    $0x1,%esi
mov    %r12,%rdx
mov    %r14,%rcx
call   1050 <fread@plt>
cmp    %r12,%rax
jae    132b <main+0x14b>
lea    0xd07(%rip),%rdi
jmp    13aa <main+0x1ca>
mov    $0x400,%edx
mov    %r13,%rdi
mov    %r15,%rsi
call   10c0 <bcmp@plt>
test   %eax,%eax
je     13a3 <main+0x1c3>
call   1090 <mpz_init@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x100,%edx
call   1100 <mpz_mul_ui@plt>
movzbl 0x0(%r13,%rbx,1),%edx
call   1060 <mpz_add_ui@plt>
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1350 <main+0x170>
lea    -0x400(%rsp),%rdi
ff
mov    %rdi,%rsp
mov    $0x400,%edx
xor    %esi,%esi
call   1080 <memset@plt>
call   1030 <mpz_powm@plt>
mov    0x2c3b(%rip),%rax
mov    (%rax),%edi
mov    $0x10,%esi
call   10b0 <mpz_out_str@plt>
jmp    13af <main+0x1cf>
lea    0xc76(%rip),%rdi
call   1040 <puts@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: %s modulus d input\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.3 = [24 x i8] c"Error: Input too long.\0A\00"
@.str.4 = [25 x i8] c"Error: Input too short.\0A\00"
@.str.5 = [17 x i8] c"Request denied.\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 4
br i1 %22, label %23, label %28
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %26)
store i32 0, i32* %3
br label %149
28: ; preds = %2
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %32, i32** %6
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i32* @fopen(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %36, i32** %7
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 3
%39 = load i8*, i8** %38
%40 = call i32* @fopen(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %40, i32** %8
%41 = load i32, i32* %9
%42 = call i32 @mpz_init(i32 %41)
%43 = load i32, i32* %10
%44 = call i32 @mpz_init(i32 %43)
%45 = load i32, i32* %9
%46 = load i32*, i32** %6
%47 = call i32 @mpz_inp_str(i32 %45, i32* %46, i32 16)
%48 = load i32, i32* %10
%49 = load i32*, i32** %7
%50 = call i32 @mpz_inp_str(i32 %48, i32* %49, i32 16)
%51 = load i32, i32* %11
%52 = call i32 @mpz_init(i32 %51)
store i64 1024, i64* %12
%53 = load i64, i64* %12
%54 = call i8* @llvm.stacksave()
store i8* %54, i8** %13
%55 = alloca i8, i64 %53
store i64 %53, i64* %14
%56 = load i64, i64* %12
%57 = call i32 @memset(i8* %55, i32 0, i64 %56)
%58 = load i64, i64* %12
%59 = sub i64 %58, 6
%60 = getelementptr inbounds i8, i8* %55, i64 %59
store i8 70, i8* %60
%61 = load i64, i64* %12
%62 = sub i64 %61, 5
%63 = getelementptr inbounds i8, i8* %55, i64 %62
store i8 108, i8* %63
%64 = load i64, i64* %12
%65 = sub i64 %64, 4
%66 = getelementptr inbounds i8, i8* %55, i64 %65
store i8 97, i8* %66
%67 = load i64, i64* %12
%68 = sub i64 %67, 3
%69 = getelementptr inbounds i8, i8* %55, i64 %68
store i8 103, i8* %69
%70 = load i64, i64* %12
%71 = sub i64 %70, 2
%72 = getelementptr inbounds i8, i8* %55, i64 %71
store i8 77, i8* %72
%73 = load i64, i64* %12
%74 = sub i64 %73, 1
%75 = getelementptr inbounds i8, i8* %55, i64 %74
store i8 101, i8* %75
%76 = load i64, i64* %12
%77 = alloca i8, i64 %76
store i64 %76, i64* %15
%78 = load i64, i64* %12
%79 = call i32 @memset(i8* %77, i32 0, i64 %78)
store i64 0, i64* %16
%80 = load i32*, i32** %8
%81 = load i32, i32* @SEEK_END
%82 = call i32 @fseek(i32* %80, i64 0, i32 %81)
%83 = load i32*, i32** %8
%84 = call i64 @ftell(i32* %83)
store i64 %84, i64* %16
%85 = load i32*, i32** %8
%86 = load i32, i32* @SEEK_SET
%87 = call i32 @fseek(i32* %85, i64 0, i32 %86)
%88 = load i64, i64* %16
%89 = load i64, i64* %12
%90 = icmp ugt i64 %88, %89
br i1 %90, label %91, label %93
91: ; preds = %28
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
store i32 1, i32* %17
br label %146
93: ; preds = %28
%94 = load i64, i64* %12
%95 = load i64, i64* %16
%96 = sub i64 %94, %95
%97 = getelementptr inbounds i8, i8* %77, i64 %96
%98 = load i64, i64* %16
%99 = load i32*, i32** %8
%100 = call i64 @fread(i8* %97, i32 1, i64 %98, i32* %99)
%101 = load i64, i64* %16
%102 = icmp ult i64 %100, %101
br i1 %102, label %103, label %105
103: ; preds = %93
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
store i32 1, i32* %17
br label %146
105: ; preds = %93
%106 = load i64, i64* %12
%107 = call i32 @memcmp(i8* %77, i8* %55, i64 %106)
%108 = icmp ne i32 %107, 0
br i1 %108, label %111, label %109
109: ; preds = %105
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
store i32 1, i32* %17
br label %146
111: ; preds = %105
%112 = load i32, i32* %18
%113 = call i32 @mpz_init(i32 %112)
store i32 0, i32* %19
br label %114
114: ; preds = %130, %111
%115 = load i32, i32* %19
%116 = sext i32 %115 to i64
%117 = load i64, i64* %12
%118 = icmp ult i64 %116, %117
br i1 %118, label %119, label %133
119: ; preds = %114
%120 = load i32, i32* %11
%121 = load i32, i32* %18
%122 = call i32 @mpz_mul_ui(i32 %120, i32 %121, i32 256)
%123 = load i32, i32* %18
%124 = load i32, i32* %11
%125 = load i32, i32* %19
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8, i8* %77, i64 %126
%128 = load i8, i8* %127
%129 = call i32 @mpz_add_ui(i32 %123, i32 %124, i8 zeroext %128)
br label %130
130: ; preds = %119
%131 = load i32, i32* %19
%132 = add nsw i32 %131, 1
store i32 %132, i32* %19
br label %114
133: ; preds = %114
%134 = load i64, i64* %12
%135 = alloca i8, i64 %134
store i64 %134, i64* %20
%136 = load i64, i64* %12
%137 = call i32 @memset(i8* %135, i32 0, i64 %136)
%138 = load i32, i32* %11
%139 = load i32, i32* %18
%140 = load i32, i32* %10
%141 = load i32, i32* %9
%142 = call i32 @mpz_powm(i32 %138, i32 %139, i32 %140, i32 %141)
%143 = load i32, i32* @stdout
%144 = load i32, i32* %11
%145 = call i32 @mpz_out_str(i32 %143, i32 16, i32 %144)
store i32 0, i32* %17
br label %146
146: ; preds = %133, %109, %103, %91
%147 = load i8*, i8** %13
%148 = load i32, i32* %17
switch i32 %148, label %151 [
i32 0, label %149
i32 1, label %149
]
149: ; preds = %23, %146, %146
%150 = load i32, i32* %3
ret i32 %150
151: ; preds = %146
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: %s modulus d input\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@stdout = global i32 0
@str = [16 x i8] c"Request denied.\00"
@str.6 = [24 x i8] c"Error: Input too short.\00"
@str.7 = [23 x i8] c"Error: Input too long.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %73
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds i8*, i8** %1, i64 3
%15 = load i8*, i8** %14
%16 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @mpz_init(i32 undef)
%18 = tail call i32 @mpz_init(i32 undef)
%19 = tail call i32 @mpz_inp_str(i32 undef, i32* %10, i32 16)
%20 = tail call i32 @mpz_inp_str(i32 undef, i32* %13, i32 16)
%21 = tail call i32 @mpz_init(i32 undef)
%22 = tail call i8* @llvm.stacksave()
%23 = alloca [1024 x i8]
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 0
%25 = call i32 @memset(i8* %24, i32 0, i64 1024)
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1018
store i8 70, i8* %26
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1019
store i8 108, i8* %27
%28 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1020
store i8 97, i8* %28
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1021
store i8 103, i8* %29
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1022
store i8 77, i8* %30
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %23, i64 0, i64 1023
store i8 101, i8* %31
%32 = alloca [1024 x i8]
%33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %32, i64 0, i64 0
%34 = call i32 @memset(i8* %33, i32 0, i64 1024)
%35 = load i32, i32* @SEEK_END
%36 = call i32 @fseek(i32* %16, i64 0, i32 %35)
%37 = call i64 @ftell(i32* %16)
%38 = load i32, i32* @SEEK_SET
%39 = call i32 @fseek(i32* %16, i64 0, i32 %38)
%40 = icmp ugt i64 %37, 1024
br i1 %40, label %41, label %43
41: ; preds = %7
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
br label %72
43: ; preds = %7
%44 = sub nuw nsw i64 1024, %37
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %32, i64 0, i64 %44
%46 = call i64 @fread(i8* %45, i32 1, i64 %37, i32* %16)
%47 = icmp ult i64 %46, %37
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.6, i64 0, i64 0))
br label %72
50: ; preds = %43
%51 = call i32 @bcmp(i8* dereferenceable(1024) %33, i8* dereferenceable(1024) %24, i64 1024)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %72
55: ; preds = %50
%56 = call i32 @mpz_init(i32 undef)
br label %64
57: ; preds = %64
%58 = alloca [1024 x i8]
%59 = getelementptr inbounds [1024 x i8], [1024 x i8]* %58, i64 0, i64 0
%60 = call i32 @memset(i8* %59, i32 0, i64 1024)
%61 = call i32 @mpz_powm(i32 undef, i32 undef, i32 undef, i32 undef)
%62 = load i32, i32* @stdout
%63 = call i32 @mpz_out_str(i32 %62, i32 16, i32 undef)
br label %72
64: ; preds = %55, %64
%65 = phi i64 [ 0, %55 ], [ %70, %64 ]
%66 = call i32 @mpz_mul_ui(i32 undef, i32 undef, i32 256)
%67 = getelementptr inbounds [1024 x i8], [1024 x i8]* %32, i64 0, i64 %65
%68 = load i8, i8* %67
%69 = call i32 @mpz_add_ui(i32 undef, i32 undef, i8 zeroext %68)
%70 = add nuw nsw i64 %65, 1
%71 = icmp eq i64 %70, 1024
br i1 %71, label %57, label %64
72: ; preds = %57, %53, %48, %41
br label %73
73: ; preds = %72, %4
ret i32 0
}