#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 */

/* Variables and functions */
int decryptage_cesar(char *);
int decryptage_clef(char *);
int detection_fichier(char *);
int /*<<< orphan*/ getchar();
int menu_image_decrypt(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ system(char *);
int menu_decryptage(void) {
  int choix = 0;
  int retour = -1;
  int fichier_correct = -1;
  char nom_fichier[255];
  while (choix < 1 || choix > 4) {
    printf("Menu Decryptage :\n");
    printf("1 - Decryptage Cesar\n");
    printf("2 - Decryptage Clef\n");
    printf("3 - Decryptage Image\n");
    printf("4 - Retour au menu principal\n\n");
    scanf("%d", &choix);
    getchar();
    if (choix < 1 || choix > 4) {
      system("cls");
      printf("Erreur : vous n'avez pas entre un choix correct\n");
    }
  }
  switch (choix) {
  case 1:
    system("cls");
    while (fichier_correct != 0) {
      printf("Entrer le nom du fichier a decrypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    system("cls");
    retour = decryptage_cesar(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le decryptage\n");
      system("pause");
      return -1;
    }
    return 0;
    break;
  case 2:
    system("cls");
    while (fichier_correct != 0) {
      printf("Entrer le nom du fichier a decrypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    retour = decryptage_clef(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le decryptage\n");
      system("pause");
      return -1;
    }
    return 0;
    break;
  case 3:
    system("cls");
    while (fichier_correct != 0) {
      printf("Entrer le nom du fichier a decrypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    retour = menu_image_decrypt(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le decryptage\n");
      system("pause");
      return -1;
    }
    return 0;
    break;
  case 4:
    return 0;
    break;
  default:
    printf("Erreur default / break");
    return -1;
    break;
  }
  return choix;
}


x86 assembly (clang, -O0):
<menu_decryptage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x111(%rbp)
jl     11bf <menu_decryptage+0x3f>
cmpl   $0x4,-0x8(%rbp)
setg   %al
mov    %al,-0x111(%rbp)
mov    -0x111(%rbp),%al
test   $0x1,%al
jne    11d2 <menu_decryptage+0x52>
jmp    1258 <menu_decryptage+0xd8>
lea    0xe37(%rip),%rdi
call   1040 <printf@plt>
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
call   1040 <printf@plt>
lea    0xe51(%rip),%rdi
call   1040 <printf@plt>
lea    0xe5b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe6e(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
cmpl   $0x1,-0x8(%rbp)
jl     123b <menu_decryptage+0xbb>
cmpl   $0x4,-0x8(%rbp)
jle    1253 <menu_decryptage+0xd3>
lea    0xe44(%rip),%rdi
call   1030 <system@plt>
lea    0xe3c(%rip),%rdi
call   1040 <printf@plt>
jmp    11a0 <menu_decryptage+0x20>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x120(%rbp)
sub    $0x3,%eax
ja     147f <menu_decryptage+0x2ff>
mov    -0x120(%rbp),%rax
lea    0xd82(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf8(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     12de <menu_decryptage+0x15e>
lea    0xe17(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xdc1(%rip),%rdi
call   1030 <system@plt>
lea    -0x110(%rbp),%rdi
call   1050 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    1293 <menu_decryptage+0x113>
lea    0xda1(%rip),%rdi
call   1030 <system@plt>
lea    -0x110(%rbp),%rdi
call   10a0 <decryptage_cesar@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1327 <menu_decryptage+0x1a7>
lea    0xddc(%rip),%rdi
call   1040 <printf@plt>
lea    0xdeb(%rip),%rdi
call   1030 <system@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
movl   $0x0,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
lea    0xd4c(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     138a <menu_decryptage+0x20a>
lea    0xd6b(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xd15(%rip),%rdi
call   1030 <system@plt>
lea    -0x110(%rbp),%rdi
call   1050 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    133f <menu_decryptage+0x1bf>
lea    -0x110(%rbp),%rdi
call   1060 <decryptage_clef@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     13c7 <menu_decryptage+0x247>
lea    0xd3c(%rip),%rdi
call   1040 <printf@plt>
lea    0xd4b(%rip),%rdi
call   1030 <system@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
movl   $0x0,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
lea    0xcac(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     142a <menu_decryptage+0x2aa>
lea    0xccb(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xce0(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xc75(%rip),%rdi
call   1030 <system@plt>
lea    -0x110(%rbp),%rdi
call   1050 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    13df <menu_decryptage+0x25f>
lea    -0x110(%rbp),%rdi
call   1080 <menu_image_decrypt@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1467 <menu_decryptage+0x2e7>
lea    0xc9c(%rip),%rdi
call   1040 <printf@plt>
lea    0xcab(%rip),%rdi
call   1030 <system@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
movl   $0x0,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
movl   $0x0,-0x4(%rbp)
jmp    1492 <menu_decryptage+0x312>
lea    0xc81(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_decryptage>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
movl   $0x0,0xc(%rsp)
lea    0xf03(%rip),%r13
lea    0xf11(%rip),%rbx
lea    0xe52(%rip),%rbp
lea    0xc(%rsp),%r14
lea    0xe49(%rip),%r15
lea    0xf15(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xe91(%rip),%rdi
call   1030 <puts@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    0xc(%rsp),%ecx
lea    -0x5(%rcx),%eax
cmp    $0xfffffffb,%eax
ja     1250 <menu_decryptage+0xc0>
mov    %r15,%rdi
call   1040 <system@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%ecx
lea    -0x5(%rcx),%eax
cmp    $0xfffffffc,%eax
jb     11e0 <menu_decryptage+0x50>
add    $0xffffffff,%ecx
cmp    $0x3,%ecx
ja     12da <menu_decryptage+0x14a>
xor    %eax,%eax
lea    0xd9b(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xd9e(%rip),%r14
mov    %r14,%rdi
call   1040 <system@plt>
lea    0xdcd(%rip),%r15
lea    0xd8c(%rip),%rbx
lea    0x10(%rsp),%rbp
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    %r14,%rdi
call   1040 <system@plt>
mov    %rbp,%rdi
call   1060 <detection_fichier@plt>
test   %eax,%eax
jne    1290 <menu_decryptage+0x100>
lea    0xd53(%rip),%rdi
call   1040 <system@plt>
lea    0x10(%rsp),%rdi
call   10b0 <decryptage_cesar@plt>
test   %eax,%eax
jne    1347 <menu_decryptage+0x1b7>
xor    %eax,%eax
jmp    1364 <menu_decryptage+0x1d4>
lea    0xd3f(%rip),%rdi
call   1050 <printf@plt>
jmp    135f <menu_decryptage+0x1cf>
lea    0xd24(%rip),%r14
mov    %r14,%rdi
call   1040 <system@plt>
lea    0xd53(%rip),%r15
lea    0xd12(%rip),%rbx
lea    0x10(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    %r14,%rdi
call   1040 <system@plt>
mov    %rbp,%rdi
call   1060 <detection_fichier@plt>
test   %eax,%eax
jne    1310 <menu_decryptage+0x180>
lea    0x10(%rsp),%rdi
call   1070 <decryptage_clef@plt>
test   %eax,%eax
je     12d3 <menu_decryptage+0x143>
lea    0xce9(%rip),%rdi
call   1030 <puts@plt>
lea    0xcc0(%rip),%rdi
call   1040 <system@plt>
mov    $0xffffffff,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc96(%rip),%r14
mov    %r14,%rdi
call   1040 <system@plt>
lea    0xcc5(%rip),%r15
lea    0xc84(%rip),%rbx
lea    0x10(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    %r14,%rdi
call   1040 <system@plt>
mov    %rbp,%rdi
call   1060 <detection_fichier@plt>
test   %eax,%eax
jne    13a0 <menu_decryptage+0x210>
lea    0x10(%rsp),%rdi
call   1090 <menu_image_decrypt@plt>
test   %eax,%eax
jne    1347 <menu_decryptage+0x1b7>
jmp    12d3 <menu_decryptage+0x143>

LLVM IR (-O0):
@.str = [19 x i8] c"Menu Decryptage :\0A\00"
@.str.1 = [22 x i8] c"1 - Decryptage Cesar\0A\00"
@.str.2 = [21 x i8] c"2 - Decryptage Clef\0A\00"
@.str.3 = [22 x i8] c"3 - Decryptage Image\0A\00"
@.str.4 = [31 x i8] c"4 - Retour au menu principal\0A\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [4 x i8] c"cls\00"
@.str.7 = [49 x i8] c"Erreur : vous n'avez pas entre un choix correct\0A\00"
@.str.8 = [40 x i8] c"Entrer le nom du fichier a decrypter :\0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [27 x i8] c"Erreur dans le decryptage\0A\00"
@.str.11 = [6 x i8] c"pause\00"
@.str.12 = [23 x i8] c"Erreur default / break\00"
define i32 @menu_decryptage() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [255 x i8]
store i32 0, i32* %2
store i32 -1, i32* %3
store i32 -1, i32* %4
br label %6
6: ; preds = %30, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 4
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %31
14: ; preds = %12
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %2)
%21 = call i32 (...) @getchar()
%22 = load i32, i32* %2
%23 = icmp slt i32 %22, 1
br i1 %23, label %27, label %24
24: ; preds = %14
%25 = load i32, i32* %2
%26 = icmp sgt i32 %25, 4
br i1 %26, label %27, label %30
27: ; preds = %24, %14
%28 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %27, %24
br label %6
31: ; preds = %12
%32 = load i32, i32* %2
switch i32 %32, label %98 [
i32 1, label %33
i32 2, label %55
i32 3, label %76
i32 4, label %97
]
33: ; preds = %31
%34 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %35
35: ; preds = %38, %33
%36 = load i32, i32* %4
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%40 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %40)
%42 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%43 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%44 = call i32 @detection_fichier(i8* %43)
store i32 %44, i32* %4
br label %35
45: ; preds = %35
%46 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%47 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%48 = call i32 @decryptage_cesar(i8* %47)
store i32 %48, i32* %3
%49 = load i32, i32* %3
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %45
%52 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
store i32 -1, i32* %1
br label %100
54: ; preds = %45
store i32 0, i32* %1
br label %100
55: ; preds = %31
%56 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %57
57: ; preds = %60, %55
%58 = load i32, i32* %4
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %67
60: ; preds = %57
%61 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%62 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %62)
%64 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%65 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%66 = call i32 @detection_fichier(i8* %65)
store i32 %66, i32* %4
br label %57
67: ; preds = %57
%68 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%69 = call i32 @decryptage_clef(i8* %68)
store i32 %69, i32* %3
%70 = load i32, i32* %3
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %67
%73 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%74 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
store i32 -1, i32* %1
br label %100
75: ; preds = %67
store i32 0, i32* %1
br label %100
76: ; preds = %31
%77 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %78
78: ; preds = %81, %76
%79 = load i32, i32* %4
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %88
81: ; preds = %78
%82 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%83 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%84 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %83)
%85 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%86 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%87 = call i32 @detection_fichier(i8* %86)
store i32 %87, i32* %4
br label %78
88: ; preds = %78
%89 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%90 = call i32 @menu_image_decrypt(i8* %89)
store i32 %90, i32* %3
%91 = load i32, i32* %3
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %88
%94 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%95 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
store i32 -1, i32* %1
br label %100
96: ; preds = %88
store i32 0, i32* %1
br label %100
97: ; preds = %31
store i32 0, i32* %1
br label %100
98: ; preds = %31
%99 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
store i32 -1, i32* %1
br label %100
100: ; preds = %98, %97, %96, %93, %75, %72, %54, %51
%101 = load i32, i32* %1
ret i32 %101
}

LLVM IR (-O2):
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [4 x i8] c"cls\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.11 = [6 x i8] c"pause\00"
@.str.12 = [23 x i8] c"Erreur default / break\00"
@str.16 = [26 x i8] c"Erreur dans le decryptage\00"
@str.17 = [39 x i8] c"Entrer le nom du fichier a decrypter :\00"
@str.18 = [18 x i8] c"Menu Decryptage :\00"
@str.19 = [21 x i8] c"1 - Decryptage Cesar\00"
@str.20 = [20 x i8] c"2 - Decryptage Clef\00"
@str.21 = [21 x i8] c"3 - Decryptage Image\00"
@str.22 = [30 x i8] c"4 - Retour au menu principal\0A\00"
@str.23 = [48 x i8] c"Erreur : vous n'avez pas entre un choix correct\00"
define i32 @menu_decryptage() {
%1 = alloca i32
%2 = alloca [255 x i8]
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
br label %5
5: ; preds = %0, %16
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.19, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.20, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.21, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%12 = call i32 (...) @getchar()
%13 = load i32, i32* %1
%14 = add i32 %13, -5
%15 = icmp ult i32 %14, -4
br i1 %15, label %16, label %22
16: ; preds = %5
%17 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.23, i64 0, i64 0))
%19 = load i32, i32* %1
%20 = add i32 %19, -5
%21 = icmp ult i32 %20, -4
br i1 %21, label %5, label %22
22: ; preds = %5, %16
%23 = phi i32 [ %19, %16 ], [ %13, %5 ]
switch i32 %23, label %67 [
i32 1, label %24
i32 2, label %39
i32 3, label %53
i32 4, label %69
]
24: ; preds = %22
%25 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %26
26: ; preds = %24, %26
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.17, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%29 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%30 = call i32 @detection_fichier(i8* %4)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %26
32: ; preds = %26
%33 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 @decryptage_cesar(i8* %4)
%35 = icmp eq i32 %34, 0
br i1 %35, label %69, label %36
36: ; preds = %32
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.16, i64 0, i64 0))
%38 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %69
39: ; preds = %22
%40 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %41
41: ; preds = %39, %41
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.17, i64 0, i64 0))
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%44 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 @detection_fichier(i8* %4)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %41
47: ; preds = %41
%48 = call i32 @decryptage_clef(i8* %4)
%49 = icmp eq i32 %48, 0
br i1 %49, label %69, label %50
50: ; preds = %47
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.16, i64 0, i64 0))
%52 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %69
53: ; preds = %22
%54 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %55
55: ; preds = %53, %55
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.17, i64 0, i64 0))
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%58 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%59 = call i32 @detection_fichier(i8* %4)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %55
61: ; preds = %55
%62 = call i32 @menu_image_decrypt(i8* %4)
%63 = icmp eq i32 %62, 0
br i1 %63, label %69, label %64
64: ; preds = %61
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.16, i64 0, i64 0))
%66 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %69
67: ; preds = %22
%68 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
br label %69
69: ; preds = %22, %61, %47, %32, %67, %64, %50, %36
%70 = phi i32 [ -1, %67 ], [ -1, %64 ], [ -1, %50 ], [ -1, %36 ], [ 0, %32 ], [ 0, %47 ], [ 0, %61 ], [ 0, %22 ]
ret i32 %70
}