xunge/DecIR huggingface dataset:
int pluginsd_space(char c) {
  switch (c) {
  case ' ':
  case '\t':
  case '\r':
  case '\n':
  case '=':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pluginsd_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1155 <pluginsd_space+0x55>
jmp    1122 <pluginsd_space+0x22>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     1155 <pluginsd_space+0x55>
jmp    1133 <pluginsd_space+0x33>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     1155 <pluginsd_space+0x55>
jmp    1144 <pluginsd_space+0x44>
mov    -0xc(%rbp),%eax
sub    $0x3d,%eax
jne    1161 <pluginsd_space+0x61>
jmp    1155 <pluginsd_space+0x55>
movl   $0x1,-0x4(%rbp)
jmp    1168 <pluginsd_space+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pluginsd_space>:
cmp    $0x3d,%edi
ja     111d <pluginsd_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x2000000100002600,%rdx
bt     %rcx,%rdx
jae    111d <pluginsd_space+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pluginsd_space(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 9, label %6
i32 13, label %6
i32 10, label %6
i32 61, label %6
]
6: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @pluginsd_space(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 9, label %4
i32 13, label %4
i32 10, label %4
i32 61, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int print_help(FILE *stream, const char *prog_name) {
  fprintf(stderr, "Try '%s --help' for more information.\n", prog_name);
  return 0;
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    %rsi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define i32 @print_help(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
define i32 @print_help(i32* nocapture readnone %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  printf("\n***Test not supported by your chip selection***\n");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"\0A***Test not supported by your chip selection***\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [49 x i8] c"\0A***Test not supported by your chip selection***\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PrintErrorCode();
int dxl_read_word(int, int);
int getCurrentSpeed(int Id) {
  int CurrentSpeed;
  CurrentSpeed = dxl_read_word(Id, 38);
  PrintErrorCode();
  return CurrentSpeed;
}


x86 assembly (clang, -O0):
<getCurrentSpeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x26,%esi
call   1030 <dxl_read_word@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <PrintErrorCode@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentSpeed>:
push   %rbx
mov    $0x26,%esi
call   1030 <dxl_read_word@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <PrintErrorCode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getCurrentSpeed(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @dxl_read_word(i32 %4, i32 38)
store i32 %5, i32* %3
%6 = call i32 (...) @PrintErrorCode()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @getCurrentSpeed(i32 %0) {
%2 = tail call i32 @dxl_read_word(i32 %0, i32 38)
%3 = tail call i32 (...) @PrintErrorCode()
ret i32 %2
}
void byte_stuff(unsigned char **buf, unsigned char c) {
  if (buf) {
    if (c == 0x7e || c == 0x7d) {
      **buf = 0x7d;
      (*buf)++;
      **buf = (c ^ 0x20);
    } else {
      **buf = c;
    }
    (*buf)++;
  }
}


x86 assembly (clang, -O0):
<byte_stuff>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117c <byte_stuff+0x7c>
movzbl -0x9(%rbp),%eax
cmp    $0x7e,%eax
je     1133 <byte_stuff+0x33>
movzbl -0x9(%rbp),%eax
cmp    $0x7d,%eax
jne    1162 <byte_stuff+0x62>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0x7d,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movzbl -0x9(%rbp),%eax
xor    $0x20,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
jmp    116e <byte_stuff+0x6e>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_stuff>:
test   %rdi,%rdi
je     112e <byte_stuff+0x2e>
lea    -0x7d(%rsi),%ecx
mov    (%rdi),%rax
cmp    $0x1,%cl
ja     1127 <byte_stuff+0x27>
movb   $0x7d,(%rax)
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
xor    $0x20,%sil
mov    %sil,0x1(%rax)
jmp    112a <byte_stuff+0x2a>
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @byte_stuff(i8** %0, i8 zeroext %1) {
%3 = alloca i8**
%4 = alloca i8
store i8** %0, i8*** %3
store i8 %1, i8* %4
%5 = load i8**, i8*** %3
%6 = icmp ne i8** %5, null
br i1 %6, label %7, label %35
7: ; preds = %2
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 126
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 125
br i1 %14, label %15, label %27
15: ; preds = %11, %7
%16 = load i8**, i8*** %3
%17 = load i8*, i8** %16
store i8 125, i8* %17
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = xor i32 %22, 32
%24 = trunc i32 %23 to i8
%25 = load i8**, i8*** %3
%26 = load i8*, i8** %25
store i8 %24, i8* %26
br label %31
27: ; preds = %11
%28 = load i8, i8* %4
%29 = load i8**, i8*** %3
%30 = load i8*, i8** %29
store i8 %28, i8* %30
br label %31
31: ; preds = %27, %15
%32 = load i8**, i8*** %3
%33 = load i8*, i8** %32
%34 = getelementptr inbounds i8, i8* %33, i32 1
store i8* %34, i8** %32
br label %35
35: ; preds = %31, %2
ret void
}

LLVM IR (-O2):
define void @byte_stuff(i8** %0, i8 zeroext %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = add i8 %1, -125
%6 = icmp ult i8 %5, 2
%7 = load i8*, i8** %0
br i1 %6, label %8, label %12
8: ; preds = %4
store i8 125, i8* %7
%9 = load i8*, i8** %0
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %0
%11 = xor i8 %1, 32
store i8 %11, i8* %10
br label %13
12: ; preds = %4
store i8 %1, i8* %7
br label %13
13: ; preds = %12, %8
%14 = load i8*, i8** %0
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %0
br label %16
16: ; preds = %13, %2
ret void
}
void warning(msg) char *msg;
{
  printf("Warning -- %s\n", msg);
  return;
}


x86 assembly (clang, -O0):
<warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Warning -- %s\0A\00"
define void @warning(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Warning -- %s\0A\00"
define void @warning(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ akscan(int);
void op_selright() { akscan(1); }


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

x86 assembly (clang, -O2):
<op_selright>:
mov    $0x1,%edi
jmp    1030 <akscan@plt>

LLVM IR (-O0):
define void @op_selright() {
%1 = call i32 @akscan(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_selright() {
%1 = tail call i32 @akscan(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
uint8_t read_uint8(FILE *in) {
  uint8_t x;
  assert(fread(&x, sizeof(uint8_t), 1, in) == 1);
  return x;
}


x86 assembly (clang, -O0):
<read_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_uint8>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read_uint8(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %4)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_uint8(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *, int);
void *malloc(int);
void *emalloc(int size) {
  void *rv;
  if ((rv = malloc(size)) == NULL)
    fatal("out of memory", "", 1);
  return rv;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1159 <emalloc+0x39>
lea    0xeb8(%rip),%rdi
lea    0xebe(%rip),%rsi
mov    $0x1,%edx
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <emalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x1,%edx
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @emalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
@.str.1 = [1 x i8] zeroinitializer
define noalias i8* @emalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void abx500_pinctrl_ab9540_init(struct abx500_pinctrl_soc_data **soc) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.abx500_pinctrl_soc_data = type opaque
define void @abx500_pinctrl_ab9540_init(%struct.abx500_pinctrl_soc_data** nocapture %0) {
ret void
}
/* Variables and functions */
double randmtzig_gv_exprnd();
double exp_rand(void) { return randmtzig_gv_exprnd(); }


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

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

LLVM IR (-O0):
define double @exp_rand() {
%1 = call double (...) @randmtzig_gv_exprnd()
ret double %1
}

LLVM IR (-O2):
define double @exp_rand() {
%1 = tail call double (...) @randmtzig_gv_exprnd()
ret double %1
}
/* Variables and functions */
char *basename(char *);
char *program_name(char *path) { return basename(path); }


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

x86 assembly (clang, -O2):
<program_name>:
jmp    1030 <basename@plt>

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

LLVM IR (-O2):
define i8* @program_name(i8* %0) {
%2 = tail call i8* @basename(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int arquivoExiste(char *caminho) {
  FILE *fil = NULL;
  fil = fopen(caminho, "rb");
  if (fil != NULL) {
    fclose(fil);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<arquivoExiste>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1168 <arquivoExiste+0x48>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    116f <arquivoExiste+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arquivoExiste>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <arquivoExiste+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @arquivoExiste(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* null, i32** %4
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @fclose(i32* %10)
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @arquivoExiste(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, count;
  for (i = 0; i < 100; i++) {
    if (i % 2 == 0) {
      count++;
      printf("x = %d\n", i);
    }
    if (count == 10) {
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    117e <main+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115c <main+0x4c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xa,-0xc(%rbp)
jne    116b <main+0x5b>
jmp    117e <main+0x6e>
jmp    1170 <main+0x60>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"x = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %21, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %24
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %11, %7
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 10
br i1 %18, label %19, label %20
19: ; preds = %16
br label %24
20: ; preds = %16
br label %21
21: ; preds = %20
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %4
24: ; preds = %19, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"x = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
void render_border(void) {}


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

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

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

LLVM IR (-O2):
define void @render_border() {
ret void
}
int main() {
  float f = (float)1;
  const int *const i = (int *)5;
  int *ii = (int *)i;
  int c = (int)'a', d = (int)'A';
  if ((int)i) {
    500;
  } else {
    400;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x5,%eax
mov    %rax,-0x10(%rbp)
mov    $0x5,%eax
mov    %rax,-0x18(%rbp)
movl   $0x61,-0x1c(%rbp)
movl   $0x41,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store float 1.000000e+00, float* %2
store i32* inttoptr (i64 5 to i32*), i32** %3
store i32* inttoptr (i64 5 to i32*), i32** %4
store i32 97, i32* %5
store i32 65, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void h265hvcc_set_avg_frame_rate(uint8_t *p, uint16_t val) {
  p[18] = val >> 8;
  p[19] = val & 0xff;
}


x86 assembly (clang, -O0):
<h265hvcc_set_avg_frame_rate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x48(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265hvcc_set_avg_frame_rate>:
movzbl %sil,%eax
sar    $0x8,%esi
mov    %esi,0x48(%rdi)
mov    %eax,0x4c(%rdi)
ret

LLVM IR (-O0):
define void @h265hvcc_set_avg_frame_rate(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 18
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 19
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @h265hvcc_set_avg_frame_rate(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = getelementptr inbounds i32, i32* %0, i64 18
store i32 %3, i32* %4
%5 = and i32 %1, 255
%6 = getelementptr inbounds i32, i32* %0, i64 19
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvget_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvget_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvget_wch+0x2a>
jmp    1170 <cmd_mvget_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvget_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvget_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvget_wch(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvget_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int compareString(char inpStr[], char cmpStr[], int no) {
  int localCtr = 0;
  for (localCtr = 0; localCtr < no; localCtr++) {
    if (inpStr[localCtr] != cmpStr[localCtr])
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compareString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1168 <compareString+0x68>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1155 <compareString+0x55>
movl   $0x1,-0x4(%rbp)
jmp    116f <compareString+0x6f>
jmp    115a <compareString+0x5a>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111d <compareString+0x1d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareString>:
test   %edx,%edx
jle    1122 <compareString+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1125 <compareString+0x25>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <compareString+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @compareString(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %18
}
/* Variables and functions */
double __strtod_nan(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
double __nan(const char *tagp) { return __strtod_nan(tagp, NULL, 0); }


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

x86 assembly (clang, -O2):
<__nan>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <__strtod_nan@plt>

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

LLVM IR (-O2):
define double @__nan(i8* %0) {
%2 = tail call double @__strtod_nan(i8* %0, i32* null, i32 0)
ret double %2
}
int cnss_logger_device_register(struct wiphy *wiphy, const char *name) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.wiphy = type opaque
define i32 @cnss_logger_device_register(%struct.wiphy* %0, i8* %1) {
%3 = alloca %struct.wiphy*
%4 = alloca i8*
store %struct.wiphy* %0, %struct.wiphy** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.wiphy = type opaque
define i32 @cnss_logger_device_register(%struct.wiphy* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void SPIFIFOLevelSet(unsigned long ulBase, unsigned long ulTxLevel,
                     unsigned long ulRxLevel) {
  unsigned long ulRegVal;
  ulRegVal = (*((volatile unsigned long *)(ulBase + 0x0000017C)));
  ulRegVal =
      ((ulRegVal & 0xFFFF0000) | (((ulRxLevel - 1) << 8) | (ulTxLevel - 1)));
  (*((volatile unsigned long *)(ulBase + 0x0000017C))) = ulRegVal;
}


x86 assembly (clang, -O0):
<SPIFIFOLevelSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x17c(%rax),%rax
mov    %rax,-0x20(%rbp)
movabs $0xffff0000,%rax
and    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
shl    $0x8,%rcx
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
or     %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x17c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPIFIFOLevelSet>:
mov    0x17c(%rdi),%rax
and    $0xffff0000,%eax
shl    $0x8,%rdx
add    $0xffffffffffffff00,%rdx
add    $0xffffffffffffffff,%rsi
or     %rdx,%rsi
or     %rax,%rsi
mov    %rsi,0x17c(%rdi)
ret

LLVM IR (-O0):
define void @SPIFIFOLevelSet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = add i64 %8, 380
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = and i64 %12, 4294901760
%14 = load i64, i64* %6
%15 = sub i64 %14, 1
%16 = shl i64 %15, 8
%17 = load i64, i64* %5
%18 = sub i64 %17, 1
%19 = or i64 %16, %18
%20 = or i64 %13, %19
store i64 %20, i64* %7
%21 = load i64, i64* %7
%22 = load i64, i64* %4
%23 = add i64 %22, 380
%24 = inttoptr i64 %23 to i64*
store volatile i64 %21, i64* %24
ret void
}

LLVM IR (-O2):
define void @SPIFIFOLevelSet(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 380
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 4294901760
%8 = shl i64 %2, 8
%9 = add i64 %8, -256
%10 = add i64 %1, -1
%11 = or i64 %9, %10
%12 = or i64 %11, %7
store volatile i64 %12, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(unsigned dst) {
  unsigned end = dst;
  do {
    bar();
    dst += 2;
  } while (dst < end);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jb     1121 <foo+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <bar@plt>
add    $0x2,%ebp
cmp    %ebx,%ebp
jb     1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
br label %5
5: ; preds = %9, %1
%6 = call i32 (...) @bar()
%7 = load i32, i32* %2
%8 = add i32 %7, 2
store i32 %8, i32* %2
br label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp ult i32 %10, %11
br i1 %12, label %5, label %13
13: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = tail call i32 (...) @bar()
%5 = add i32 %3, 2
%6 = icmp ult i32 %5, %0
br i1 %6, label %2, label %7
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ make_command(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("TODOCMD - v0.1.0\n------\n");
  if (argc > 1) {
    make_command(argc, argv);
  } else {
    printf("No Input Recieved. Shutting Down.\n");
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    116d <main+0x3d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <make_command@plt>
jmp    1179 <main+0x49>
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x2,%ebp
jl     1155 <main+0x25>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <make_command@plt>
jmp    1161 <main+0x31>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"TODOCMD - v0.1.0\0A------\0A\00"
@.str.1 = [35 x i8] c"No Input Recieved. Shutting Down.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @make_command(i32 %10, i8** %11)
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* @EXIT_SUCCESS
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [24 x i8] c"TODOCMD - v0.1.0\0A------\00"
@str.2 = [34 x i8] c"No Input Recieved. Shutting Down.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @make_command(i32 %0, i8** %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* @EXIT_SUCCESS
%11 = tail call i32 @exit(i32 %10)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_6804(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_6804() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int a = 0;
  int *puntero;
  puntero = &a;
  printf("El valor de a es: %d. \nEl valor de *puntero es: %d. \n", a,
         *puntero);
  printf("La direccion de memoria de *puntero es: %p", puntero);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"El valor de a es: %d. \0AEl valor de *puntero es: %d. \0A\00"
@.str.1 = [43 x i8] c"La direccion de memoria de *puntero es: %p\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %2
store i32* %2, i32** %3
%4 = load i32, i32* %2
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
%8 = load i32*, i32** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"El valor de a es: %d. \0AEl valor de *puntero es: %d. \0A\00"
@.str.1 = [43 x i8] c"La direccion de memoria de *puntero es: %p\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void tokenize_destroy_function(void *object) { free(object); }


x86 assembly (clang, -O0):
<tokenize_destroy_function>:
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):
<tokenize_destroy_function>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @tokenize_destroy_function(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int detail;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigurerequest_detail(void *_p, int _v) {
  ((XEvent *)_p)->xconfigurerequest.detail = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigurerequest_detail>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigurerequest_detail(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigurerequest_detail(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int check1(char c1) {
  int j, k;
  char orig[] = {'2', '3', '4', '5', '6', '7', '8',
                 '9', 'T', 'J', 'Q', 'K', 'A'};
  k = 1;
  for (j = 0; j < 13; j++) {
    if (c1 == orig[j]) {
      k = 0;
    }
  }
  return k;
}


x86 assembly (clang, -O0):
<check1>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x19(%rbp)
mov    0xeed(%rip),%eax
mov    %eax,-0x11(%rbp)
mov    0xee8(%rip),%al
mov    %al,-0xd(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xd,-0x8(%rbp)
jge    116e <check1+0x6e>
movsbl -0x1(%rbp),%eax
movslq -0x8(%rbp),%rcx
movsbl -0x19(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    115b <check1+0x5b>
movl   $0x0,-0xc(%rbp)
jmp    1160 <check1+0x60>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <check1+0x35>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check1>:
movd   %edi,%xmm0
mov    $0xfe,%eax
movd   %eax,%xmm1
pand   %xmm0,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x0,%xmm1,%xmm0
pcmpeqb 0xede(%rip),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movmskps %xmm0,%eax
test   %eax,%eax
sete   %al
cmp    $0x54,%dil
setne  %cl
cmp    $0x4a,%dil
setne  %dl
and    %cl,%dl
cmp    $0x51,%dil
setne  %cl
and    %dl,%cl
and    %al,%cl
cmp    $0x4b,%dil
setne  %al
cmp    $0x41,%dil
setne  %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
@__const.check1.orig = [13 x i8] c"23456789TJQKA"
define i32 @check1(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca [13 x i8]
store i8 %0, i8* %2
%6 = bitcast [13 x i8]* %5 to i8*
store i32 1, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %21, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 13
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %12, %17
br i1 %18, label %19, label %20
19: ; preds = %10
store i32 0, i32* %4
br label %20
20: ; preds = %19, %10
br label %21
21: ; preds = %20
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %7
24: ; preds = %7
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @check1(i8 signext %0) {
%2 = insertelement <4 x i8> poison, i8 %0, i64 0
%3 = and <4 x i8> %2, <i8 -2, i8 poison, i8 poison, i8 poison>
%4 = shufflevector <4 x i8> %3, <4 x i8> poison, <4 x i32> zeroinitializer
%5 = icmp eq <4 x i8> %4, <i8 56, i8 54, i8 52, i8 50>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp eq i4 %6, 0
%8 = icmp ne i8 %0, 84
%9 = and i1 %8, %7
%10 = icmp ne i8 %0, 74
%11 = and i1 %10, %9
%12 = icmp ne i8 %0, 81
%13 = and i1 %12, %11
%14 = icmp ne i8 %0, 75
%15 = icmp ne i8 %0, 65
%16 = and i1 %15, %14
%17 = select i1 %16, i1 %13, i1 false
%18 = zext i1 %17 to i32
ret i32 %18
}
/* Variables and functions */
int a();
int b() { return a() + 17; }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <a@plt>
add    $0x11,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rax
xor    %eax,%eax
call   1030 <a@plt>
add    $0x11,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @b() {
%1 = call i32 (...) @a()
%2 = add nsw i32 %1, 17
ret i32 %2
}

LLVM IR (-O2):
define i32 @b() {
%1 = tail call i32 (...) @a()
%2 = add nsw i32 %1, 17
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(void **, int /*<<< orphan*/, int);
void **alloc_meta_table() {
  void **pt = (void **)malloc((0x10000 >> 2) * sizeof(void *));
  memset(pt, 0, (0x10000 >> 2) * sizeof(void *));
  return pt;
}


x86 assembly (clang, -O0):
<alloc_meta_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20000,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x20000,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_meta_table>:
push   %rbx
mov    $0x20000,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x20000,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8** @alloc_meta_table() {
%1 = alloca i8**
%2 = call i64 @malloc(i32 131072)
%3 = inttoptr i64 %2 to i8**
store i8** %3, i8*** %1
%4 = load i8**, i8*** %1
%5 = call i32 @memset(i8** %4, i32 0, i32 131072)
%6 = load i8**, i8*** %1
ret i8** %6
}

LLVM IR (-O2):
define i8** @alloc_meta_table() {
%1 = tail call i64 @malloc(i32 131072)
%2 = inttoptr i64 %1 to i8**
%3 = tail call i32 @memset(i8** %2, i32 0, i32 131072)
ret i8** %2
}
/* Variables and functions */
int /*<<< orphan*/ GLimp_EndFrame();
void R_EndFrame(void) { GLimp_EndFrame(); }


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

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

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

LLVM IR (-O2):
define void @R_EndFrame() {
%1 = tail call i32 (...) @GLimp_EndFrame()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FE_DIVBYZERO;
void test1() { FE_DIVBYZERO; }


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

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

LLVM IR (-O0):
@FE_DIVBYZERO = global i32 0
define void @test1() {
%1 = load i32, i32* @FE_DIVBYZERO
ret void
}

LLVM IR (-O2):
@FE_DIVBYZERO = global i32 0
define void @test1() {
ret void
}
/* Variables and functions */
int get_rand(int /*<<< orphan*/, int);
int gr_obj_char() {
  int r;
  char *rs = "%!?]=/):*";
  r = get_rand(0, 8);
  return (rs[r]);
}


x86 assembly (clang, -O0):
<gr_obj_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <get_rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gr_obj_char>:
push   %rax
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <get_rand@plt>
cltq
lea    0xeda(%rip),%rcx
movsbl (%rax,%rcx,1),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%!?]=/):*\00"
define i32 @gr_obj_char() {
%1 = alloca i32
%2 = alloca i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 @get_rand(i32 0, i32 8)
store i32 %3, i32* %1
%4 = load i8*, i8** %2
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"%!?]=/):*\00"
define i32 @gr_obj_char() {
%1 = tail call i32 @get_rand(i32 0, i32 8)
%2 = sext i32 %1 to i64
%3 = getelementptr inbounds [10 x i8], [10 x i8]* @.str, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Type definitions */
struct stack_st_OPENSSL_STRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_find_ex(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_STRING_find_ex(struct stack_st_OPENSSL_STRING *sk, char *ptr) {
  return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr);
}


x86 assembly (clang, -O0):
<sk_OPENSSL_STRING_find_ex>:
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 <OPENSSL_sk_find_ex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_OPENSSL_STRING_find_ex>:
jmp    1030 <OPENSSL_sk_find_ex@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i32 @sk_OPENSSL_STRING_find_ex(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_STRING*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_STRING* %0, %struct.stack_st_OPENSSL_STRING** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_STRING*, %struct.stack_st_OPENSSL_STRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_STRING* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_find_ex(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i32 @sk_OPENSSL_STRING_find_ex(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_STRING, %struct.stack_st_OPENSSL_STRING* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_find_ex(i32* %3, i8* %1)
ret i32 %4
}
void keys_(int *k, int *n) {}


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

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

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

LLVM IR (-O2):
define void @keys_(i32* nocapture %0, i32* nocapture %1) {
ret void
}