xunge/DecIR huggingface dataset:
void foo(void) {
  volatile long i, j;
  long x;
  for (j = 0; j < 4; j++) {
    x++;
    i += j + x;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    $0x4,%rax
jge    114a <foo+0x4a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
add    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <foo+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movq   $0x0,-0x10(%rsp)
mov    -0x10(%rsp),%rax
cmp    $0x3,%rax
jg     1147 <foo+0x47>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x10(%rsp),%rcx
add    -0x8(%rsp),%rcx
add    %rax,%rcx
mov    %rcx,-0x8(%rsp)
addq   $0x1,-0x10(%rsp)
mov    -0x10(%rsp),%rcx
add    $0x1,%rax
cmp    $0x4,%rcx
jl     1120 <foo+0x20>
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
store volatile i64 0, i64* %2
br label %4
4: ; preds = %15, %0
%5 = load volatile i64, i64* %2
%6 = icmp slt i64 %5, 4
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i64, i64* %3
%9 = add nsw i64 %8, 1
store i64 %9, i64* %3
%10 = load volatile i64, i64* %2
%11 = load i64, i64* %3
%12 = add nsw i64 %10, %11
%13 = load volatile i64, i64* %1
%14 = add nsw i64 %13, %12
store volatile i64 %14, i64* %1
br label %15
15: ; preds = %7
%16 = load volatile i64, i64* %2
%17 = add nsw i64 %16, 1
store volatile i64 %17, i64* %2
br label %4
18: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
store volatile i64 0, i64* %2
%5 = load volatile i64, i64* %2
%6 = icmp slt i64 %5, 4
br i1 %6, label %7, label %18
7: ; preds = %0, %7
%8 = phi i64 [ %9, %7 ], [ undef, %0 ]
%9 = add nsw i64 %8, 1
%10 = load volatile i64, i64* %2
%11 = add nsw i64 %10, %9
%12 = load volatile i64, i64* %1
%13 = add nsw i64 %11, %12
store volatile i64 %13, i64* %1
%14 = load volatile i64, i64* %2
%15 = add nsw i64 %14, 1
store volatile i64 %15, i64* %2
%16 = load volatile i64, i64* %2
%17 = icmp slt i64 %16, 4
br i1 %17, label %7, label %18
18: ; preds = %7, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int compare_int_keys(register void *key1, register void *key2) {
  assert(key1 != NULL && key2 != NULL);
  return *((int *)key1) - *((int *)key2);
}


x86 assembly (clang, -O0):
<compare_int_keys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     113b <compare_int_keys+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int_keys>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    (%rbx),%eax
sub    (%r14),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @compare_int_keys(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to i32*
%16 = load i32, i32* %15
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i32*
%19 = load i32, i32* %18
%20 = sub nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @compare_int_keys(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = bitcast i8* %0 to i32*
%9 = load i32, i32* %8
%10 = bitcast i8* %1 to i32*
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ printfail();
void fail(char *msg) {
  printfail();
  printf(": %s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <printfail@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <printfail@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c": %s\0A\00"
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @printfail()
%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 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c": %s\0A\00"
define void @fail(i8* %0) {
%2 = tail call i32 (...) @printfail()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int /*<<< orphan*/, int,
                           char *);
const char *get_version() {
  static char str[128];
  sprintf(str, "%d.%d build %d (%s)", 1, 0, 31, "Mar 18 2022");
  return str;
}


x86 assembly (clang, -O0):
<get_version>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1f,%r8d
lea    0xede(%rip),%r9
call   1030 <sprintf@plt>
lea    0x2efe(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_version>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
lea    0xeee(%rip),%r9
mov    %rbx,%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1f,%r8d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_version.str = internal global [128 x i8] zeroinitializer
@.str = [20 x i8] c"%d.%d build %d (%s)\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
define i8* @get_version() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_version.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_version.str, i64 0, i64 0)
}

LLVM IR (-O2):
@get_version.str = internal global [128 x i8] zeroinitializer
@.str = [20 x i8] c"%d.%d build %d (%s)\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
define i8* @get_version() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @get_version.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_version.str, i64 0, i64 0)
}
/* Variables and functions */
double ZopfliCalculateBlockSize(unsigned short const *, unsigned short const *,
                                size_t, size_t, int);
double EstimateCost(const unsigned short *litlens, const unsigned short *dists,
                    size_t lstart, size_t lend) {
  return ZopfliCalculateBlockSize(litlens, dists, lstart, lend, 2);
}


x86 assembly (clang, -O0):
<EstimateCost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2,%r8d
call   1030 <ZopfliCalculateBlockSize@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EstimateCost>:
mov    $0x2,%r8d
jmp    1030 <ZopfliCalculateBlockSize@plt>

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

LLVM IR (-O2):
define double @EstimateCost(i16* %0, i16* %1, i64 %2, i64 %3) {
%5 = tail call double @ZopfliCalculateBlockSize(i16* %0, i16* %1, i64 %2, i64 %3, i32 2)
ret double %5
}
unsigned foo(unsigned *p, unsigned x) {
  *p += x;
  return *p;
}


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

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, %1
store i32 %4, i32* %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bson_fatal_msg(int, char *);
void *bson_realloc_func(void *, size_t);
void *bson_realloc(void *ptr, size_t size) {
  void *p;
  p = bson_realloc_func(ptr, size);
  bson_fatal_msg(!!p, "realloc() failed");
  return p;
}


x86 assembly (clang, -O0):
<bson_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <bson_realloc_func@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xea7(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bson_realloc>:
push   %rbx
call   1030 <bson_realloc_func@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
lea    0xec7(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"realloc() failed\00"
define i8* @bson_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @bson_realloc_func(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = call i32 @bson_fatal_msg(i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [17 x i8] c"realloc() failed\00"
define i8* @bson_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @bson_realloc_func(i8* %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @bson_fatal_msg(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_storage(void) { output_with_tab("blkb "); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"blkb \00"
define void @gen_def_storage() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  int **ppi = malloc(sizeof *ppi);
  *ppi = malloc(sizeof **ppi);
  ppi = realloc(ppi, 2 * sizeof *ppi);
  free(*ppi);
  free(ppi);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,(%rbx)
mov    $0x10,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
mov    (%rax),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32**
%2 = call i8* @malloc(i64 8)
%3 = bitcast i8* %2 to i32**
store i32** %3, i32*** %1
%4 = call i8* @malloc(i64 4)
%5 = bitcast i8* %4 to i32*
%6 = load i32**, i32*** %1
store i32* %5, i32** %6
%7 = load i32**, i32*** %1
%8 = bitcast i32** %7 to i8*
%9 = call i8* @realloc(i8* %8, i64 16)
%10 = bitcast i8* %9 to i32**
store i32** %10, i32*** %1
%11 = load i32**, i32*** %1
%12 = load i32*, i32** %11
%13 = bitcast i32* %12 to i8*
%14 = load i32**, i32*** %1
%15 = bitcast i32** %14 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(8) i8* @malloc(i64 8)
%2 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%3 = bitcast i8* %1 to i8**
store i8* %2, i8** %3
%4 = tail call dereferenceable_or_null(16) i8* @realloc(i8* %1, i64 16)
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
tail call void @free(i8* %4)
ret i32 0
}
void ath10k_spectral_destroy(struct ath10k *ar) {}


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

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

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

LLVM IR (-O2):
%struct.ath10k = type opaque
define void @ath10k_spectral_destroy(%struct.ath10k* nocapture %0) {
ret void
}
/* Variables and functions */
int MSG_CMSG_CLOEXEC;
int main(void) {
  int flag = MSG_CMSG_CLOEXEC;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@MSG_CMSG_CLOEXEC = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @MSG_CMSG_CLOEXEC
store i32 %3, i32* %2
ret i32 0
}

LLVM IR (-O2):
@MSG_CMSG_CLOEXEC = global i32 0
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char buffer[20];
  printf("INT_MIN: %d\n", INT_MIN);
  itoa(INT_MIN, buffer);
  printf("Buffer : %s\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0x20(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rbx
mov    (%rbx),%esi
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"INT_MIN: %d\0A\00"
@INT_MIN = global i32 0
@.str.1 = [13 x i8] c"Buffer : %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = load i32, i32* @INT_MIN
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @INT_MIN
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @itoa(i32 %5, i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"INT_MIN: %d\0A\00"
@INT_MIN = global i32 0
@.str.1 = [13 x i8] c"Buffer : %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @INT_MIN
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @INT_MIN
%6 = call i32 @itoa(i32 %5, i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint64(int /*<<< orphan*/ *, int);
uint64_t ses_config_enclosure_descriptor_logical_identifier(uint8_t *data) {
  return get_uint64(data, 4);
}


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

x86 assembly (clang, -O2):
<ses_config_enclosure_descriptor_logical_identifier>:
mov    $0x4,%esi
jmp    1030 <get_uint64@plt>

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

LLVM IR (-O2):
define i32 @ses_config_enclosure_descriptor_logical_identifier(i32* %0) {
%2 = tail call i32 @get_uint64(i32* %0, i32 4)
ret i32 %2
}
/* Variables and functions */
int sscanf(char *, char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int req_login(char *data) {
  int c;
  char cl[32];
  c = sscanf(data, "%*[^=]%*[^&]%*[^=]%*[^&]&%s", cl);
  return c == 1 && !strncmp(cl, "commit=Login", 32);
}


x86 assembly (clang, -O0):
<req_login>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1040 <sscanf@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x31(%rbp)
jne    1172 <req_login+0x52>
lea    -0x30(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x20,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_login>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rsi
mov    %rsp,%rdx
call   1040 <sscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1159 <req_login+0x39>
lea    0xed9(%rip),%rsi
mov    %rsp,%rdi
mov    $0x20,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%*[^=]%*[^&]%*[^=]%*[^&]&%s\00"
@.str.1 = [13 x i8] c"commit=Login\00"
define i32 @req_login(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [32 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%7 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%12 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 32)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %1
%16 = phi i1 [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@.str = [28 x i8] c"%*[^=]%*[^&]%*[^=]%*[^&]&%s\00"
@.str.1 = [13 x i8] c"commit=Login\00"
define i32 @req_login(i8* nocapture %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 32)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
void chomp(char *s) {
  char *nl;
  do
    if (*s == '\n')
      nl = s;
  while (*s++);
  *nl = 0;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1120 <chomp+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1125 <chomp+0x25>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1108 <chomp+0x8>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
movzbl (%rdi),%ecx
cmp    $0xa,%cl
cmove  %rdi,%rax
add    $0x1,%rdi
test   %cl,%cl
jne    1100 <chomp>
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define void @chomp(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = phi i8* [ undef, %1 ], [ %7, %2 ]
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 10
%7 = select i1 %6, i8* %3, i8* %4
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = icmp eq i8 %5, 0
br i1 %9, label %10, label %2
10: ; preds = %2
store i8 0, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cli();
int /*<<< orphan*/ _sti();
int /*<<< orphan*/ out_port(int, int);
void gc_configure(void) {
  _cli();
  out_port(0x3ce, 0x6);
  out_port(0x3cf, 0x1);
  _sti();
}


x86 assembly (clang, -O0):
<gc_configure>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <_cli@plt>
mov    $0x3ce,%edi
mov    $0x6,%esi
call   1040 <out_port@plt>
mov    $0x3cf,%edi
mov    $0x1,%esi
call   1040 <out_port@plt>
mov    $0x0,%al
call   1030 <_sti@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_configure>:
push   %rax
xor    %eax,%eax
call   1050 <_cli@plt>
mov    $0x3ce,%edi
mov    $0x6,%esi
call   1040 <out_port@plt>
mov    $0x3cf,%edi
mov    $0x1,%esi
call   1040 <out_port@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <_sti@plt>

LLVM IR (-O0):
define void @gc_configure() {
%1 = call i32 (...) @_cli()
%2 = call i32 @out_port(i32 974, i32 6)
%3 = call i32 @out_port(i32 975, i32 1)
%4 = call i32 (...) @_sti()
ret void
}

LLVM IR (-O2):
define void @gc_configure() {
%1 = tail call i32 (...) @_cli()
%2 = tail call i32 @out_port(i32 974, i32 6)
%3 = tail call i32 @out_port(i32 975, i32 1)
%4 = tail call i32 (...) @_sti()
ret void
}
/* Variables and functions */
int genrand64_int64_unsafe();
double genrand64_real2_unsafe(void) {
  return (genrand64_int64_unsafe() >> 11) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<genrand64_real2_unsafe>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand64_int64_unsafe@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand64_real2_unsafe>:
push   %rax
xor    %eax,%eax
call   1030 <genrand64_int64_unsafe@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand64_real2_unsafe() {
%1 = call i32 (...) @genrand64_int64_unsafe()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000000
ret double %4
}

LLVM IR (-O2):
define double @genrand64_real2_unsafe() {
%1 = tail call i32 (...) @genrand64_int64_unsafe()
%2 = ashr i32 %1, 11
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3CA0000000000000
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printNumCpusInfo(const char *cmd) {
  (void)cmd;
  output("Number of physical CPUs\t0\t0\t\n");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Number of physical CPUs\090\090\09\0A\00"
define void @printNumCpusInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Number of physical CPUs\090\090\09\0A\00"
define void @printNumCpusInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char ch = 'M';
  printf("character: %c\n", ch);
  printf("character value: %d\n", ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x4d,-0x5(%rbp)
lea    0xed6(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"character: %c\0A\00"
@.str.1 = [21 x i8] c"character value: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 77, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext %3)
%5 = load i8, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"character: %c\0A\00"
@.str.1 = [21 x i8] c"character value: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext 77)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 signext 77)
ret i32 0
}
/* Variables and functions */
int japi_splitpane(int, int, int);
int j_splitpane(int arg0, int arg1, int arg2) {
  return (japi_splitpane(arg0, arg1, arg2));
}


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

x86 assembly (clang, -O2):
<j_splitpane>:
jmp    1030 <japi_splitpane@plt>

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

LLVM IR (-O2):
define i32 @j_splitpane(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @japi_splitpane(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t getArrayB(int8_t *arr, int idx) { return arr[idx]; }


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

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

LLVM IR (-O0):
define i32 @getArrayB(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @getArrayB(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void disp_result(int result) {
  switch (result) {
  case 0:
    puts("Same.");
    break;
  case 1:
    puts("You lose.");
    break;
  case 2:
    puts("You win.");
    break;
  }
}


x86 assembly (clang, -O0):
<disp_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1150 <disp_result+0x40>
jmp    112e <disp_result+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1161 <disp_result+0x51>
jmp    113f <disp_result+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1172 <disp_result+0x62>
jmp    117e <disp_result+0x6e>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
jmp    117e <disp_result+0x6e>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
jmp    117e <disp_result+0x6e>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_result>:
cmp    $0x2,%edi
ja     112b <disp_result+0x1b>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Same.\00"
@.str.1 = [10 x i8] c"You lose.\00"
@.str.2 = [9 x i8] c"You win.\00"
define void @disp_result(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
]
4: ; preds = %1
%5 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %1, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Same.\00"
@.str.1 = [10 x i8] c"You lose.\00"
@.str.2 = [9 x i8] c"You win.\00"
@reltable.disp_result = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.disp_result to i64)) to i32)]
define void @disp_result(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.disp_result to i8*), i64 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
br label %8
8: ; preds = %1, %3
ret void
}
/* Type definitions */
struct clause_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_new();
struct clause_list *clause_list_new(void) {
  return (struct clause_list *)genlist_new();
}


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

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

LLVM IR (-O0):
%struct.clause_list = type { i32 }
define %struct.clause_list* @clause_list_new() {
%1 = call i64 (...) @genlist_new()
%2 = inttoptr i64 %1 to %struct.clause_list*
ret %struct.clause_list* %2
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
define %struct.clause_list* @clause_list_new() {
%1 = tail call i64 (...) @genlist_new()
%2 = inttoptr i64 %1 to %struct.clause_list*
ret %struct.clause_list* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void do_printf(char *formatted_message) {
  printf("Error: %s\n", formatted_message);
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @do_printf(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp_ci(char *, char *);
int string_ci_le(char *s1, char *s2, int k) {
  k = 0;
  return strcmp_ci(s1, s2) <= 0;
}


x86 assembly (clang, -O0):
<string_ci_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp_ci@plt>
cmp    $0x0,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_ci_le>:
push   %rax
call   1030 <strcmp_ci@plt>
xor    %ecx,%ecx
test   %rax,%rax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_ci_le(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @strcmp_ci(i8* %7, i8* %8)
%10 = icmp sle i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @string_ci_le(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strcmp_ci(i8* %0, i8* %1)
%5 = icmp slt i64 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __do_global_ctors();
void __main() {
  static int initialized;
  if (!initialized) {
    initialized = 1;
    __do_global_ctors();
  }
}


x86 assembly (clang, -O0):
<__main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1132 <__main+0x22>
movl   $0x1,0x2f01(%rip)
mov    $0x0,%al
call   1030 <__do_global_ctors@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__main>:
cmpb   $0x0,0x2f15(%rip)
je     111a <__main+0xa>
ret
movb   $0x1,0x2f0b(%rip)
xor    %eax,%eax
jmp    1030 <__do_global_ctors@plt>

LLVM IR (-O0):
@__main.initialized = internal global i32 0
define void @__main() {
%1 = load i32, i32* @__main.initialized
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
store i32 1, i32* @__main.initialized
%4 = call i32 (...) @__do_global_ctors()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@__main.initialized = internal unnamed_addr global i1 false
define void @__main() {
%1 = load i1, i1* @__main.initialized
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @__main.initialized
%3 = tail call i32 (...) @__do_global_ctors()
br label %4
4: ; preds = %2, %0
ret void
}
/* Type definitions */
struct timeval {
  unsigned long long tv_sec;
  unsigned long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long long now(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec * 1000ull) + (tv.tv_usec / 1000ull);
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%rcx
mov    0x10(%rsp),%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rdx
9b c4 20
mul    %rdx
shr    $0x4,%rdx
add    %rdx,%rcx
mov    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = mul i64 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = udiv i64 %7, 1000
%9 = add i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = udiv i64 %8, 1000
%10 = add i64 %9, %6
ret i64 %10
}
/* Type definitions */
struct iface {
  int dummy;
};

/* Variables and functions */
struct iface *iface_find_by_name(char const *);
int iface_get_mif(struct iface *);
int iface_get_mif_by_name(const char *ifname) {
  int vif;
  struct iface *iface;
  iface = iface_find_by_name(ifname);
  if (!iface)
    return -1;
  vif = iface_get_mif(iface);
  if (vif < 0)
    return -1;
  return vif;
}


x86 assembly (clang, -O0):
<iface_get_mif_by_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <iface_find_by_name@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1150 <iface_get_mif_by_name+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <iface_get_mif_by_name+0x58>
mov    -0x20(%rbp),%rdi
call   1040 <iface_get_mif@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1172 <iface_get_mif_by_name+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <iface_get_mif_by_name+0x58>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iface_get_mif_by_name>:
push   %rax
call   1030 <iface_find_by_name@plt>
test   %rax,%rax
je     1141 <iface_get_mif_by_name+0x21>
mov    %rax,%rdi
call   1040 <iface_get_mif@plt>
mov    %eax,%ecx
test   %eax,%eax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.iface = type { i32 }
define i32 @iface_get_mif_by_name(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.iface*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call %struct.iface* @iface_find_by_name(i8* %6)
store %struct.iface* %7, %struct.iface** %5
%8 = load %struct.iface*, %struct.iface** %5
%9 = icmp ne %struct.iface* %8, null
br i1 %9, label %11, label %10
10: ; preds = %1
store i32 -1, i32* %2
br label %19
11: ; preds = %1
%12 = load %struct.iface*, %struct.iface** %5
%13 = call i32 @iface_get_mif(%struct.iface* %12)
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 -1, i32* %2
br label %19
17: ; preds = %11
%18 = load i32, i32* %4
store i32 %18, i32* %2
br label %19
19: ; preds = %17, %16, %10
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
%struct.iface = type { i32 }
define i32 @iface_get_mif_by_name(i8* %0) {
%2 = tail call %struct.iface* @iface_find_by_name(i8* %0)
%3 = icmp eq %struct.iface* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @iface_get_mif(%struct.iface* %2)
%6 = icmp sgt i32 %5, -1
%7 = select i1 %6, i32 %5, i32 -1
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
int estimate(int n) {
  if (n < 0)
    return (int)(n * 0.3010299956639812);
  else
    return 1 + (int)(n * 0.3010299956639811);
}


x86 assembly (clang, -O0):
<estimate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112e <estimate+0x2e>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <estimate+0x49>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<estimate>:
cvtsi2sd %edi,%xmm0
test   %edi,%edi
js     1118 <estimate+0x18>
mulsd  0xef0(%rip),%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
ret
mulsd  0xee8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @estimate(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 0x3FD34413509F79FF
%10 = fptosi double %9 to i32
store i32 %10, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 0x3FD34413509F79FD
%15 = fptosi double %14 to i32
%16 = add nsw i32 1, %15
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @estimate(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = sitofp i32 %0 to double
br i1 %2, label %4, label %7
4: ; preds = %1
%5 = fmul double %3, 0x3FD34413509F79FF
%6 = fptosi double %5 to i32
br label %11
7: ; preds = %1
%8 = fmul double %3, 0x3FD34413509F79FD
%9 = fptosi double %8 to i32
%10 = add nsw i32 %9, 1
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ %6, %4 ], [ %10, %7 ]
ret i32 %12
}
void ff_hevc_put_hevc_bi_w_pel_pixels24_10_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ dlock_unlock(int /*<<< orphan*/ *, int /*<<< orphan*/);
int o_pthread_spin_unlock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
int pthread_spin_unlock(pthread_spinlock_t *spin) {
  dlock_unlock(spin, pthread_self());
  return o_pthread_spin_unlock(spin);
}


x86 assembly (clang, -O0):
<pthread_spin_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1050 <dlock_unlock@plt>
mov    -0x8(%rbp),%rdi
call   1030 <o_pthread_spin_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_spin_unlock>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <dlock_unlock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <o_pthread_spin_unlock@plt>

LLVM IR (-O0):
define i32 @pthread_spin_unlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (...) @pthread_self()
%5 = call i32 @dlock_unlock(i32* %3, i32 %4)
%6 = load i32*, i32** %2
%7 = call i32 @o_pthread_spin_unlock(i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @pthread_spin_unlock(i32* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @dlock_unlock(i32* %0, i32 %2)
%4 = tail call i32 @o_pthread_spin_unlock(i32* %0)
ret i32 %4
}
/* Variables and functions */
size_t right(size_t i) { return 2 * i + 2; }


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%rax
add    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @right(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 2, %3
%5 = add i64 %4, 2
ret i64 %5
}

LLVM IR (-O2):
define i64 @right(i64 %0) {
%2 = shl i64 %0, 1
%3 = add i64 %2, 2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int unlock(pthread_mutex_t *l) { return pthread_mutex_unlock(l); }


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

x86 assembly (clang, -O2):
<unlock>:
jmp    1030 <pthread_mutex_unlock@plt>

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

LLVM IR (-O2):
define i32 @unlock(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret i32 %2
}
void swap(int *a, int *b) {
  if (a == b)
    return;
  *a ^= *b;
  *b ^= *a;
  *a ^= *b;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = load i32, i32* %0
%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
}