#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 */
char EOF;
int /*<<< orphan*/ afficheFichier(char *);
int csplit(char *, char *, char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ filenstr(char *, int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
char getchar();
int /*<<< orphan*/ lireChemins(char *, char *);
int /*<<< orphan*/ moveFichiers(int, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int numero = 0;
  char c;
  char nomFichier[150];
  char nomFichierTxt[150];
  char nomFichier1[150];
  char nomFichier2[150];
  char prefixe[50];
  char decrypter[300];
  char ligne[300];
  char cheminApicrypt[300];
  char cheminApitemp[300];
  lireChemins(cheminApicrypt, cheminApitemp);
  sprintf(nomFichier, "%smail", cheminApicrypt);
  FILE *fichier2 = NULL;
  fichier2 = fopen(nomFichier, "w+");
  if (fichier2 != NULL) {
    while ((c = getchar()) != EOF) {
      fputc(c, fichier2);
    }
    filenstr("Date:", fichier2, 1, ligne);
    filenstr("Subject:", fichier2, 1, ligne);
    filenstr("To:", fichier2, 1, ligne);
    filenstr("From:", fichier2, 1, ligne);
    printf("Content-Type: text/plain; charset=ISO-8859-1; "
           "format=flowed\nContent-Transfer-Encoding: 7bit\n\n");
    fclose(fichier2);
    sprintf(decrypter, "%sapiuncrypt -s %s -k %s", cheminApicrypt, nomFichier,
            cheminApicrypt);
    sprintf(nomFichierTxt, "%s.txt", nomFichier);
    system(decrypter);
    remove(nomFichier);
    sprintf(nomFichier1, "%smail.txt", cheminApicrypt);
    sprintf(nomFichier2, "%smailtext000.txt", cheminApicrypt);
    sprintf(prefixe, "%smailtext", cheminApicrypt);
    csplit("****FINFICHIER****", nomFichier1, nomFichier2, prefixe);
    sprintf(nomFichier1, "%smailtext000.txt", cheminApicrypt);
    sprintf(nomFichier2, "%stmp/resutext000.txt", cheminApicrypt);
    sprintf(prefixe, "%stmp/resutext", cheminApicrypt);
    numero = csplit("****FIN****", nomFichier1, nomFichier2, prefixe);
    if (numero == 0)
      numero = 1;
    moveFichiers(numero, cheminApicrypt, cheminApitemp);
    afficheFichier(nomFichierTxt);
    remove(nomFichier1);
    remove(nomFichier2);
    remove(nomFichierTxt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x660(%rbp),%rdi
lea    -0x790(%rbp),%rsi
call   10a0 <lireChemins@plt>
lea    -0xb0(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xde8(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
movq   $0x0,-0x798(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x798(%rbp)
cmpq   $0x0,-0x798(%rbp)
je     14c3 <main+0x2f3>
jmp    1257 <main+0x87>
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,-0x15(%rbp)
movsbl %al,%eax
mov    0x2d7d(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     128d <main+0xbd>
mov    -0x15(%rbp),%al
mov    -0x798(%rbp),%rsi
movsbl %al,%edi
call   1080 <fputc@plt>
jmp    1257 <main+0x87>
mov    -0x798(%rbp),%rsi
lea    -0x530(%rbp),%rcx
lea    0xd68(%rip),%rdi
mov    $0x1,%edx
call   10c0 <filenstr@plt>
mov    -0x798(%rbp),%rsi
lea    -0x530(%rbp),%rcx
lea    0xd4f(%rip),%rdi
mov    $0x1,%edx
call   10c0 <filenstr@plt>
mov    -0x798(%rbp),%rsi
lea    -0x530(%rbp),%rcx
lea    0xd39(%rip),%rdi
mov    $0x1,%edx
call   10c0 <filenstr@plt>
mov    -0x798(%rbp),%rsi
lea    -0x530(%rbp),%rcx
lea    0xd1e(%rip),%rdi
mov    $0x1,%edx
call   10c0 <filenstr@plt>
lea    0xd13(%rip),%rdi
call   1060 <printf@plt>
mov    -0x798(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x400(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
lea    -0x660(%rbp),%r8
lea    0xd3d(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0xb0(%rbp),%rdx
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1050 <system@plt>
lea    -0xb0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0x1f0(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xd0d(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x290(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x2d0(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xcf2(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x1f0(%rbp),%rsi
lea    -0x290(%rbp),%rdx
lea    -0x2d0(%rbp),%rcx
lea    0xcda(%rip),%rdi
call   10f0 <csplit@plt>
lea    -0x1f0(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xca3(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x290(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xcb7(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x2d0(%rbp),%rdi
lea    -0x660(%rbp),%rdx
lea    0xcb1(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
lea    -0x1f0(%rbp),%rsi
lea    -0x290(%rbp),%rdx
lea    -0x2d0(%rbp),%rcx
lea    0xc9d(%rip),%rdi
call   10f0 <csplit@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    147d <main+0x2ad>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x660(%rbp),%rsi
lea    -0x790(%rbp),%rdx
call   10d0 <moveFichiers@plt>
lea    -0x150(%rbp),%rdi
call   1070 <afficheFichier@plt>
lea    -0x1f0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0x290(%rbp),%rdi
call   1030 <remove@plt>
lea    -0x150(%rbp),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x7a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x788,%rsp
lea    0x2b0(%rsp),%rbx
lea    0x180(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <lireChemins@plt>
lea    0xe00(%rip),%rsi
lea    0xe0(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xdeb(%rip),%rsi
mov    %rbp,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     142f <main+0x25f>
mov    %rax,%rbx
xor    %eax,%eax
call   1090 <getchar@plt>
mov    0x2daa(%rip),%rbp
cmp    0x0(%rbp),%al
je     1267 <main+0x97>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
cmp    0x0(%rbp),%al
jne    1250 <main+0x80>
lea    0xd9c(%rip),%rdi
mov    $0x1,%r15d
lea    0x520(%rsp),%rbp
mov    %rbx,%rsi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <filenstr@plt>
lea    0xd7d(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <filenstr@plt>
lea    0xd6f(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <filenstr@plt>
lea    0xd5c(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10c0 <filenstr@plt>
lea    0xdd7(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xd37(%rip),%rsi
lea    0x650(%rsp),%r12
lea    0xe0(%rsp),%rbp
lea    0x2b0(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xd1e(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %r12,%rdi
call   1060 <system@plt>
mov    %rbp,%rdi
call   1030 <remove@plt>
lea    0xcff(%rip),%rsi
lea    0x480(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xcee(%rip),%r14
lea    0x3e0(%rsp),%r13
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xce1(%rip),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xcd5(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
call   10f0 <csplit@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xcc3(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xcc5(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0xcc0(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
call   10f0 <csplit@plt>
test   %eax,%eax
cmovne %eax,%r15d
lea    0x180(%rsp),%rdx
mov    %r15d,%edi
mov    %rbx,%rsi
call   10d0 <moveFichiers@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
call   1070 <afficheFichier@plt>
mov    %r12,%rdi
call   1030 <remove@plt>
mov    %r13,%rdi
call   1030 <remove@plt>
mov    %rbx,%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x788,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%smail\00"
@.str.1 = [3 x i8] c"w+\00"
@EOF = global i8 0
@.str.2 = [6 x i8] c"Date:\00"
@.str.3 = [9 x i8] c"Subject:\00"
@.str.4 = [4 x i8] c"To:\00"
@.str.5 = [6 x i8] c"From:\00"
@.str.6 = [94 x i8] c"Content-Type: text/plain; charset=ISO-8859-1; format=flowed\0AContent-Transfer-Encoding: 7bit\0A\0A\00"
@.str.7 = [25 x i8] c"%sapiuncrypt -s %s -k %s\00"
@.str.8 = [7 x i8] c"%s.txt\00"
@.str.9 = [11 x i8] c"%smail.txt\00"
@.str.10 = [18 x i8] c"%smailtext000.txt\00"
@.str.11 = [11 x i8] c"%smailtext\00"
@.str.12 = [19 x i8] c"****FINFICHIER****\00"
@.str.13 = [22 x i8] c"%stmp/resutext000.txt\00"
@.str.14 = [15 x i8] c"%stmp/resutext\00"
@.str.15 = [12 x i8] c"****FIN****\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8
%8 = alloca [150 x i8]
%9 = alloca [150 x i8]
%10 = alloca [150 x i8]
%11 = alloca [150 x i8]
%12 = alloca [50 x i8]
%13 = alloca [300 x i8]
%14 = alloca [300 x i8]
%15 = alloca [300 x i8]
%16 = alloca [300 x i8]
%17 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%18 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%19 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%20 = call i32 @lireChemins(i8* %18, i8* %19)
%21 = getelementptr inbounds [150 x i8], [150 x i8]* %8, i64 0, i64 0
%22 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%23 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %22)
store i32* null, i32** %17
%24 = getelementptr inbounds [150 x i8], [150 x i8]* %8, i64 0, i64 0
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %25, i32** %17
%26 = load i32*, i32** %17
%27 = icmp ne i32* %26, null
br i1 %27, label %28, label %109
28: ; preds = %2
br label %29
29: ; preds = %35, %28
%30 = call signext i8 (...) @getchar()
store i8 %30, i8* %7
%31 = sext i8 %30 to i32
%32 = load i8, i8* @EOF
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %31, %33
br i1 %34, label %35, label %39
35: ; preds = %29
%36 = load i8, i8* %7
%37 = load i32*, i32** %17
%38 = call i32 @fputc(i8 signext %36, i32* %37)
br label %29
39: ; preds = %29
%40 = load i32*, i32** %17
%41 = getelementptr inbounds [300 x i8], [300 x i8]* %14, i64 0, i64 0
%42 = call i32 @filenstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %40, i32 1, i8* %41)
%43 = load i32*, i32** %17
%44 = getelementptr inbounds [300 x i8], [300 x i8]* %14, i64 0, i64 0
%45 = call i32 @filenstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* %43, i32 1, i8* %44)
%46 = load i32*, i32** %17
%47 = getelementptr inbounds [300 x i8], [300 x i8]* %14, i64 0, i64 0
%48 = call i32 @filenstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32* %46, i32 1, i8* %47)
%49 = load i32*, i32** %17
%50 = getelementptr inbounds [300 x i8], [300 x i8]* %14, i64 0, i64 0
%51 = call i32 @filenstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32* %49, i32 1, i8* %50)
%52 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.6, i64 0, i64 0))
%53 = load i32*, i32** %17
%54 = call i32 @fclose(i32* %53)
%55 = getelementptr inbounds [300 x i8], [300 x i8]* %13, i64 0, i64 0
%56 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%57 = getelementptr inbounds [150 x i8], [150 x i8]* %8, i64 0, i64 0
%58 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%59 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %55, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %56, i8* %57, i8* %58)
%60 = getelementptr inbounds [150 x i8], [150 x i8]* %9, i64 0, i64 0
%61 = getelementptr inbounds [150 x i8], [150 x i8]* %8, i64 0, i64 0
%62 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %60, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %61)
%63 = getelementptr inbounds [300 x i8], [300 x i8]* %13, i64 0, i64 0
%64 = call i32 @system(i8* %63)
%65 = getelementptr inbounds [150 x i8], [150 x i8]* %8, i64 0, i64 0
%66 = call i32 @remove(i8* %65)
%67 = getelementptr inbounds [150 x i8], [150 x i8]* %10, i64 0, i64 0
%68 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%69 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* %68)
%70 = getelementptr inbounds [150 x i8], [150 x i8]* %11, i64 0, i64 0
%71 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%72 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %70, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %71)
%73 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%74 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%75 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %73, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* %74)
%76 = getelementptr inbounds [150 x i8], [150 x i8]* %10, i64 0, i64 0
%77 = getelementptr inbounds [150 x i8], [150 x i8]* %11, i64 0, i64 0
%78 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%79 = call i32 @csplit(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* %76, i8* %77, i8* %78)
%80 = getelementptr inbounds [150 x i8], [150 x i8]* %10, i64 0, i64 0
%81 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%82 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %80, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %81)
%83 = getelementptr inbounds [150 x i8], [150 x i8]* %11, i64 0, i64 0
%84 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%85 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %83, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i8* %84)
%86 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%87 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%88 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %86, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %87)
%89 = getelementptr inbounds [150 x i8], [150 x i8]* %10, i64 0, i64 0
%90 = getelementptr inbounds [150 x i8], [150 x i8]* %11, i64 0, i64 0
%91 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%92 = call i32 @csplit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* %89, i8* %90, i8* %91)
store i32 %92, i32* %6
%93 = load i32, i32* %6
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %96
95: ; preds = %39
store i32 1, i32* %6
br label %96
96: ; preds = %95, %39
%97 = load i32, i32* %6
%98 = getelementptr inbounds [300 x i8], [300 x i8]* %15, i64 0, i64 0
%99 = getelementptr inbounds [300 x i8], [300 x i8]* %16, i64 0, i64 0
%100 = call i32 @moveFichiers(i32 %97, i8* %98, i8* %99)
%101 = getelementptr inbounds [150 x i8], [150 x i8]* %9, i64 0, i64 0
%102 = call i32 @afficheFichier(i8* %101)
%103 = getelementptr inbounds [150 x i8], [150 x i8]* %10, i64 0, i64 0
%104 = call i32 @remove(i8* %103)
%105 = getelementptr inbounds [150 x i8], [150 x i8]* %11, i64 0, i64 0
%106 = call i32 @remove(i8* %105)
%107 = getelementptr inbounds [150 x i8], [150 x i8]* %9, i64 0, i64 0
%108 = call i32 @remove(i8* %107)
br label %109
109: ; preds = %96, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%smail\00"
@.str.1 = [3 x i8] c"w+\00"
@EOF = global i8 0
@.str.2 = [6 x i8] c"Date:\00"
@.str.3 = [9 x i8] c"Subject:\00"
@.str.4 = [4 x i8] c"To:\00"
@.str.5 = [6 x i8] c"From:\00"
@.str.7 = [25 x i8] c"%sapiuncrypt -s %s -k %s\00"
@.str.8 = [7 x i8] c"%s.txt\00"
@.str.9 = [11 x i8] c"%smail.txt\00"
@.str.10 = [18 x i8] c"%smailtext000.txt\00"
@.str.11 = [11 x i8] c"%smailtext\00"
@.str.12 = [19 x i8] c"****FINFICHIER****\00"
@.str.13 = [22 x i8] c"%stmp/resutext000.txt\00"
@.str.14 = [15 x i8] c"%stmp/resutext\00"
@.str.15 = [12 x i8] c"****FIN****\00"
@str = [93 x i8] c"Content-Type: text/plain; charset=ISO-8859-1; format=flowed\0AContent-Transfer-Encoding: 7bit\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [150 x i8]
%4 = alloca [150 x i8]
%5 = alloca [150 x i8]
%6 = alloca [150 x i8]
%7 = alloca [50 x i8]
%8 = alloca [300 x i8]
%9 = alloca [300 x i8]
%10 = alloca [300 x i8]
%11 = alloca [300 x i8]
%12 = getelementptr inbounds [150 x i8], [150 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [150 x i8], [150 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [150 x i8], [150 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [300 x i8], [300 x i8]* %8, i64 0, i64 0
%18 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 0
%19 = getelementptr inbounds [300 x i8], [300 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%21 = call i32 @lireChemins(i8* %19, i8* %20)
%22 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %19)
%23 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %61, label %25
25: ; preds = %2
%26 = call signext i8 (...) @getchar()
%27 = load i8, i8* @EOF
%28 = icmp eq i8 %26, %27
br i1 %28, label %35, label %29
29: ; preds = %25, %29
%30 = phi i8 [ %32, %29 ], [ %26, %25 ]
%31 = call i32 @fputc(i8 signext %30, i32* %23)
%32 = call signext i8 (...) @getchar()
%33 = load i8, i8* @EOF
%34 = icmp eq i8 %32, %33
br i1 %34, label %35, label %29
35: ; preds = %29, %25
%36 = call i32 @filenstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %23, i32 1, i8* %18)
%37 = call i32 @filenstr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* %23, i32 1, i8* %18)
%38 = call i32 @filenstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32* %23, i32 1, i8* %18)
%39 = call i32 @filenstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32* %23, i32 1, i8* %18)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str, i64 0, i64 0))
%41 = call i32 @fclose(i32* %23)
%42 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %19, i8* %12, i8* %19)
%43 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* %12)
%44 = call i32 @system(i8* %17)
%45 = call i32 @remove(i8* %12)
%46 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* %19)
%47 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %19)
%48 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %16, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* %19)
%49 = call i32 @csplit(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* %14, i8* %15, i8* %16)
%50 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %19)
%51 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i8* %19)
%52 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %16, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %19)
%53 = call i32 @csplit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* %14, i8* %15, i8* %16)
%54 = icmp eq i32 %53, 0
%55 = select i1 %54, i32 1, i32 %53
%56 = call i32 @moveFichiers(i32 %55, i8* %19, i8* %20)
%57 = call i32 @afficheFichier(i8* %13)
%58 = call i32 @remove(i8* %14)
%59 = call i32 @remove(i8* %15)
%60 = call i32 @remove(i8* %13)
br label %61
61: ; preds = %35, %2
ret i32 0
}