#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ letmesee(int);
int /*<<< orphan*/ pause();
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ system(char *);
void info_wep() {
  system("CLS");
  fprintf(stdout,
          "Source: https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy\n\n");
  fprintf(
      stdout,
      "\4 Encryption details:\n"
      "WEP was included as the privacy component of the original IEEE 802.11 "
      "standard\n"
      "ratified in 1997. WEP uses the stream cipher RC4 for confidentiality, "
      "and\n"
      "the CRC-32 checksum for integrity. It was deprecated in 2004 and is\n"
      "documented in the current standard.\n\n");
  if ((letmesee(10 + 6 + 9)) == 0)
    return;
  fprintf(
      stdout,
      "\n\4 64-bit:\n"
      "A 64-bit WEP key is usually entered as a string of 10 hexadecimal (base "
      "16)\n"
      "characters (0-9 and A-F). Each character represents 4 bits,\n"
      "10 digits of 4 bits each gives 40 bits; adding the 24-bit IV produces "
      "the\n"
      "complete 64-bit WEP key (4 bits x 10 + 24 bits IV = 64 bits of WEP "
      "key).\n"
      "Most devices also allow the user to enter the key as 5 ASCII "
      "characters\n"
      "(0-9, a-z, A-Z), each of which is turned into 8 bits using the "
      "character's\n"
      "byte value in ASCII (8 bits x 5 + 24 bits IV = 64 bits of WEP key); "
      "however,\n"
      "this restricts each byte to be a printable ASCII character, which is "
      "only\n"
      "a small fraction of possible byte values, greatly reducing the space\n"
      "of possible keys.\n\n");
  if ((letmesee(6 + 9)) == 0)
    return;
  fprintf(
      stdout,
      "\n\4 128-bit:\n"
      "A 128-bit WEP key is usually entered as a string of 26 hexadecimal\n"
      "characters. 26 digits of 4 bits each gives 104 bits; adding the 24-bit\n"
      "IV produces the complete 128-bit WEP key\n"
      "(4 bits x 26 + 24 bits IV = 128 bits of WEP key).\n"
      "Most devices also allow the user to enter it as 13 ASCII characters\n"
      "(8 bits x 13 + 24 bits IV = 128 bits of WEP key).\n\n");
  if ((letmesee(9)) == 0)
    return;
  fprintf(
      stdout,
      "\n\4 152-bit:\n"
      "A 152-bit and a 256-bit WEP systems are available from some vendors.\n"
      "As with the other WEP variants, 24 bits of that is for the IV,\n"
      "leaving 128 or 232 bits for actual protection.\n"
      "These 128 or 232 bits are typically entered as 32 or 58 hexadecimal "
      "characters\n"
      "(4 bits x 32 + 24 bits IV = 152 bits of WEP key,\n"
      "4 bits x 58 + 24 bits IV = 256 bits of WEP key).\n"
      "Most devices also allow the user to enter it as 16 or 29 ASCII "
      "characters\n"
      "(8 bits x 16 + 24 bits IV = 152 bits of WEP key,\n"
      "8 bits x 29 + 24 bits IV = 256 bits of WEP key).\n\n");
  pause();
  system("CLS");
}


x86 assembly (clang, -O0):
<info_wep>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xed0(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x19,%edi
call   1040 <letmesee@plt>
cmp    $0x0,%rax
jne    1193 <info_wep+0x53>
jmp    1217 <info_wep+0xd7>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xfbb(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xf,%edi
call   1040 <letmesee@plt>
cmp    $0x0,%rax
jne    11c1 <info_wep+0x81>
jmp    1217 <info_wep+0xd7>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0x1236(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x9,%edi
call   1040 <letmesee@plt>
cmp    $0x0,%rax
jne    11ef <info_wep+0xaf>
jmp    1217 <info_wep+0xd7>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
lea    0x1371(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1060 <pause@plt>
lea    0xdee(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<info_wep>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <system@plt>
mov    0x2e8c(%rip),%rbx
mov    (%rbx),%edi
lea    0xea7(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeda(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x19,%edi
call   1040 <letmesee@plt>
test   %rax,%rax
je     11db <info_wep+0x9b>
mov    (%rbx),%edi
lea    0xfd6(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xf,%edi
call   1040 <letmesee@plt>
test   %rax,%rax
je     11db <info_wep+0x9b>
mov    (%rbx),%edi
lea    0x1262(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x9,%edi
call   1040 <letmesee@plt>
test   %rax,%rax
je     11db <info_wep+0x9b>
mov    (%rbx),%edi
lea    0x13ae(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1060 <pause@plt>
lea    0xe2b(%rip),%rdi
pop    %rbx
jmp    1030 <system@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"CLS\00"
@stdout = global i32 0
@.str.1 = [65 x i8] c"Source: https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy\0A\0A\00"
@.str.2 = [281 x i8] c"\04 Encryption details:\0AWEP was included as the privacy component of the original IEEE 802.11 standard\0Aratified in 1997. WEP uses the stream cipher RC4 for confidentiality, and\0Athe CRC-32 checksum for integrity. It was deprecated in 2004 and is\0Adocumented in the current standard.\0A\0A\00"
@.str.3 = [681 x i8] c"\0A\04 64-bit:\0AA 64-bit WEP key is usually entered as a string of 10 hexadecimal (base 16)\0Acharacters (0-9 and A-F). Each character represents 4 bits,\0A10 digits of 4 bits each gives 40 bits; adding the 24-bit IV produces the\0Acomplete 64-bit WEP key (4 bits x 10 + 24 bits IV = 64 bits of WEP key).\0AMost devices also allow the user to enter the key as 5 ASCII characters\0A(0-9, a-z, A-Z), each of which is turned into 8 bits using the character's\0Abyte value in ASCII (8 bits x 5 + 24 bits IV = 64 bits of WEP key); however,\0Athis restricts each byte to be a printable ASCII character, which is only\0Aa small fraction of possible byte values, greatly reducing the space\0Aof possible keys.\0A\0A\00"
@.str.4 = [361 x i8] c"\0A\04 128-bit:\0AA 128-bit WEP key is usually entered as a string of 26 hexadecimal\0Acharacters. 26 digits of 4 bits each gives 104 bits; adding the 24-bit\0AIV produces the complete 128-bit WEP key\0A(4 bits x 26 + 24 bits IV = 128 bits of WEP key).\0AMost devices also allow the user to enter it as 13 ASCII characters\0A(8 bits x 13 + 24 bits IV = 128 bits of WEP key).\0A\0A\00"
@.str.5 = [542 x i8] c"\0A\04 152-bit:\0AA 152-bit and a 256-bit WEP systems are available from some vendors.\0AAs with the other WEP variants, 24 bits of that is for the IV,\0Aleaving 128 or 232 bits for actual protection.\0AThese 128 or 232 bits are typically entered as 32 or 58 hexadecimal characters\0A(4 bits x 32 + 24 bits IV = 152 bits of WEP key,\0A4 bits x 58 + 24 bits IV = 256 bits of WEP key).\0AMost devices also allow the user to enter it as 16 or 29 ASCII characters\0A(8 bits x 16 + 24 bits IV = 152 bits of WEP key,\0A8 bits x 29 + 24 bits IV = 256 bits of WEP key).\0A\0A\00"
define void @info_wep() {
%1 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str.2, i64 0, i64 0))
%6 = call i64 @letmesee(i32 25)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
br label %26
9: ; preds = %0
%10 = load i32, i32* @stdout
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([681 x i8], [681 x i8]* @.str.3, i64 0, i64 0))
%12 = call i64 @letmesee(i32 15)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
br label %26
15: ; preds = %9
%16 = load i32, i32* @stdout
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([361 x i8], [361 x i8]* @.str.4, i64 0, i64 0))
%18 = call i64 @letmesee(i32 9)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
br label %26
21: ; preds = %15
%22 = load i32, i32* @stdout
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([542 x i8], [542 x i8]* @.str.5, i64 0, i64 0))
%24 = call i32 (...) @pause()
%25 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %26
26: ; preds = %21, %20, %14, %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"CLS\00"
@stdout = global i32 0
@.str.1 = [65 x i8] c"Source: https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy\0A\0A\00"
@.str.2 = [281 x i8] c"\04 Encryption details:\0AWEP was included as the privacy component of the original IEEE 802.11 standard\0Aratified in 1997. WEP uses the stream cipher RC4 for confidentiality, and\0Athe CRC-32 checksum for integrity. It was deprecated in 2004 and is\0Adocumented in the current standard.\0A\0A\00"
@.str.3 = [681 x i8] c"\0A\04 64-bit:\0AA 64-bit WEP key is usually entered as a string of 10 hexadecimal (base 16)\0Acharacters (0-9 and A-F). Each character represents 4 bits,\0A10 digits of 4 bits each gives 40 bits; adding the 24-bit IV produces the\0Acomplete 64-bit WEP key (4 bits x 10 + 24 bits IV = 64 bits of WEP key).\0AMost devices also allow the user to enter the key as 5 ASCII characters\0A(0-9, a-z, A-Z), each of which is turned into 8 bits using the character's\0Abyte value in ASCII (8 bits x 5 + 24 bits IV = 64 bits of WEP key); however,\0Athis restricts each byte to be a printable ASCII character, which is only\0Aa small fraction of possible byte values, greatly reducing the space\0Aof possible keys.\0A\0A\00"
@.str.4 = [361 x i8] c"\0A\04 128-bit:\0AA 128-bit WEP key is usually entered as a string of 26 hexadecimal\0Acharacters. 26 digits of 4 bits each gives 104 bits; adding the 24-bit\0AIV produces the complete 128-bit WEP key\0A(4 bits x 26 + 24 bits IV = 128 bits of WEP key).\0AMost devices also allow the user to enter it as 13 ASCII characters\0A(8 bits x 13 + 24 bits IV = 128 bits of WEP key).\0A\0A\00"
@.str.5 = [542 x i8] c"\0A\04 152-bit:\0AA 152-bit and a 256-bit WEP systems are available from some vendors.\0AAs with the other WEP variants, 24 bits of that is for the IV,\0Aleaving 128 or 232 bits for actual protection.\0AThese 128 or 232 bits are typically entered as 32 or 58 hexadecimal characters\0A(4 bits x 32 + 24 bits IV = 152 bits of WEP key,\0A4 bits x 58 + 24 bits IV = 256 bits of WEP key).\0AMost devices also allow the user to enter it as 16 or 29 ASCII characters\0A(8 bits x 16 + 24 bits IV = 152 bits of WEP key,\0A8 bits x 29 + 24 bits IV = 256 bits of WEP key).\0A\0A\00"
define void @info_wep() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i64 @letmesee(i32 25)
%7 = icmp eq i64 %6, 0
br i1 %7, label %23, label %8
8: ; preds = %0
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([681 x i8], [681 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i64 @letmesee(i32 15)
%12 = icmp eq i64 %11, 0
br i1 %12, label %23, label %13
13: ; preds = %8
%14 = load i32, i32* @stdout
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([361 x i8], [361 x i8]* @.str.4, i64 0, i64 0))
%16 = tail call i64 @letmesee(i32 9)
%17 = icmp eq i64 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i32, i32* @stdout
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([542 x i8], [542 x i8]* @.str.5, i64 0, i64 0))
%21 = tail call i32 (...) @pause()
%22 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %13, %8, %0, %18
ret void
}