#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 cryptage_cesar(char *);
int cryptage_clef(char *);
int detection_fichier(char *);
int /*<<< orphan*/ getchar();
int menu_image_crypt(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ system(char *);
int menu_cryptage(void) {
  int choix = 0;
  int retour = -1;
  int fichier_correct = -1;
  char nom_fichier[255];
  while (choix < 1 || choix > 4) {
    printf("Menu Cryptage :\n");
    printf("1 - Cryptage Cesar\n");
    printf("2 - Cryptage Clef\n");
    printf("3 - Cryptage 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 crypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    retour = cryptage_cesar(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le cryptage\n");
      system("pause");
    }
    return 0;
    break;
  case 2:
    system("cls");
    while (fichier_correct != 0) {
      printf("Entrer le nom du fichier a crypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    retour = cryptage_clef(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le cryptage\n");
      system("pause");
    }
    return 0;
    break;
  case 3:
    system("cls");
    while (fichier_correct != 0) {
      printf("Entrer le nom du fichier a crypter :\n");
      scanf("%s", nom_fichier);
      system("cls");
      fichier_correct = detection_fichier(nom_fichier);
    }
    retour = menu_image_crypt(nom_fichier);
    if (retour != 0) {
      printf("Erreur dans le cryptage\n");
      system("pause");
    }
    return 0;
    break;
  case 4:
    return 0;
    break;
  default:
    printf("Erreur default / break\n");
    return -1;
    break;
  }
  return choix;
}


x86 assembly (clang, -O0):
<menu_cryptage>:
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_cryptage+0x3f>
cmpl   $0x4,-0x8(%rbp)
setg   %al
mov    %al,-0x111(%rbp)
mov    -0x111(%rbp),%al
test   $0x1,%al
jne    11d2 <menu_cryptage+0x52>
jmp    1258 <menu_cryptage+0xd8>
lea    0xe37(%rip),%rdi
call   1060 <printf@plt>
lea    0xe3c(%rip),%rdi
call   1060 <printf@plt>
lea    0xe44(%rip),%rdi
call   1060 <printf@plt>
lea    0xe4b(%rip),%rdi
call   1060 <printf@plt>
lea    0xe53(%rip),%rdi
call   1060 <printf@plt>
lea    0xe66(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
cmpl   $0x1,-0x8(%rbp)
jl     123b <menu_cryptage+0xbb>
cmpl   $0x4,-0x8(%rbp)
jle    1253 <menu_cryptage+0xd3>
lea    0xe3c(%rip),%rdi
call   1050 <system@plt>
lea    0xe34(%rip),%rdi
call   1060 <printf@plt>
jmp    11a0 <menu_cryptage+0x20>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x120(%rbp)
sub    $0x3,%eax
ja     144f <menu_cryptage+0x2cf>
mov    -0x120(%rbp),%rax
lea    0xd82(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf0(%rip),%rdi
call   1050 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     12de <menu_cryptage+0x15e>
lea    0xe0f(%rip),%rdi
call   1060 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xdb9(%rip),%rdi
call   1050 <system@plt>
lea    -0x110(%rbp),%rdi
call   1070 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    1293 <menu_cryptage+0x113>
lea    -0x110(%rbp),%rdi
call   10a0 <cryptage_cesar@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     130f <menu_cryptage+0x18f>
lea    0xdde(%rip),%rdi
call   1060 <printf@plt>
lea    0xdeb(%rip),%rdi
call   1050 <system@plt>
movl   $0x0,-0x4(%rbp)
jmp    1462 <menu_cryptage+0x2e2>
lea    0xd5c(%rip),%rdi
call   1050 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     1372 <menu_cryptage+0x1f2>
lea    0xd7b(%rip),%rdi
call   1060 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xd25(%rip),%rdi
call   1050 <system@plt>
lea    -0x110(%rbp),%rdi
call   1070 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    1327 <menu_cryptage+0x1a7>
lea    -0x110(%rbp),%rdi
call   1040 <cryptage_clef@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     13a3 <menu_cryptage+0x223>
lea    0xd4a(%rip),%rdi
call   1060 <printf@plt>
lea    0xd57(%rip),%rdi
call   1050 <system@plt>
movl   $0x0,-0x4(%rbp)
jmp    1462 <menu_cryptage+0x2e2>
lea    0xcc8(%rip),%rdi
call   1050 <system@plt>
cmpl   $0x0,-0x10(%rbp)
je     1406 <menu_cryptage+0x286>
lea    0xce7(%rip),%rdi
call   1060 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xc91(%rip),%rdi
call   1050 <system@plt>
lea    -0x110(%rbp),%rdi
call   1070 <detection_fichier@plt>
mov    %eax,-0x10(%rbp)
jmp    13bb <menu_cryptage+0x23b>
lea    -0x110(%rbp),%rdi
call   1030 <menu_image_crypt@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1437 <menu_cryptage+0x2b7>
lea    0xcb6(%rip),%rdi
call   1060 <printf@plt>
lea    0xcc3(%rip),%rdi
call   1050 <system@plt>
movl   $0x0,-0x4(%rbp)
jmp    1462 <menu_cryptage+0x2e2>
movl   $0x0,-0x4(%rbp)
jmp    1462 <menu_cryptage+0x2e2>
lea    0xca5(%rip),%rdi
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_cryptage>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
movl   $0x0,0xc(%rsp)
lea    0xf09(%rip),%r13
lea    0xf15(%rip),%rbx
lea    0xe62(%rip),%rbp
lea    0xc(%rsp),%r14
lea    0xe59(%rip),%r15
lea    0xf19(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xe9d(%rip),%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    0xc(%rsp),%eax
lea    -0x5(%rax),%ecx
cmp    $0xfffffffb,%ecx
ja     1240 <menu_cryptage+0xc0>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%eax
lea    -0x5(%rax),%ecx
cmp    $0xfffffffc,%ecx
jb     11d0 <menu_cryptage+0x50>
add    $0xffffffff,%eax
cmp    $0x3,%eax
ja     12b8 <menu_cryptage+0x138>
xor    %ebx,%ebx
lea    0xdaf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdb2(%rip),%r14
mov    %r14,%rdi
call   1060 <system@plt>
lea    0xdc8(%rip),%r15
lea    0xda0(%rip),%rbx
lea    0x10(%rsp),%rbp
nopl   0x0(%rax)
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %r14,%rdi
call   1060 <system@plt>
mov    %rbp,%rdi
call   1070 <detection_fichier@plt>
test   %eax,%eax
jne    1280 <menu_cryptage+0x100>
lea    0x10(%rsp),%rdi
call   10a0 <cryptage_cesar@plt>
jmp    1383 <menu_cryptage+0x203>
lea    0xd9e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
jmp    13a1 <menu_cryptage+0x221>
lea    0xd3e(%rip),%r14
mov    %r14,%rdi
call   1060 <system@plt>
lea    0xd54(%rip),%r15
lea    0xd2c(%rip),%rbx
lea    0x10(%rsp),%rbp
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %r14,%rdi
call   1060 <system@plt>
mov    %rbp,%rdi
call   1070 <detection_fichier@plt>
test   %eax,%eax
jne    12f0 <menu_cryptage+0x170>
lea    0x10(%rsp),%rdi
call   1050 <cryptage_clef@plt>
jmp    1383 <menu_cryptage+0x203>
lea    0xce7(%rip),%r14
mov    %r14,%rdi
call   1060 <system@plt>
lea    0xcfd(%rip),%r15
lea    0xcd5(%rip),%rbx
lea    0x10(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %r14,%rdi
call   1060 <system@plt>
mov    %rbp,%rdi
call   1070 <detection_fichier@plt>
test   %eax,%eax
jne    1350 <menu_cryptage+0x1d0>
lea    0x10(%rsp),%rdi
call   1030 <menu_image_crypt@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     13a1 <menu_cryptage+0x221>
lea    0xc90(%rip),%rdi
call   1040 <puts@plt>
lea    0xc7e(%rip),%rdi
call   1060 <system@plt>
mov    %ebx,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Menu Cryptage :\0A\00"
@.str.1 = [20 x i8] c"1 - Cryptage Cesar\0A\00"
@.str.2 = [19 x i8] c"2 - Cryptage Clef\0A\00"
@.str.3 = [20 x i8] c"3 - Cryptage 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 = [38 x i8] c"Entrer le nom du fichier a crypter :\0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [25 x i8] c"Erreur dans le cryptage\0A\00"
@.str.11 = [6 x i8] c"pause\00"
@.str.12 = [24 x i8] c"Erreur default / break\0A\00"
define i32 @menu_cryptage() {
%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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 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 %97 [
i32 1, label %33
i32 2, label %54
i32 3, label %75
i32 4, label %96
]
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 ([38 x i8], [38 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 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%47 = call i32 @cryptage_cesar(i8* %46)
store i32 %47, i32* %3
%48 = load i32, i32* %3
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %45
%51 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, 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 %53
53: ; preds = %50, %45
store i32 0, i32* %1
br label %99
54: ; preds = %31
%55 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %59, %54
%57 = load i32, i32* %4
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %66
59: ; preds = %56
%60 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
%61 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %61)
%63 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%64 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%65 = call i32 @detection_fichier(i8* %64)
store i32 %65, i32* %4
br label %56
66: ; preds = %56
%67 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%68 = call i32 @cryptage_clef(i8* %67)
store i32 %68, i32* %3
%69 = load i32, i32* %3
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %66
%72 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%73 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %74
74: ; preds = %71, %66
store i32 0, i32* %1
br label %99
75: ; preds = %31
%76 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %77
77: ; preds = %80, %75
%78 = load i32, i32* %4
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %87
80: ; preds = %77
%81 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
%82 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%83 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %82)
%84 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%85 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%86 = call i32 @detection_fichier(i8* %85)
store i32 %86, i32* %4
br label %77
87: ; preds = %77
%88 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%89 = call i32 @menu_image_crypt(i8* %88)
store i32 %89, i32* %3
%90 = load i32, i32* %3
%91 = icmp ne i32 %90, 0
br i1 %91, label %92, label %95
92: ; preds = %87
%93 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%94 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %95
95: ; preds = %92, %87
store i32 0, i32* %1
br label %99
96: ; preds = %31
store i32 0, i32* %1
br label %99
97: ; preds = %31
%98 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
store i32 -1, i32* %1
br label %99
99: ; preds = %97, %96, %95, %74, %53
%100 = load i32, i32* %1
ret i32 %100
}

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.16 = [24 x i8] c"Erreur dans le cryptage\00"
@str.17 = [37 x i8] c"Entrer le nom du fichier a crypter :\00"
@str.18 = [23 x i8] c"Erreur default / break\00"
@str.19 = [16 x i8] c"Menu Cryptage :\00"
@str.20 = [19 x i8] c"1 - Cryptage Cesar\00"
@str.21 = [18 x i8] c"2 - Cryptage Clef\00"
@str.22 = [19 x i8] c"3 - Cryptage Image\00"
@str.23 = [30 x i8] c"4 - Retour au menu principal\0A\00"
@str.24 = [48 x i8] c"Erreur : vous n'avez pas entre un choix correct\00"
define i32 @menu_cryptage() {
%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 ([16 x i8], [16 x i8]* @str.19, i64 0, i64 0))
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.20, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.22, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.23, 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.24, 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 %66 [
i32 1, label %24
i32 2, label %38
i32 3, label %52
i32 4, label %68
]
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 ([37 x i8], [37 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 @cryptage_cesar(i8* %4)
%34 = icmp eq i32 %33, 0
br i1 %34, label %68, label %35
35: ; preds = %32
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0))
%37 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %68
38: ; preds = %22
%39 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %40
40: ; preds = %38, %40
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.17, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%43 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%44 = call i32 @detection_fichier(i8* %4)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %40
46: ; preds = %40
%47 = call i32 @cryptage_clef(i8* %4)
%48 = icmp eq i32 %47, 0
br i1 %48, label %68, label %49
49: ; preds = %46
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0))
%51 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %68
52: ; preds = %22
%53 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %54
54: ; preds = %52, %54
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.17, i64 0, i64 0))
%56 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %4)
%57 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%58 = call i32 @detection_fichier(i8* %4)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %54
60: ; preds = %54
%61 = call i32 @menu_image_crypt(i8* %4)
%62 = icmp eq i32 %61, 0
br i1 %62, label %68, label %63
63: ; preds = %60
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0))
%65 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %68
66: ; preds = %22
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.18, i64 0, i64 0))
br label %68
68: ; preds = %22, %60, %63, %46, %49, %32, %35, %66
%69 = phi i32 [ -1, %66 ], [ 0, %35 ], [ 0, %32 ], [ 0, %49 ], [ 0, %46 ], [ 0, %63 ], [ 0, %60 ], [ 0, %22 ]
ret i32 %69
}