xunge/DecIR huggingface dataset:
/* Variables and functions */
int strlen(char *);
int count(char *a, char c) {
  int i, co = 0;
  for (i = 0; i < strlen(a); i++)
    if (a[i] == c)
      co++;
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jge    1180 <count+0x70>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    116d <count+0x5d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1172 <count+0x62>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1130 <count+0x20>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x1,%ebp
cmp    %eax,%ebp
jl     1120 <count+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @count(i8* %0, i8 signext %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
store i32 0, i32* %7
store i32 0, i32* %6
br label %8
8: ; preds = %27, %2
%9 = load i32, i32* %6
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %30
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %19, %21
br i1 %22, label %23, label %26
23: ; preds = %13
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %26
26: ; preds = %23, %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %8
30: ; preds = %8
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @count(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp slt i32 %4, %5
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %3, label %8
8: ; preds = %3
ret i32 undef
}
void lcm_resume(void) {
  pr_debug("kernel %s\n", __func__);
  lcm_init();
}


x86 assembly (clang, -O0):
<lcm_resume>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1040 <pr_debug@plt>
mov    $0x0,%al
call   1030 <lcm_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm_resume>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1040 <pr_debug@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <lcm_init@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"kernel %s\0A\00"
@__func__.lcm_resume = [11 x i8] c"lcm_resume\00"
define void @lcm_resume() {
%1 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.lcm_resume, i64 0, i64 0))
%2 = call i32 (...) @lcm_init()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"kernel %s\0A\00"
@__func__.lcm_resume = [11 x i8] c"lcm_resume\00"
define void @lcm_resume() {
%1 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.lcm_resume, i64 0, i64 0))
%2 = tail call i32 (...) @lcm_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *memmove(void *, void *, int);
void test3(void *ptr) {
  if (memmove(ptr, ptr, 8) != ptr)
    abort();
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memmove@plt>
cmp    -0x8(%rbp),%rax
je     114f <test3+0x2f>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rsi
mov    $0x8,%edx
call   1040 <memmove@plt>
cmp    %rbx,%rax
jne    1138 <test3+0x18>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @test3(i8* %0) {
%2 = tail call i8* @memmove(i8* %0, i8* %0, i32 8)
%3 = icmp eq i8* %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GRND_NONBLOCK;
scalar_t__ getrandom(char *, int, int /*<<< orphan*/);
int main(void) {
  char buf[4];
  if (getrandom(buf, 4, GRND_NONBLOCK) < 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1030 <getrandom@plt>
cmp    $0x0,%rax
jge    114c <main+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <main+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <getrandom@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@GRND_NONBLOCK = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @GRND_NONBLOCK
%5 = call i64 @getrandom(i8* %3, i32 4, i32 %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@GRND_NONBLOCK = global i32 0
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @GRND_NONBLOCK
%4 = call i64 @getrandom(i8* %2, i32 4, i32 %3)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
ret i32 %6
}
int count_421(int n) {
  int steps = 0;
  while (n > 1) {
    steps++;
    if (n % 2 == 0)
      n /= 2;
    else
      n = n * 3 + 1;
  }
  return steps;
}


x86 assembly (clang, -O0):
<count_421>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1157 <count_421+0x57>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1148 <count_421+0x48>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1152 <count_421+0x52>
imul   $0x3,-0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <count_421+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_421>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1127 <count_421+0x27>
xor    %eax,%eax
nopl   0x0(%rax)
add    $0x1,%eax
mov    %edi,%ecx
shr    %ecx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%edi
cmove  %ecx,%edi
cmp    $0x1,%edi
jg     1110 <count_421+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_421(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %12, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = and i32 %5, 1
%8 = icmp eq i32 %7, 0
%9 = lshr i32 %5, 1
%10 = mul nsw i32 %5, 3
%11 = add nsw i32 %10, 1
%12 = select i1 %8, i32 %9, i32 %11
%13 = icmp sgt i32 %12, 1
br i1 %13, label %3, label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int readline(char *, int, char *);
int Readline(char *buff, int pos, char *line) {
  bzero(line, 256);
  return readline(buff, pos, line);
}


x86 assembly (clang, -O0):
<Readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x100,%esi
call   1040 <bzero@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <readline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Readline>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
mov    $0x100,%esi
call   1040 <bzero@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <readline@plt>

LLVM IR (-O0):
define i32 @Readline(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @bzero(i8* %7, i32 256)
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @readline(i8* %9, i32 %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @Readline(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @bzero(i8* %2, i32 256)
%5 = tail call i32 @readline(i8* %0, i32 %1, i8* %2)
ret i32 %5
}
int isascii(int c) {
  if (c > 127)
    return 0;
  if (c == '\n' || c == '\t' || c == '\r')
    return 1;
  return c > 31;
}


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jle    111d <isascii+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1156 <isascii+0x56>
cmpl   $0xa,-0x8(%rbp)
je     113b <isascii+0x3b>
cmpl   $0x9,-0x8(%rbp)
je     113b <isascii+0x3b>
cmpl   $0xd,-0x8(%rbp)
jne    1147 <isascii+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isascii+0x56>
cmpl   $0x1f,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x7f,%edi
jg     111b <isascii+0x1b>
cmp    $0xd,%edi
ja     111c <isascii+0x1c>
mov    $0x1,%eax
mov    $0x2600,%ecx
bt     %edi,%ecx
jae    111c <isascii+0x1c>
ret
xor    %eax,%eax
cmp    $0x20,%edi
setge  %al
ret

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp sgt i32 %0, 127
br i1 %2, label %7, label %3
3: ; preds = %1
switch i32 %0, label %4 [
i32 13, label %7
i32 10, label %7
i32 9, label %7
]
4: ; preds = %3
%5 = icmp sgt i32 %0, 31
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %3, %3, %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ]
ret i32 %8
}
void gsc_fopen() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ARGBSubtractRow_AVX2() {
ret void
}
/* Type definitions */
struct sockaddr_in6 {
  int dummy;
};
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int sa_family;
};

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
int /*<<< orphan*/ assert(struct sockaddr const *);
size_t ls_sockaddr_get_length(const struct sockaddr *addr) {
  assert(addr);
  switch (addr->sa_family) {
  case AF_INET:
    return sizeof(struct sockaddr_in);
  case AF_INET6:
    return sizeof(struct sockaddr_in6);
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<ls_sockaddr_get_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x80,%eax
je     115e <ls_sockaddr_get_length+0x4e>
jmp    113e <ls_sockaddr_get_length+0x2e>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
jne    116b <ls_sockaddr_get_length+0x5b>
jmp    1151 <ls_sockaddr_get_length+0x41>
movq   $0x4,-0x8(%rbp)
jmp    1173 <ls_sockaddr_get_length+0x63>
movq   $0x4,-0x8(%rbp)
jmp    1173 <ls_sockaddr_get_length+0x63>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_sockaddr_get_length>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%eax
and    $0xfffffffe,%eax
xor    %ecx,%ecx
cmp    $0x80,%eax
sete   %cl
lea    (%rcx,%rcx,4),%rax
add    $0xffffffffffffffff,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i64 @ls_sockaddr_get_length(%struct.sockaddr* %0) {
%2 = alloca i64
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = call i32 @assert(%struct.sockaddr* %4)
%6 = load %struct.sockaddr*, %struct.sockaddr** %3
%7 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %6, i32 0, i32 0
%8 = load i32, i32* %7
switch i32 %8, label %11 [
i32 129, label %9
i32 128, label %10
]
9: ; preds = %1
store i64 4, i64* %2
br label %12
10: ; preds = %1
store i64 4, i64* %2
br label %12
11: ; preds = %1
store i64 -1, i64* %2
br label %12
12: ; preds = %11, %10, %9
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i64 @ls_sockaddr_get_length(%struct.sockaddr* %0) {
%2 = tail call i32 @assert(%struct.sockaddr* %0)
%3 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = and i32 %4, -2
%6 = icmp eq i32 %5, 128
%7 = select i1 %6, i64 4, i64 -1
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
void uninitvar_getenv(void) {
  char *name;
  (void)getenv(name);
}


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

x86 assembly (clang, -O2):
<uninitvar_getenv>:
jmp    1030 <getenv@plt>

LLVM IR (-O0):
define void @uninitvar_getenv() {
%1 = alloca i8*
%2 = load i8*, i8** %1
%3 = call i32 @getenv(i8* %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_getenv() {
%1 = tail call i32 @getenv(i8* undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
uint8_t opdi_int64_to_str(int64_t value, char *msgBuf) {
  snprintf(msgBuf, 23,
           "%"
           "lld",
           value);
  return strlen(msgBuf);
}


x86 assembly (clang, -O0):
<opdi_int64_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x17,%esi
lea    0xebe(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opdi_int64_to_str>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ecx
lea    0xed3(%rip),%rdx
mov    %rsi,%rdi
mov    $0x17,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
define i32 @opdi_int64_to_str(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = call i32 @snprintf(i8* %5, i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
define i32 @opdi_int64_to_str(i32 %0, i8* %1) {
%3 = tail call i32 @snprintf(i8* %1, i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @strlen(i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void *world(void *arg) {
  char *msg = "mundo";
  printf("%s\n", msg);
}


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

x86 assembly (clang, -O2):
<world>:
lea    0xeef(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"mundo\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define noalias i8* @world(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(int argc, char *argv[]) {
  foo(10);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @foo(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ JeckyllRepaint();
void JeckyllListener() { JeckyllRepaint(); }


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

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

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

LLVM IR (-O2):
define void @JeckyllListener() {
%1 = tail call i32 (...) @JeckyllRepaint()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DefaultRendition(void) { printf("\033[m"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[m\00"
define void @DefaultRendition() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
extern void mmcif_update_progress(int nr) {}


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

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

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

LLVM IR (-O2):
define void @mmcif_update_progress(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stbi__err(char *);
void stbi__stdio_skip(void *user, int n) {
  if (fseek((FILE *)user, n, SEEK_CUR) != 0)
    stbi__err("can't fseek");
}


x86 assembly (clang, -O0):
<stbi__stdio_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
cmp    $0x0,%rax
je     115a <stbi__stdio_skip+0x3a>
lea    0xeab(%rip),%rdi
call   1040 <stbi__err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbi__stdio_skip>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
test   %rax,%rax
je     1141 <stbi__stdio_skip+0x21>
lea    0xec5(%rip),%rdi
pop    %rax
jmp    1040 <stbi__err@plt>
pop    %rax
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
@.str = [12 x i8] c"can't fseek\00"
define void @stbi__stdio_skip(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_CUR
%9 = call i64 @fseek(i32* %6, i32 %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @stbi__err(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
@.str = [12 x i8] c"can't fseek\00"
define void @stbi__stdio_skip(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i64 @fseek(i32* %3, i32 %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @stbi__err(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void new_func1(void) {
  printf("\n Inside new_func1()\n");
  int i = 0;
  for (; i < 0xffffffee; i++)
    ;
  return;
}


x86 assembly (clang, -O0):
<new_func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0xffffffee,-0x4(%rbp)
jae    1148 <new_func1+0x38>
jmp    113a <new_func1+0x2a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112b <new_func1+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_func1>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>

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

LLVM IR (-O2):
@str = [21 x i8] c"\0A Inside new_func1()\00"
define void @new_func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
unreachable
}
int dddd() { int g667h_, ttt; }


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

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

LLVM IR (-O0):
define i32 @dddd() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @dddd() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ GPTLerror(char *, int const);
void *malloc(int const);
void *GPTLallocate(const int nbytes) {
  void *ptr;
  if (nbytes <= 0 || !(ptr = malloc(nbytes)))
    (void)GPTLerror("GPTLallocate: malloc failed for %d bytes\n", nbytes);
  return ptr;
}


x86 assembly (clang, -O0):
<GPTLallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114b <GPTLallocate+0x2b>
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115a <GPTLallocate+0x3a>
mov    -0x4(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <GPTLerror@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPTLallocate>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jle    1135 <GPTLallocate+0x15>
mov    %ebx,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1135 <GPTLallocate+0x15>
pop    %rbx
ret
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
call   1040 <GPTLerror@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"GPTLallocate: malloc failed for %d bytes\0A\00"
define i8* @GPTLallocate(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %6, %1
%11 = load i32, i32* %2
%12 = call i32 @GPTLerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [42 x i8] c"GPTLallocate: malloc failed for %d bytes\0A\00"
define noalias i8* @GPTLallocate(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i32 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3, %1
%7 = tail call i32 @GPTLerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %3
%9 = phi i8* [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *circularDoublyLinkedList_Insert(struct node *, int);
struct node *circularDoublyLinkedList_Make(int n) {
  struct node *p;
  int i;
  p = NULL;
  for (i = 1; i <= n; i++)
    p = circularDoublyLinkedList_Insert(p, i);
  return p;
}


x86 assembly (clang, -O0):
<circularDoublyLinkedList_Make>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1154 <circularDoublyLinkedList_Make+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <circularDoublyLinkedList_Insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <circularDoublyLinkedList_Make+0x1a>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circularDoublyLinkedList_Make>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    114f <circularDoublyLinkedList_Make+0x3f>
mov    %edi,%r14d
neg    %r14d
mov    $0x1,%ebx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rdi
mov    %ebx,%esi
call   1030 <circularDoublyLinkedList_Insert@plt>
lea    (%r14,%rbx,1),%ecx
add    $0x1,%ecx
mov    %ebx,%edx
add    $0x1,%edx
mov    %edx,%ebx
cmp    $0x1,%ecx
jne    1130 <circularDoublyLinkedList_Make+0x20>
jmp    1151 <circularDoublyLinkedList_Make+0x41>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define %struct.node* @circularDoublyLinkedList_Make(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.node*
%4 = alloca i32
store i32 %0, i32* %2
store %struct.node* null, %struct.node** %3
store i32 1, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load %struct.node*, %struct.node** %3
%11 = load i32, i32* %4
%12 = call %struct.node* @circularDoublyLinkedList_Insert(%struct.node* %10, i32 %11)
store %struct.node* %12, %struct.node** %3
br label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %5
16: ; preds = %5
%17 = load %struct.node*, %struct.node** %3
ret %struct.node* %17
}

LLVM IR (-O2):
%struct.node = type { i32 }
define %struct.node* @circularDoublyLinkedList_Make(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi %struct.node* [ %6, %3 ], [ null, %1 ]
%6 = tail call %struct.node* @circularDoublyLinkedList_Insert(%struct.node* %5, i32 %4)
%7 = add nuw i32 %4, 1
%8 = icmp eq i32 %4, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi %struct.node* [ null, %1 ], [ %6, %3 ]
ret %struct.node* %10
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRD5_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRD5_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRD5_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *xlosAlloc(scalar_t__);
char *xlCopyCString(char *str) {
  char *copy = xlosAlloc(strlen(str) + 1);
  if (copy)
    strcpy(copy, str);
  return copy;
}


x86 assembly (clang, -O0):
<xlCopyCString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xlosAlloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <xlCopyCString+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlCopyCString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xlosAlloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <xlCopyCString+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xlCopyCString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xlosAlloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
br label %14
14: ; preds = %10, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @xlCopyCString(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xlosAlloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
scalar_t__ g(double, double);
bool is_internal(int i, int j) {
  double x = (-1.5) + i * ((3.0) / (256));
  double y = (-1.5) + j * ((3.0) / (256));
  return (g(x, y) < 0);
}


x86 assembly (clang, -O0):
<is_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeaf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <g@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_internal>:
push   %rax
cvtsi2sd %edi,%xmm0
movsd  0xee3(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xedf(%rip),%xmm3
addsd  %xmm3,%xmm0
cvtsi2sd %esi,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
call   1030 <g@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_internal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3F88000000000000, double -1.500000e+00)
store double %9, double* %5
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = call double @llvm.fmuladd.f64(double %11, double 0x3F88000000000000, double -1.500000e+00)
store double %12, double* %6
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call i64 @g(double %13, double %14)
%16 = icmp slt i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_internal(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 0x3F88000000000000, double -1.500000e+00)
%5 = sitofp i32 %1 to double
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3F88000000000000, double -1.500000e+00)
%7 = tail call i64 @g(double %4, double %6)
%8 = lshr i64 %7, 63
%9 = trunc i64 %8 to i32
ret i32 %9
}
int config_CARDREADER_PHOENIX(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @config_CARDREADER_PHOENIX() {
ret i32 0
}

LLVM IR (-O2):
define i32 @config_CARDREADER_PHOENIX() {
ret i32 0
}
/* Variables and functions */
int calc(char *, int *);
int /*<<< orphan*/ err(int, char *);
int express(char *form) {
  int result, status;
  result = calc(form, &status);
  if (status != 0) {
    err(7, "");
  }
  return result;
}


x86 assembly (clang, -O0):
<express>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <calc@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1157 <express+0x37>
mov    $0x7,%edi
lea    0xeae(%rip),%rsi
call   1040 <err@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<express>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rsi
call   1030 <calc@plt>
mov    %eax,%ebx
cmpl   $0x0,0xc(%rsp)
je     1149 <express+0x29>
lea    0xec1(%rip),%rsi
mov    $0x7,%edi
call   1040 <err@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @express(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @calc(i8* %5, i32* %4)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @err(i32 7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @express(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @calc(i8* %0, i32* %2)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @err(i32 7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t _hex_char_to_nibble(uint8_t hex) {
  hex |= 0x20;
  return hex - (hex >= 97 ? 87 : 48);
}


x86 assembly (clang, -O0):
<_hex_char_to_nibble>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%esi
mov    $0x30,%ecx
mov    $0x57,%edx
cmp    $0x61,%esi
cmovge %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hex_char_to_nibble>:
or     $0x20,%edi
lea    -0x30(%rdi),%ecx
lea    -0x57(%rdi),%eax
cmp    $0x61,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_hex_char_to_nibble(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, 32
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 97
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 87, i32 48
%10 = sub nsw i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @_hex_char_to_nibble(i32 %0) {
%2 = or i32 %0, 32
%3 = icmp sgt i32 %2, 96
%4 = select i1 %3, i32 -87, i32 -48
%5 = add i32 %4, %2
ret i32 %5
}
/* Type definitions */
struct S_MATRIX {
  int dummy;
};

/* Variables and functions */
struct S_MATRIX **calloc(size_t const, int);
struct S_MATRIX **constructor_matrix2_pointer(size_t const N0) {
  struct S_MATRIX **A = calloc(N0, sizeof *A);
  return A;
}


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

x86 assembly (clang, -O2):
<constructor_matrix2_pointer>:
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
%struct.S_MATRIX = type { i32 }
define %struct.S_MATRIX** @constructor_matrix2_pointer(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.S_MATRIX**
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call %struct.S_MATRIX** @calloc(i64 %4, i32 8)
store %struct.S_MATRIX** %5, %struct.S_MATRIX*** %3
%6 = load %struct.S_MATRIX**, %struct.S_MATRIX*** %3
ret %struct.S_MATRIX** %6
}

LLVM IR (-O2):
%struct.S_MATRIX = type { i32 }
define %struct.S_MATRIX** @constructor_matrix2_pointer(i64 %0) {
%2 = tail call %struct.S_MATRIX** @calloc(i64 %0, i32 8)
ret %struct.S_MATRIX** %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntEnable(int /*<<< orphan*/);
int /*<<< orphan*/ IntRegister(int /*<<< orphan*/, void (*)());
int /*<<< orphan*/ _SSIIntNumberGet(int /*<<< orphan*/);
void SSIIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  uint32_t ui32Int;
  ;
  ui32Int = _SSIIntNumberGet(ui32Base);
  ;
  IntRegister(ui32Int, pfnHandler);
  IntEnable(ui32Int);
}


x86 assembly (clang, -O0):
<SSIIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <_SSIIntNumberGet@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <IntRegister@plt>
mov    -0x14(%rbp),%edi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIIntRegister>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1050 <_SSIIntNumberGet@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @SSIIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
%5 = alloca i32
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%6 = load i32, i32* %3
%7 = call i32 @_SSIIntNumberGet(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load void ()*, void ()** %4
%10 = bitcast void ()* %9 to void (...)*
%11 = call i32 @IntRegister(i32 %8, void (...)* %10)
%12 = load i32, i32* %5
%13 = call i32 @IntEnable(i32 %12)
ret void
}

LLVM IR (-O2):
define void @SSIIntRegister(i32 %0, void ()* %1) {
%3 = tail call i32 @_SSIIntNumberGet(i32 %0)
%4 = bitcast void ()* %1 to void (...)*
%5 = tail call i32 @IntRegister(i32 %3, void (...)* %4)
%6 = tail call i32 @IntEnable(i32 %3)
ret void
}
int menor(int a, int b) {
  if (a < b) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<menor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <menor+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <menor+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<menor>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @menor(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void use_error(message) char *message;
{
  refer();
  putstrn(message);
  usage();
}


x86 assembly (clang, -O0):
<use_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <refer@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <putstrn@plt>
mov    $0x0,%al
call   1040 <usage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <refer@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <putstrn@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <usage@plt>

LLVM IR (-O0):
define void @use_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @refer()
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @putstrn to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (...) @usage()
ret void
}

LLVM IR (-O2):
define void @use_error(i8* %0) {
%2 = tail call i32 (...) @refer()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @putstrn to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (...) @usage()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ round_box(int, int, int, int, int);
void submenu_only_icon(int x, int y, int color) {
  round_box(color, x + 8, y + 8, 16, 16);
}


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

x86 assembly (clang, -O2):
<submenu_only_icon>:
mov    %edx,%ecx
lea    0x8(%rdi),%eax
lea    0x8(%rsi),%edx
mov    %ecx,%edi
mov    %eax,%esi
mov    $0x10,%ecx
mov    $0x10,%r8d
jmp    1030 <round_box@plt>

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

LLVM IR (-O2):
define void @submenu_only_icon(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %0, 8
%5 = add nsw i32 %1, 8
%6 = tail call i32 @round_box(i32 %2, i32 %4, i32 %5, i32 16, i32 16)
ret void
}
void XkbFreeComponentList() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeComponentList() {
ret void
}
char getCharToSend(void) {
  static unsigned char i = 0;
  if (i == 255) {
    i = 0;
  }
  return (i++);
}


x86 assembly (clang, -O0):
<getCharToSend>:
push   %rbp
mov    %rsp,%rbp
movzbl 0x2f16(%rip),%eax
cmp    $0xff,%eax
jne    111d <getCharToSend+0x1d>
movb   $0x0,0x2f04(%rip)
mov    0x2efe(%rip),%al
mov    %al,%cl
add    $0x1,%cl
mov    %cl,0x2ef3(%rip)
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCharToSend>:
movzbl 0x2f1a(%rip),%ecx
xor    %eax,%eax
cmp    $0xff,%cl
cmovne %ecx,%eax
lea    0x1(%rax),%ecx
mov    %cl,0x2f09(%rip)
ret

LLVM IR (-O0):
@getCharToSend.i = internal global i8 0
define signext i8 @getCharToSend() {
%1 = load i8, i8* @getCharToSend.i
%2 = zext i8 %1 to i32
%3 = icmp eq i32 %2, 255
br i1 %3, label %4, label %5
4: ; preds = %0
store i8 0, i8* @getCharToSend.i
br label %5
5: ; preds = %4, %0
%6 = load i8, i8* @getCharToSend.i
%7 = add i8 %6, 1
store i8 %7, i8* @getCharToSend.i
ret i8 %6
}

LLVM IR (-O2):
@getCharToSend.i = internal unnamed_addr global i8 0
define signext i8 @getCharToSend() {
%1 = load i8, i8* @getCharToSend.i
%2 = icmp eq i8 %1, -1
%3 = select i1 %2, i8 0, i8 %1
%4 = add nuw i8 %3, 1
store i8 %4, i8* @getCharToSend.i
ret i8 %3
}
int test2(int x, int y, int z, int weight) {
  int tmp1 = x * weight;
  int tmp2 = y * weight * weight;
  int tmp3 = z * weight * weight * weight;
  return tmp1 + tmp2 + tmp3;
}


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

x86 assembly (clang, -O2):
<test2>:
imul   %ecx,%edx
lea    (%rdx,%rsi,1),%eax
imul   %ecx,%eax
add    %edi,%eax
imul   %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %5
%13 = load i32, i32* %8
%14 = mul nsw i32 %12, %13
store i32 %14, i32* %9
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %8
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %10
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = mul nsw i32 %20, %21
%23 = load i32, i32* %8
%24 = mul nsw i32 %22, %23
%25 = load i32, i32* %8
%26 = mul nsw i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %9
%28 = load i32, i32* %10
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %11
%31 = add nsw i32 %29, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @test2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul i32 %3, %2
%6 = add i32 %5, %1
%7 = mul i32 %6, %3
%8 = add i32 %7, %0
%9 = mul i32 %8, %3
ret i32 %9
}
int fun1296() { return 1296; }


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

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

LLVM IR (-O0):
define i32 @fun1296() {
ret i32 1296
}

LLVM IR (-O2):
define i32 @fun1296() {
ret i32 1296
}