xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_8_le(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_uint64_le(uint8_t *dst, uint32_t offs,
                                    const uint64_t *src) {
  uint8_t tmp[8] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_8_le(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_uint64_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x40(%rbp),%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_uint64_le>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x20,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_uint64_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [8 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [8 x i32]* %7 to i8*
%9 = bitcast [8 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 32)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_8_le(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_uint64_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = bitcast [8 x i32]* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 32)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%11 = call i32 @ivory_serialize_pack_prim_8_le(i32* %9, i32* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tratar_alarma(void) { printf("Alarma activada \n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"Alarma activada \00"
define void @tratar_alarma() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *getstr();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *str = getstr();
  printf("[%s] \n", str);
  free(str);
  str = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getstr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getstr@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"[%s] \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @getstr()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"[%s] \0A\00"
define i32 @main() {
%1 = tail call i8* (...) @getstr()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: measure-level freq time\n");
  fprintf(stderr, " freq - frequency expressed in MHz (122.88 or 125),\n");
  fprintf(stderr,
          " time - measurement time expressed in seconds (from 1 to 30).\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xee7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf07(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef1(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf18(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: measure-level freq time\0A\00"
@.str.1 = [53 x i8] c" freq - frequency expressed in MHz (122.88 or 125),\0A\00"
@.str.2 = [63 x i8] c" time - measurement time expressed in seconds (from 1 to 30).\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: measure-level freq time\0A\00"
@.str.1 = [53 x i8] c" freq - frequency expressed in MHz (122.88 or 125),\0A\00"
@.str.2 = [63 x i8] c" time - measurement time expressed in seconds (from 1 to 30).\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcasecmp(char *, char *);
void strcasecmp_diff_length_2() {
  char *x = "aBcDe";
  char *y = "abc";
  clang_analyzer_eval(strcasecmp(x, y) > 0);
}


x86 assembly (clang, -O0):
<strcasecmp_diff_length_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_diff_length_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"aBcDe\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strcasecmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcasecmp(i8* %3, i8* %4)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"aBcDe\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strcasecmp_diff_length_2() {
%1 = tail call i64 @strcasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int sum = 0, count;
  for (count = 1; count <= 10; count++) {
    if (count % 2 == 0) {
      sum += count;
    }
  }
  printf("sum is %d", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     1167 <main+0x57>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1154 <main+0x44>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <main+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"sum is %d\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 1, i32* %3
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 10
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = add nsw i32 %13, %12
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %7
br label %16
16: ; preds = %15
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [10 x i8] c"sum is %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int ac, char **av) {
  puts("Hello world");
  puts("foobar");
  puts("dev/branch");
  return (0);
}


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    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [7 x i8] c"foobar\00"
@.str.2 = [11 x i8] c"dev/branch\00"
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 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [7 x i8] c"foobar\00"
@.str.2 = [11 x i8] c"dev/branch\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ plat_video_menu_end();
void menu_draw_end(void) { plat_video_menu_end(); }


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

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

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

LLVM IR (-O2):
define void @menu_draw_end() {
%1 = tail call i32 (...) @plat_video_menu_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *s) {
  fprintf(stderr, "%s <depth> <width> <grain> <reps>\n", s);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"%s <depth> <width> <grain> <reps>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"%s <depth> <width> <grain> <reps>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void set_taint_full(struct taint *src) { return; }


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

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

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

LLVM IR (-O2):
%struct.taint = type opaque
define void @set_taint_full(%struct.taint* nocapture %0) {
ret void
}
int wet_console_width(void) { return 80; }


x86 assembly (clang, -O0):
<wet_console_width>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wet_console_width>:
mov    $0x50,%eax
ret

LLVM IR (-O0):
define i32 @wet_console_width() {
ret i32 80
}

LLVM IR (-O2):
define i32 @wet_console_width() {
ret i32 80
}
/* Variables and functions */
scalar_t__ _PDCLIB_atomax(char const *);
int atoi(const char *s) { return (int)_PDCLIB_atomax(s); }


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

x86 assembly (clang, -O2):
<atoi>:
jmp    1030 <_PDCLIB_atomax@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @_PDCLIB_atomax(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* %0) {
%2 = tail call i64 @_PDCLIB_atomax(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpunord_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d f3(__m128d x, __m128d y) { return _mm_cmpunord_sd(x, y); }


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

x86 assembly (clang, -O2):
<f3>:
jmp    1030 <_mm_cmpunord_sd@plt>

LLVM IR (-O0):
define i32 @f3(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 = call i32 @_mm_cmpunord_sd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpunord_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ f(int *);
int main() {
  int x = 5;
  f(&x);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushinteger4array_(char *x, unsigned int *n) { pushNarray(x, (*n * 4)); }


x86 assembly (clang, -O0):
<pushinteger4array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x2,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushinteger4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushinteger4array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 4
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushinteger4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
long double __q_acosd(long double *);
long double intr_wrap_006(long double p1) { return __q_acosd(&p1); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <__q_acosd@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
mov    %rsp,%rdi
call   1030 <__q_acosd@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @intr_wrap_006(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_acosd(x86_fp80* %2)
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @intr_wrap_006(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_acosd(x86_fp80* %2)
ret x86_fp80 %3
}
/* Variables and functions */
void *OP1_TYPECAST(void *);
void *OP2_TYPECAST(void *);
void *op_MULT(void *inp1, void *inp2) {
  inp1 = OP1_TYPECAST(inp1);
  inp2 = OP2_TYPECAST(inp2);
  int first = (int)inp1;
  int second = (int)inp2;
  return (void *)(first * second);
}


x86 assembly (clang, -O0):
<op_MULT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <OP1_TYPECAST@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <OP2_TYPECAST@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_MULT>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <OP1_TYPECAST@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <OP2_TYPECAST@plt>
imul   %r14d,%eax
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @op_MULT(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i8* @OP1_TYPECAST(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %4
%10 = call i8* @OP2_TYPECAST(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %11 to i32
store i32 %12, i32* %5
%13 = load i8*, i8** %4
%14 = ptrtoint i8* %13 to i32
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = mul nsw i32 %15, %16
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
ret i8* %19
}

LLVM IR (-O2):
define i8* @op_MULT(i8* %0, i8* %1) {
%3 = tail call i8* @OP1_TYPECAST(i8* %0)
%4 = tail call i8* @OP2_TYPECAST(i8* %1)
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %4 to i64
%7 = shl i64 %5, 32
%8 = mul i64 %7, %6
%9 = ashr exact i64 %8, 32
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
void unpackbin_print_help() {}


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

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

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

LLVM IR (-O2):
define void @unpackbin_print_help() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ video_stream_source_t;

/* Variables and functions */
int /*<<< orphan*/ VIDEO_SELECT_SOURCE;
scalar_t__ ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int videoSelectSource(int fd, video_stream_source_t source) {
  int ans;
  if ((ans = ioctl(fd, VIDEO_SELECT_SOURCE, source) < 0)) {
    perror("VIDEO SELECT SOURCE: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<videoSelectSource>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x10(%rbp)
test   $0x1,%al
jne    1161 <videoSelectSource+0x41>
jmp    1179 <videoSelectSource+0x59>
lea    0xe98(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <videoSelectSource+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoSelectSource>:
push   %rax
mov    %esi,%edx
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     113d <videoSelectSource+0x1d>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@VIDEO_SELECT_SOURCE = global i32 0
@.str = [22 x i8] c"VIDEO SELECT SOURCE: \00"
define i32 @videoSelectSource(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @VIDEO_SELECT_SOURCE
%9 = load i32, i32* %5
%10 = call i64 @ioctl(i32 %7, i32 %8, i32 %9)
%11 = icmp slt i64 %10, 0
%12 = zext i1 %11 to i32
store i32 %12, i32* %6
br i1 %11, label %13, label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@VIDEO_SELECT_SOURCE = global i32 0
@.str = [22 x i8] c"VIDEO SELECT SOURCE: \00"
define i32 @videoSelectSource(i32 %0, i32 %1) {
%3 = load i32, i32* @VIDEO_SELECT_SOURCE
%4 = tail call i64 @ioctl(i32 %0, i32 %3, i32 %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
int is_numeric(char *word) {
  char *wrapper = word, c = 0;
  int result = 0;
  while (c = *wrapper++) {
    result = '0' <= c && c <= '9';
    if (!result)
      break;
  }
  return result;
}


x86 assembly (clang, -O0):
<is_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     1179 <is_numeric+0x79>
movsbl -0x11(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jg     115a <is_numeric+0x5a>
movsbl -0x11(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1174 <is_numeric+0x74>
jmp    1179 <is_numeric+0x79>
jmp    111b <is_numeric+0x1b>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_numeric>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1128 <is_numeric+0x28>
add    $0x1,%rdi
nopl   0x0(%rax)
add    $0xd0,%cl
cmp    $0xa,%cl
jae    1128 <is_numeric+0x28>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <is_numeric+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %10
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %10, %4 ], [ %0, %1 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = add i8 %8, -48
%12 = icmp ult i8 %11, 10
br i1 %12, label %4, label %13
13: ; preds = %4, %7, %1
%14 = phi i32 [ 0, %1 ], [ 0, %7 ], [ 1, %4 ]
ret i32 %14
}
int upload_file_size_callback_dummy(int aSize) { return 1; }


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

x86 assembly (clang, -O2):
<upload_file_size_callback_dummy>:
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @upload_file_size_callback_dummy(i32 %0) {
ret i32 1
}
/* Variables and functions */
char *xml_findend(char *, char *);
char *modsin_endptr(char *p) {
  char *endptr;
  endptr = xml_findend(p, "mods");
  if (!endptr)
    endptr = xml_findend(p, "mods:mods");
  return endptr;
}


x86 assembly (clang, -O0):
<modsin_endptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xede(%rip),%rsi
call   1030 <xml_findend@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <modsin_endptr+0x3f>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <xml_findend@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modsin_endptr>:
push   %rbx
mov    %rdi,%rbx
lea    0xeea(%rip),%rsi
call   1030 <xml_findend@plt>
test   %rax,%rax
je     1127 <modsin_endptr+0x17>
pop    %rbx
ret
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <xml_findend@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"mods\00"
@.str.1 = [10 x i8] c"mods:mods\00"
define i8* @modsin_endptr(i8* %0) {
%2 = tail call i8* @xml_findend(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @xml_findend(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %2, %1 ], [ %5, %4 ]
ret i8* %7
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int gca_cmp_int64(const void *aa, const void *bb) {
  const int64_t a = *(const int64_t *)aa;
  const int64_t b = *(const int64_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp_int64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp_int64>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp_int64(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @gca_cmp_int64(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
void soru_4(int *kucuk, int *buyuk) {
  if (*kucuk > *buyuk) {
    *kucuk ^= *buyuk;
    *buyuk ^= *kucuk;
    *kucuk ^= *buyuk;
  }
}


x86 assembly (clang, -O0):
<soru_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    1148 <soru_4+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_4>:
mov    (%rdi),%ecx
mov    (%rsi),%eax
cmp    %eax,%ecx
jle    1112 <soru_4+0x12>
xor    %ecx,%eax
mov    %eax,(%rdi)
xor    (%rsi),%eax
mov    %eax,(%rsi)
xor    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @soru_4(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 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %26
10: ; preds = %2
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = xor i32 %14, %12
store i32 %15, i32* %13
%16 = load i32*, i32** %3
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %18
%20 = xor i32 %19, %17
store i32 %20, i32* %18
%21 = load i32*, i32** %4
%22 = load i32, i32* %21
%23 = load i32*, i32** %3
%24 = load i32, i32* %23
%25 = xor i32 %24, %22
store i32 %25, i32* %23
br label %26
26: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @soru_4(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = xor i32 %4, %3
store i32 %7, i32* %0
%8 = load i32, i32* %1
%9 = xor i32 %8, %7
store i32 %9, i32* %1
%10 = load i32, i32* %0
%11 = xor i32 %10, %9
store i32 %11, i32* %0
br label %12
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_horizontal_delimetre() { printf("%s\n", "-----------------------"); }


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

x86 assembly (clang, -O2):
<print_horizontal_delimetre>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [24 x i8] c"-----------------------\00"
define void @print_horizontal_delimetre() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int test_level_four(int, int, int, int, void (*)(void *), void *);
int test_level_three(int one, int two, int three, int four,
                     void (*callback_func)(void *), void *data) {
  return test_level_four(one + 3, two + 6, three + 9, four + 12, callback_func,
                         data) +
         3;
}


x86 assembly (clang, -O0):
<test_level_three>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%edi
add    $0x3,%edi
mov    -0x8(%rbp),%esi
add    $0x6,%esi
mov    -0xc(%rbp),%edx
add    $0x9,%edx
mov    -0x10(%rbp),%ecx
add    $0xc,%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <test_level_four@plt>
add    $0x3,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_level_three>:
push   %rax
add    $0x3,%edi
add    $0x6,%esi
add    $0x9,%edx
add    $0xc,%ecx
call   1030 <test_level_four@plt>
add    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_level_three(i32 %0, i32 %1, i32 %2, i32 %3, void (i8*)* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca void (i8*)*
%12 = alloca i8*
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store void (i8*)* %4, void (i8*)** %11
store i8* %5, i8** %12
%13 = load i32, i32* %7
%14 = add nsw i32 %13, 3
%15 = load i32, i32* %8
%16 = add nsw i32 %15, 6
%17 = load i32, i32* %9
%18 = add nsw i32 %17, 9
%19 = load i32, i32* %10
%20 = add nsw i32 %19, 12
%21 = load void (i8*)*, void (i8*)** %11
%22 = load i8*, i8** %12
%23 = call i32 @test_level_four(i32 %14, i32 %16, i32 %18, i32 %20, void (i8*)* %21, i8* %22)
%24 = add nsw i32 %23, 3
ret i32 %24
}

LLVM IR (-O2):
define i32 @test_level_three(i32 %0, i32 %1, i32 %2, i32 %3, void (i8*)* %4, i8* %5) {
%7 = add nsw i32 %0, 3
%8 = add nsw i32 %1, 6
%9 = add nsw i32 %2, 9
%10 = add nsw i32 %3, 12
%11 = tail call i32 @test_level_four(i32 %7, i32 %8, i32 %9, i32 %10, void (i8*)* %4, i8* %5)
%12 = add nsw i32 %11, 3
ret i32 %12
}
/* Variables and functions */
int iposix_file_link(char const *, char const *);
int install_file_link(const char *src, const char *dst) {
  return iposix_file_link(src, dst);
}


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

x86 assembly (clang, -O2):
<install_file_link>:
jmp    1030 <iposix_file_link@plt>

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

LLVM IR (-O2):
define i32 @install_file_link(i8* %0, i8* %1) {
%3 = tail call i32 @iposix_file_link(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void speex_memcpy_bytes(char *dst, char *src, int nbytes) {
  memcpy(dst, src, nbytes);
}


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

x86 assembly (clang, -O2):
<speex_memcpy_bytes>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @speex_memcpy_bytes(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @speex_memcpy_bytes(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
void some_c_function(void) {
  int a, b, c;
  a = 1;
  b = 2;
}


x86 assembly (clang, -O0):
<some_c_function>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @some_c_function() {
ret void
}
int layer_table_base(int layer) {
  switch (layer) {
  case 1:
    return 0x100;
  case 2:
    return 0x120;
  }
  return 0;
}


x86 assembly (clang, -O0):
<layer_table_base>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     112c <layer_table_base+0x2c>
jmp    111b <layer_table_base+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1138 <layer_table_base+0x38>
jmp    1144 <layer_table_base+0x44>
movl   $0x100,-0x4(%rbp)
jmp    114b <layer_table_base+0x4b>
movl   $0x120,-0x4(%rbp)
jmp    114b <layer_table_base+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<layer_table_base>:
xor    %eax,%eax
cmp    $0x2,%edi
mov    $0x120,%ecx
cmovne %eax,%ecx
cmp    $0x1,%edi
mov    $0x100,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @layer_table_base(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i32 288, i32 0
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i32 256, i32 %3
ret i32 %5
}
int main() {
  int i = 123, j = 5;
  do {
    i++;
    do {
      j++;
    } while (j < 5);
  } while (i < 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jl     1122 <main+0x22>
jmp    113a <main+0x3a>
cmpl   $0xa,-0x8(%rbp)
jl     1119 <main+0x19>
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 i32
%3 = alloca i32
store i32 0, i32* %1
store i32 123, i32* %2
store i32 5, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
br label %7
7: ; preds = %10, %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 5
br i1 %12, label %7, label %13
13: ; preds = %10
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 10
br i1 %16, label %4, label %17
17: ; preds = %14
ret i32 0
}

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

/* Variables and functions */
int16_t get_immediate16(int32_t instruction) {
  return (instruction & 0x0000ffff);
}


x86 assembly (clang, -O0):
<get_immediate16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_immediate16>:
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @get_immediate16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
ret i32 %4
}

LLVM IR (-O2):
define i32 @get_immediate16(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
void foo_2_1_1_2_1_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_1_1_1_2_2() {
ret void
}
int main() {
  long long x;
  x = 0;
  x = x + 1;
  if (x != 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
je     1136 <main+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <main+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_DECK_CONTROL;
void cec_msg_deck_control(struct cec_msg *msg, __u8 deck_control_mode) {
  msg->len = 3;
  msg->msg[1] = CEC_MSG_DECK_CONTROL;
  msg->msg[2] = deck_control_mode;
}


x86 assembly (clang, -O0):
<cec_msg_deck_control>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    0x2ecc(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_deck_control>:
movl   $0x3,(%rdi)
mov    0x2edb(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
mov    %esi,0x8(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_DECK_CONTROL = global i32 0
define void @cec_msg_deck_control(%struct.cec_msg* %0, i32 %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32 %1, i32* %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
store i32 3, i32* %6
%7 = load i32, i32* @CEC_MSG_DECK_CONTROL
%8 = load %struct.cec_msg*, %struct.cec_msg** %3
%9 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %8, i32 0, i32 1
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %7, i32* %11
%12 = load i32, i32* %4
%13 = load %struct.cec_msg*, %struct.cec_msg** %3
%14 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %13, i32 0, i32 1
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_DECK_CONTROL = global i32 0
define void @cec_msg_deck_control(%struct.cec_msg* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 3, i32* %3
%4 = load i32, i32* @CEC_MSG_DECK_CONTROL
%5 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 %4, i32* %7
%8 = getelementptr inbounds i32, i32* %6, i64 2
store i32 %1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_func(char c, void *p) {
  p = p;
  putchar(c);
}


x86 assembly (clang, -O0):
<print_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_func>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_func(i8 signext %0, i8* nocapture readnone %1) {
%3 = tail call i32 @putchar(i8 signext %0)
ret void
}
void foo724() {}


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

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

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

LLVM IR (-O2):
define void @foo724() {
ret void
}