xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *removeAllSpaces(char *);
int main(int argc, char *argv[]) {
  for (int ii = 1; ii < argc; ii++)
    printf("%s\n", removeAllSpaces(argv[ii]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1177 <main+0x57>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <removeAllSpaces@plt>
mov    %rax,%rsi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     115d <main+0x3d>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xec1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rdi
call   1040 <removeAllSpaces@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 1, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i8* @removeAllSpaces(i8* %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void px_free(void *mem) {
  if (!mem)
    return;
  free(mem);
}


x86 assembly (clang, -O0):
<px_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <px_free+0x1c>
jmp    1135 <px_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @px_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int errno;
void *realloc(void *, size_t);
int /*<<< orphan*/ s_error(int /*<<< orphan*/ *);
void *s_realloc(void *p, size_t size) {
  void *temp_p;
  int temp_i;
  temp_i = errno;
  errno = 0;
  if ((temp_p = realloc(p, size)) == NULL) {
    s_error(NULL);
    return NULL;
  }
  errno = temp_i;
  return temp_p;
}


x86 assembly (clang, -O0):
<s_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2e9d(%rip),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    117a <s_realloc+0x5a>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <s_error@plt>
movq   $0x0,-0x8(%rbp)
jmp    118e <s_realloc+0x6e>
mov    -0x24(%rbp),%ecx
mov    0x2e5c(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_realloc>:
push   %rbp
push   %r14
push   %rbx
mov    0x2eb5(%rip),%r14
mov    (%r14),%ebp
movl   $0x0,(%r14)
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1147 <s_realloc+0x27>
mov    %ebp,(%r14)
jmp    114e <s_realloc+0x2e>
xor    %edi,%edi
call   1030 <s_error@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i8* @s_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
%8 = load i32, i32* @errno
store i32 %8, i32* %7
store i32 0, i32* @errno
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i8* @realloc(i8* %9, i64 %10)
store i8* %11, i8** %6
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @s_error(i32* null)
store i8* null, i8** %3
br label %18
15: ; preds = %2
%16 = load i32, i32* %7
store i32 %16, i32* @errno
%17 = load i8*, i8** %6
store i8* %17, i8** %3
br label %18
18: ; preds = %15, %13
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@errno = global i32 0
define noalias i8* @s_realloc(i8* nocapture %0, i64 %1) {
%3 = load i32, i32* @errno
store i32 0, i32* @errno
%4 = tail call i8* @realloc(i8* %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @s_error(i32* null)
br label %9
8: ; preds = %2
store i32 %3, i32* @errno
br label %9
9: ; preds = %8, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void millisleep(int milliseconds) { usleep(milliseconds * 1000); }


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

x86 assembly (clang, -O2):
<millisleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @millisleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @millisleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo(int);
int main() {
  if (foo(100) != 102)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1040 <foo@plt>
cmp    $0x66,%eax
je     1159 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1040 <foo@plt>
cmp    $0x66,%eax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 100)
%3 = icmp ne i32 %2, 102
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 100)
%2 = icmp eq i32 %1, 102
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void blk_end_sync_rq(struct request *rq, int error) { return; }


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

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

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

LLVM IR (-O2):
%struct.request = type opaque
define void @blk_end_sync_rq(%struct.request* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mxFree(void *);
void mem_free(void *p) { mxFree(p); }


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

x86 assembly (clang, -O2):
<mem_free>:
jmp    1030 <mxFree@plt>

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

LLVM IR (-O2):
define void @mem_free(i8* %0) {
%2 = tail call i32 @mxFree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ time(int);
__attribute__((visibility("hidden"))) void func_0xA5() {
  time(1);
  ;
}


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

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

LLVM IR (-O0):
define hidden void @func_0xA5() {
%1 = call i32 @time(i32 1)
ret void
}

LLVM IR (-O2):
define hidden void @func_0xA5() {
%1 = tail call i32 @time(i32 1)
ret void
}
int set_servo_position(int servo, int pos) {}


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

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

LLVM IR (-O0):
define i32 @set_servo_position(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @set_servo_position(i32 %0, i32 %1) {
ret i32 undef
}
int physics_sim(int mass, int acceleration) {
  int force;
  force = mass * acceleration;
  return force;
}


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

x86 assembly (clang, -O2):
<physics_sim>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @physics_sim(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ LittleEndianReadU64(int /*<<< orphan*/ const *);
int64_t LittleEndianReadS64(const uint8_t *bytes) {
  union {
    int64_t s64;
    uint64_t u64;
  } u;
  u.u64 = LittleEndianReadU64(bytes);
  return u.s64;
}


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

x86 assembly (clang, -O2):
<LittleEndianReadS64>:
jmp    1030 <LittleEndianReadU64@plt>

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @LittleEndianReadS64(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @LittleEndianReadU64(i32* %4)
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to i32*
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @LittleEndianReadS64(i32* %0) {
%2 = tail call i32 @LittleEndianReadU64(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int mode_t;

/* Variables and functions */
int S_IFIFO;
int mknodat(int, char const *, int, int /*<<< orphan*/);
int mkfifoat(int fd, const char *path, mode_t mode) {
  return mknodat(fd, path, mode | S_IFIFO, 0);
}


x86 assembly (clang, -O0):
<mkfifoat>:
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    -0x14(%rbp),%edx
mov    0x2ead(%rip),%rax
or     (%rax),%edx
xor    %ecx,%ecx
call   1030 <mknodat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkfifoat>:
mov    0x2ec9(%rip),%rax
or     (%rax),%edx
xor    %ecx,%ecx
jmp    1030 <mknodat@plt>

LLVM IR (-O0):
@S_IFIFO = global i32 0
define i32 @mkfifoat(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* %6
%10 = load i32, i32* @S_IFIFO
%11 = or i32 %9, %10
%12 = call i32 @mknodat(i32 %7, i8* %8, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
@S_IFIFO = global i32 0
define i32 @mkfifoat(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @S_IFIFO
%5 = or i32 %4, %2
%6 = tail call i32 @mknodat(i32 %0, i8* %1, i32 %5, i32 0)
ret i32 %6
}
int test_imm_CAint8_reg(signed char val) {
  return ((val) & (0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xca,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CAint8_reg>:
test   $0xca,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CAint8_reg(i8 signext %0) {
%2 = and i8 %0, -54
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ecm_sfe_multicast_ipv4_exit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ecm_sfe_multicast_ipv4_exit() {
ret void
}
/* Variables and functions */
scalar_t__ __infer_nondet_int();
void FP_loop_with_break_good() {
  while (1) {
    if (__infer_nondet_int()) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<FP_loop_with_break_good>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <FP_loop_with_break_good+0x9>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
cmp    $0x0,%rax
je     112f <FP_loop_with_break_good+0x1f>
jmp    1134 <FP_loop_with_break_good+0x24>
jmp    1119 <FP_loop_with_break_good+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_loop_with_break_good>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %rax,%rax
je     1120 <FP_loop_with_break_good+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @FP_loop_with_break_good() {
br label %1
1: ; preds = %0, %5
%2 = call i64 (...) @__infer_nondet_int()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %6
5: ; preds = %1
br label %1
6: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @FP_loop_with_break_good() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @__infer_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
void gtk_file_chooser_add_filter() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_add_filter() {
ret void
}
/* Type definitions */
typedef long uint32_t;
struct itimer {
  int dummy;
};

/* Variables and functions */
long timer_interval_start(struct itimer *, long);
uint32_t timer_interval_start_seconds(struct itimer *t, uint32_t interval) {
  uint32_t elapsed = 0;
  interval *= 1000L;
  elapsed = timer_interval_start(t, interval);
  elapsed /= 1000L;
  return elapsed;
}


x86 assembly (clang, -O0):
<timer_interval_start_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
imul   $0x3e8,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <timer_interval_start@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_interval_start_seconds>:
push   %rax
imul   $0x3e8,%rsi,%rsi
call   1030 <timer_interval_start@plt>
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.itimer = type { i32 }
define i64 @timer_interval_start_seconds(%struct.itimer* %0, i64 %1) {
%3 = alloca %struct.itimer*
%4 = alloca i64
%5 = alloca i64
store %struct.itimer* %0, %struct.itimer** %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %4
%7 = mul nsw i64 %6, 1000
store i64 %7, i64* %4
%8 = load %struct.itimer*, %struct.itimer** %3
%9 = load i64, i64* %4
%10 = call i64 @timer_interval_start(%struct.itimer* %8, i64 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = sdiv i64 %11, 1000
store i64 %12, i64* %5
%13 = load i64, i64* %5
ret i64 %13
}

LLVM IR (-O2):
%struct.itimer = type { i32 }
define i64 @timer_interval_start_seconds(%struct.itimer* %0, i64 %1) {
%3 = mul nsw i64 %1, 1000
%4 = tail call i64 @timer_interval_start(%struct.itimer* %0, i64 %3)
%5 = sdiv i64 %4, 1000
ret i64 %5
}
/* Variables and functions */
void kissf_fft_cleanup(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
scalar_t__ system(char *);
int system_has_rtprio_limits_conf() {
  const char *limits = "/etc/security/limits.conf";
  char cmd[100];
  snprintf(cmd, sizeof(cmd), "grep -q 'rtprio *[0-9][0-9]*' %s", limits);
  if (system(cmd) == 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<system_has_rtprio_limits_conf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x64,%esi
lea    0xed0(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
jne    116e <system_has_rtprio_limits_conf+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <system_has_rtprio_limits_conf+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_has_rtprio_limits_conf>:
push   %rbx
sub    $0x70,%rsp
lea    0xeee(%rip),%rdx
lea    0xecd(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"/etc/security/limits.conf\00"
@.str.1 = [33 x i8] c"grep -q 'rtprio *[0-9][0-9]*' %s\00"
define i32 @system_has_rtprio_limits_conf() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 100, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = call i64 @system(i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [26 x i8] c"/etc/security/limits.conf\00"
@.str.1 = [33 x i8] c"grep -q 'rtprio *[0-9][0-9]*' %s\00"
define i32 @system_has_rtprio_limits_conf() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 100, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @system(i8* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void printlnFloat(float data) { printf("%f\n", data); }


x86 assembly (clang, -O0):
<printlnFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @printlnFloat(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, m, p;
  scanf("%d", &n);
  m = n * n;
  p = n * m;
  printf("%d", m);
  printf("\n%d", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed7(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
mov    %ebp,%esi
imul   %ebp,%esi
imul   %esi,%ebp
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int SX1257Read(int);
int /*<<< orphan*/ SX1257Write(int, int);
void SX1257SetSleep(void) {
  SX1257Write(0x00, (SX1257Read(0x00) & 0b11110000));
}


x86 assembly (clang, -O0):
<SX1257SetSleep>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <SX1257Read@plt>
mov    %eax,%esi
and    $0xf0,%esi
xor    %edi,%edi
call   1030 <SX1257Write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SX1257SetSleep>:
push   %rax
xor    %edi,%edi
call   1040 <SX1257Read@plt>
and    $0xf0,%eax
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <SX1257Write@plt>

LLVM IR (-O0):
define void @SX1257SetSleep() {
%1 = call i32 @SX1257Read(i32 0)
%2 = and i32 %1, 240
%3 = call i32 @SX1257Write(i32 0, i32 %2)
ret void
}

LLVM IR (-O2):
define void @SX1257SetSleep() {
%1 = tail call i32 @SX1257Read(i32 0)
%2 = and i32 %1, 240
%3 = tail call i32 @SX1257Write(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertion_sort(int *, int);
int /*<<< orphan*/ print_arr(int *, int);
int main() {
  int arr[10] = {8, 4, 6, 9, 0, -1, 5, -7, 10, -3};
  print_arr(arr, 10);
  insertion_sort(arr, 10);
  print_arr(arr, 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <print_arr@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <insertion_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <print_arr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <print_arr@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <insertion_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <print_arr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 8, i32 4, i32 6, i32 9, i32 0, i32 -1, i32 5, i32 -7, i32 10, i32 -3]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_arr(i32* %3, i32 10)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @insertion_sort(i32* %5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = call i32 @print_arr(i32* %7, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 8, i32 4, i32 6, i32 9, i32 0, i32 -1, i32 5, i32 -7, i32 10, i32 -3]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_arr(i32* %3, i32 10)
%5 = call i32 @insertion_sort(i32* %3, i32 10)
%6 = call i32 @print_arr(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int sqrt(int);
int yuiPointsDist(int x1, int y1, int x2, int y2) {
  int x = x2 - x1;
  int y = y2 - y1;
  return sqrt(x * x + y * y);
}


x86 assembly (clang, -O0):
<yuiPointsDist>:
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    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x14(%rbp),%edi
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
add    %eax,%edi
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yuiPointsDist>:
sub    %edi,%edx
sub    %esi,%ecx
imul   %edx,%edx
imul   %ecx,%ecx
lea    (%rcx,%rdx,1),%edi
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define i32 @yuiPointsDist(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = sub nsw i32 %3, %1
%7 = mul nsw i32 %5, %5
%8 = mul nsw i32 %6, %6
%9 = add nuw nsw i32 %8, %7
%10 = tail call i32 @sqrt(i32 %9)
ret i32 %10
}
void mdp4_mddi_dma_busy_wait(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_mddi_dma_busy_wait(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
void swapTwoIntNum(int *i, int *j) {
  if (i == j)
    return;
  *i = *i ^ *j;
  *j = *i ^ *j;
  *i = *i ^ *j;
}


x86 assembly (clang, -O0):
<swapTwoIntNum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    111f <swapTwoIntNum+0x1f>
jmp    1155 <swapTwoIntNum+0x55>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapTwoIntNum>:
cmp    %rsi,%rdi
je     1111 <swapTwoIntNum+0x11>
mov    (%rsi),%eax
xor    (%rdi),%eax
mov    %eax,(%rdi)
xor    (%rsi),%eax
mov    %eax,(%rsi)
xor    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @swapTwoIntNum(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = load i32, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
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 = %2, %4
ret void
}
int main() {
  int x, y;
  printf("%s\n", __func__);
  x = 10;
  y = util_fn(x);
  printf("util_fn(%d) => %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <util_fn@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1050 <util_fn@plt>
lea    0xeb5(%rip),%rdi
mov    $0xa,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [19 x i8] c"util_fn(%d) => %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
store i32 10, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @util_fn to i32 (i32, ...)*)(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [19 x i8] c"util_fn(%d) => %d\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @util_fn to i32 (i32, ...)*)(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, float *);
int /*<<< orphan*/ stdin;
float askFloatQuestion(char *question) {
  float answer = 0;
  printf("%s\n> ", question);
  scanf(" %f", &answer);
  fflush(stdin);
  return answer;
}


x86 assembly (clang, -O0):
<askFloatQuestion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<askFloatQuestion>:
push   %rax
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s\0A> \00"
@.str.1 = [4 x i8] c" %f\00"
@stdin = global i32 0
define float @askFloatQuestion(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
store float 0.000000e+00, float* %3
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s\0A> \00"
@.str.1 = [4 x i8] c" %f\00"
@stdin = global i32 0
define float @askFloatQuestion(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load i32, i32* @stdin
%7 = call i32 @fflush(i32 %6)
%8 = load float, float* %2
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void err(char *s, char *s2) {
  printf("ERROR: ");
  printf(s, s2);
  printf("\n");
  exit(2);
}


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

x86 assembly (clang, -O2):
<err>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"ERROR: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @err(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* %6, i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"ERROR: \00"
define void @err(i8* nocapture %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @exit(i32 2)
unreachable
}
int xmlUCSIsTibetan(int code) {
  return (((code >= 0x0F00) && (code <= 0x0FFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsTibetan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xf00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsTibetan+0x26>
cmpl   $0xfff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsTibetan>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0xf00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsTibetan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 3840
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 4095
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsTibetan(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 3840
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ nice(int);
int uvrrpd_sched_set() {
  nice(-20);
  return 0;
}


x86 assembly (clang, -O0):
<uvrrpd_sched_set>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffec,%edi
call   1030 <nice@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uvrrpd_sched_set>:
push   %rax
mov    $0xffffffec,%edi
call   1030 <nice@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uvrrpd_sched_set() {
%1 = call i32 @nice(i32 -20)
ret i32 0
}

LLVM IR (-O2):
define i32 @uvrrpd_sched_set() {
%1 = tail call i32 @nice(i32 -20)
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int comparator(const void *p1, const void *p2) {
  return strcmp((const char *)p1, (const char *)p2);
}


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

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

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

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
struct drm_mm_node {
  int dummy;
};

/* Variables and functions */
struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *,
                                             unsigned long, unsigned int,
                                             int /*<<< orphan*/);
struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent,
                                     unsigned long size, unsigned alignment) {
  return drm_mm_get_block_generic(parent, size, alignment, 0);
}


x86 assembly (clang, -O0):
<drm_mm_get_block>:
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
xor    %ecx,%ecx
call   1030 <drm_mm_get_block_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drm_mm_get_block>:
xor    %ecx,%ecx
jmp    1030 <drm_mm_get_block_generic@plt>

LLVM IR (-O0):
%struct.drm_mm_node = type { i32 }
define %struct.drm_mm_node* @drm_mm_get_block(%struct.drm_mm_node* %0, i64 %1, i32 %2) {
%4 = alloca %struct.drm_mm_node*
%5 = alloca i64
%6 = alloca i32
store %struct.drm_mm_node* %0, %struct.drm_mm_node** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load %struct.drm_mm_node*, %struct.drm_mm_node** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call %struct.drm_mm_node* @drm_mm_get_block_generic(%struct.drm_mm_node* %7, i64 %8, i32 %9, i32 0)
ret %struct.drm_mm_node* %10
}

LLVM IR (-O2):
%struct.drm_mm_node = type { i32 }
define %struct.drm_mm_node* @drm_mm_get_block(%struct.drm_mm_node* %0, i64 %1, i32 %2) {
%4 = tail call %struct.drm_mm_node* @drm_mm_get_block_generic(%struct.drm_mm_node* %0, i64 %1, i32 %2, i32 0)
ret %struct.drm_mm_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ init_esc_table();
int /*<<< orphan*/ init_token_predict();
void __attribute__((constructor)) init_const_table() {
  init_token_predict();
  init_esc_table();
}


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

x86 assembly (clang, -O2):
<init_const_table>:
push   %rax
xor    %eax,%eax
call   1040 <init_token_predict@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <init_esc_table@plt>

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init_const_table, i8* null }]
define void @init_const_table() {
%1 = call i32 (...) @init_token_predict()
%2 = call i32 (...) @init_esc_table()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init_const_table, i8* null }]
define void @init_const_table() {
%1 = tail call i32 (...) @init_token_predict()
%2 = tail call i32 (...) @init_esc_table()
ret void
}
/* Variables and functions */
int errno;
int pread64(int, char *, int, unsigned long long);
int read_file(int fd, unsigned long long *offset, char *buf, int len) {
  int n;
  n = pread64(fd, buf, len, *offset);
  if (n < 0)
    return -errno;
  *offset += n;
  return n;
}


x86 assembly (clang, -O0):
<read_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
call   1030 <pread64@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    115c <read_file+0x4c>
xor    %eax,%eax
mov    0x2e8e(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <read_file+0x60>
movslq -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_file>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rax
mov    %rdx,%rsi
mov    %ecx,%edx
mov    %rax,%rcx
call   1030 <pread64@plt>
test   %eax,%eax
js     112f <read_file+0x1f>
mov    %eax,%ecx
add    %rcx,(%rbx)
pop    %rbx
ret
mov    0x2eaa(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @read_file(i32 %0, i64* nocapture %1, i8* %2, i32 %3) {
%5 = load i64, i64* %1
%6 = tail call i32 @pread64(i32 %0, i8* %2, i32 %3, i64 %5)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* @errno
%10 = sub nsw i32 0, %9
br label %15
11: ; preds = %4
%12 = zext i32 %6 to i64
%13 = load i64, i64* %1
%14 = add i64 %13, %12
store i64 %14, i64* %1
br label %15
15: ; preds = %11, %8
%16 = phi i32 [ %10, %8 ], [ %6, %11 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ do_send(int, char *);
void japi_get_status(int sd) { do_send(sd, "STATUS\n"); }


x86 assembly (clang, -O0):
<japi_get_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <do_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<japi_get_status>:
lea    0xee9(%rip),%rsi
jmp    1030 <do_send@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"STATUS\0A\00"
define void @japi_get_status(i32 %0) {
%2 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float price(float, int);
void tankcost(float gallon, int size, float *cost) {
  (*cost) = price(gallon, size);
}


x86 assembly (clang, -O0):
<tankcost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1030 <price@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tankcost>:
push   %rbx
mov    %rsi,%rbx
call   1030 <price@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @tankcost(float %0, i32 %1, float* nocapture writeonly %2) {
%4 = tail call float @price(float %0, i32 %1)
store float %4, float* %2
ret void
}