xunge/DecIR huggingface dataset:
long long zzuu() { return 0x000000007fff7fffLL; }


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

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

LLVM IR (-O0):
define i64 @zzuu() {
ret i64 2147450879
}

LLVM IR (-O2):
define i64 @zzuu() {
ret i64 2147450879
}
char *mstrcpy(str)
char *str;
{
  char *temp;
  temp = malloc(strlen(str) + 1);
  strcpy(temp, str);
  return (temp);
}


x86 assembly (clang, -O0):
<mstrcpy>:
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 <malloc@plt>
mov    %rax,-0x10(%rbp)
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):
<mstrcpy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @mstrcpy(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 i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @mstrcpy(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
void pthread_mutex_trylock() {}


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

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

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

LLVM IR (-O2):
define void @pthread_mutex_trylock() {
ret void
}
int and4(int a) { return (a & 0xf) != 0; }


x86 assembly (clang, -O0):
<and4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<and4>:
xor    %eax,%eax
test   $0xf,%dil
setne  %al
ret

LLVM IR (-O0):
define i32 @and4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @and4(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
char const *_Locale_extract_messages_name(const char *__DUMMY_PAR1,
                                          char *__DUMMY_PAR,
                                          struct _Locale_name_hint *hint) {
  return 0;
}


x86 assembly (clang, -O0):
<_Locale_extract_messages_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
define i8* @_Locale_extract_messages_name(i8* %0, i8* %1, %struct._Locale_name_hint* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct._Locale_name_hint*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct._Locale_name_hint* %2, %struct._Locale_name_hint** %6
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
define noalias i8* @_Locale_extract_messages_name(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct._Locale_name_hint* nocapture readnone %2) {
ret i8* null
}
/* Variables and functions */
int slength(char *);
void strunc(char *str, int len) {
  if (slength(str) > len)
    str[len] = '\0';
}


x86 assembly (clang, -O0):
<strunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <slength@plt>
cmp    -0xc(%rbp),%eax
jle    113d <strunc+0x2d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strunc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <slength@plt>
cmp    %ebp,%eax
jle    1128 <strunc+0x18>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @strunc(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 = call i32 @slength(i8* %5)
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
br label %14
14: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @strunc(i8* %0, i32 %1) {
%3 = tail call i32 @slength(i8* %0)
%4 = icmp sgt i32 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char const *, char *, int /*<<< orphan*/);
int is_cleartext(const char *pwd) {
  if (0 == strncmp(pwd, "{NS1}", strlen("{NS1}")))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<is_cleartext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
lea    0xeb3(%rip),%rsi
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    116c <is_cleartext+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <is_cleartext+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cleartext>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"{NS1}\00"
define i32 @is_cleartext(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp eq i64 0, %6
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"{NS1}\00"
define i32 @is_cleartext(i8* %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int another_function(float);
void some_function() {
  float c = 10.0f;
  if (another_function(c) < 25) {
    c *= 2;
  } else {
    c *= 3;
  }
}


x86 assembly (clang, -O0):
<some_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <another_function@plt>
cmp    $0x19,%eax
jge    114f <some_function+0x3f>
movss  0xec8(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1161 <some_function+0x51>
movss  0xead(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<some_function>:
movss  0xee8(%rip),%xmm0
jmp    1030 <another_function@plt>

LLVM IR (-O0):
define void @some_function() {
%1 = alloca float
store float 1.000000e+01, float* %1
%2 = load float, float* %1
%3 = call i32 @another_function(float %2)
%4 = icmp slt i32 %3, 25
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load float, float* %1
%7 = fmul float %6, 2.000000e+00
store float %7, float* %1
br label %11
8: ; preds = %0
%9 = load float, float* %1
%10 = fmul float %9, 3.000000e+00
store float %10, float* %1
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
define void @some_function() {
%1 = tail call i32 @another_function(float 1.000000e+01)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put(char const *);
int /*<<< orphan*/ putc(char);
void puts(const char *s) {
  put(s);
  putc('\n');
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <put@plt>
mov    $0xa,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rax
call   1030 <put@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <putc@plt>

LLVM IR (-O0):
define void @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @put(i8* %3)
%5 = call i32 @putc(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @puts(i8* %0) {
%2 = tail call i32 @put(i8* %0)
%3 = tail call i32 @putc(i8 signext 10)
ret void
}
void parse_short_option(const struct option_spec *specs, const char *key) {
  (void)specs;
  (void)key;
  do {
    __die("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/amhk/arsc/refs/heads/master/options.c",
          35, __FUNCTION__, "not implemented (yet)");
  } while (0);
}


x86 assembly (clang, -O0):
<parse_short_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x23,%esi
lea    0xf4d(%rip),%rdx
lea    0xf59(%rip),%rcx
mov    $0x0,%al
call   1030 <__die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_short_option>:
lea    0xee9(%rip),%rdi
lea    0xf62(%rip),%rdx
lea    0xf6e(%rip),%rcx
mov    $0x23,%esi
xor    %eax,%eax
jmp    1030 <__die@plt>

LLVM IR (-O0):
%struct.option_spec = type opaque
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/amhk/arsc/refs/heads/master/options.c\00"
@__FUNCTION__.parse_short_option = [19 x i8] c"parse_short_option\00"
@.str.1 = [22 x i8] c"not implemented (yet)\00"
define void @parse_short_option(%struct.option_spec* %0, i8* %1) {
%3 = alloca %struct.option_spec*
%4 = alloca i8*
store %struct.option_spec* %0, %struct.option_spec** %3
store i8* %1, i8** %4
%5 = load %struct.option_spec*, %struct.option_spec** %3
%6 = load i8*, i8** %4
br label %7
7: ; preds = %2
%8 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @__die to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.parse_short_option, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7
ret void
}

LLVM IR (-O2):
%struct.option_spec = type opaque
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/amhk/arsc/refs/heads/master/options.c\00"
@__FUNCTION__.parse_short_option = [19 x i8] c"parse_short_option\00"
@.str.1 = [22 x i8] c"not implemented (yet)\00"
define void @parse_short_option(%struct.option_spec* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @__die to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.parse_short_option, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ft_atoi(char *str) {
  int value;
  value = 0;
  while (*str) {
    if (str <= '0' && str >= '9') {
      value = str;
    }
  }
  return (value);
}


x86 assembly (clang, -O0):
<ft_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <ft_atoi+0x46>
mov    $0x30,%eax
cmp    %rax,-0x8(%rbp)
ja     1141 <ft_atoi+0x41>
mov    $0x39,%eax
cmp    %rax,-0x8(%rbp)
jb     1141 <ft_atoi+0x41>
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = icmp ule i8* %9, inttoptr (i64 48 to i8*)
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i8*, i8** %2
%13 = icmp uge i8* %12, inttoptr (i64 57 to i8*)
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8*, i8** %2
%16 = ptrtoint i8* %15 to i32
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %11, %8
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ft_atoi(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
char const *get_name(int /*<<< orphan*/);
int /*<<< orphan*/ geteuid();
const char *get_effective_user_name() {
  uid_t effective_uid = geteuid();
  return get_name(effective_uid);
}


x86 assembly (clang, -O0):
<get_effective_user_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <geteuid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <get_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_effective_user_name>:
push   %rax
xor    %eax,%eax
call   1030 <geteuid@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <get_name@plt>

LLVM IR (-O0):
define i8* @get_effective_user_name() {
%1 = alloca i32
%2 = call i32 (...) @geteuid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i8* @get_name(i32 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @get_effective_user_name() {
%1 = tail call i32 (...) @geteuid()
%2 = tail call i8* @get_name(i32 %1)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ write_uint32(int /*<<< orphan*/ *, unsigned long long);
void write_uint64(FILE *f, unsigned long long ll) {
  write_uint32(f, ll >> 32);
  write_uint32(f, ll);
}


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

x86 assembly (clang, -O2):
<write_uint64>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
shr    $0x20,%rsi
call   1030 <write_uint32@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write_uint32@plt>

LLVM IR (-O0):
define void @write_uint64(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = lshr i64 %6, 32
%8 = call i32 @write_uint32(i32* %5, i64 %7)
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = call i32 @write_uint32(i32* %9, i64 %10)
ret void
}

LLVM IR (-O2):
define void @write_uint64(i32* %0, i64 %1) {
%3 = lshr i64 %1, 32
%4 = tail call i32 @write_uint32(i32* %0, i64 %3)
%5 = tail call i32 @write_uint32(i32* %0, i64 %1)
ret void
}
int any_even_one(unsigned x) { return (x & 0x5555) & 1; }


x86 assembly (clang, -O0):
<any_even_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x5555,%eax
and    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @any_even_one(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 21845
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @any_even_one(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef double uint64_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, double);
char *parse_time(char *buf, int len, uint64_t usec) {
  snprintf(buf, len, "%lf", usec * 1.0 / 1000000);
  return buf;
}


x86 assembly (clang, -O0):
<parse_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  0xed5(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xec5(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_time>:
push   %rbx
mov    %rdi,%rbx
divsd  0xee4(%rip),%xmm0
lea    0xee5(%rip),%rdx
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define i8* @parse_time(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load double, double* %6
%10 = fmul double %9, 1.000000e+00
%11 = fdiv double %10, 1.000000e+06
%12 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i8* @parse_time(i8* returned %0, i32 %1, double %2) {
%4 = fdiv double %2, 1.000000e+06
%5 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *prog_name, char *filename) {
  printf("Usage: %s <data to add %s?\n", prog_name, filename);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Usage: %s <data to add %s?\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"Usage: %s <data to add %s?\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _getopt_internal(int, char **, char const *, struct option const *, int *,
                     int, int /*<<< orphan*/);
int getopt_long_only(int argc, char *const *argv, const char *options,
                     const struct option *long_options, int *opt_index) {
  return _getopt_internal(argc, (char **)argv, options, long_options, opt_index,
                          1, 0);
}


x86 assembly (clang, -O0):
<getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x1,%r9d
call   1030 <_getopt_internal@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 1, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1, i32 0)
ret i32 %6
}
void gtk_accel_flags_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_flags_get_type() {
ret void
}
OP(ed, e4) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void welcome_user() { printf("Welcome, User!\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Welcome, User!\0A\00"
define void @welcome_user() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Welcome, User!\00"
define void @welcome_user() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int hf2Int(const void *const e) {
  int *e_int = (int *)e;
  return 1 + ((*e_int) % (31 - 2));
}


x86 assembly (clang, -O0):
<hf2Int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x1d,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hf2Int>:
movslq (%rdi),%rax
imul   $0xffffffff8d3dcb09,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x4,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rdx,%rdx,2),%edx
add    %ecx,%edx
add    %ecx,%edx
neg    %edx
add    %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @hf2Int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = srem i32 %7, 29
%9 = add nsw i32 1, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @hf2Int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = srem i32 %3, 29
%5 = add nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ util_compress_buffer(void const *, int, void *,
                                        unsigned long *);
void *util_malloc(int);
void *util_realloc(void *, unsigned long);
void *util_alloc_compressed_buffer(const void *data, int data_size,
                                   unsigned long *compressed_size) {
  void *zbuffer = util_malloc(data_size);
  *compressed_size = data_size;
  util_compress_buffer(data, data_size, zbuffer, compressed_size);
  zbuffer = util_realloc(zbuffer, *compressed_size);
  return zbuffer;
}


x86 assembly (clang, -O0):
<util_alloc_compressed_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <util_malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <util_compress_buffer@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <util_realloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_alloc_compressed_buffer>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1050 <util_malloc@plt>
mov    %rax,%r15
movslq %ebp,%rsi
mov    %rsi,(%rbx)
mov    %r14,%rdi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1040 <util_compress_buffer@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <util_realloc@plt>

LLVM IR (-O0):
define i8* @util_alloc_compressed_buffer(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%8 = load i32, i32* %5
%9 = call i8* @util_malloc(i32 %8)
store i8* %9, i8** %7
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = load i64*, i64** %6
store i64 %11, i64* %12
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = load i8*, i8** %7
%16 = load i64*, i64** %6
%17 = call i32 @util_compress_buffer(i8* %13, i32 %14, i8* %15, i64* %16)
%18 = load i8*, i8** %7
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = call i8* @util_realloc(i8* %18, i64 %20)
store i8* %21, i8** %7
%22 = load i8*, i8** %7
ret i8* %22
}

LLVM IR (-O2):
define i8* @util_alloc_compressed_buffer(i8* %0, i32 %1, i64* %2) {
%4 = tail call i8* @util_malloc(i32 %1)
%5 = sext i32 %1 to i64
store i64 %5, i64* %2
%6 = tail call i32 @util_compress_buffer(i8* %0, i32 %1, i8* %4, i64* %2)
%7 = load i64, i64* %2
%8 = tail call i8* @util_realloc(i8* %4, i64 %7)
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ feof(void *);
int fread(void *, int, int, void *);
int asf_fileio_read_cb(void *stream, void *buffer, int size) {
  int ret;
  ret = fread(buffer, 1, size, stream);
  if (!ret && !feof(stream))
    return -1;
  return ret;
}


x86 assembly (clang, -O0):
<asf_fileio_read_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1173 <asf_fileio_read_cb+0x53>
mov    -0x10(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%eax
jne    1173 <asf_fileio_read_cb+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <asf_fileio_read_cb+0x59>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asf_fileio_read_cb>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
mov    $0x1,%esi
mov    %r14,%rcx
call   1030 <fread@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    114e <asf_fileio_read_cb+0x2e>
mov    %r14,%rdi
call   1040 <feof@plt>
test   %eax,%eax
jne    114e <asf_fileio_read_cb+0x2e>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @asf_fileio_read_cb(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fread(i8* %1, i32 1, i32 %2, i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @feof(i8* %0)
%8 = icmp eq i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6, %3
br label %10
10: ; preds = %6, %9
%11 = phi i32 [ %4, %9 ], [ -1, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void h264_free(void *p) {
  if (p) {
    free(*(((void **)p) - 1));
  }
}


x86 assembly (clang, -O0):
<h264_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <h264_free+0x24>
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264_free>:
test   %rdi,%rdi
je     111e <h264_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @h264_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
void initClock() {
  (*((volatile unsigned int *)(0x40012400 + 0x10))) |= ((1 << 31));
  (*((volatile unsigned int *)(0x40021000 + 0x1c))) |= ((1 << 1) | (1 << 8));
  (*((volatile unsigned int *)(0x40021000 + 0x18))) |= ((1 << 9) | (1 << 11));
}


x86 assembly (clang, -O0):
<initClock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40012410,%eax
mov    (%rax),%ecx
or     $0x80000000,%ecx
mov    $0x40012410,%eax
mov    %ecx,(%rax)
mov    $0x4002101c,%eax
mov    (%rax),%ecx
or     $0x102,%ecx
mov    $0x4002101c,%eax
mov    %ecx,(%rax)
mov    $0x40021018,%eax
mov    (%rax),%ecx
or     $0xa00,%ecx
mov    $0x40021018,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initClock>:
orl    $0x80000000,0x40012410
orl    $0x102,0x4002101c
orl    $0xa00,0x40021018
ret

LLVM IR (-O0):
define void @initClock() {
%1 = load volatile i32, i32* inttoptr (i64 1073816592 to i32*)
%2 = or i32 %1, -2147483648
store volatile i32 %2, i32* inttoptr (i64 1073816592 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1073877020 to i32*)
%4 = or i32 %3, 258
store volatile i32 %4, i32* inttoptr (i64 1073877020 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1073877016 to i32*)
%6 = or i32 %5, 2560
store volatile i32 %6, i32* inttoptr (i64 1073877016 to i32*)
ret void
}

LLVM IR (-O2):
define void @initClock() {
%1 = load volatile i32, i32* inttoptr (i64 1073816592 to i32*)
%2 = or i32 %1, -2147483648
store volatile i32 %2, i32* inttoptr (i64 1073816592 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1073877020 to i32*)
%4 = or i32 %3, 258
store volatile i32 %4, i32* inttoptr (i64 1073877020 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1073877016 to i32*)
%6 = or i32 %5, 2560
store volatile i32 %6, i32* inttoptr (i64 1073877016 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dbprintf(char *, int, int, int, int);
void explainrow(int r) {
  dbprintf("row %d (%d,%d)=%d\n", r, r / 81 + 1, (r / 9) % 9 + 1, r % 9 + 1);
}


x86 assembly (clang, -O0):
<explainrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%eax
mov    $0x51,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%eax
mov    $0x9,%edi
cltd
idiv   %edi
mov    %edx,%r8d
mov    -0x8(%rbp),%edx
add    $0x1,%r8d
lea    0xe9d(%rip),%rdi
call   1030 <dbprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explainrow>:
movslq %edi,%rsi
imul   $0x1948b0fd,%rsi,%rax
mov    %rax,%rcx
sar    $0x23,%rcx
shr    $0x3f,%rax
lea    (%rcx,%rax,1),%edx
add    $0x1,%edx
imul   $0x38e38e39,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x21,%rcx
add    %edi,%ecx
lea    (%rcx,%rcx,8),%r8d
lea    (%rax,%rax,8),%edi
mov    %eax,%ecx
sub    %r8d,%ecx
add    $0x1,%ecx
neg    %edi
lea    (%rsi,%rdi,1),%r8d
add    $0x1,%r8d
lea    0xe8b(%rip),%rdi
jmp    1030 <dbprintf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"row %d (%d,%d)=%d\0A\00"
define void @explainrow(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 81
%6 = add nsw i32 %5, 1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 9
%9 = srem i32 %8, 9
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %2
%12 = srem i32 %11, 9
%13 = add nsw i32 %12, 1
%14 = call i32 @dbprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6, i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"row %d (%d,%d)=%d\0A\00"
define void @explainrow(i32 %0) {
%2 = sdiv i32 %0, 81
%3 = add nsw i32 %2, 1
%4 = sdiv i32 %0, 9
%5 = srem i32 %4, 9
%6 = add nsw i32 %5, 1
%7 = srem i32 %0, 9
%8 = add nsw i32 %7, 1
%9 = tail call i32 @dbprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %3, i32 %6, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core1_print(char *, char const *);
void U_EMRPOLYBEZIERTO_print(const char *contents) {
  core1_print("U_EMRPOLYBEZIERTO", contents);
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"U_EMRPOLYBEZIERTO\00"
define void @U_EMRPOLYBEZIERTO_print(i8* %0) {
%2 = tail call i32 @core1_print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fmuld(int s1, int s2, int d) {
  assem_debug("fmuld d%d,d%d,d%d", d, s1, s2);
  output_w32(0xee200b00 | ((d & 7) << 12) | ((s1 & 7) << 16) | (s2 & 7));
}


x86 assembly (clang, -O0):
<emit_fmuld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0xc(%rbp),%edi
and    $0x7,%edi
shl    $0xc,%edi
or     $0xee200b00,%edi
mov    -0x4(%rbp),%eax
and    $0x7,%eax
shl    $0x10,%eax
or     %eax,%edi
mov    -0x8(%rbp),%eax
and    $0x7,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fmuld>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xece(%rip),%rdi
mov    %edx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <assem_debug@plt>
and    $0x7,%r14d
shl    $0xc,%r14d
and    $0x7,%ebp
shl    $0x10,%ebp
and    $0x7,%ebx
or     %ebp,%ebx
lea    (%r14,%rbx,1),%edi
add    $0xee200b00,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"fmuld d%d,d%d,d%d\00"
define void @emit_fmuld(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 = load i32, i32* %5
%10 = call i32 @assem_debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = and i32 %11, 7
%13 = shl i32 %12, 12
%14 = or i32 -299889920, %13
%15 = load i32, i32* %4
%16 = and i32 %15, 7
%17 = shl i32 %16, 16
%18 = or i32 %14, %17
%19 = load i32, i32* %5
%20 = and i32 %19, 7
%21 = or i32 %18, %20
%22 = call i32 @output_w32(i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"fmuld d%d,d%d,d%d\00"
define void @emit_fmuld(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @assem_debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0, i32 %1)
%5 = shl i32 %2, 12
%6 = and i32 %5, 28672
%7 = shl i32 %0, 16
%8 = and i32 %7, 458752
%9 = and i32 %1, 7
%10 = or i32 %8, %9
%11 = or i32 %10, %6
%12 = or i32 %11, -299889920
%13 = tail call i32 @output_w32(i32 %12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t smpte_fec_get_offset(const uint8_t *p_fec) { return p_fec[13]; }


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

x86 assembly (clang, -O2):
<smpte_fec_get_offset>:
mov    0x34(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @smpte_fec_get_offset(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 13
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @smpte_fec_get_offset(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 13
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ help_req();
int /*<<< orphan*/ nvo_cmd_req();
void commandlist() {
  help_req();
  nvo_cmd_req();
}


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

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

LLVM IR (-O0):
define void @commandlist() {
%1 = call i32 (...) @help_req()
%2 = call i32 (...) @nvo_cmd_req()
ret void
}

LLVM IR (-O2):
define void @commandlist() {
%1 = tail call i32 (...) @help_req()
%2 = tail call i32 (...) @nvo_cmd_req()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
long _lseek(int, long, int /*<<< orphan*/);
long int filelength(int fd) {
  long int cur = _lseek(fd, 0, SEEK_CUR);
  long int fsize = _lseek(fd, 0, SEEK_END);
  _lseek(fd, cur, SEEK_SET);
  return fsize;
}


x86 assembly (clang, -O0):
<filelength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <_lseek@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <_lseek@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
call   1030 <_lseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filelength>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <_lseek@plt>
mov    %rax,%r14
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <_lseek@plt>
mov    %rax,%r15
mov    0x2e8a(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <_lseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filelength(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @SEEK_CUR
%7 = call i64 @_lseek(i32 %5, i64 0, i32 %6)
store i64 %7, i64* %3
%8 = load i32, i32* %2
%9 = load i32, i32* @SEEK_END
%10 = call i64 @_lseek(i32 %8, i64 0, i32 %9)
store i64 %10, i64* %4
%11 = load i32, i32* %2
%12 = load i64, i64* %3
%13 = load i32, i32* @SEEK_SET
%14 = call i64 @_lseek(i32 %11, i64 %12, i32 %13)
%15 = load i64, i64* %4
ret i64 %15
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filelength(i32 %0) {
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i64 @_lseek(i32 %0, i64 0, i32 %2)
%4 = load i32, i32* @SEEK_END
%5 = tail call i64 @_lseek(i32 %0, i64 0, i32 %4)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i64 @_lseek(i32 %0, i64 %3, i32 %6)
ret i64 %5
}
/* Variables and functions */
int f1(int, int);
int /*<<< orphan*/ init_bufs();
int main(int argc, char *argv[]) {
  init_bufs();
  return f1(1, 2);
}


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    $0x0,%al
call   1030 <init_bufs@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <f1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init_bufs@plt>
mov    $0x1,%edi
mov    $0x2,%esi
pop    %rax
jmp    1040 <f1@plt>

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 (...) @init_bufs()
%7 = call i32 @f1(i32 1, i32 2)
ret i32 %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_bufs()
%4 = tail call i32 @f1(i32 1, i32 2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quit();
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_strtol();
int /*<<< orphan*/ test_strtoul();
int main(int argc, char **argv) {
  printf("Test 45 (ACK) ");
  fflush(stdout);
  test_strtol();
  test_strtoul();
  quit();
  return -1;
}


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)
lea    0xe93(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
mov    $0x0,%al
call   1040 <test_strtol@plt>
mov    $0x0,%al
call   1030 <test_strtoul@plt>
mov    $0x0,%al
call   1060 <quit@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
xor    %eax,%eax
call   1040 <test_strtol@plt>
xor    %eax,%eax
call   1030 <test_strtoul@plt>
xor    %eax,%eax
call   1060 <quit@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Test 45 (ACK) \00"
@stdout = global i32 0
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 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = call i32 (...) @test_strtol()
%10 = call i32 (...) @test_strtoul()
%11 = call i32 (...) @quit()
ret i32 -1
}

LLVM IR (-O2):
@.str = [15 x i8] c"Test 45 (ACK) \00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 (...) @test_strtol()
%7 = tail call i32 (...) @test_strtoul()
%8 = tail call i32 (...) @quit()
ret i32 -1
}
void init_fm_rook(int fm[][2]) {
  int i;
  for (i = 0; i < 15; i++) {
    fm[i][0] = -1;
    fm[i][1] = -1;
  }
}


x86 assembly (clang, -O0):
<init_fm_rook>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xf,-0xc(%rbp)
jge    1146 <init_fm_rook+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xffffffff,0x4(%rax,%rcx,8)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_fm_rook+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_fm_rook>:
pcmpeqd %xmm0,%xmm0
movdqu %xmm0,0x60(%rdi)
movdqu %xmm0,0x50(%rdi)
movdqu %xmm0,0x40(%rdi)
movdqu %xmm0,0x30(%rdi)
movdqu %xmm0,0x20(%rdi)
movdqu %xmm0,0x10(%rdi)
movdqu %xmm0,(%rdi)
movq   $0xffffffffffffffff,0x70(%rdi)
ff
ret

LLVM IR (-O0):
define void @init_fm_rook([2 x i32]* %0) {
%2 = alloca [2 x i32]*
%3 = alloca i32
store [2 x i32]* %0, [2 x i32]** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 15
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load [2 x i32]*, [2 x i32]** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 %10
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 -1, i32* %12
%13 = load [2 x i32]*, [2 x i32]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 %15
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 1
store i32 -1, i32* %17
br label %18
18: ; preds = %7
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @init_fm_rook([2 x i32]* nocapture writeonly %0) {
%2 = bitcast [2 x i32]* %0 to i8*
ret void
}
/* Variables and functions */
float sla_rvlg_(float *, float *);
float slaRvlg(float ra, float dec) {
  float RA;
  float DEC;
  float result;
  RA = ra;
  DEC = dec;
  result = sla_rvlg_(&RA, &DEC);
  return result;
}


x86 assembly (clang, -O0):
<slaRvlg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <sla_rvlg_@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaRvlg>:
push   %rax
movss  %xmm0,0x4(%rsp)
movss  %xmm1,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <sla_rvlg_@plt>
pop    %rax
ret

LLVM IR (-O0):
define float @slaRvlg(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %3
store float %1, float* %4
%8 = load float, float* %3
store float %8, float* %5
%9 = load float, float* %4
store float %9, float* %6
%10 = call float @sla_rvlg_(float* %5, float* %6)
store float %10, float* %7
%11 = load float, float* %7
ret float %11
}

LLVM IR (-O2):
define float @slaRvlg(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
store float %0, float* %3
store float %1, float* %4
%7 = call float @sla_rvlg_(float* %3, float* %4)
ret float %7
}