xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_version() {
  printf("microkeyer 0.1\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"microkeyer 0.1\0A\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"microkeyer 0.1\00"
define void @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int is_absolute_path(const char *path) {
  if (path && (*path == '/'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_absolute_path>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112f <is_absolute_path+0x2f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    112f <is_absolute_path+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <is_absolute_path+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_absolute_path>:
test   %rdi,%rdi
je     110f <is_absolute_path+0xf>
mov    $0x1,%eax
cmpb   $0x2f,(%rdi)
je     1111 <is_absolute_path+0x11>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_absolute_path(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 47
br i1 %10, label %11, label %12
11: ; preds = %6
store i32 1, i32* %2
br label %13
12: ; preds = %6, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_absolute_path(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 47
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
int qh4(unsigned int x) {
  x = (x & 0xff00) | ((x & 255) << 24);
  x = (x & 0xf000f00) | ((x >> 12) & 0xf000f);
  unsigned int ten = (x + 0x6060606) & 0x10101010;
  return (int)(x + 0x30303030 + (ten >> 1) - (ten >> 4));
}


x86 assembly (clang, -O0):
<qh4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf000f00,%eax
mov    -0x4(%rbp),%ecx
shr    $0xc,%ecx
and    $0xf000f,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6060606,%eax
and    $0x10101010,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30303030,%eax
mov    -0x8(%rbp),%ecx
shr    $0x1,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qh4>:
mov    %edi,%eax
and    $0xff00,%eax
shl    $0x18,%edi
or     %edi,%eax
mov    %eax,%ecx
shr    $0xc,%ecx
or     %eax,%ecx
and    $0xf0f0f0f,%ecx
lea    0x6060606(%rcx),%edx
and    $0x10101010,%edx
mov    %edx,%eax
shr    %eax
add    %ecx,%eax
shr    $0x4,%edx
sub    %edx,%eax
add    $0x30303030,%eax
ret

LLVM IR (-O0):
define i32 @qh4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 65280
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 24
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 251662080
%12 = load i32, i32* %2
%13 = lshr i32 %12, 12
%14 = and i32 %13, 983055
%15 = or i32 %11, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = add i32 %16, 101058054
%18 = and i32 %17, 269488144
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = add i32 %19, 808464432
%21 = load i32, i32* %3
%22 = lshr i32 %21, 1
%23 = add i32 %20, %22
%24 = load i32, i32* %3
%25 = lshr i32 %24, 4
%26 = sub i32 %23, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @qh4(i32 %0) {
%2 = and i32 %0, 65280
%3 = shl i32 %0, 24
%4 = or i32 %2, %3
%5 = and i32 %4, 251662080
%6 = lshr i32 %4, 12
%7 = and i32 %6, 983055
%8 = or i32 %7, %5
%9 = add nuw nsw i32 %8, 101058054
%10 = and i32 %9, 269488144
%11 = or i32 %8, 808464432
%12 = lshr exact i32 %10, 1
%13 = add nuw nsw i32 %11, %12
%14 = lshr exact i32 %10, 4
%15 = sub nuw nsw i32 %13, %14
ret i32 %15
}
/* Variables and functions */
int nextcharstart(char const *, int);
extern int utfstrlen(const char *str) {
  int char_counter = 0;
  int pointer = 0;
  while (str[pointer]) {
    pointer = nextcharstart(str, pointer);
    ++char_counter;
  }
  return char_counter;
}


x86 assembly (clang, -O0):
<utfstrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1159 <utfstrlen+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <nextcharstart@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <utfstrlen+0x1a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utfstrlen>:
push   %rbp
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     1138 <utfstrlen+0x28>
mov    %rdi,%rbx
xor    %eax,%eax
xor    %ebp,%ebp
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <nextcharstart@plt>
add    $0x1,%ebp
movslq %eax,%rcx
cmpb   $0x0,(%rbx,%rcx,1)
jne    1120 <utfstrlen+0x10>
jmp    113a <utfstrlen+0x2a>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @utfstrlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %12, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %4
%15 = call i32 @nextcharstart(i8* %13, i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %5
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @utfstrlen(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = tail call i32 @nextcharstart(i8* %0, i32 %5)
%8 = add nuw nsw i32 %6, 1
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %14
}
/* Variables and functions */
bool parsing_integer_start_is_correct(char c, bool allow_signed) {
  return (c >= '0' && c <= '9') || (c == '+') || (c == '-' && allow_signed);
}


x86 assembly (clang, -O0):
<parsing_integer_start_is_correct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     112c <parsing_integer_start_is_correct+0x2c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x9(%rbp)
jle    1160 <parsing_integer_start_is_correct+0x60>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x9(%rbp)
je     1160 <parsing_integer_start_is_correct+0x60>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0xa(%rbp)
jne    115a <parsing_integer_start_is_correct+0x5a>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parsing_integer_start_is_correct>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x2b,%dil
sete   %cl
or     %al,%cl
cmp    $0x2d,%dil
sete   %al
test   %esi,%esi
setne  %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @parsing_integer_start_is_correct(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 57
br i1 %11, label %25, label %12
12: ; preds = %8, %2
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 43
br i1 %15, label %25, label %16
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 45
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
br label %23
23: ; preds = %20, %16
%24 = phi i1 [ false, %16 ], [ %22, %20 ]
br label %25
25: ; preds = %23, %12, %8
%26 = phi i1 [ true, %12 ], [ true, %8 ], [ %24, %23 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @parsing_integer_start_is_correct(i8 signext %0, i32 %1) {
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = icmp eq i8 %0, 43
%6 = or i1 %5, %4
%7 = icmp eq i8 %0, 45
%8 = icmp ne i32 %1, 0
%9 = and i1 %7, %8
%10 = or i1 %6, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int s5p_sdhci_init(unsigned int, int, int);
int samsung_get_base_mmc();
int s5p_mmc_init(int index, int bus_width) {
  unsigned int base = samsung_get_base_mmc() + (0x10000 * index);
  return s5p_sdhci_init(base, index, bus_width);
}


x86 assembly (clang, -O0):
<s5p_mmc_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <samsung_get_base_mmc@plt>
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <s5p_sdhci_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s5p_mmc_init>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <samsung_get_base_mmc@plt>
mov    %ebp,%edi
shl    $0x10,%edi
add    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <s5p_sdhci_init@plt>

LLVM IR (-O0):
define i32 @s5p_mmc_init(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @samsung_get_base_mmc()
%7 = load i32, i32* %3
%8 = mul nsw i32 65536, %7
%9 = add nsw i32 %6, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @s5p_sdhci_init(i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @s5p_mmc_init(i32 %0, i32 %1) {
%3 = tail call i32 (...) @samsung_get_base_mmc()
%4 = shl nsw i32 %0, 16
%5 = add nsw i32 %3, %4
%6 = tail call i32 @s5p_sdhci_init(i32 %5, i32 %0, i32 %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void f8(void) {
  int k = 'a';
  int *nn = &k;
  typedef int *ptr;
  ptr *j = &nn;
  int **p;
  *j = &k;
  p = j;
  putchar(**p);
  putchar(**j);
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x61,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    -0x4(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
push   %rax
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x61,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @f8() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32**
%4 = alloca i32**
store i32 97, i32* %1
store i32* %1, i32** %2
store i32** %2, i32*** %3
%5 = load i32**, i32*** %3
store i32* %1, i32** %5
%6 = load i32**, i32*** %3
store i32** %6, i32*** %4
%7 = load i32**, i32*** %4
%8 = load i32*, i32** %7
%9 = load i32, i32* %8
%10 = call i32 @putchar(i32 %9)
%11 = load i32**, i32*** %3
%12 = load i32*, i32** %11
%13 = load i32, i32* %12
%14 = call i32 @putchar(i32 %13)
ret void
}

LLVM IR (-O2):
define void @f8() {
%1 = tail call i32 @putchar(i32 97)
%2 = tail call i32 @putchar(i32 97)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void PrintUsage(char *program) {
  printf("Usage: %s <filename> [options]\n\n"
         "Options:\n"
         "\t-stack\tto monitor stack usage\n"
         "\t...\tother options are passed to the script\n",
         program);
  exit(1);
}


x86 assembly (clang, -O0):
<PrintUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PrintUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [117 x i8] c"Usage: %s <filename> [options]\0A\0AOptions:\0A\09-stack\09to monitor stack usage\0A\09...\09other options are passed to the script\0A\00"
define void @PrintUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [117 x i8] c"Usage: %s <filename> [options]\0A\0AOptions:\0A\09-stack\09to monitor stack usage\0A\09...\09other options are passed to the script\0A\00"
define void @PrintUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void dump(float *input) {
  int i;
  for (i = 0; i < 32 * 32 * 32; ++i) {
    printf("%f\n", input[i]);
  }
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8000,-0xc(%rbp)
jge    1157 <dump+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <dump+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  (%r15,%rbx,4),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x8000,%rbx
jne    1130 <dump+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @dump(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32768
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load float*, float** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @dump(float* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds float, float* %0, i64 %3
%5 = load float, float* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %5)
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 32768
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
scalar_t__ getenv(char *);
int mb_want_warnings() {
  static int env_checked = 0;
  if (env_checked == 0)
    env_checked = getenv("MB_WARNINGS") ? 1 : 2;
  else
    return env_checked - 1;
}


x86 assembly (clang, -O0):
<mb_want_warnings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f0d(%rip)
jne    1150 <mb_want_warnings+0x40>
lea    0xed4(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rdx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,0x2ee1(%rip)
jmp    115c <mb_want_warnings+0x4c>
mov    0x2ed6(%rip),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mb_want_warnings>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     1120 <mb_want_warnings+0x10>
add    $0xffffffff,%eax
pop    %rcx
ret
lea    0xed9(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x1,%rax
mov    $0x1,%eax
adc    $0x0,%eax
mov    %eax,0x2eee(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@mb_want_warnings.env_checked = internal global i32 0
@.str = [12 x i8] c"MB_WARNINGS\00"
define i32 @mb_want_warnings() {
%1 = alloca i32
%2 = load i32, i32* @mb_want_warnings.env_checked
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = call i64 @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 2
store i32 %8, i32* @mb_want_warnings.env_checked
br label %12
9: ; preds = %0
%10 = load i32, i32* @mb_want_warnings.env_checked
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %1
br label %12
12: ; preds = %9, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@mb_want_warnings.env_checked = internal unnamed_addr global i32 0
@.str = [12 x i8] c"MB_WARNINGS\00"
define i32 @mb_want_warnings() {
%1 = load i32, i32* @mb_want_warnings.env_checked
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 2, i32 1
store i32 %6, i32* @mb_want_warnings.env_checked
br label %9
7: ; preds = %0
%8 = add nsw i32 %1, -1
br label %9
9: ; preds = %7, %3
%10 = phi i32 [ undef, %3 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
void __attribute__((weak)) vpr_stat(const char *fmt, va_list ap) {}


x86 assembly (clang, -O0):
<vpr_stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpr_stat>:
ret

LLVM IR (-O0):
define weak void @vpr_stat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define weak void @vpr_stat(i8* %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
char *skip_whitespace(const char *p) {
  while (isspace((unsigned char)*p))
    ++p;
  return (char *)p;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <skip_whitespace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_whitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @skip_whitespace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ _dorand48(unsigned short *);
long nrand48(unsigned short xseed[3]) {
  _dorand48(xseed);
  return ((long)xseed[2] << 15) + ((long)xseed[1] >> 1);
}


x86 assembly (clang, -O0):
<nrand48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_dorand48@plt>
mov    -0x8(%rbp),%rax
movzwl 0x4(%rax),%eax
shl    $0xf,%rax
mov    -0x8(%rbp),%rcx
movzwl 0x2(%rcx),%ecx
sar    $0x1,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrand48>:
push   %rbx
mov    %rdi,%rbx
call   1030 <_dorand48@plt>
movzwl 0x4(%rbx),%ecx
shl    $0xf,%rcx
movzwl 0x2(%rbx),%eax
shr    %rax
or     %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @nrand48(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = call i32 @_dorand48(i16* %3)
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 2
%7 = load i16, i16* %6
%8 = zext i16 %7 to i64
%9 = shl i64 %8, 15
%10 = load i16*, i16** %2
%11 = getelementptr inbounds i16, i16* %10, i64 1
%12 = load i16, i16* %11
%13 = zext i16 %12 to i64
%14 = ashr i64 %13, 1
%15 = add nsw i64 %9, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @nrand48(i16* %0) {
%2 = tail call i32 @_dorand48(i16* %0)
%3 = getelementptr inbounds i16, i16* %0, i64 2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i64
%6 = shl nuw nsw i64 %5, 15
%7 = getelementptr inbounds i16, i16* %0, i64 1
%8 = load i16, i16* %7
%9 = lshr i16 %8, 1
%10 = zext i16 %9 to i64
%11 = or i64 %6, %10
ret i64 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int dca_popcount(uint32_t x) {
  x -= (x >> 1) & 0x55555555;
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  x = (x + (x >> 4)) & 0x0f0f0f0f;
  x += x >> 8;
  return (x + (x >> 16)) & 0x3f;
}


x86 assembly (clang, -O0):
<dca_popcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55555555,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dca_popcount>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @dca_popcount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = and i32 %4, 1431655765
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 858993459
%10 = load i32, i32* %2
%11 = ashr i32 %10, 2
%12 = and i32 %11, 858993459
%13 = add nsw i32 %9, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 4
%17 = add nsw i32 %14, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 8
%21 = load i32, i32* %2
%22 = add nsw i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = ashr i32 %24, 16
%26 = add nsw i32 %23, %25
%27 = and i32 %26, 63
ret i32 %27
}

LLVM IR (-O2):
define i32 @dca_popcount(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub nsw i32 %0, %3
%5 = and i32 %4, 858993459
%6 = lshr i32 %4, 2
%7 = and i32 %6, 858993459
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
/* Variables and functions */
char *strdup(char const *);
int dict_clone_string(const char **tgt, const char **src, void *data) {
  *tgt = strdup(*src);
  return *tgt != NULL ? 0 : -1;
}


x86 assembly (clang, -O0):
<dict_clone_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dict_clone_string>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%rdi
call   1030 <strdup@plt>
mov    %rax,(%rbx)
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dict_clone_string(i8** %0, i8** %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8*
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = call i8* @strdup(i8* %8)
%10 = load i8**, i8*** %4
store i8* %9, i8** %10
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 -1
ret i32 %15
}

LLVM IR (-O2):
define i32 @dict_clone_string(i8** nocapture writeonly %0, i8** nocapture %1, i8* nocapture readnone %2) {
%4 = load i8*, i8** %1
%5 = tail call i8* @strdup(i8* %4)
store i8* %5, i8** %0
%6 = icmp eq i8* %5, null
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fftwf_ifree(void *);
void fftwf_ifree0(void *p) {
  if (p)
    fftwf_ifree(p);
}


x86 assembly (clang, -O0):
<fftwf_ifree0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <fftwf_ifree0+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <fftwf_ifree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftwf_ifree0>:
test   %rdi,%rdi
je     111a <fftwf_ifree0+0xa>
jmp    1030 <fftwf_ifree@plt>
ret

LLVM IR (-O0):
define void @fftwf_ifree0(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @fftwf_ifree(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @fftwf_ifree0(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fftwf_ifree(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ pthread_self();
unsigned long SSLThreadIDCallback(void) {
  return ((unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<SSLThreadIDCallback>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pthread_self@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSLThreadIDCallback>:
xor    %eax,%eax
jmp    1030 <pthread_self@plt>

LLVM IR (-O0):
define i64 @SSLThreadIDCallback() {
%1 = call i64 (...) @pthread_self()
ret i64 %1
}

LLVM IR (-O2):
define i64 @SSLThreadIDCallback() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
int test_imm_7Buint16_mem(unsigned short *val) {
  return ((*val) & (-0x7B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Buint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff85,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Buint16_mem>:
movzwl (%rdi),%eax
test   $0xff85,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Buint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -123
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_7Buint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -123
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ good(int **, int, int);
int /*<<< orphan*/ inar(int **, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int ar[100][100];
  int r, c;
  scanf("%d%d", &r, &c);
  inar(ar, r, c);
  good(ar, r, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x9c54(%rbp),%rsi
lea    -0x9c58(%rbp),%rdx
call   1050 <scanf@plt>
lea    -0x9c50(%rbp),%rdi
mov    -0x9c54(%rbp),%esi
mov    -0x9c58(%rbp),%edx
call   1040 <inar@plt>
lea    -0x9c50(%rbp),%rdi
mov    -0x9c54(%rbp),%esi
mov    -0x9c58(%rbp),%edx
call   1030 <good@plt>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x9c50,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <inar@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <good@plt>
xor    %eax,%eax
add    $0x9c50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x i32]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %2, i64 0, i64 0
%7 = bitcast [100 x i32]* %6 to i32**
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @inar(i32** %7, i32 %8, i32 %9)
%11 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %2, i64 0, i64 0
%12 = bitcast [100 x i32]* %11 to i32**
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @good(i32** %12, i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca [100 x [100 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [100 x [100 x i32]]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = bitcast [100 x [100 x i32]]* %1 to i32**
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @inar(i32** %8, i32 %9, i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @good(i32** %8, i32 %12, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ good();
int main(void) {
  good();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <good@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <good@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @good()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @good()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t convert_v21_state(uint8_t state) {
  switch (state) {
  case 0x41:
    return 0x11;
  case 0x82:
    return 0x22;
  }
  return 0xFF;
}


x86 assembly (clang, -O0):
<convert_v21_state>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     112e <convert_v21_state+0x2e>
jmp    111b <convert_v21_state+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
je     113a <convert_v21_state+0x3a>
jmp    1146 <convert_v21_state+0x46>
movl   $0x11,-0x4(%rbp)
jmp    114d <convert_v21_state+0x4d>
movl   $0x22,-0x4(%rbp)
jmp    114d <convert_v21_state+0x4d>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_v21_state>:
cmp    $0x82,%edi
mov    $0x22,%eax
mov    $0xff,%ecx
cmove  %eax,%ecx
cmp    $0x41,%edi
mov    $0x11,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convert_v21_state(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 65, label %5
i32 130, label %6
]
5: ; preds = %1
store i32 17, i32* %2
br label %8
6: ; preds = %1
store i32 34, i32* %2
br label %8
7: ; preds = %1
store i32 255, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @convert_v21_state(i32 %0) {
%2 = icmp eq i32 %0, 130
%3 = select i1 %2, i32 34, i32 255
%4 = icmp eq i32 %0, 65
%5 = select i1 %4, i32 17, i32 %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, unsigned long, unsigned long,
            unsigned long long);
int mm_write_mtx_crd_size(FILE *f, unsigned long M, unsigned long N,
                          unsigned long long nz) {
  if (fprintf(f, "%lu %lu %llu\n", M, N, nz) != 3)
    return 17;
  else
    return 0;
}


x86 assembly (clang, -O0):
<mm_write_mtx_crd_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x3,%eax
je     1159 <mm_write_mtx_crd_size+0x49>
movl   $0x11,-0x4(%rbp)
jmp    1160 <mm_write_mtx_crd_size+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_write_mtx_crd_size>:
push   %rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
mov    $0x11,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%lu %lu %llu\0A\00"
define i32 @mm_write_mtx_crd_size(i32* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32* %0, i32** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
%10 = load i32*, i32** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = load i64, i64* %9
%14 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %11, i64 %12, i64 %13)
%15 = icmp ne i32 %14, 3
br i1 %15, label %16, label %17
16: ; preds = %4
store i32 17, i32* %5
br label %18
17: ; preds = %4
store i32 0, i32* %5
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [14 x i8] c"%lu %lu %llu\0A\00"
define i32 @mm_write_mtx_crd_size(i32* nocapture %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %1, i64 %2, i64 %3)
%6 = icmp eq i32 %5, 3
%7 = select i1 %6, i32 0, i32 17
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ lcd_wr_command(int);
void lcd_line1() { lcd_wr_command(0x80); }


x86 assembly (clang, -O0):
<lcd_line1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1030 <lcd_wr_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_line1>:
mov    $0x80,%edi
jmp    1030 <lcd_wr_command@plt>

LLVM IR (-O0):
define void @lcd_line1() {
%1 = call i32 @lcd_wr_command(i32 128)
ret void
}

LLVM IR (-O2):
define void @lcd_line1() {
%1 = tail call i32 @lcd_wr_command(i32 128)
ret void
}
void slow_down_io(void) { __asm__ __volatile__("outb %%al,$0x80;" : :); }


x86 assembly (clang, -O0):
<slow_down_io>:
push   %rbp
mov    %rsp,%rbp
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<slow_down_io>:
out    %al,$0x80
ret

LLVM IR (-O0):
define void @slow_down_io() {
ret void
}

LLVM IR (-O2):
define void @slow_down_io() {
tail call void asm sideeffect "outb %al,$$0x80;", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int wps_validate_m5(const struct wpabuf *tlvs) { return 0; }


x86 assembly (clang, -O0):
<wps_validate_m5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wps_validate_m5>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.wpabuf = type opaque
define i32 @wps_validate_m5(%struct.wpabuf* %0) {
%2 = alloca %struct.wpabuf*
store %struct.wpabuf* %0, %struct.wpabuf** %2
ret i32 0
}

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_m5(%struct.wpabuf* nocapture readnone %0) {
ret i32 0
}
int f3(int x, unsigned y) {
  int a = x - y;
  return a - x;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %esi,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @f3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = sub i32 0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ string_reverse(char *);
int main(void) {
  char buffer[] = "Hola Mundo";
  puts(buffer);
  string_reverse(buffer);
  puts(buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xb(%rbp),%rdi
call   1030 <puts@plt>
lea    -0xb(%rbp),%rdi
call   1040 <string_reverse@plt>
lea    -0xb(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6e754d20616c6f48,%rax
4d 75 6e
mov    %rax,(%rsp)
movl   $0x6f646e,0x7(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <string_reverse@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.buffer = [11 x i8] c"Hola Mundo\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = bitcast [11 x i8]* %1 to i8*
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = call i32 @puts(i8* %3)
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%6 = call i32 @string_reverse(i8* %5)
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.buffer = [11 x i8] c"Hola Mundo\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = call i32 @string_reverse(i8* %2)
%5 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gds_swap2bytes(unsigned char *);
int /*<<< orphan*/ write(int, short *, int);
void gds_write_endlib(int fd) {
  static short int count, token;
  count = 4;
  gds_swap2bytes((unsigned char *)&count);
  write(fd, &count, 2);
  token = 0x0400;
  gds_swap2bytes((unsigned char *)&token);
  write(fd, &token, 2);
}


x86 assembly (clang, -O0):
<gds_write_endlib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movw   $0x4,0x2efe(%rip)
lea    0x2ef7(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ee8(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x400,0x2ed7(%rip)
lea    0x2ed0(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ec1(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gds_write_endlib>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movw   $0x4,0x2f03(%rip)
lea    0x2efc(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x400,0x2ede(%rip)
lea    0x2ed7(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@gds_write_endlib.count = internal global i16 0
@gds_write_endlib.token = internal global i16 0
define void @gds_write_endlib(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i16 4, i16* @gds_write_endlib.count
%3 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_endlib.count to i8*))
%4 = load i32, i32* %2
%5 = call i32 @write(i32 %4, i16* @gds_write_endlib.count, i32 2)
store i16 1024, i16* @gds_write_endlib.token
%6 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_endlib.token to i8*))
%7 = load i32, i32* %2
%8 = call i32 @write(i32 %7, i16* @gds_write_endlib.token, i32 2)
ret void
}

LLVM IR (-O2):
@gds_write_endlib.count = internal global i16 0
@gds_write_endlib.token = internal global i16 0
define void @gds_write_endlib(i32 %0) {
store i16 4, i16* @gds_write_endlib.count
%2 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_endlib.count to i8*))
%3 = tail call i32 @write(i32 %0, i16* @gds_write_endlib.count, i32 2)
store i16 1024, i16* @gds_write_endlib.token
%4 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_endlib.token to i8*))
%5 = tail call i32 @write(i32 %0, i16* @gds_write_endlib.token, i32 2)
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int open(char *, int, int);
int getdatafile() {
  int fd;
  fd = open("data100m", O_RDWR | O_CREAT, 0644);
  return (fd);
}


x86 assembly (clang, -O0):
<getdatafile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ed0(%rip),%rax
or     (%rax),%esi
lea    0xecf(%rip),%rdi
mov    $0x1a4,%edx
call   1030 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdatafile>:
mov    0x2ec9(%rip),%rax
mov    0x2eda(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xed7(%rip),%rdi
mov    $0x1a4,%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"data100m\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define i32 @getdatafile() {
%1 = alloca i32
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_CREAT
%4 = or i32 %2, %3
%5 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, i32 420)
store i32 %5, i32* %1
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [9 x i8] c"data100m\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define i32 @getdatafile() {
%1 = load i32, i32* @O_RDWR
%2 = load i32, i32* @O_CREAT
%3 = or i32 %2, %1
%4 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32 420)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void strToResponse(char *str, char *msg) {
  bzero(msg, 255);
  sprintf(msg, "%s", str);
}


x86 assembly (clang, -O0):
<strToResponse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xff,%esi
call   1030 <bzero@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strToResponse>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    $0xff,%esi
call   1040 <bzero@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @strToResponse(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @bzero(i8* %5, i32 255)
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
define void @strToResponse(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @bzero(i8* %1, i32 255)
%4 = tail call i8* @strcpy(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int comparator(const char *a, const char *b) { return strcmp(a, b); }


x86 assembly (clang, -O0):
<comparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @comparator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}