xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ memcmp(char *, char *, int);
int strlen(char *);
int eq(char *s1, char *s2) {
  int s1_len = strlen(s1);
  int s2_len = strlen(s2);
  return s1_len == s2_len && memcmp(s1, s2, s1_len) == 0;
}


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x19(%rbp)
jne    1173 <eq+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%ebp
jne    1159 <eq+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = load i32, i32* %5
%18 = call i64 @memcmp(i8* %15, i8* %16, i32 %17)
%19 = icmp eq i64 %18, 0
br label %20
20: ; preds = %14, %2
%21 = phi i1 [ false, %2 ], [ %19, %14 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @eq(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @memcmp(i8* %0, i8* %1, i32 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 0, %2 ], [ %9, %6 ]
ret i32 %11
}
int testint(const void *a, const void *b) {
  int x = *(const int *)a, y = *(const int *)b;
  if (x < y)
    return -1;
  if (x > y)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<testint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <testint+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <testint+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <testint+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <testint+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testint>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @testint(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @testint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void ff_hevc_put_hevc_bi_epel_hv6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv6_8_sse4() {
ret void
}
__attribute__((always_)) void init_timer_stats(void) {}


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

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

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

LLVM IR (-O2):
define void @init_timer_stats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pin_Direction(int);
int /*<<< orphan*/ pin_Value(int, int);
void brake_right(int tr) {
  pin_Direction(51);
  pin_Value(51, tr);
}


x86 assembly (clang, -O0):
<brake_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x33,%edi
call   1030 <pin_Direction@plt>
mov    -0x4(%rbp),%esi
mov    $0x33,%edi
call   1040 <pin_Value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brake_right>:
push   %rbx
mov    %edi,%ebx
mov    $0x33,%edi
call   1030 <pin_Direction@plt>
mov    $0x33,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <pin_Value@plt>

LLVM IR (-O0):
define void @brake_right(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pin_Direction(i32 51)
%4 = load i32, i32* %2
%5 = call i32 @pin_Value(i32 51, i32 %4)
ret void
}

LLVM IR (-O2):
define void @brake_right(i32 %0) {
%2 = tail call i32 @pin_Direction(i32 51)
%3 = tail call i32 @pin_Value(i32 51, i32 %0)
ret void
}
/* Variables and functions */
int freesasa_fail_wloc(char const *, int, char *);
int freesasa_mem_fail(const char *file, int line) {
  return freesasa_fail_wloc(file, line, "Out of memory");
}


x86 assembly (clang, -O0):
<freesasa_mem_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <freesasa_fail_wloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freesasa_mem_fail>:
lea    0xee9(%rip),%rdx
jmp    1030 <freesasa_fail_wloc@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i32 @freesasa_mem_fail(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @freesasa_fail_wloc(i8* %5, i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define i32 @freesasa_mem_fail(i8* %0, i32 %1) {
%3 = tail call i32 @freesasa_fail_wloc(i8* %0, i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          size_t);
__attribute__((always_)) uint32_t getblock(const uint8_t *p, int i) {
  uint32_t r;
  size_t size = sizeof(uint32_t);
  memcpy(&r, &p[i * size], size);
  return (r);
}


x86 assembly (clang, -O0):
<getblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x4,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rdi
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getblock>:
push   %rax
movslq %esi,%rsi
shl    $0x4,%rsi
add    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getblock(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
store i64 4, i64* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = load i64, i64* %6
%11 = mul i64 %9, %10
%12 = getelementptr inbounds i32, i32* %7, i64 %11
%13 = load i64, i64* %6
%14 = call i32 @memcpy(i32* %5, i32* %12, i64 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @getblock(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = sext i32 %1 to i64
%6 = shl nsw i64 %5, 2
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = call i32 @memcpy(i32* %3, i32* %7, i64 4)
%9 = load i32, i32* %3
ret i32 %9
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, char *, int);
int round(double);
int main(int argc, char **argv) {
  if (argc > 1) {
    int i = atoi(argv[1]);
    printf("«%s» → %d\n", argv[1], i);
    i = round(2.35);
  }
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    1187 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x14(%rbp),%edx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe81(%rip),%xmm0
call   1040 <round@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1161 <main+0x31>
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1050 <atoi@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
movsd  0xea5(%rip),%xmm0
call   1040 <round@plt>
pop    %rbx
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"\C2\AB%s\C2\BB \E2\86\92 %d\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
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %20
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17)
%19 = call i32 @round(double 2.350000e+00)
store i32 %19, i32* %6
br label %20
20: ; preds = %9, %2
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [15 x i8] c"\C2\AB%s\C2\BB \E2\86\92 %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = tail call i32 @round(double 2.350000e+00)
br label %10
10: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *);
void adjust_goto_seq(char *seq, int offset) {
  int x, y;
  sscanf(seq, "\x1b[%i;%iH", &y, &x);
  sprintf(seq, "\x1b[%i;%iH", y, x + offset);
}


x86 assembly (clang, -O0):
<adjust_goto_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xea5(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_goto_seq>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xecb(%rip),%r15
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %r15,%rsi
call   1030 <sscanf@plt>
mov    0x8(%rsp),%edx
add    0xc(%rsp),%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%ecx
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%i;%iH\00"
define void @adjust_goto_seq(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %5)
%9 = load i8*, i8** %3
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
%14 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%i;%iH\00"
define void @adjust_goto_seq(i8* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %3)
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %1
%11 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
ret void
}
char charType(char c) {
  if (c <= 'z' && c >= 'A') {
    return 'a';
  } else if (c <= '9' && c >= '0') {
    return 'n';
  } else {
    return 'o';
  }
}


x86 assembly (clang, -O0):
<charType>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     112d <charType+0x2d>
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     112d <charType+0x2d>
movb   $0x61,-0x1(%rbp)
jmp    1154 <charType+0x54>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1150 <charType+0x50>
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1150 <charType+0x50>
movb   $0x6e,-0x1(%rbp)
jmp    1154 <charType+0x54>
movb   $0x6f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charType>:
lea    -0x41(%rdi),%eax
add    $0xd0,%dil
cmp    $0xa,%dil
mov    $0x6f,%cl
sbb    $0x0,%cl
cmp    $0x3a,%al
movzbl %cl,%ecx
mov    $0x61,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @charType(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 122
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 97, i8* %2
br label %22
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 57
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 48
br i1 %19, label %20, label %21
20: ; preds = %16
store i8 110, i8* %2
br label %22
21: ; preds = %16, %12
store i8 111, i8* %2
br label %22
22: ; preds = %21, %20, %11
%23 = load i8, i8* %2
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @charType(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 58
%4 = add i8 %0, -48
%5 = icmp ult i8 %4, 10
%6 = select i1 %5, i8 110, i8 111
%7 = select i1 %3, i8 97, i8 %6
ret i8 %7
}
int permutation_get_single_offset(int x, int y, int y_width) {
  return (y * y_width) + x;
}


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

x86 assembly (clang, -O2):
<permutation_get_single_offset>:
imul   %edx,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @permutation_get_single_offset(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* %5
%8 = load i32, i32* %6
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @permutation_get_single_offset(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
int isEndOfLine2(char ent) {
  if (ent == 10 || ent == 13)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isEndOfLine2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1124 <isEndOfLine2+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    1130 <isEndOfLine2+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isEndOfLine2+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEndOfLine2>:
cmp    $0xd,%dil
sete   %al
cmp    $0xa,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isEndOfLine2(i8 signext %0) {
%2 = icmp eq i8 %0, 13
%3 = icmp eq i8 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int main() {
  char s[100];
  char p[100];
  get(s, 0, 10);
  get(p, 100, 10);
  ru(s, p);
  asm("int3");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0x0,%al
call   1040 <get@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x64,%esi
mov    $0xa,%edx
mov    $0x0,%al
call   1040 <get@plt>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    $0x0,%al
call   1030 <ru@plt>
int3
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0x70(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <get@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <get@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <ru@plt>
int3
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @get to i32 (i8*, i32, i32, ...)*)(i8* %3, i32 0, i32 10)
%6 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @get to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 100, i32 10)
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ru to i32 (i8*, i8*, ...)*)(i8* %3, i8* %4)
ret i32 0
}
void elog_add_event_raw(void) { return; }


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

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

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

LLVM IR (-O2):
define void @elog_add_event_raw() {
ret void
}
int test_imm_F7uint32_reg(unsigned int val) {
  return ((val) & (0xF7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F7uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F7uint32_reg(i32 %0) {
%2 = and i32 %0, 247
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
bdos1(c, de) int c, de;
{ return (255 & bdos(c, de)); }


x86 assembly (clang, -O0):
<bdos1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <bdos@plt>
and    $0xff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdos1>:
push   %rax
xor    %eax,%eax
call   1030 <bdos@plt>
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bdos1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @bdos to i32 (i32, i32, ...)*)(i32 %5, i32 %6)
%8 = and i32 255, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bdos1(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @bdos to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%4 = and i32 %3, 255
ret i32 %4
}
int grid_area(int d1, int d2, int order) {
  if (order == 4)
    return d1 * d2;
  else
    return d1 * d1 + d2 * d2 + 4 * d1 * d2;
}


x86 assembly (clang, -O0):
<grid_area>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jne    1126 <grid_area+0x26>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <grid_area+0x45>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
shl    $0x2,%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_area>:
mov    %esi,%eax
cmp    $0x4,%edx
jne    110b <grid_area+0xb>
imul   %edi,%eax
ret
mov    %edi,%ecx
imul   %edi,%ecx
lea    (%rax,%rdi,4),%edx
imul   %eax,%edx
add    %ecx,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @grid_area(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 4
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %4
br label %27
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %5
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %6
%20 = mul nsw i32 %18, %19
%21 = add nsw i32 %17, %20
%22 = load i32, i32* %5
%23 = mul nsw i32 4, %22
%24 = load i32, i32* %6
%25 = mul nsw i32 %23, %24
%26 = add nsw i32 %21, %25
store i32 %26, i32* %4
br label %27
27: ; preds = %14, %10
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @grid_area(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 4
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = mul nsw i32 %1, %0
br label %13
7: ; preds = %3
%8 = mul nsw i32 %0, %0
%9 = shl i32 %0, 2
%10 = add i32 %9, %1
%11 = mul i32 %10, %1
%12 = add i32 %11, %8
br label %13
13: ; preds = %7, %5
%14 = phi i32 [ %6, %5 ], [ %12, %7 ]
ret i32 %14
}
int test_imm_66int32_reg(int val) { return ((val) & (0x66 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_66int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x66,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_66int32_reg(i32 %0) {
%2 = and i32 %0, 102
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void receiveEnd() {}


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

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

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

LLVM IR (-O2):
define void @receiveEnd() {
ret void
}
unsigned long split(unsigned long in, unsigned bit) {
  unsigned long high;
  high = in;
  in &= (1UL << bit) - 1;
  high ^= in;
  return (high << 1) | in;
}


x86 assembly (clang, -O0):
<split>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
or     -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<split>:
mov    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
mov    %rax,%rcx
not    %rcx
and    %rdi,%rcx
and    %rdi,%rax
add    %rax,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @split(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
store i64 %6, i64* %5
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = shl i64 1, %8
%10 = sub i64 %9, 1
%11 = load i64, i64* %3
%12 = and i64 %11, %10
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = load i64, i64* %5
%15 = xor i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = shl i64 %16, 1
%18 = load i64, i64* %3
%19 = or i64 %17, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @split(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl nsw i64 -1, %3
%5 = xor i64 %4, -1
%6 = and i64 %5, %0
%7 = and i64 %4, %0
%8 = shl i64 %7, 1
%9 = or i64 %8, %6
ret i64 %9
}
void sub_set_io(char *args) {}


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

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

LLVM IR (-O0):
define void @sub_set_io(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @sub_set_io(i8* nocapture %0) {
ret void
}
int _Rice_NumBits(unsigned int x) {
  int n;
  for (n = 32; !(x & 0x80000000) && (n > 0); --n) {
    x <<= 1;
  }
  return n;
}


x86 assembly (clang, -O0):
<_Rice_NumBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x80000000,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    112f <_Rice_NumBits+0x2f>
cmpl   $0x0,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113f <_Rice_NumBits+0x3f>
jmp    1156 <_Rice_NumBits+0x56>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_Rice_NumBits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Rice_NumBits>:
test   %edi,%edi
js     1121 <_Rice_NumBits+0x21>
mov    $0x20,%ecx
nopl   0x0(%rax)
add    %edi,%edi
lea    -0x1(%rcx),%eax
test   %edi,%edi
js     1120 <_Rice_NumBits+0x20>
cmp    $0x1,%ecx
mov    %eax,%ecx
ja     1110 <_Rice_NumBits+0x10>
ret
mov    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @_Rice_NumBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 32, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %2
%6 = and i32 %5, -2147483648
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %19
13: ; preds = %11
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -1
store i32 %18, i32* %3
br label %4
19: ; preds = %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @_Rice_NumBits(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 32, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = shl nuw i32 %5, 1
%7 = add nsw i32 %4, -1
%8 = icmp sgt i32 %6, -1
%9 = icmp ugt i32 %4, 1
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 32, %1 ], [ %7, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ func1(int);
int main(void) {
  static int static_var = 85;
  static int staic_var2;
  int a = 1;
  int b;
  func1(static_var + staic_var2 + a + b);
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    0x2efc(%rip),%edi
add    0x2efe(%rip),%edi
add    -0x8(%rbp),%edi
add    -0xc(%rbp),%edi
call   1030 <func1@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <func1@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.static_var = internal global i32 85
@main.staic_var2 = internal global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%4 = load i32, i32* @main.static_var
%5 = load i32, i32* @main.staic_var2
%6 = add nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = call i32 @func1(i32 %10)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func1(i32 undef)
ret i32 1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int stable_mixed_volume_by_demics(int *mv, int *smv) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(844, mv, smv, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<stable_mixed_volume_by_demics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x34c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stable_mixed_volume_by_demics>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x34c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @stable_mixed_volume_by_demics(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca double*
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = load double*, double** %7
%11 = call i32 @_ada_use_c2phc(i32 844, i32* %8, i32* %9, double* %10, i32 0)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @stable_mixed_volume_by_demics(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc(i32 844, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
double log(int);
double initTemp_boltzmannAnnealing(double t_end, double max_iter) {
  return t_end * log(1 + max_iter);
}


x86 assembly (clang, -O0):
<initTemp_boltzmannAnnealing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xecc(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initTemp_boltzmannAnnealing>:
push   %rax
movsd  %xmm0,(%rsp)
addsd  0xee2(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <log@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @initTemp_boltzmannAnnealing(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double 1.000000e+00, %6
%8 = fptosi double %7 to i32
%9 = call double @log(i32 %8)
%10 = fmul double %5, %9
ret double %10
}

LLVM IR (-O2):
define double @initTemp_boltzmannAnnealing(double %0, double %1) {
%3 = fadd double %1, 1.000000e+00
%4 = fptosi double %3 to i32
%5 = tail call double @log(i32 %4)
%6 = fmul double %5, %0
ret double %6
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
struct Cyc_List_List *Cyc_RenameTemps_rename(struct Cyc_List_List *);
struct Cyc_List_List *Cyc_do_temprename(int ignore, struct Cyc_List_List *tds) {
  struct Cyc_List_List *_T0;
  _T0 = Cyc_RenameTemps_rename(tds);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_do_temprename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_RenameTemps_rename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_do_temprename>:
mov    %rsi,%rdi
jmp    1030 <Cyc_RenameTemps_rename@plt>

LLVM IR (-O0):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_temprename(i32 %0, %struct.Cyc_List_List* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_List_List*
%5 = alloca %struct.Cyc_List_List*
store i32 %0, i32* %3
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %4
%6 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%7 = call %struct.Cyc_List_List* @Cyc_RenameTemps_rename(%struct.Cyc_List_List* %6)
store %struct.Cyc_List_List* %7, %struct.Cyc_List_List** %5
%8 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %5
ret %struct.Cyc_List_List* %8
}

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_temprename(i32 %0, %struct.Cyc_List_List* %1) {
%3 = tail call %struct.Cyc_List_List* @Cyc_RenameTemps_rename(%struct.Cyc_List_List* %1)
ret %struct.Cyc_List_List* %3
}
char *fossil_mbcs_to_utf8(const char *zMbcs) { return (char *)zMbcs; }


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

x86 assembly (clang, -O2):
<fossil_mbcs_to_utf8>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @fossil_mbcs_to_utf8(i8* readnone returned %0) {
ret i8* %0
}
void omap2_hsmmc_init(struct omap2_hsmmc_info *info) {}


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

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

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

LLVM IR (-O2):
%struct.omap2_hsmmc_info = type opaque
define void @omap2_hsmmc_init(%struct.omap2_hsmmc_info* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Expander_Init(int);
void Expander_Init_All(void) {
  Expander_Init(0x18);
  Expander_Init(0x19);
  Expander_Init(0x1a);
}


x86 assembly (clang, -O0):
<Expander_Init_All>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <Expander_Init@plt>
mov    $0x19,%edi
call   1030 <Expander_Init@plt>
mov    $0x1a,%edi
call   1030 <Expander_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expander_Init_All>:
push   %rax
mov    $0x18,%edi
call   1030 <Expander_Init@plt>
mov    $0x19,%edi
call   1030 <Expander_Init@plt>
mov    $0x1a,%edi
pop    %rax
jmp    1030 <Expander_Init@plt>

LLVM IR (-O0):
define void @Expander_Init_All() {
%1 = call i32 @Expander_Init(i32 24)
%2 = call i32 @Expander_Init(i32 25)
%3 = call i32 @Expander_Init(i32 26)
ret void
}

LLVM IR (-O2):
define void @Expander_Init_All() {
%1 = tail call i32 @Expander_Init(i32 24)
%2 = tail call i32 @Expander_Init(i32 25)
%3 = tail call i32 @Expander_Init(i32 26)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ big();
int main(void) {
  big();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @big()
ret i32 0
}
int fdevent_is_tcp_half_closed(int fd) {
  ((void)(fd));
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @fdevent_is_tcp_half_closed(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_msg(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, long, long);
void pomodoro_print_remaining(long t, char *buf, int buflen) {
  clear_msg(buf);
  snprintf(buf, buflen, "Remaining time: %d:%02d", t / 60, t % 60);
  printf(buf);
}


x86 assembly (clang, -O0):
<pomodoro_print_remaining>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <clear_msg@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    $0x3c,%r8d
cqto
idiv   %r8
mov    %rdx,%r8
lea    0xe83(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pomodoro_print_remaining>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
call   1050 <clear_msg@plt>
movabs $0x8888888888888889,%rcx
88 88 88
mov    %rbp,%rax
imul   %rcx
lea    (%rdx,%rbp,1),%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x5,%rcx
add    %rax,%rcx
imul   $0x3c,%rcx,%rax
sub    %rax,%rbp
lea    0xe8b(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%r8
call   1040 <snprintf@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Remaining time: %d:%02d\00"
define void @pomodoro_print_remaining(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 @clear_msg(i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i64, i64* %4
%12 = sdiv i64 %11, 60
%13 = load i64, i64* %4
%14 = srem i64 %13, 60
%15 = call i32 @snprintf(i8* %9, i32 %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %12, i64 %14)
%16 = load i8*, i8** %5
%17 = call i32 @printf(i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Remaining time: %d:%02d\00"
define void @pomodoro_print_remaining(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @clear_msg(i8* %1)
%5 = sdiv i64 %0, 60
%6 = srem i64 %0, 60
%7 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6)
%8 = tail call i32 @printf(i8* dereferenceable(1) %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY_CTX;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ DSA;

/* Variables and functions */
int /*<<< orphan*/ *EVP_PKEY_get0(int /*<<< orphan*/ *);
int /*<<< orphan*/ gost_sign_keygen(int /*<<< orphan*/ *);
int /*<<< orphan*/ pkey_gost94_paramgen(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *);
int pkey_gost94cp_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
  DSA *dsa;
  if (!pkey_gost94_paramgen(ctx, pkey))
    return 0;
  dsa = EVP_PKEY_get0(pkey);
  gost_sign_keygen(dsa);
  return 1;
}


x86 assembly (clang, -O0):
<pkey_gost94cp_keygen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pkey_gost94_paramgen@plt>
cmp    $0x0,%eax
jne    1162 <pkey_gost94cp_keygen+0x32>
movl   $0x0,-0x4(%rbp)
jmp    117f <pkey_gost94cp_keygen+0x4f>
mov    -0x18(%rbp),%rdi
call   1030 <EVP_PKEY_get0@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <gost_sign_keygen@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkey_gost94cp_keygen>:
push   %rbx
mov    %rsi,%rbx
call   1040 <pkey_gost94_paramgen@plt>
test   %eax,%eax
je     1154 <pkey_gost94cp_keygen+0x24>
mov    %rbx,%rdi
call   1030 <EVP_PKEY_get0@plt>
mov    %rax,%rdi
call   1050 <gost_sign_keygen@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pkey_gost94cp_keygen(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = call i32 @pkey_gost94_paramgen(i32* %7, i32* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %2
store i32 0, i32* %3
br label %17
12: ; preds = %2
%13 = load i32*, i32** %5
%14 = call i32* @EVP_PKEY_get0(i32* %13)
store i32* %14, i32** %6
%15 = load i32*, i32** %6
%16 = call i32 @gost_sign_keygen(i32* %15)
store i32 1, i32* %3
br label %17
17: ; preds = %12, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @pkey_gost94cp_keygen(i32* %0, i32* %1) {
%3 = tail call i32 @pkey_gost94_paramgen(i32* %0, i32* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32* @EVP_PKEY_get0(i32* %1)
%7 = tail call i32 @gost_sign_keygen(i32* %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
void liblog_none(const char *str, ...) {
  if (0 && str)
    return;
}


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

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

LLVM IR (-O0):
define void @liblog_none(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @liblog_none(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
double floor(double const);
double custom_round(const double x) { return floor(x + 0.5); }


x86 assembly (clang, -O0):
<custom_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<custom_round>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @custom_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call double @llvm.floor.f64(double %4)
ret double %5
}

LLVM IR (-O2):
define double @custom_round(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call double @llvm.floor.f64(double %2)
ret double %3
}
/* Variables and functions */
void OSDSoftReset(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo445() {
ret void
}
void transfer_boundary_from_device_a_(long *Mesh_pointer,
                                      const int *nspec_outer_elastic) {}


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

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

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

LLVM IR (-O2):
define void @transfer_boundary_from_device_a_(i64* nocapture %0, i32* nocapture %1) {
ret void
}
int gca_cmp2_long(const void *aa, const void *bb, void *p) {
  (void)p;
  const long a = *(const long *)aa;
  const long b = *(const long *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


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

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

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

LLVM IR (-O2):
define i32 @gca_cmp2_long(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = icmp sgt i64 %5, %7
%9 = zext i1 %8 to i32
%10 = icmp sgt i64 %7, %5
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}