xunge/DecIR huggingface dataset:
int complete_ignore_replace_func(const struct cmd_info *ci) { return 1; }


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

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

LLVM IR (-O0):
%struct.cmd_info = type opaque
define i32 @complete_ignore_replace_func(%struct.cmd_info* %0) {
%2 = alloca %struct.cmd_info*
store %struct.cmd_info* %0, %struct.cmd_info** %2
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_info = type opaque
define i32 @complete_ignore_replace_func(%struct.cmd_info* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char const *);
char *prepare_shell_command(const char *cmd) {
  char *shell_cmd = malloc(sizeof(cmd) + 27 + 3 + 1);
  sprintf(shell_cmd, "%s/scripts/%s.sh", "/usr/local/gitflow", cmd);
  return shell_cmd;
}


x86 assembly (clang, -O0):
<prepare_shell_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x27,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xeb7(%rip),%rsi
lea    0xec1(%rip),%rdx
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_shell_command>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x27,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
lea    0xecf(%rip),%rdx
mov    %rax,%rdi
mov    %r14,%rcx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%s/scripts/%s.sh\00"
@.str.1 = [19 x i8] c"/usr/local/gitflow\00"
define i8* @prepare_shell_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 39)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s/scripts/%s.sh\00"
@.str.1 = [19 x i8] c"/usr/local/gitflow\00"
define noalias i8* @prepare_shell_command(i8* %0) {
%2 = tail call dereferenceable_or_null(39) i8* @malloc(i32 39)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i8* %2
}
void gdbif_connectSpin(void) {}


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

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

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

LLVM IR (-O2):
define void @gdbif_connectSpin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void standbyMessage(char *gameName) {
  printf("\nIt's my sad duty to report that the game %s is already full.\n"
         "\n\n"
         "Please note that I am a program, and that my only function is to\n"
         "register your name.  I am not smart enough to answer any\n"
         "questions that you might have put in your email, so please do\n"
         "not get angry because they are not answered.\n"
         "\n"
         "Have Fun!\n\n",
         gameName);
}


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

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

LLVM IR (-O0):
@.str = [306 x i8] c"\0AIt's my sad duty to report that the game %s is already full.\0A\0A\0APlease note that I am a program, and that my only function is to\0Aregister your name. I am not smart enough to answer any\0Aquestions that you might have put in your email, so please do\0Anot get angry because they are not answered.\0A\0AHave Fun!\0A\0A\00"
define void @standbyMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [306 x i8] c"\0AIt's my sad duty to report that the game %s is already full.\0A\0A\0APlease note that I am a program, and that my only function is to\0Aregister your name. I am not smart enough to answer any\0Aquestions that you might have put in your email, so please do\0Anot get angry because they are not answered.\0A\0AHave Fun!\0A\0A\00"
define void @standbyMessage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage() {
  puts("program verify|atoi|sse numbers [iterations]");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"program verify|atoi|sse numbers [iterations]\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"program verify|atoi|sse numbers [iterations]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ is_upper(int);
int ft_tolower(int c) {
  if (is_upper(c))
    return (c + 32);
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <is_upper@plt>
cmp    $0x0,%rax
je     113b <ft_tolower+0x2b>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <ft_tolower+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_upper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = tail call i64 @is_upper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_remap() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_remap"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_cvolume_remap\0A\00"
define i32 @pa_cvolume_remap() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_cvolume_remap\00"
define i32 @pa_cvolume_remap() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void ff_hevc_put_hevc_uni_epel_v12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v12_8_sse4() {
ret void
}
int GetCompileDay(void) {
  int day = (("Mar 16 2022"[4] == ' ' ? 0 : "Mar 16 2022"[4] - '0') * 10 +
             ("Mar 16 2022"[5] - '0'));
  return ((char)day);
}


x86 assembly (clang, -O0):
<GetCompileDay>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xef9(%rip),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
movsbl 0xeed(%rip),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Mar 16 2022\00"
define i32 @GetCompileDay() {
%1 = alloca i32
%2 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 4)
%3 = sext i8 %2 to i32
%4 = sub nsw i32 %3, 48
%5 = mul nsw i32 %4, 10
%6 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 5)
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 48
%9 = add nsw i32 %5, %8
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = trunc i32 %10 to i8
%12 = sext i8 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @GetCompileDay() {
ret i32 16
}
int checkfordiv(int num) {
  if (num % 6 == 0)
    if (num % 4 == 0)
      return 4;
    else
      return 0;
  else
    return 0;
}


x86 assembly (clang, -O0):
<checkfordiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1147 <checkfordiv+0x47>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113b <checkfordiv+0x3b>
movl   $0x4,-0x4(%rbp)
jmp    114e <checkfordiv+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    114e <checkfordiv+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkfordiv>:
movslq %edi,%rcx
imul   $0x2aaaaaab,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
mov    %ecx,%edx
sub    %eax,%edx
and    $0x3,%ecx
xor    %eax,%eax
or     %edx,%ecx
sete   %al
shl    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @checkfordiv(i32 %0) {
%2 = srem i32 %0, 6
%3 = and i32 %0, 3
%4 = or i32 %2, %3
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 4, i32 0
ret i32 %6
}
/* Type definitions */
struct ipv6hdr {
  int dummy;
};
typedef int __u8;
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
int ntohs(int /*<<< orphan*/);
__u8 ipv6_get_dsfield(struct ipv6hdr *ipv6h) {
  return ntohs(*(__u16 *)ipv6h) >> 4;
}


x86 assembly (clang, -O0):
<ipv6_get_dsfield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <ntohs@plt>
sar    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_get_dsfield>:
push   %rax
mov    (%rdi),%edi
call   1030 <ntohs@plt>
sar    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ipv6hdr = type { i32 }
define i32 @ipv6_get_dsfield(%struct.ipv6hdr* %0) {
%2 = alloca %struct.ipv6hdr*
store %struct.ipv6hdr* %0, %struct.ipv6hdr** %2
%3 = load %struct.ipv6hdr*, %struct.ipv6hdr** %2
%4 = bitcast %struct.ipv6hdr* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @ntohs(i32 %5)
%7 = ashr i32 %6, 4
ret i32 %7
}

LLVM IR (-O2):
%struct.ipv6hdr = type { i32 }
define i32 @ipv6_get_dsfield(%struct.ipv6hdr* nocapture %0) {
%2 = getelementptr %struct.ipv6hdr, %struct.ipv6hdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohs(i32 %3)
%5 = ashr i32 %4, 4
ret i32 %5
}
/* Variables and functions */
int f(void *);
main() { return f((void *)0) == 1296; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <f@plt>
cmp    $0x510,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <f@plt>
xor    %ecx,%ecx
cmp    $0x510,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i8* null)
%3 = icmp eq i32 %2, 1296
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i8* null)
%2 = icmp eq i32 %1, 1296
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *filename) {
  FILE *file = fopen(filename, "r");
  if (file != 0) {
    fclose(file);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <file_exists+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <file_exists+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int nondet_int();
int istrrand(char *s) {
  int i;
  for (i = 0; s[i] != 0; i++)
    if (nondet_int() == 1)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<istrrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1166 <istrrand+0x56>
mov    $0x0,%al
call   1030 <nondet_int@plt>
cmp    $0x1,%eax
jne    1153 <istrrand+0x43>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <istrrand+0x5d>
jmp    1158 <istrrand+0x48>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <istrrand+0x13>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<istrrand>:
push   %rbp
push   %r14
push   %rbx
mov    $0xffffffff,%r14d
cmpb   $0x0,(%rdi)
je     114c <istrrand+0x3c>
mov    %rdi,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <nondet_int@plt>
cmp    $0x1,%eax
je     1149 <istrrand+0x39>
cmpb   $0x0,0x1(%rbx,%rbp,1)
lea    0x1(%rbp),%rbp
jne    1130 <istrrand+0x20>
jmp    114c <istrrand+0x3c>
mov    %ebp,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @istrrand(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %19, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %5
%14 = call i32 (...) @nondet_int()
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %23
18: ; preds = %13
br label %19
19: ; preds = %18
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %5
22: ; preds = %5
store i32 -1, i32* %2
br label %23
23: ; preds = %22, %16
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @istrrand(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %8
%5 = phi i64 [ %9, %8 ], [ 0, %1 ]
%6 = tail call i32 (...) @nondet_int()
%7 = icmp eq i32 %6, 1
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %15, label %4
13: ; preds = %4
%14 = trunc i64 %5 to i32
br label %15
15: ; preds = %8, %13, %1
%16 = phi i32 [ -1, %1 ], [ %14, %13 ], [ -1, %8 ]
ret i32 %16
}
int test_imm_C9int64_lowword_mem(long long *val) {
  return ((*val) & (0xC9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C9int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 201
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long lmin(long x, long y) { return (x <= y) ? x : y; }


x86 assembly (clang, -O0):
<lmin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1127 <lmin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <lmin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmin>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovg  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @lmin(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sle i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @lmin(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
int stopPatternSearch(int xpat, int npat, unsigned char fpat, int x, int n,
                      unsigned char f) {
  if (xpat < x)
    return 1;
  if (npat < n)
    return 1;
  if (fpat < f)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<stopPatternSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %r9b,%al
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %dl,-0xd(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1132 <stopPatternSearch+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116d <stopPatternSearch+0x6d>
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    114a <stopPatternSearch+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    116d <stopPatternSearch+0x6d>
movzbl -0xd(%rbp),%eax
movzbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jge    1166 <stopPatternSearch+0x66>
movl   $0x1,-0x4(%rbp)
jmp    116d <stopPatternSearch+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopPatternSearch>:
cmp    %ecx,%edi
setl   %al
cmp    %r8d,%esi
setl   %cl
or     %al,%cl
cmp    %r9b,%dl
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @stopPatternSearch(i32 %0, i32 %1, i8 zeroext %2, i32 %3, i32 %4, i8 zeroext %5) {
%7 = icmp slt i32 %0, %3
%8 = icmp slt i32 %1, %4
%9 = or i1 %7, %8
%10 = icmp ult i8 %2, %5
%11 = or i1 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
scalar_t__ strtold(char const *, char **);
double strtod(const char *nptr, char **endptr) {
  return (double)strtold(nptr, endptr);
}


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

x86 assembly (clang, -O2):
<strtod>:
push   %rax
call   1030 <strtold@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @strtod(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call i64 @strtold(i8* %5, i8** %6)
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @strtod(i8* %0, i8** nocapture %1) {
%3 = tail call i64 @strtold(i8* %0, i8** %1)
%4 = sitofp i64 %3 to double
ret double %4
}
int Cyc_PP_min(int x, int y) {
  int _T0;
  int _T1;
  if (x > y)
    goto _TL4B;
  _T0 = x;
  return _T0;
_TL4B:
  _T1 = y;
  return _T1;
}


x86 assembly (clang, -O0):
<Cyc_PP_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    111b <Cyc_PP_min+0x1b>
jmp    112c <Cyc_PP_min+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <Cyc_PP_min+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_PP_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @Cyc_PP_min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
char *next_separator(char const *);
int strspn(char const *, char *);
const char *next_token(const char *str) {
  str = next_separator(str);
  return str + strspn(str, " \t");
}


x86 assembly (clang, -O0):
<next_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <next_separator@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_token>:
push   %rbx
call   1040 <next_separator@plt>
mov    %rax,%rbx
lea    0xed0(%rip),%rsi
mov    %rax,%rdi
call   1030 <strspn@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
define i8* @next_token(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @next_separator(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strspn(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
define i8* @next_token(i8* %0) {
%2 = tail call i8* @next_separator(i8* %0)
%3 = tail call i32 @strspn(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
ret i8* %5
}
float quad_bezier(float t, float p0, float p1, float p2) {
  return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2;
}


x86 assembly (clang, -O0):
<quad_bezier>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xee4(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
movss  0xed7(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
mulss  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm2
movss  0xec1(%rip),%xmm3
subss  -0x4(%rbp),%xmm3
movss  0xeb0(%rip),%xmm0
mulss  %xmm3,%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quad_bezier>:
movss  0xef8(%rip),%xmm4
subss  %xmm0,%xmm4
movaps %xmm4,%xmm5
mulss  %xmm4,%xmm5
addss  %xmm4,%xmm4
mulss  %xmm0,%xmm4
mulss  %xmm2,%xmm4
mulss  %xmm1,%xmm5
addss  %xmm4,%xmm5
mulss  %xmm0,%xmm0
mulss  %xmm3,%xmm0
addss  %xmm5,%xmm0
ret

LLVM IR (-O0):
define float @quad_bezier(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = fsub float 1.000000e+00, %9
%11 = load float, float* %5
%12 = fsub float 1.000000e+00, %11
%13 = fmul float %10, %12
%14 = load float, float* %6
%15 = load float, float* %5
%16 = fsub float 1.000000e+00, %15
%17 = fmul float 2.000000e+00, %16
%18 = load float, float* %5
%19 = fmul float %17, %18
%20 = load float, float* %7
%21 = fmul float %19, %20
%22 = call float @llvm.fmuladd.f32(float %13, float %14, float %21)
%23 = load float, float* %5
%24 = load float, float* %5
%25 = fmul float %23, %24
%26 = load float, float* %8
%27 = call float @llvm.fmuladd.f32(float %25, float %26, float %22)
ret float %27
}

LLVM IR (-O2):
define float @quad_bezier(float %0, float %1, float %2, float %3) {
%5 = fsub float 1.000000e+00, %0
%6 = fmul float %5, %5
%7 = fmul float %5, 2.000000e+00
%8 = fmul float %7, %0
%9 = fmul float %8, %2
%10 = tail call float @llvm.fmuladd.f32(float %6, float %1, float %9)
%11 = fmul float %0, %0
%12 = tail call float @llvm.fmuladd.f32(float %11, float %3, float %10)
ret float %12
}
/* Variables and functions */
double asin(double);
double sqrt(double);
double atan(double x) { return asin(x / sqrt(x * x + 1)); }


x86 assembly (clang, -O0):
<atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <asin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan>:
push   %rax
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm0
addsd  0xecf(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <atan+0x21>
sqrtsd %xmm0,%xmm0
jmp    1150 <atan+0x30>
movsd  %xmm2,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
jmp    1030 <asin@plt>

LLVM IR (-O0):
define double @atan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = call double @sqrt(double %6)
%8 = fdiv double %3, %7
%9 = call double @asin(double %8)
ret double %9
}

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = tail call double @sqrt(double %2)
%4 = fdiv double %0, %3
%5 = tail call double @asin(double %4)
ret double %5
}
void tty_set_size(int width, int height) {}


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

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

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

LLVM IR (-O2):
define void @tty_set_size(i32 %0, i32 %1) {
ret void
}
void SteamAPI_ISteamGameServer_ForceHeartbeat(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_ForceHeartbeat>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_ForceHeartbeat = [41 x i8] c"SteamAPI_ISteamGameServer_ForceHeartbeat\00"
define void @SteamAPI_ISteamGameServer_ForceHeartbeat(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @__func__.SteamAPI_ISteamGameServer_ForceHeartbeat, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_ForceHeartbeat = [41 x i8] c"SteamAPI_ISteamGameServer_ForceHeartbeat\00"
define void @SteamAPI_ISteamGameServer_ForceHeartbeat(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @__func__.SteamAPI_ISteamGameServer_ForceHeartbeat, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mcb_grow_max(int);
int /*<<< orphan*/ mcb_set_owner(int, int /*<<< orphan*/);
void mcb_free(int mcb) {
  mcb_set_owner(mcb, 0);
  mcb_grow_max(mcb);
}


x86 assembly (clang, -O0):
<mcb_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <mcb_set_owner@plt>
mov    -0x4(%rbp),%edi
call   1040 <mcb_grow_max@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcb_free>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1030 <mcb_set_owner@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <mcb_grow_max@plt>

LLVM IR (-O0):
define void @mcb_free(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @mcb_set_owner(i32 %3, i32 0)
%5 = load i32, i32* %2
%6 = call i32 @mcb_grow_max(i32 %5)
ret void
}

LLVM IR (-O2):
define void @mcb_free(i32 %0) {
%2 = tail call i32 @mcb_set_owner(i32 %0, i32 0)
%3 = tail call i32 @mcb_grow_max(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ set_setting(char *, char *, char *);
void set_setting_INT(char *filename, char *settingname, int value) {
  char *tempstr;
  asprintf(&tempstr, "%d", value);
  set_setting(filename, settingname, tempstr);
  free(tempstr);
}


x86 assembly (clang, -O0):
<set_setting_INT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <asprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1050 <set_setting@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_setting_INT>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %rsp,%rdi
call   1040 <asprintf@plt>
mov    (%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <set_setting@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @set_setting_INT(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @asprintf(i8** %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = load i8*, i8** %4
%8 = call i32 @set_setting(i8* %0, i8* %1, i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @free(i8* %9)
ret void
}
int LZ4_sizeofStreamState() {
  return (((1 << (14 - 3)) + 4) * sizeof(long long));
}


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

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

LLVM IR (-O0):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}

LLVM IR (-O2):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}
/* Type definitions */
struct sched_entity {
  int dummy;
};
struct cfs_rq {
  int dummy;
};

/* Variables and functions */
struct sched_entity *__pick_next_entity(struct cfs_rq *);
int /*<<< orphan*/ set_next_entity(struct cfs_rq *, struct sched_entity *);
struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) {
  struct sched_entity *se = __pick_next_entity(cfs_rq);
  set_next_entity(cfs_rq, se);
  return se;
}


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

x86 assembly (clang, -O2):
<pick_next_entity>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <__pick_next_entity@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <set_next_entity@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sched_entity = type { i32 }
%struct.cfs_rq = type { i32 }
define %struct.sched_entity* @pick_next_entity(%struct.cfs_rq* %0) {
%2 = alloca %struct.cfs_rq*
%3 = alloca %struct.sched_entity*
store %struct.cfs_rq* %0, %struct.cfs_rq** %2
%4 = load %struct.cfs_rq*, %struct.cfs_rq** %2
%5 = call %struct.sched_entity* @__pick_next_entity(%struct.cfs_rq* %4)
store %struct.sched_entity* %5, %struct.sched_entity** %3
%6 = load %struct.cfs_rq*, %struct.cfs_rq** %2
%7 = load %struct.sched_entity*, %struct.sched_entity** %3
%8 = call i32 @set_next_entity(%struct.cfs_rq* %6, %struct.sched_entity* %7)
%9 = load %struct.sched_entity*, %struct.sched_entity** %3
ret %struct.sched_entity* %9
}

LLVM IR (-O2):
%struct.sched_entity = type { i32 }
%struct.cfs_rq = type { i32 }
define %struct.sched_entity* @pick_next_entity(%struct.cfs_rq* %0) {
%2 = tail call %struct.sched_entity* @__pick_next_entity(%struct.cfs_rq* %0)
%3 = tail call i32 @set_next_entity(%struct.cfs_rq* %0, %struct.sched_entity* %2)
ret %struct.sched_entity* %2
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_iface_nr();
int wrap_get_iface_nr(struct activity *a) {
  int n = 0;
  if ((n = get_iface_nr()) > 0)
    return n + 2;
  return 0;
}


x86 assembly (clang, -O0):
<wrap_get_iface_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_iface_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    1144 <wrap_get_iface_nr+0x34>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <wrap_get_iface_nr+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_iface_nr>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <get_iface_nr@plt>
lea    0x2(%rax),%ecx
test   %eax,%eax
cmovle %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_iface_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 0, i32* %4
%5 = call i32 (...) @get_iface_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 2
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_iface_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_iface_nr()
%3 = icmp sgt i32 %2, 0
%4 = add nsw i32 %2, 2
%5 = select i1 %3, i32 %4, i32 0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ eembed_str_to_i64(char const *, char **, int);
int64_t eembed_str_to_long(const char *str, char **endptr) {
  int base10 = 10;
  return eembed_str_to_i64(str, endptr, base10);
}


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

x86 assembly (clang, -O2):
<eembed_str_to_long>:
mov    $0xa,%edx
jmp    1030 <eembed_str_to_i64@plt>

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

LLVM IR (-O2):
define i32 @eembed_str_to_long(i8* %0, i8** %1) {
%3 = tail call i32 @eembed_str_to_i64(i8* %0, i8** %1, i32 10)
ret i32 %3
}
long hash1(const char *s, long sz) {
  long h;
  for (h = 5381; *s != '\0'; s++) {
    h = ((h << 5) + h) + (long)*s;
  }
  return h % sz;
}


x86 assembly (clang, -O0):
<hash1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <hash1+0x50>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <hash1+0x14>
mov    -0x18(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash1>:
mov    (%rdi),%cl
test   %cl,%cl
je     112e <hash1+0x2e>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash1+0x10>
jmp    1133 <hash1+0x33>
mov    $0x1505,%eax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1148 <hash1+0x48>
cqto
idiv   %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @hash1(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 5381, i64* %5
br label %6
6: ; preds = %20, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %6
%12 = load i64, i64* %5
%13 = shl i64 %12, 5
%14 = load i64, i64* %5
%15 = add nsw i64 %13, %14
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i64
%19 = add nsw i64 %15, %18
store i64 %19, i64* %5
br label %20
20: ; preds = %11
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %6
23: ; preds = %6
%24 = load i64, i64* %5
%25 = load i64, i64* %4
%26 = srem i64 %24, %25
ret i64 %26
}

LLVM IR (-O2):
define i64 @hash1(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i64 [ %11, %5 ], [ 5381, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = mul i64 %7, 33
%10 = sext i8 %6 to i64
%11 = add nsw i64 %9, %10
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 5381, %2 ], [ %11, %5 ]
%17 = srem i64 %16, %1
ret i64 %17
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
int CLOCKS_PER_SEC;
scalar_t__ clock();
void delay_ms(int ms) {
  clock_t end = clock() + ms * CLOCKS_PER_SEC / 1000.0;
  while (clock() < end)
    continue;
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    -0x4(%rbp),%eax
mov    0x2eb7(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm1
movsd  0xec0(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cmp    -0x10(%rbp),%rax
jge    1167 <delay_ms+0x57>
jmp    1151 <delay_ms+0x41>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec2(%rip),%rax
imul   (%rax),%ebx
cvtsi2sd %ebx,%xmm1
divsd  0xecb(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rbx
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <clock@plt>
cmp    %rbx,%rax
jl     1140 <delay_ms+0x30>
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define void @delay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @clock()
%5 = sitofp i64 %4 to double
%6 = load i32, i32* %2
%7 = load i32, i32* @CLOCKS_PER_SEC
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.000000e+03
%11 = fadd double %5, %10
%12 = fptosi double %11 to i64
store i64 %12, i64* %3
br label %13
13: ; preds = %17, %1
%14 = call i64 (...) @clock()
%15 = load i64, i64* %3
%16 = icmp slt i64 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %13
br label %13
18: ; preds = %13
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define void @delay_ms(i32 %0) {
%2 = tail call i64 (...) @clock()
%3 = sitofp i64 %2 to double
%4 = load i32, i32* @CLOCKS_PER_SEC
%5 = mul nsw i32 %4, %0
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 1.000000e+03
%8 = fadd double %7, %3
%9 = fptosi double %8 to i64
br label %10
10: ; preds = %10, %1
%11 = tail call i64 (...) @clock()
%12 = icmp slt i64 %11, %9
br i1 %12, label %10, label %13
13: ; preds = %10
ret void
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void finish(ssize_t wrote, size_t buf_size) {
  if (wrote < 0) {
    perror("snprintf");
    exit(1);
  }
  if (wrote >= buf_size) {
    fprintf(stderr, "buffer overflow (caught): %d >= %d\n", (int)wrote,
            (int)buf_size);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jae    1161 <finish+0x31>
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     119a <finish+0x6a>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
lea    0xe7e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finish>:
cmp    %rsi,%rdi
jae    1126 <finish+0x6>
ret
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"snprintf\00"
@stderr = global i32 0
@.str.1 = [36 x i8] c"buffer overflow (caught): %d >= %d\0A\00"
define void @finish(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = icmp uge i64 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32, i32* @stderr
%16 = load i64, i64* %3
%17 = trunc i64 %16 to i32
%18 = load i64, i64* %4
%19 = trunc i64 %18 to i32
%20 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %19)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %10
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [36 x i8] c"buffer overflow (caught): %d >= %d\0A\00"
define void @finish(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = trunc i64 %0 to i32
%7 = trunc i64 %1 to i32
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
ret void
}