xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void tell(const char *message) { write(2, message, strlen(message)); }


x86 assembly (clang, -O0):
<tell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tell>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @tell(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @tell(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
/* Variables and functions */
double liba_func(double);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("main.c: main()\n");
  double a = liba_func(1.0);
  printf("main.c: a = %f\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  0xebb(%rip),%xmm0
call   1030 <liba_func@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
movsd  0xebb(%rip),%xmm0
call   1030 <liba_func@plt>
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"main.c: main()\0A\00"
@.str.1 = [16 x i8] c"main.c: a = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = call double @liba_func(double 1.000000e+00)
store double %7, double* %5
%8 = load double, double* %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"main.c: a = %f\0A\00"
@str = [15 x i8] c"main.c: main()\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call double @liba_func(double 1.000000e+00)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %4)
ret i32 0
}
int shell_parse_int(char *str) {
  int val = 0;
  int i = 0;
  char c;
  while ((c = str[i++]) != 0) {
    if (c < '0' || c > '9')
      break;
    val = val * 10 + (c - '0');
  }
  return val;
}


x86 assembly (clang, -O0):
<shell_parse_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     116e <shell_parse_int+0x6e>
movsbl -0x11(%rbp),%eax
cmp    $0x30,%eax
jl     1154 <shell_parse_int+0x54>
movsbl -0x11(%rbp),%eax
cmp    $0x39,%eax
jle    1159 <shell_parse_int+0x59>
jmp    116e <shell_parse_int+0x6e>
imul   $0xa,-0xc(%rbp),%eax
movsbl -0x11(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <shell_parse_int+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shell_parse_int>:
mov    (%rdi),%cl
lea    -0x3a(%rcx),%edx
xor    %eax,%eax
cmp    $0xf6,%dl
jb     113b <shell_parse_int+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x3a(%rcx),%edx
add    $0x1,%rdi
cmp    $0xf5,%dl
ja     1120 <shell_parse_int+0x20>
ret

LLVM IR (-O0):
define i32 @shell_parse_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %24, %1
%7 = load i8*, i8** %2
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %5
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %31
15: ; preds = %6
%16 = load i8, i8* %5
%17 = sext i8 %16 to i32
%18 = icmp slt i32 %17, 48
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp sgt i32 %21, 57
br i1 %22, label %23, label %24
23: ; preds = %19, %15
br label %31
24: ; preds = %19
%25 = load i32, i32* %3
%26 = mul nsw i32 %25, 10
%27 = load i8, i8* %5
%28 = sext i8 %27 to i32
%29 = sub nsw i32 %28, 48
%30 = add nsw i32 %26, %29
store i32 %30, i32* %3
br label %6
31: ; preds = %23, %6
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @shell_parse_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -58
%4 = icmp ult i8 %3, -10
br i1 %4, label %18, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = phi i8 [ %15, %5 ], [ %2, %1 ]
%8 = phi i32 [ %13, %5 ], [ 0, %1 ]
%9 = zext i8 %7 to i32
%10 = add nuw nsw i64 %6, 1
%11 = mul nsw i32 %8, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %9
%14 = getelementptr inbounds i8, i8* %0, i64 %10
%15 = load i8, i8* %14
%16 = add i8 %15, -58
%17 = icmp ult i8 %16, -10
br i1 %17, label %18, label %5
18: ; preds = %5, %1
%19 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %19
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t uint32_big_decode(const uint8_t *p_encoded_data) {
  return ((((uint32_t)((uint8_t *)p_encoded_data)[0]) << 24) |
          (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 16) |
          (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 8) |
          (((uint32_t)((uint8_t *)p_encoded_data)[3]) << 0));
}


x86 assembly (clang, -O0):
<uint32_big_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint32_big_decode>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @uint32_big_decode(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 24
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 2
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i64*, i64** %2
%21 = getelementptr inbounds i64, i64* %20, i64 3
%22 = load i64, i64* %21
%23 = trunc i64 %22 to i32
%24 = shl i32 %23, 0
%25 = or i32 %19, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @uint32_big_decode(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %0, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
void INT_Excep_TPU0_TGI0B(void) {}


x86 assembly (clang, -O0):
<INT_Excep_TPU0_TGI0B>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU0_TGI0B() {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t av_bswap16(uint16_t x) {
  x = (x >> 8) | (x << 8);
  return x;
}


x86 assembly (clang, -O0):
<av_bswap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_bswap16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_bswap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @av_bswap16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
int Get_Node(int *array, int offset) { return array[offset - 1]; }


x86 assembly (clang, -O0):
<Get_Node>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_Node>:
movslq %esi,%rax
mov    -0x4(%rdi,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @Get_Node(i32* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
double r10(void *x) { return *(double *)(x + 32758); }


x86 assembly (clang, -O0):
<r10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x7ff6(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r10>:
movsd  0x7ff6(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r10(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32758
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r10(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32758
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ _delay_us(int);
int /*<<< orphan*/ motion_direction(int);
int /*<<< orphan*/ speed_control(int /*<<< orphan*/, int /*<<< orphan*/);
void stop(void) {
  motion_direction(0b00000000);
  speed_control(0, 0);
  _delay_us(10);
}


x86 assembly (clang, -O0):
<stop>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <motion_direction@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <speed_control@plt>
mov    $0xa,%edi
call   1040 <_delay_us@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop>:
push   %rax
xor    %edi,%edi
call   1030 <motion_direction@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <speed_control@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <_delay_us@plt>

LLVM IR (-O0):
define void @stop() {
%1 = call i32 @motion_direction(i32 0)
%2 = call i32 @speed_control(i32 0, i32 0)
%3 = call i32 @_delay_us(i32 10)
ret void
}

LLVM IR (-O2):
define void @stop() {
%1 = tail call i32 @motion_direction(i32 0)
%2 = tail call i32 @speed_control(i32 0, i32 0)
%3 = tail call i32 @_delay_us(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: build_romfs [-?] [--help] [-s|--romfs-size <romfs_size>]\n"
         "\t[-p|--smart-pad] [-n|--notime] <config-file> <output-file>\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [125 x i8] c"Usage: build_romfs [-?] [--help] [-s|--romfs-size <romfs_size>]\0A\09[-p|--smart-pad] [-n|--notime] <config-file> <output-file>\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [124 x i8] c"Usage: build_romfs [-?] [--help] [-s|--romfs-size <romfs_size>]\0A\09[-p|--smart-pad] [-n|--notime] <config-file> <output-file>\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([124 x i8], [124 x i8]* @str, i64 0, i64 0))
ret void
}
void affichage_tableau(int p_tableau[]) {}


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

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

LLVM IR (-O0):
define void @affichage_tableau(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @affichage_tableau(i32* nocapture %0) {
ret void
}
unsigned int UARTParityModeGet(unsigned int baseAdd) {
  return ((*((volatile unsigned int *)(baseAdd + (0xC)))) &
          ((0x00000020u) | (0x00000010u) | (0x00000008u)));
}


x86 assembly (clang, -O0):
<UARTParityModeGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x38,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTParityModeGet>:
add    $0xc,%edi
mov    (%rdi),%eax
and    $0x38,%eax
ret

LLVM IR (-O0):
define i32 @UARTParityModeGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 12
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 56
ret i32 %8
}

LLVM IR (-O2):
define i32 @UARTParityModeGet(i32 %0) {
%2 = add i32 %0, 12
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 56
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void print_reverced(char *msg, size_t size) {
  int i;
  for (i = size; i >= 0; i--) {
    printf("%c", msg[i]);
  }
}


x86 assembly (clang, -O0):
<print_reverced>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1157 <print_reverced+0x47>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
lea    0xec0(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_reverced+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reverced>:
push   %r15
push   %r14
push   %rbx
test   $0x80000000,%esi
jne    1143 <print_reverced+0x33>
mov    %rdi,%r15
mov    %esi,%ebx
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jb     1130 <print_reverced+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_reverced(i8* nocapture %0, i64 %1) {
%3 = and i64 %1, 2147483648
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = and i64 %1, 4294967295
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = add nsw i64 %8, -1
%13 = icmp eq i64 %8, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void freeaddrinfop(struct addrinfo **ai) {
  if (*ai)
    freeaddrinfo(*ai);
}


x86 assembly (clang, -O0):
<freeaddrinfop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <freeaddrinfop+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <freeaddrinfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeaddrinfop>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <freeaddrinfop+0xd>
jmp    1030 <freeaddrinfo@plt>
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @freeaddrinfop(%struct.addrinfo** %0) {
%2 = alloca %struct.addrinfo**
store %struct.addrinfo** %0, %struct.addrinfo*** %2
%3 = load %struct.addrinfo**, %struct.addrinfo*** %2
%4 = load %struct.addrinfo*, %struct.addrinfo** %3
%5 = icmp ne %struct.addrinfo* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.addrinfo**, %struct.addrinfo*** %2
%8 = load %struct.addrinfo*, %struct.addrinfo** %7
%9 = call i32 @freeaddrinfo(%struct.addrinfo* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @freeaddrinfop(%struct.addrinfo** nocapture %0) {
%2 = load %struct.addrinfo*, %struct.addrinfo** %0
%3 = icmp eq %struct.addrinfo* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @freeaddrinfo(%struct.addrinfo* %2)
br label %6
6: ; preds = %4, %1
ret void
}
int c_0(int tt, int *n, char *s) { return 0; }


x86 assembly (clang, -O0):
<c_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @c_0(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @c_0(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgpop2(void) { gen("popl\t%ecx"); }


x86 assembly (clang, -O0):
<cgpop2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgpop2>:
lea    0xee9(%rip),%rdi
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"popl\09%ecx\00"
define void @cgpop2() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"popl\09%ecx\00"
define void @cgpop2() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arc_mulu64(int, int);
void bar(int x) { __builtin_arc_mulu64(x, 0x10); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
call   1030 <__builtin_arc_mulu64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0x10,%esi
jmp    1030 <__builtin_arc_mulu64@plt>

LLVM IR (-O0):
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__builtin_arc_mulu64(i32 %3, i32 16)
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0) {
%2 = tail call i32 @__builtin_arc_mulu64(i32 %0, i32 16)
ret void
}
char *COM_SkipPath(const char *pathname) {
  const char *last;
  last = pathname;
  while (*pathname) {
    if (*pathname == '/' || *pathname == '\\')
      last = pathname + 1;
    pathname++;
  }
  return (char *)last;
}


x86 assembly (clang, -O0):
<COM_SkipPath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <COM_SkipPath+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     113d <COM_SkipPath+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1149 <COM_SkipPath+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <COM_SkipPath+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_SkipPath>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <COM_SkipPath+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <COM_SkipPath+0x10>
cmp    $0x5c,%dl
je     1110 <COM_SkipPath+0x10>
test   %dl,%dl
jne    1113 <COM_SkipPath+0x13>
ret

LLVM IR (-O0):
define i8* @COM_SkipPath(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %22, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %25
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 92
br i1 %18, label %19, label %22
19: ; preds = %14, %9
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 1
store i8* %21, i8** %3
br label %22
22: ; preds = %19, %14
%23 = load i8*, i8** %2
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %2
br label %5
25: ; preds = %5
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @COM_SkipPath(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
i8 92, label %6
]
6: ; preds = %2, %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ db_read_random_test();
int /*<<< orphan*/ db_read_seq_test();
int /*<<< orphan*/ db_write_test();
int /*<<< orphan*/ printf(char *);
void db_tests() {
  db_write_test();
  db_read_random_test();
  db_read_seq_test();
  printf("+-----------------------+---------------------------+----------------"
         "------------------+---------------------+\n");
}


x86 assembly (clang, -O0):
<db_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <db_write_test@plt>
mov    $0x0,%al
call   1040 <db_read_random_test@plt>
mov    $0x0,%al
call   1050 <db_read_seq_test@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_tests>:
push   %rax
xor    %eax,%eax
call   1060 <db_write_test@plt>
xor    %eax,%eax
call   1040 <db_read_random_test@plt>
xor    %eax,%eax
call   1050 <db_read_seq_test@plt>
lea    0xea3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [112 x i8] c"+-----------------------+---------------------------+----------------------------------+---------------------+\0A\00"
define void @db_tests() {
%1 = call i32 (...) @db_write_test()
%2 = call i32 (...) @db_read_random_test()
%3 = call i32 (...) @db_read_seq_test()
%4 = call i32 @printf(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [111 x i8] c"+-----------------------+---------------------------+----------------------------------+---------------------+\00"
define void @db_tests() {
%1 = tail call i32 (...) @db_write_test()
%2 = tail call i32 (...) @db_read_random_test()
%3 = tail call i32 (...) @db_read_seq_test()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ descent;
};
struct TYPE_4__ {
  TYPE_1__ max_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
short get_XFontStruct_max_bounds_descent(void *_p) {
  return (short)((XFontStruct *)_p)->max_bounds.descent;
}


x86 assembly (clang, -O0):
<get_XFontStruct_max_bounds_descent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_XFontStruct_max_bounds_descent>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define signext i16 @get_XFontStruct_max_bounds_descent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i16
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @get_XFontStruct_max_bounds_descent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
scalar_t__ isspace(int);
int /*<<< orphan*/ strlen(char *);
void strip_blank_front(char **p) {
  char *s = *p;
  if (!strlen(s))
    return;
  while (isspace((int)*s))
    s++;
  *p = s;
}


x86 assembly (clang, -O0):
<strip_blank_front>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jne    114e <strip_blank_front+0x2e>
jmp    1185 <strip_blank_front+0x65>
jmp    1153 <strip_blank_front+0x33>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     117a <strip_blank_front+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1153 <strip_blank_front+0x33>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_blank_front>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
je     1155 <strip_blank_front+0x35>
add    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1140 <strip_blank_front+0x20>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @strip_blank_front(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @strlen(i8* %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %11, %5 ], [ %2, %1 ]
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = tail call i64 @isspace(i32 %8)
%10 = icmp eq i64 %9, 0
%11 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %10, label %12, label %5
12: ; preds = %5
store i8* %6, i8** %0
br label %13
13: ; preds = %1, %12
ret void
}
/* Variables and functions */
double abs(double num) {
  if (num < 0) {
    return -num;
  }
  return num;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <abs+0x3d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1147 <abs+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @abs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @abs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Type definitions */
struct tracer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tracer *);
void tracer_done(struct tracer *t) { free(t); }


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

x86 assembly (clang, -O2):
<tracer_done>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.tracer = type { i32 }
define void @tracer_done(%struct.tracer* %0) {
%2 = alloca %struct.tracer*
store %struct.tracer* %0, %struct.tracer** %2
%3 = load %struct.tracer*, %struct.tracer** %2
%4 = call i32 @free(%struct.tracer* %3)
ret void
}

LLVM IR (-O2):
%struct.tracer = type { i32 }
define void @tracer_done(%struct.tracer* nocapture %0) {
%2 = tail call i32 @free(%struct.tracer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printError();
void call_exit(char **shArgs) {
  if (shArgs[1] == NULL) {
    exit(0);
  } else {
    printError();
  }
}


x86 assembly (clang, -O0):
<call_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1142 <call_exit+0x22>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <printError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_exit>:
push   %rax
cmpq   $0x0,0x8(%rdi)
je     1130 <call_exit+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <printError@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @call_exit(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %1
%10 = call i32 (...) @printError()
br label %11
11: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @call_exit(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
%8 = tail call i32 (...) @printError()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_a_hl();
void opcode_86() { add_a_hl(); }


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

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

LLVM IR (-O0):
define void @opcode_86() {
%1 = call i32 (...) @add_a_hl()
ret void
}

LLVM IR (-O2):
define void @opcode_86() {
%1 = tail call i32 (...) @add_a_hl()
ret void
}
void glutInitDisplayString(const char *string) {}


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

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

LLVM IR (-O0):
define void @glutInitDisplayString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @glutInitDisplayString(i8* nocapture %0) {
ret void
}
int convertToInt(char charToConvert) {
  int tmp = -1;
  if ((charToConvert == 'X') || (charToConvert == '/'))
    tmp = 10;
  else if (charToConvert == '-')
    tmp = 0;
  else
    tmp = charToConvert - '0';
  return tmp;
}


x86 assembly (clang, -O0):
<convertToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x58,%eax
je     112b <convertToInt+0x2b>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
jne    1137 <convertToInt+0x37>
movl   $0xa,-0x8(%rbp)
jmp    115f <convertToInt+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    1150 <convertToInt+0x50>
movl   $0x0,-0x8(%rbp)
jmp    115a <convertToInt+0x5a>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <convertToInt+0x5f>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertToInt>:
mov    $0xa,%eax
cmp    $0x58,%dil
je     1121 <convertToInt+0x21>
cmp    $0x2f,%dil
je     1121 <convertToInt+0x21>
cmp    $0x2d,%dil
jne    111a <convertToInt+0x1a>
xor    %eax,%eax
ret
movsbl %dil,%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @convertToInt(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 -1, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 88
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 47
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 10, i32* %3
br label %22
12: ; preds = %7
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 45
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 0, i32* %3
br label %21
17: ; preds = %12
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %19, 48
store i32 %20, i32* %3
br label %21
21: ; preds = %17, %16
br label %22
22: ; preds = %21, %11
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @convertToInt(i8 signext %0) {
switch i8 %0, label %3 [
i8 88, label %6
i8 47, label %6
i8 45, label %2
]
2: ; preds = %1
br label %6
3: ; preds = %1
%4 = sext i8 %0 to i32
%5 = add nsw i32 %4, -48
br label %6
6: ; preds = %1, %1, %2, %3
%7 = phi i32 [ 0, %2 ], [ %5, %3 ], [ 10, %1 ], [ 10, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("crashwrite\n");
  char *ptr = (char *)0x61616161;
  ptr[0] = 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x61616161,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
movb   $0x0,0x61616161
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"crashwrite\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* inttoptr (i64 1633771873 to i8*), i8** %1
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"crashwrite\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
store i8 0, i8* inttoptr (i64 1633771873 to i8*)
ret i32 0
}
/* Variables and functions */
double atof(char *);
float Str2Float(char *lps) {
  double d;
  float f;
  d = atof(lps);
  f = (float)d;
  return f;
}


x86 assembly (clang, -O0):
<Str2Float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Str2Float>:
push   %rax
call   1030 <atof@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Str2Float(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca float
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call double @atof(i8* %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = fptrunc double %7 to float
store float %8, float* %4
%9 = load float, float* %4
ret float %9
}

LLVM IR (-O2):
define float @Str2Float(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
%3 = fptrunc double %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mensagemA() { printf("Eu sou A!\n"); }


x86 assembly (clang, -O0):
<mensagemA>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mensagemA>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Eu sou A!\0A\00"
define void @mensagemA() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Eu sou A!\00"
define void @mensagemA() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
void Analyzer_destruct(struct Analyzer *self) {}


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

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

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

LLVM IR (-O2):
%struct.Analyzer = type opaque
define void @Analyzer_destruct(%struct.Analyzer* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void stub_function(void) { abort(); }


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

x86 assembly (clang, -O2):
<stub_function>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @stub_function() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @stub_function() {
%1 = tail call i32 (...) @abort()
unreachable
}
double UTD2(u)
unsigned u;
{
  double d;
  u -= 2147483648;
  d = (int)u;
  return d + 2147483648.0;
}


x86 assembly (clang, -O0):
<UTD2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movabs $0x80000000,%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTD2>:
xor    $0x80000000,%edi
cvtsi2sd %edi,%xmm0
addsd  0xeee(%rip),%xmm0
ret

LLVM IR (-O0):
define double @UTD2(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = sub nsw i64 %5, 2147483648
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to double
store double %9, double* %3
%10 = load double, double* %3
%11 = fadd double %10, 0x41E0000000000000
ret double %11
}

LLVM IR (-O2):
define double @UTD2(i32 %0) {
%2 = xor i32 %0, -2147483648
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 0x41E0000000000000
ret double %4
}
/* Variables and functions */
scalar_t__ input_joystick_available();
char const *lang_get(char *);
const char *f_input_directional() {
  return lang_get(input_joystick_available() ? "INPUT_JOY_DIRECTIONAL"
                                             : "INPUT_KEYB_DIRECTIONAL");
}


x86 assembly (clang, -O0):
<f_input_directional>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <input_joystick_available@plt>
mov    %rax,%rcx
lea    0xee1(%rip),%rdi
lea    0xec4(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
call   1030 <lang_get@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_input_directional>:
push   %rax
xor    %eax,%eax
call   1040 <input_joystick_available@plt>
test   %rax,%rax
lea    0xee4(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <lang_get@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"INPUT_JOY_DIRECTIONAL\00"
@.str.1 = [23 x i8] c"INPUT_KEYB_DIRECTIONAL\00"
define i8* @f_input_directional() {
%1 = call i64 (...) @input_joystick_available()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0)
%5 = call i8* @lang_get(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
@.str = [22 x i8] c"INPUT_JOY_DIRECTIONAL\00"
@.str.1 = [23 x i8] c"INPUT_KEYB_DIRECTIONAL\00"
define i8* @f_input_directional() {
%1 = tail call i64 (...) @input_joystick_available()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
%4 = tail call i8* @lang_get(i8* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
int astG3DAttr(int attr, double value, double *old_value, int prim) {
  Report("astG3DAttr");
  return 0;
}


x86 assembly (clang, -O0):
<astG3DAttr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astG3DAttr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"astG3DAttr\00"
define i32 @astG3DAttr(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = call i32 @Report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"astG3DAttr\00"
define i32 @astG3DAttr(i32 %0, double %1, double* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @Report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void pdr2i_(x, y) int *x, *y;
{ pdr((float)*x, (float)*y, 0.0); }


x86 assembly (clang, -O0):
<pdr2i_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1030 <pdr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdr2i_>:
cvtsi2ssl (%rdi),%xmm0
cvtsi2ssl (%rsi),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <pdr@plt>

LLVM IR (-O0):
define void @pdr2i_(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to float
%8 = fpext float %7 to double
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to float
%12 = fpext float %11 to double
%13 = call i32 (double, double, double, ...) bitcast (i32 (...)* @pdr to i32 (double, double, double, ...)*)(double %8, double %12, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @pdr2i_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = sitofp i32 %3 to float
%5 = fpext float %4 to double
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to float
%8 = fpext float %7 to double
%9 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @pdr to i32 (double, double, double, ...)*)(double %5, double %8, double 0.000000e+00)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t EEPROMIntStatus(bool bMasked) {
  if (bMasked) {
    return (((*((volatile uint32_t *)(0x400FD014))) & 0x00000004) ? 0x00000004
                                                                  : 0);
  } else {
    return (((*((volatile uint32_t *)(0x400AF018))) & 0x00000001) ? 0
                                                                  : 0x00000004);
  }
}


x86 assembly (clang, -O0):
<EEPROMIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1130 <EEPROMIntStatus+0x30>
mov    $0x400fd014,%eax
mov    (%rax),%edx
and    $0x4,%edx
xor    %eax,%eax
mov    $0x4,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    114a <EEPROMIntStatus+0x4a>
mov    $0x400af018,%eax
mov    (%rax),%edx
and    $0x1,%edx
mov    $0x4,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMIntStatus>:
test   %edi,%edi
je     110f <EEPROMIntStatus+0xf>
mov    0x400fd014,%eax
and    $0x4,%eax
ret
mov    0x400af018,%eax
shl    $0x2,%eax
not    %eax
and    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @EEPROMIntStatus(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1074778132 to i32*)
%8 = and i32 %7, 4
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 4, i32 0
store i32 %11, i32* %2
br label %18
12: ; preds = %1
%13 = load volatile i32, i32* inttoptr (i64 1074458648 to i32*)
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 4
store i32 %17, i32* %2
br label %18
18: ; preds = %12, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @EEPROMIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load volatile i32, i32* inttoptr (i64 1074778132 to i32*)
%5 = and i32 %4, 4
br label %11
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1074458648 to i32*)
%8 = shl i32 %7, 2
%9 = and i32 %8, 4
%10 = xor i32 %9, 4
br label %11
11: ; preds = %6, %3
%12 = phi i32 [ %5, %3 ], [ %10, %6 ]
ret i32 %12
}
int umask(c) { return (0); }


x86 assembly (clang, -O0):
<umask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @umask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @umask(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int destractor(void *a) {
  free(a);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @destractor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @destractor(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}