xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ main_loop();
int /*<<< orphan*/ setup();
int main() {
  setup();
  main_loop();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setup@plt>
mov    $0x0,%al
call   1030 <main_loop@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @setup()
%2 = call i32 (...) @main_loop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @main_loop()
ret i32 0
}
void init_accelerometer() {
  (*((volatile unsigned char *)(0x2A)) &= ~(1 << 3));
  (*((volatile unsigned char *)(0x2A)) &= ~(1 << 2));
}


x86 assembly (clang, -O0):
<init_accelerometer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xfffffff7,%eax
mov    %al,%cl
mov    $0x2a,%eax
mov    %cl,(%rax)
mov    $0x2a,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xfffffffb,%eax
mov    %al,%cl
mov    $0x2a,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_accelerometer>:
andb   $0xf7,0x2a
f7
andb   $0xfb,0x2a
fb
ret

LLVM IR (-O0):
define void @init_accelerometer() {
%1 = load volatile i8, i8* inttoptr (i64 42 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, -9
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 42 to i8*)
%5 = load volatile i8, i8* inttoptr (i64 42 to i8*)
%6 = zext i8 %5 to i32
%7 = and i32 %6, -5
%8 = trunc i32 %7 to i8
store volatile i8 %8, i8* inttoptr (i64 42 to i8*)
ret void
}

LLVM IR (-O2):
define void @init_accelerometer() {
%1 = load volatile i8, i8* inttoptr (i64 42 to i8*)
%2 = and i8 %1, -9
store volatile i8 %2, i8* inttoptr (i64 42 to i8*)
%3 = load volatile i8, i8* inttoptr (i64 42 to i8*)
%4 = and i8 %3, -5
store volatile i8 %4, i8* inttoptr (i64 42 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int _ez_net_tcp_server(int, char *, int /*<<< orphan*/, int);
int ez_net_tcp6_server(int port, char *bindaddr, int backlog) {
  return _ez_net_tcp_server(port, bindaddr, AF_INET6, backlog);
}


x86 assembly (clang, -O0):
<ez_net_tcp6_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
mov    -0x14(%rbp),%ecx
call   1030 <_ez_net_tcp_server@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ez_net_tcp6_server>:
mov    %edx,%ecx
mov    0x2ecf(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_ez_net_tcp_server@plt>

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

LLVM IR (-O2):
@AF_INET6 = global i32 0
define i32 @ez_net_tcp6_server(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @AF_INET6
%5 = tail call i32 @_ez_net_tcp_server(i32 %0, i8* %1, i32 %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void kotlinclib_print_boolean(int message) {
  if (message == 0) {
    printf("false");
  } else {
    printf("true");
  }
}


x86 assembly (clang, -O0):
<kotlinclib_print_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1136 <kotlinclib_print_boolean+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <kotlinclib_print_boolean+0x32>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kotlinclib_print_boolean>:
test   %edi,%edi
lea    0xee7(%rip),%rax
lea    0xee6(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define void @kotlinclib_print_boolean(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
extern void header(FILE *sock_fp, char *content_type) {
  fprintf(sock_fp, "HTTP/1.0 200 OK\r\n");
  if (content_type)
    fprintf(sock_fp, "Content-type: %s\r\n", content_type);
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1153 <header+0x43>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
test   %r14,%r14
je     1163 <header+0x43>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"HTTP/1.0 200 OK\0D\0A\00"
@.str.1 = [19 x i8] c"Content-type: %s\0D\0A\00"
define void @header(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 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = load i8*, i8** %4
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HTTP/1.0 200 OK\0D\0A\00"
@.str.1 = [19 x i8] c"Content-type: %s\0D\0A\00"
define void @header(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 17, i64 1, i32* %0)
%4 = icmp eq i8* %1, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ucontext_t;

/* Variables and functions */
int swapcontext(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int model_swapcontext(ucontext_t *oucp, ucontext_t *ucp) {
  return swapcontext(oucp, ucp);
}


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

x86 assembly (clang, -O2):
<model_swapcontext>:
jmp    1030 <swapcontext@plt>

LLVM IR (-O0):
define i32 @model_swapcontext(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 @swapcontext(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @model_swapcontext(i32* %0, i32* %1) {
%3 = tail call i32 @swapcontext(i32* %0, i32* %1)
ret i32 %3
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[local1] += state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - (unsigned short)46601;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    115a <RandomFunc+0x5a>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%edx
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
add    %edx,%ecx
mov    %cx,-0x12(%rbp,%rax,2)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0xb609,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    %eax,%eax
add    $0x6081,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %35
18: ; preds = %14
%19 = load i16, i16* %6
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %20
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = load i16, i16* %6
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %25
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = add nsw i32 %28, %23
%30 = trunc i32 %29 to i16
store i16 %30, i16* %26
%31 = load i16, i16* %6
%32 = zext i16 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i16
store i16 %34, i16* %6
br label %14
35: ; preds = %14
%36 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%37 = load i16, i16* %36
%38 = zext i16 %37 to i32
%39 = sub nsw i32 %38, 46601
%40 = trunc i32 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 1
%5 = add i16 %4, 24705
store i16 %5, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glWindowPos4f(float, float, float, int);
void glWindowPos3f(float x, float y, float z) { glWindowPos4f(x, y, z, 1); }


x86 assembly (clang, -O0):
<glWindowPos3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
mov    $0x1,%edi
call   1030 <glWindowPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @glWindowPos3f(float %0, float %1, float %2) {
%4 = tail call i32 @glWindowPos4f(float %0, float %1, float %2, i32 1)
ret void
}
/* Type definitions */
struct TEK1_STR_UC {
  int dummy;
};

/* Variables and functions */
int calclen_uc0str(struct TEK1_STR_UC *, int /*<<< orphan*/,
                   int /*<<< orphan*/);
int calclen_ucstr(struct TEK1_STR_UC *ucstr) {
  return calclen_uc0str(ucstr, 0, 0);
}


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

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

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

LLVM IR (-O2):
%struct.TEK1_STR_UC = type { i32 }
define i32 @calclen_ucstr(%struct.TEK1_STR_UC* %0) {
%2 = tail call i32 @calclen_uc0str(%struct.TEK1_STR_UC* %0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void VLED_ResetLedAll() { printf("%c[2J", 27); }


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

x86 assembly (clang, -O2):
<VLED_ResetLedAll>:
lea    0xee9(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%c[2J\00"
define void @VLED_ResetLedAll() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c[2J\00"
define void @VLED_ResetLedAll() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}
void CloseDebugPipe() {}


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

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

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

LLVM IR (-O2):
define void @CloseDebugPipe() {
ret void
}
void fd143(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
p02A:
  goto p02A;
  goto a;
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd143>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd143+0x7>

x86 assembly (clang, -O2):
<fd143>:
jmp    1100 <fd143>

LLVM IR (-O0):
define void @fd143(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; preds = %26
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd143(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ chomp(char *);
int /*<<< orphan*/ list_print(struct list *);
int /*<<< orphan*/ split(char *, char, struct list **);
int main() {
  char string[] = "FOO\tBAR\tFOOBAR\n";
  struct list *fields;
  chomp(string);
  split(string, '\t', &fields);
  list_print(fields);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <chomp@plt>
lea    -0x20(%rbp),%rdi
mov    $0x9,%esi
lea    -0x28(%rbp),%rdx
call   1040 <split@plt>
mov    -0x28(%rbp),%rdi
call   1030 <list_print@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <chomp@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <split@plt>
mov    0x8(%rsp),%rdi
call   1030 <list_print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
@__const.main.string = [16 x i8] c"FOO\09BAR\09FOOBAR\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
%3 = alloca %struct.list*
store i32 0, i32* %1
%4 = bitcast [16 x i8]* %2 to i8*
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = call i32 @chomp(i8* %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = call i32 @split(i8* %7, i8 signext 9, %struct.list** %3)
%9 = load %struct.list*, %struct.list** %3
%10 = call i32 @list_print(%struct.list* %9)
ret i32 0
}

LLVM IR (-O2):
%struct.list = type { i32 }
@__const.main.string = [16 x i8] c"FOO\09BAR\09FOOBAR\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca %struct.list*
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = bitcast %struct.list** %2 to i8*
%5 = call i32 @chomp(i8* %3)
%6 = call i32 @split(i8* %3, i8 signext 9, %struct.list** %2)
%7 = load %struct.list*, %struct.list** %2
%8 = call i32 @list_print(%struct.list* %7)
ret i32 0
}
float testf(float x, int sel1, int sel2) {
  float input = sel1 ? -x : __builtin_fabsf(x);
  if (sel2)
    return __builtin_cosf(input);
  else
    return __builtin_coshf(input);
}


x86 assembly (clang, -O0):
<testf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1159 <testf+0x39>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    116e <testf+0x4e>
movss  -0x8(%rbp),%xmm0
movaps 0xe9b(%rip),%xmm1
pand   %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1196 <testf+0x76>
movss  -0x14(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11a5 <testf+0x85>
movss  -0x14(%rbp),%xmm0
call   1030 <coshf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testf>:
test   %edi,%edi
je     1134 <testf+0x14>
xorps  0xed5(%rip),%xmm0
test   %esi,%esi
je     113f <testf+0x1f>
jmp    1040 <cosf@plt>
andps  0xed5(%rip),%xmm0
test   %esi,%esi
jne    112f <testf+0xf>
jmp    1030 <coshf@plt>

LLVM IR (-O0):
define float @testf(float %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store float %0, float* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load float, float* %5
%13 = fneg float %12
br label %17
14: ; preds = %3
%15 = load float, float* %5
%16 = call float @llvm.fabs.f32(float %15)
br label %17
17: ; preds = %14, %11
%18 = phi float [ %13, %11 ], [ %16, %14 ]
store float %18, float* %8
%19 = load i32, i32* %7
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load float, float* %8
%23 = call float @cosf(float %22)
store float %23, float* %4
br label %27
24: ; preds = %17
%25 = load float, float* %8
%26 = call float @coshf(float %25)
store float %26, float* %4
br label %27
27: ; preds = %24, %21
%28 = load float, float* %4
ret float %28
}

LLVM IR (-O2):
define float @testf(float %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = fneg float %0
%6 = tail call float @llvm.fabs.f32(float %0)
%7 = select i1 %4, float %6, float %5
%8 = icmp eq i32 %2, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call float @cosf(float %7)
br label %13
11: ; preds = %3
%12 = tail call float @coshf(float %7)
br label %13
13: ; preds = %11, %9
%14 = phi float [ %10, %9 ], [ %12, %11 ]
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ initialize_clock();
int main(void) {
  initialize_clock();
  while (1) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initialize_clock@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initialize_clock@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initialize_clock()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialize_clock()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ t2();
void t1(void) { t2(); }


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

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

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

LLVM IR (-O2):
define void @t1() {
%1 = tail call i32 (...) @t2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wallocate_3i_(int *, int *, int *, int *, int *);
void wallocate_3i(int *A, int *firstNo, int *secondNo, int *thirdNo,
                  int *alloc_info) {
  wallocate_3i_(A, firstNo, secondNo, thirdNo, alloc_info);
}


x86 assembly (clang, -O0):
<wallocate_3i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <wallocate_3i_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wallocate_3i>:
jmp    1030 <wallocate_3i_@plt>

LLVM IR (-O0):
define void @wallocate_3i(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i32 @wallocate_3i_(i32* %11, i32* %12, i32* %13, i32* %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @wallocate_3i(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @wallocate_3i_(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4)
ret void
}
/* Variables and functions */
int mbtowc(int /*<<< orphan*/, char const *, size_t);
int mblen(const char *s, size_t n) { return mbtowc(0, s, n); }


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

x86 assembly (clang, -O2):
<mblen>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <mbtowc@plt>

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

LLVM IR (-O2):
define i32 @mblen(i8* %0, i64 %1) {
%3 = tail call i32 @mbtowc(i32 0, i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("Yello\t\b\b\v hi \n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@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>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Yello\09\08\08\0B hi \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Yello\09\08\08\0B hi \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int PMPI_Init_thread(int *, char ***, int, int *);
int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) {
  ;
  return PMPI_Init_thread(argc, argv, required, provided);
}


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

x86 assembly (clang, -O2):
<MPI_Init_thread>:
jmp    1030 <PMPI_Init_thread@plt>

LLVM IR (-O0):
define i32 @MPI_Init_thread(i32* %0, i8*** %1, i32 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i8***
%7 = alloca i32
%8 = alloca i32*
store i32* %0, i32** %5
store i8*** %1, i8**** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i8***, i8**** %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @PMPI_Init_thread(i32* %9, i8*** %10, i32 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @MPI_Init_thread(i32* %0, i8*** %1, i32 %2, i32* %3) {
%5 = tail call i32 @PMPI_Init_thread(i32* %0, i8*** %1, i32 %2, i32* %3)
ret i32 %5
}
test_old1(a, b) int a, b;
{ printf("Old Style %d %d\n", a, b); }


x86 assembly (clang, -O0):
<test_old1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_old1>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Old Style %d %d\0A\00"
define i32 @test_old1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [17 x i8] c"Old Style %d %d\0A\00"
define i32 @test_old1(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 undef
}
/* Variables and functions */
int time(int /*<<< orphan*/);
int time_timestamp() { return time(0); }


x86 assembly (clang, -O0):
<time_timestamp>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_timestamp>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @time_timestamp() {
%1 = call i32 @time(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @time_timestamp() {
%1 = tail call i32 @time(i32 0)
ret i32 %1
}
/* Type definitions */
struct sup_packet {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void dump_segment_end(const struct sup_packet *packet) {
  fprintf(stdout, "END\n\n");
}


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

x86 assembly (clang, -O2):
<dump_segment_end>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.sup_packet = type { i32 }
@stdout = global i32 0
@.str = [6 x i8] c"END\0A\0A\00"
define void @dump_segment_end(%struct.sup_packet* %0) {
%2 = alloca %struct.sup_packet*
store %struct.sup_packet* %0, %struct.sup_packet** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.sup_packet = type { i32 }
@stdout = global i32 0
@.str = [6 x i8] c"END\0A\0A\00"
define void @dump_segment_end(%struct.sup_packet* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "\nThe program loads <index> and shows some stats on it\n");
  fprintf(stderr, "Usage:  %s <index> \n", progname);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xefe(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"\0AThe program loads <index> and shows some stats on it\0A\00"
@.str.1 = [21 x i8] c"Usage: %s <index> \0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"\0AThe program loads <index> and shows some stats on it\0A\00"
@.str.1 = [21 x i8] c"Usage: %s <index> \0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mtime;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
int64_t get_mtime(char *path) {
  struct stat s;
  stat(path, &s);
  return s.st_mtime;
}


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

x86 assembly (clang, -O2):
<get_mtime>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @get_mtime(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_mtime(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0Toggle();
void TelosbSensorReadingNoMessageEditsC__Leds__led0Toggle(void) {
  LedsP__Leds__led0Toggle();
}


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

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

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

LLVM IR (-O2):
define void @TelosbSensorReadingNoMessageEditsC__Leds__led0Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led0Toggle()
ret void
}
void ReverseGPIOP$0$In$makeOutput(void) { HplMcs51GeneralIOC$P10$makeOutput(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$0$In$makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P10$makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$0$In$makeOutput>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P10$makeOutput@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$0$In$makeOutput"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P10$makeOutput"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$0$In$makeOutput"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P10$makeOutput"()
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_slice(void *c, const char **ret) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_creds_get_slice>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_slice(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_slice(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void _ewfe(int pi, unsigned event, uint32_t tick, void *user) {
  *(int *)user = 1;
}


x86 assembly (clang, -O0):
<_ewfe>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ewfe>:
movl   $0x1,(%rcx)
ret

LLVM IR (-O0):
define void @_ewfe(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = bitcast i8* %9 to i32*
store i32 1, i32* %10
ret void
}

LLVM IR (-O2):
define void @_ewfe(i32 %0, i32 %1, i32 %2, i8* nocapture writeonly %3) {
%5 = bitcast i8* %3 to i32*
store i32 1, i32* %5
ret void
}
unsigned int timer_gettime() {
  return (*((volatile unsigned long *)((0xFFD8000C + (2 * 12)))));
}


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

x86 assembly (clang, -O2):
<timer_gettime>:
mov    $0xffd80024,%eax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i32 @timer_gettime() {
%1 = load volatile i64, i64* inttoptr (i64 4292345892 to i64*)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @timer_gettime() {
%1 = load volatile i64, i64* inttoptr (i64 4292345892 to i64*)
%2 = trunc i64 %1 to i32
ret i32 %2
}
char *RCSid() {
  return RCSid("$Id: standard.c,v 1.30.2.2 2012/07/24 15:41:31 markisch Exp $");
}


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

x86 assembly (clang, -O2):
<RCSid>:
jmp    1100 <RCSid>

LLVM IR (-O0):
@.str = [62 x i8] c"$Id: standard.c,v 1.30.2.2 2012/07/24 15:41:31 markisch Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
struct timespec {
  double tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
double seconds(struct timespec start, struct timespec stop) {
  double diff = (stop.tv_sec - start.tv_sec) +
                (double)(stop.tv_nsec - start.tv_nsec) / (double)1e9;
  return diff;
}


x86 assembly (clang, -O0):
<seconds>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x8(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm1
movsd  0xecb(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<seconds>:
sub    %rdi,%rsi
cvtsi2sd %rsi,%xmm2
subsd  %xmm0,%xmm1
divsd  0xeec(%rip),%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i64 }
define double @seconds(double %0, i64 %1, double %2, i64 %3) {
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
%7 = alloca double
%8 = bitcast %struct.timespec* %5 to { double, i64 }*
%9 = getelementptr inbounds { double, i64 }, { double, i64 }* %8, i32 0, i32 0
store double %0, double* %9
%10 = getelementptr inbounds { double, i64 }, { double, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = bitcast %struct.timespec* %6 to { double, i64 }*
%12 = getelementptr inbounds { double, i64 }, { double, i64 }* %11, i32 0, i32 0
store double %2, double* %12
%13 = getelementptr inbounds { double, i64 }, { double, i64 }* %11, i32 0, i32 1
store i64 %3, i64* %13
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
%15 = load double, double* %14
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%17 = load double, double* %16
%18 = fsub double %15, %17
%19 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%20 = load i64, i64* %19
%21 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%22 = load i64, i64* %21
%23 = sub nsw i64 %20, %22
%24 = sitofp i64 %23 to double
%25 = fdiv double %24, 1.000000e+09
%26 = fadd double %18, %25
store double %26, double* %7
%27 = load double, double* %7
ret double %27
}

LLVM IR (-O2):
define double @seconds(double %0, i64 %1, double %2, i64 %3) {
%5 = fsub double %2, %0
%6 = sub nsw i64 %3, %1
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 1.000000e+09
%9 = fadd double %5, %8
ret double %9
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Tcutil_deep_copy_exp(int, struct Cyc_Absyn_Exp *);
struct Cyc_Absyn_Exp *Cyc_RemoveAggrs_deep_copy(struct Cyc_Absyn_Exp *e) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Tcutil_deep_copy_exp(1, e);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_RemoveAggrs_deep_copy>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <Cyc_Tcutil_deep_copy_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_RemoveAggrs_deep_copy(%struct.Cyc_Absyn_Exp* %0) {
%2 = alloca %struct.Cyc_Absyn_Exp*
%3 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %2
%4 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %2
%5 = call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_deep_copy_exp(i32 1, %struct.Cyc_Absyn_Exp* %4)
store %struct.Cyc_Absyn_Exp* %5, %struct.Cyc_Absyn_Exp** %3
%6 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
ret %struct.Cyc_Absyn_Exp* %6
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_RemoveAggrs_deep_copy(%struct.Cyc_Absyn_Exp* %0) {
%2 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_deep_copy_exp(i32 1, %struct.Cyc_Absyn_Exp* %0)
ret %struct.Cyc_Absyn_Exp* %2
}
int test_imm_3Bint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Bint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x3b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Bint64_highword_mem>:
testb  $0x3b,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Bint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 253403070464
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int odd_parity(uint8_t c) {
  c ^= (c >> 4);
  c ^= (c >> 2);
  c ^= (c >> 1);
  return c & 1;
}


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

x86 assembly (clang, -O2):
<odd_parity>:
mov    %edi,%eax
sar    $0x4,%eax
xor    %edi,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    %eax
xor    %ecx,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @odd_parity(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 2
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 1
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 1
ret i32 %16
}

LLVM IR (-O2):
define i32 @odd_parity(i32 %0) {
%2 = ashr i32 %0, 4
%3 = xor i32 %2, %0
%4 = ashr i32 %3, 2
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 1
%7 = xor i32 %6, %5
%8 = and i32 %7, 1
ret i32 %8
}
void gtk_tooltips_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tooltips_new() {
ret void
}
double scale_h3(double x, double y, double z) { return 1.0; }


x86 assembly (clang, -O0):
<scale_h3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_h3>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @scale_h3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @scale_h3(double %0, double %1, double %2) {
ret double 1.000000e+00
}
int isOperator(char c) {
  if (c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == ')') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1158 <isOperator+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     1158 <isOperator+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1158 <isOperator+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     1158 <isOperator+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x28,%eax
je     1158 <isOperator+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x29,%eax
jne    1164 <isOperator+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <isOperator+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
add    $0xd8,%dil
xor    %eax,%eax
cmp    $0x7,%dil
ja     111a <isOperator+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isOperator(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
%6 = icmp eq i32 %5, 43
br i1 %6, label %27, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %27, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 42
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 40
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 41
br i1 %26, label %27, label %28
27: ; preds = %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %29
28: ; preds = %23
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
@switch.table.isOperator = [8 x i32] [i32 1, i32 1, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @isOperator(i8 signext %0) {
%2 = add i8 %0, -40
%3 = icmp ult i8 %2, 8
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.isOperator, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}