#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 */
size_t f1(char *);
size_t f2(char *);
size_t f3(char *);
size_t f4(char *);
size_t f5(char *);
size_t f6(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("Utilisation : %s [pseudo]\n", argv[0]);
    return 1;
  }
  char *login = argv[1];
  char *key = argv[2];
  char kstr[] =
      "A-CHRDw87lNS0E9B2TibgpnMVys5XzvtOGJcYLU+4mjW6fxqZeF3Qa1rPhdKIouk";
  printf("%c", kstr[f1(login)]);
  printf("%c", kstr[f2(login)]);
  printf("%c", kstr[f3(login)]);
  printf("%c", kstr[f4(login)]);
  printf("%c", kstr[f5(login)]);
  printf("%c", kstr[f6(login)]);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11c1 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    12a4 <main+0x124>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x41,%edx
call   1070 <memcpy@plt>
mov    -0x18(%rbp),%rdi
call   1080 <f1@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <f2@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1060 <f3@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <f4@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1090 <f5@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <f6@plt>
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd7c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    1212 <main+0x92>
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1080 <f1@plt>
lea    0xe80(%rip),%r14
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
call   1030 <f2@plt>
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
call   1070 <f3@plt>
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
call   10a0 <f4@plt>
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
call   1090 <f5@plt>
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
call   1040 <f6@plt>
movsbl (%rax,%r14,1),%edi
call   1050 <putchar@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
xor    %eax,%eax
jmp    1228 <main+0xa8>
mov    (%rsi),%rsi
lea    0xde4(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Utilisation : %s [pseudo]\0A\00"
@__const.main.kstr = [65 x i8] c"A-CHRDw87lNS0E9B2TibgpnMVys5XzvtOGJcYLU+4mjW6fxqZeF3Qa1rPhdKIouk\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [65 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %14)
store i32 1, i32* %3
br label %61
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
store i8* %19, i8** %6
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
store i8* %22, i8** %7
%23 = bitcast [65 x i8]* %8 to i8*
%24 = load i8*, i8** %6
%25 = call i64 @f1(i8* %24)
%26 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = load i8*, i8** %6
%31 = call i64 @f2(i8* %30)
%32 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = load i8*, i8** %6
%37 = call i64 @f3(i8* %36)
%38 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = load i8*, i8** %6
%43 = call i64 @f4(i8* %42)
%44 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = load i8*, i8** %6
%49 = call i64 @f5(i8* %48)
%50 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = load i8*, i8** %6
%55 = call i64 @f6(i8* %54)
%56 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %58)
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %16, %11
%62 = load i32, i32* %3
ret i32 %62
}

LLVM IR (-O2):
@.str = [27 x i8] c"Utilisation : %s [pseudo]\0A\00"
@__const.main.kstr = [65 x i8] c"A-CHRDw87lNS0E9B2TibgpnMVys5XzvtOGJcYLU+4mjW6fxqZeF3Qa1rPhdKIouk\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
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 %41
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @f1(i8* %9)
%11 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = tail call i32 @putchar(i32 %13)
%15 = tail call i64 @f2(i8* %9)
%16 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = tail call i32 @putchar(i32 %18)
%20 = tail call i64 @f3(i8* %9)
%21 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = tail call i32 @putchar(i32 %23)
%25 = tail call i64 @f4(i8* %9)
%26 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = tail call i32 @putchar(i32 %28)
%30 = tail call i64 @f5(i8* %9)
%31 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = tail call i32 @putchar(i32 %33)
%35 = tail call i64 @f6(i8* %9)
%36 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.kstr, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = tail call i32 @putchar(i32 %38)
%40 = tail call i32 @putchar(i32 10)
br label %41
41: ; preds = %7, %4
%42 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %42
}