xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ describe_audio_state();
int /*<<< orphan*/ initialize_sndlib();
int main(int argc, char *argv[]) {
  initialize_sndlib();
  describe_audio_state();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initialize_sndlib()
%4 = tail call i32 (...) @describe_audio_state()
ret i32 0
}
/* Variables and functions */
int mus_char_to_bint(unsigned char const *);
int mus_char_to_lint(unsigned char const *);
int big_or_little_endian_int(const unsigned char *n, int little) {
  if (little)
    return (mus_char_to_lint(n));
  return (mus_char_to_bint(n));
}


x86 assembly (clang, -O0):
<big_or_little_endian_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114a <big_or_little_endian_int+0x2a>
mov    -0x10(%rbp),%rdi
call   1040 <mus_char_to_lint@plt>
mov    %eax,-0x4(%rbp)
jmp    1156 <big_or_little_endian_int+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <mus_char_to_bint@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big_or_little_endian_int>:
test   %esi,%esi
je     1129 <big_or_little_endian_int+0x9>
jmp    1040 <mus_char_to_lint@plt>
jmp    1030 <mus_char_to_bint@plt>

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

LLVM IR (-O2):
define i32 @big_or_little_endian_int(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @mus_char_to_lint(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @mus_char_to_bint(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ EVP_PKEY_free(int /*<<< orphan*/ *);
void freeKey(EVP_PKEY *key) { EVP_PKEY_free(key); }


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

x86 assembly (clang, -O2):
<freeKey>:
jmp    1030 <EVP_PKEY_free@plt>

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

LLVM IR (-O2):
define void @freeKey(i32* %0) {
%2 = tail call i32 @EVP_PKEY_free(i32* %0)
ret void
}
/* Variables and functions */
double __ocml_fmod_f64(double, double);
double fmod(double x, double y) { return __ocml_fmod_f64(x, y); }


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__ocml_fmod_f64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
jmp    1030 <__ocml_fmod_f64@plt>

LLVM IR (-O0):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ocml_fmod_f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = tail call double @__ocml_fmod_f64(double %0, double %1)
ret double %3
}
/* Variables and functions */
char *malloc(int);
*odwrocona(int a) {
  char *znaki = malloc(4);
  znaki[0] = '0';
  znaki[1] = '1';
  znaki[2] = '4';
  znaki[3] = '1';
  return znaki;
}


x86 assembly (clang, -O0):
<odwrocona>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x30,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x31,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x34,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x31,0x3(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odwrocona>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x31343130,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i32* @odwrocona(i32 %0) {
%2 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
store i8 48, i8* %2
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8 49, i8* %3
%4 = getelementptr inbounds i8, i8* %2, i64 2
store i8 52, i8* %4
%5 = getelementptr inbounds i8, i8* %2, i64 3
store i8 49, i8* %5
%6 = bitcast i8* %2 to i32*
ret i32* %6
}
void printchar(char **str, int c) {
  extern int putchar(int c);
  if (str) {
    **str = c;
    ++(*str);
  } else
    ;
}


x86 assembly (clang, -O0):
<printchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <printchar+0x37>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    113c <printchar+0x3c>
jmp    113c <printchar+0x3c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printchar>:
test   %rdi,%rdi
je     110f <printchar+0xf>
mov    (%rdi),%rax
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @printchar(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 = icmp ne i8** %5, null
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i8
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
store i8 %9, i8* %11
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %12
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %7
ret void
}

LLVM IR (-O2):
define void @printchar(i8** %0, i32 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = trunc i32 %1 to i8
%6 = load i8*, i8** %0
store i8 %5, i8* %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
br label %9
9: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AccelSensorHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void AccelSensorUpdated() { UAVObjUpdated(AccelSensorHandle()); }


x86 assembly (clang, -O0):
<AccelSensorUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AccelSensorHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @AccelSensorUpdated() {
%1 = call i32 (...) @AccelSensorHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AccelSensorUpdated() {
%1 = tail call i32 (...) @AccelSensorHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct _info {
  int dummy;
};

/* Variables and functions */
int scan_infos(struct _info const *, int /*<<< orphan*/, int);
int noautoremove(const struct _info *lst, uid_t id) {
  return scan_infos(lst, id, 0x0010);
}


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

x86 assembly (clang, -O2):
<noautoremove>:
mov    $0x10,%edx
jmp    1030 <scan_infos@plt>

LLVM IR (-O0):
%struct._info = type { i32 }
define i32 @noautoremove(%struct._info* %0, i32 %1) {
%3 = alloca %struct._info*
%4 = alloca i32
store %struct._info* %0, %struct._info** %3
store i32 %1, i32* %4
%5 = load %struct._info*, %struct._info** %3
%6 = load i32, i32* %4
%7 = call i32 @scan_infos(%struct._info* %5, i32 %6, i32 16)
ret i32 %7
}

LLVM IR (-O2):
%struct._info = type { i32 }
define i32 @noautoremove(%struct._info* %0, i32 %1) {
%3 = tail call i32 @scan_infos(%struct._info* %0, i32 %1, i32 16)
ret i32 %3
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ getppid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void child_main() {
  struct timespec ts;
  ts.tv_sec = 0;
  ts.tv_nsec = 100000;
  while (1) {
    kill(getppid(), SIGUSR1);
    nanosleep(&ts, NULL);
  }
}


x86 assembly (clang, -O0):
<child_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x186a0,-0x10(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %eax,%edi
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
jmp    1147 <child_main+0x17>

x86 assembly (clang, -O2):
<child_main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x186a0,0x8(%rsp)
mov    0x2e99(%rip),%r14
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <getppid@plt>
mov    (%r14),%esi
mov    %eax,%edi
call   1040 <kill@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
jmp    1160 <child_main+0x30>

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@SIGUSR1 = global i32 0
define void @child_main() {
%1 = alloca %struct.timespec
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i32 100000, i32* %3
br label %4
4: ; preds = %0, %4
%5 = call i32 (...) @getppid()
%6 = load i32, i32* @SIGUSR1
%7 = call i32 @kill(i32 %5, i32 %6)
%8 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
br label %4
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@SIGUSR1 = global i32 0
define void @child_main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 100000, i32* %4
br label %5
5: ; preds = %5, %0
%6 = call i32 (...) @getppid()
%7 = load i32, i32* @SIGUSR1
%8 = call i32 @kill(i32 %6, i32 %7)
%9 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
br label %5
}
void chomp(char *s) {
  while (*s && *s != '\n' && *s != '\r' && *s != '_' && *s != '"' && *s != '\'')
    s++;
  *s = 0;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1181 <chomp+0x81>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1181 <chomp+0x81>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
mov    %al,-0x9(%rbp)
je     1181 <chomp+0x81>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x5f,%ecx
mov    %al,-0x9(%rbp)
je     1181 <chomp+0x81>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x9(%rbp)
je     1181 <chomp+0x81>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1191 <chomp+0x91>
jmp    11a2 <chomp+0xa2>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <chomp+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
movabs $0x8400002401,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi),%ecx
cmp    $0x27,%rcx
ja     111f <chomp+0x1f>
bt     %rcx,%rax
jb     112a <chomp+0x2a>
cmp    $0x5f,%cl
je     112a <chomp+0x2a>
add    $0x1,%rdi
jmp    1110 <chomp+0x10>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @chomp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %35, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %33
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %33
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 13
br i1 %17, label %18, label %33
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 95
br i1 %22, label %23, label %33
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 34
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = load i8*, i8** %2
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 39
br label %33
33: ; preds = %28, %23, %18, %13, %8, %3
%34 = phi i1 [ false, %23 ], [ false, %18 ], [ false, %13 ], [ false, %8 ], [ false, %3 ], [ %32, %28 ]
br i1 %34, label %35, label %38
35: ; preds = %33
%36 = load i8*, i8** %2
%37 = getelementptr inbounds i8, i8* %36, i32 1
store i8* %37, i8** %2
br label %3
38: ; preds = %33
%39 = load i8*, i8** %2
store i8 0, i8* %39
ret void
}

LLVM IR (-O2):
define void @chomp(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 10, label %7
i8 13, label %7
i8 95, label %7
i8 34, label %7
i8 39, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2, %2, %2, %2
store i8 0, i8* %3
ret void
}
int ut_size_unicode(unsigned long unicode) {
  if (!(unicode & ~0x7F)) {
    return 1;
  } else if (!(unicode & ~0x7FF)) {
    return 2;
  } else if (!(unicode & ~0xFFFF)) {
    return 3;
  } else if (unicode <= 0x10FFFF) {
    return 4;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ut_size_unicode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffffffffffffff80,%rax
cmp    $0x0,%rax
jne    1126 <ut_size_unicode+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1187 <ut_size_unicode+0x87>
mov    -0x10(%rbp),%rax
and    $0xfffffffffffff800,%rax
cmp    $0x0,%rax
jne    1146 <ut_size_unicode+0x46>
movl   $0x2,-0x4(%rbp)
jmp    1187 <ut_size_unicode+0x87>
mov    -0x10(%rbp),%rax
and    $0xffffffffffff0000,%rax
cmp    $0x0,%rax
jne    1166 <ut_size_unicode+0x66>
movl   $0x3,-0x4(%rbp)
jmp    1187 <ut_size_unicode+0x87>
cmpq   $0x10ffff,-0x10(%rbp)
ja     1180 <ut_size_unicode+0x80>
movl   $0x4,-0x4(%rbp)
jmp    1187 <ut_size_unicode+0x87>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut_size_unicode>:
mov    $0x1,%eax
cmp    $0x80,%rdi
jb     1139 <ut_size_unicode+0x39>
mov    $0x2,%eax
cmp    $0x800,%rdi
jb     1139 <ut_size_unicode+0x39>
mov    $0x3,%eax
cmp    $0x10000,%rdi
jb     1139 <ut_size_unicode+0x39>
xor    %eax,%eax
cmp    $0x110000,%rdi
setb   %al
shl    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @ut_size_unicode(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = and i64 %4, -128
%6 = icmp ne i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %23
8: ; preds = %1
%9 = load i64, i64* %3
%10 = and i64 %9, -2048
%11 = icmp ne i64 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 2, i32* %2
br label %23
13: ; preds = %8
%14 = load i64, i64* %3
%15 = and i64 %14, -65536
%16 = icmp ne i64 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %13
store i32 3, i32* %2
br label %23
18: ; preds = %13
%19 = load i64, i64* %3
%20 = icmp ule i64 %19, 1114111
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 4, i32* %2
br label %23
22: ; preds = %18
store i32 0, i32* %2
br label %23
23: ; preds = %22, %21, %17, %12, %7
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @ut_size_unicode(i64 %0) {
%2 = icmp ult i64 %0, 128
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 2048
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i64 %0, 65536
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i64 %0, 1114112
%9 = select i1 %8, i32 4, i32 0
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;
typedef int int16_t;

/* Variables and functions */
void packi16(uint8_t *buf, int16_t i) {
  uint16_t i2 = i;
  *buf++ = i2 >> 8;
  *buf++ = i2;
}


x86 assembly (clang, -O0):
<packi16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<packi16>:
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,(%rdi)
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @packi16(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = ashr i32 %7, 8
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %3
store i32 %8, i32* %9
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %3
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @packi16(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %0
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ event_thread_lib_shutdown();
int /*<<< orphan*/ printf(char *, int);
void sig_handler(int signo) {
  printf("Received signal %d, quitting..\n", signo);
  event_thread_lib_shutdown();
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <event_thread_lib_shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <event_thread_lib_shutdown@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Received signal %d, quitting..\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @event_thread_lib_shutdown()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Received signal %d, quitting..\0A\00"
define void @sig_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @event_thread_lib_shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  glEnable(GL_DEPTH_TEST);
  glClearColor(0.25, 0.25, 0.25, 1.0);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
movsd  0xeb6(%rip),%xmm2
movsd  0xeb6(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1040 <glClearColor@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm3
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1040 <glClearColor@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <glShadeModel@plt>

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @init() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = call i32 @glEnable(i32 %1)
%3 = call i32 @glClearColor(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01, double 1.000000e+00)
%4 = load i32, i32* @GL_SMOOTH
%5 = call i32 @glShadeModel(i32 %4)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @init() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = tail call i32 @glEnable(i32 %1)
%3 = tail call i32 @glClearColor(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01, double 1.000000e+00)
%4 = load i32, i32* @GL_SMOOTH
%5 = tail call i32 @glShadeModel(i32 %4)
ret void
}
void SCB_1_ScbEnableIntr(void) {}


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

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

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

LLVM IR (-O2):
define void @SCB_1_ScbEnableIntr() {
ret void
}
/* Variables and functions */
double doubleme();
int main() {
  double x = doubleme();
  return (99);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double (...) @doubleme()
ret i32 99
}
/* Variables and functions */
char *parcel_getItemFromJSON(char const *, char *);
int /*<<< orphan*/ puts(char const *);
int main(void) {
  const char *json = "{ \"test\":\"json\" }";
  const char *str = parcel_getItemFromJSON(json, "test");
  puts(str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
call   1040 <parcel_getItemFromJSON@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1040 <parcel_getItemFromJSON@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"{ \22test\22:\22json\22 }\00"
@.str.1 = [5 x i8] c"test\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i8* @parcel_getItemFromJSON(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @puts(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"{ \22test\22:\22json\22 }\00"
@.str.1 = [5 x i8] c"test\00"
define i32 @main() {
%1 = tail call i8* @parcel_getItemFromJSON(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) %1)
ret i32 0
}
int evfilt_user_knote_create(struct filter *filt, struct knote *kn) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.filter = type opaque
%struct.knote = type opaque
define i32 @evfilt_user_knote_create(%struct.filter* %0, %struct.knote* %1) {
%3 = alloca %struct.filter*
%4 = alloca %struct.knote*
store %struct.filter* %0, %struct.filter** %3
store %struct.knote* %1, %struct.knote** %4
ret i32 0
}

LLVM IR (-O2):
%struct.filter = type opaque
%struct.knote = type opaque
define i32 @evfilt_user_knote_create(%struct.filter* nocapture readnone %0, %struct.knote* nocapture readnone %1) {
ret i32 0
}
dot() {}


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

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

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

LLVM IR (-O2):
define i32 @dot() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srl_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test63(__m64 a, __m64 b) { return _mm_srl_pi32(a, b); }


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

x86 assembly (clang, -O2):
<test63>:
jmp    1030 <_mm_srl_pi32@plt>

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

LLVM IR (-O2):
define i32 @test63(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_srl_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct UPort {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PortFail(struct UPort *, char *);
int /*<<< orphan*/ SetDwireBaud(struct UPort *);
int /*<<< orphan*/ digisparkBufferFlush(struct UPort *, int);
void DigisparkSync(struct UPort *up) {
  digisparkBufferFlush(up, 0x24);
  if (!SetDwireBaud(up)) {
    PortFail(up,
             "Could not read back timings following transfer and sync command");
  }
}


x86 assembly (clang, -O0):
<DigisparkSync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x24,%esi
call   1040 <digisparkBufferFlush@plt>
mov    -0x8(%rbp),%rdi
call   1050 <SetDwireBaud@plt>
cmp    $0x0,%eax
jne    116c <DigisparkSync+0x3c>
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <PortFail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DigisparkSync>:
push   %rbx
mov    %rdi,%rbx
mov    $0x24,%esi
call   1040 <digisparkBufferFlush@plt>
mov    %rbx,%rdi
call   1050 <SetDwireBaud@plt>
test   %eax,%eax
je     114c <DigisparkSync+0x1c>
pop    %rbx
ret
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <PortFail@plt>

LLVM IR (-O0):
%struct.UPort = type { i32 }
@.str = [64 x i8] c"Could not read back timings following transfer and sync command\00"
define void @DigisparkSync(%struct.UPort* %0) {
%2 = alloca %struct.UPort*
store %struct.UPort* %0, %struct.UPort** %2
%3 = load %struct.UPort*, %struct.UPort** %2
%4 = call i32 @digisparkBufferFlush(%struct.UPort* %3, i32 36)
%5 = load %struct.UPort*, %struct.UPort** %2
%6 = call i32 @SetDwireBaud(%struct.UPort* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load %struct.UPort*, %struct.UPort** %2
%10 = call i32 @PortFail(%struct.UPort* %9, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.UPort = type { i32 }
@.str = [64 x i8] c"Could not read back timings following transfer and sync command\00"
define void @DigisparkSync(%struct.UPort* %0) {
%2 = tail call i32 @digisparkBufferFlush(%struct.UPort* %0, i32 36)
%3 = tail call i32 @SetDwireBaud(%struct.UPort* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @PortFail(%struct.UPort* %0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
int unsetenv(char *name) {}


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

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

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

LLVM IR (-O2):
define i32 @unsetenv(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int random32_value();
unsigned long random32_bit(unsigned long totalBit) {
  unsigned long value;
  unsigned long i;
  value = 0;
  for (i = 0; i < totalBit; i++) {
    value <<= 1;
    value |= (random32_value() & 1);
  }
  return value;
}


x86 assembly (clang, -O0):
<random32_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116b <random32_bit+0x5b>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random32_value@plt>
and    $0x1,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112c <random32_bit+0x1c>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random32_bit>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1136 <random32_bit+0x26>
mov    %rdi,%r14
xor    %ebx,%ebx
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <random32_value@plt>
and    $0x1,%eax
lea    (%rax,%rbx,2),%rbx
add    $0xffffffffffffffff,%r14
jne    1120 <random32_bit+0x10>
jmp    1138 <random32_bit+0x28>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @random32_bit(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
store i64 0, i64* %4
br label %5
5: ; preds = %17, %1
%6 = load i64, i64* %4
%7 = load i64, i64* %2
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i64, i64* %3
%11 = shl i64 %10, 1
store i64 %11, i64* %3
%12 = call i32 (...) @random32_value()
%13 = and i32 %12, 1
%14 = sext i32 %13 to i64
%15 = load i64, i64* %3
%16 = or i64 %15, %14
store i64 %16, i64* %3
br label %17
17: ; preds = %9
%18 = load i64, i64* %4
%19 = add i64 %18, 1
store i64 %19, i64* %4
br label %5
20: ; preds = %5
%21 = load i64, i64* %3
ret i64 %21
}

LLVM IR (-O2):
define i64 @random32_bit(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %11, %3 ], [ 0, %1 ]
%5 = phi i64 [ %10, %3 ], [ 0, %1 ]
%6 = shl i64 %5, 1
%7 = tail call i32 (...) @random32_value()
%8 = and i32 %7, 1
%9 = zext i32 %8 to i64
%10 = or i64 %6, %9
%11 = add nuw i64 %4, 1
%12 = icmp eq i64 %11, %0
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i64 [ 0, %1 ], [ %10, %3 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ CloseLog();
int /*<<< orphan*/ FinishSound();
int /*<<< orphan*/ Log(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
OutOfMemory() {
  Log("OutOfMemory: Out of memory!  Panicking!!");
  FinishSound();
  CloseLog();
  exit(0);
}


x86 assembly (clang, -O0):
<OutOfMemory>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <Log@plt>
mov    $0x0,%al
call   1050 <FinishSound@plt>
mov    $0x0,%al
call   1030 <CloseLog@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<OutOfMemory>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <Log@plt>
xor    %eax,%eax
call   1050 <FinishSound@plt>
xor    %eax,%eax
call   1030 <CloseLog@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"OutOfMemory: Out of memory! Panicking!!\00"
define i32 @OutOfMemory() {
%1 = call i32 @Log(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @FinishSound()
%3 = call i32 (...) @CloseLog()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"OutOfMemory: Out of memory! Panicking!!\00"
define i32 @OutOfMemory() {
%1 = tail call i32 @Log(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @FinishSound()
%3 = tail call i32 (...) @CloseLog()
%4 = tail call i32 @exit(i32 0)
unreachable
}
int do_033() { return 33; }


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

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

LLVM IR (-O0):
define i32 @do_033() {
ret i32 33
}

LLVM IR (-O2):
define i32 @do_033() {
ret i32 33
}
void metautils_set_vtable_syscall(struct metautils_syscalls_vtable_s *vtable) {
  (void)vtable;
}


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

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

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

LLVM IR (-O2):
%struct.metautils_syscalls_vtable_s = type opaque
define void @metautils_set_vtable_syscall(%struct.metautils_syscalls_vtable_s* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int SIGFPE;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void field_fpe(int sig) {
  assert(sig == SIGFPE);
  puts("SUCCESS testing <signal.h>");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<field_fpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<field_fpe>:
push   %rax
mov    0x2eb0(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SIGFPE = global i32 0
@.str = [27 x i8] c"SUCCESS testing <signal.h>\00"
@EXIT_SUCCESS = global i32 0
define void @field_fpe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGFPE
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@SIGFPE = global i32 0
@.str = [27 x i8] c"SUCCESS testing <signal.h>\00"
@EXIT_SUCCESS = global i32 0
define void @field_fpe(i32 %0) {
%2 = load i32, i32* @SIGFPE
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Type definitions */
struct client {
  int dummy;
};
struct bufferevent {
  int dummy;
};

/* Variables and functions */
short BEV_EVENT_CONNECTED;
int /*<<< orphan*/ free_client(struct client *);
void client_eventcb(struct bufferevent *bev, short events, void *context) {
  if (events != BEV_EVENT_CONNECTED)
    free_client((struct client *)context);
  ;
}


x86 assembly (clang, -O0):
<client_eventcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
movswl -0xa(%rbp),%eax
mov    0x2eae(%rip),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
je     1146 <client_eventcb+0x36>
mov    -0x18(%rbp),%rdi
call   1030 <free_client@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_eventcb>:
mov    0x2ec9(%rip),%rax
cmp    %si,(%rax)
jne    111d <client_eventcb+0xd>
ret
mov    %rdx,%rdi
jmp    1030 <free_client@plt>

LLVM IR (-O0):
%struct.bufferevent = type { i32 }
%struct.client = type { i32 }
@BEV_EVENT_CONNECTED = global i16 0
define void @client_eventcb(%struct.bufferevent* %0, i16 signext %1, i8* %2) {
%4 = alloca %struct.bufferevent*
%5 = alloca i16
%6 = alloca i8*
store %struct.bufferevent* %0, %struct.bufferevent** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = load i16, i16* %5
%8 = sext i16 %7 to i32
%9 = load i16, i16* @BEV_EVENT_CONNECTED
%10 = sext i16 %9 to i32
%11 = icmp ne i32 %8, %10
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = bitcast i8* %13 to %struct.client*
%15 = call i32 @free_client(%struct.client* %14)
br label %16
16: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
%struct.client = type { i32 }
@BEV_EVENT_CONNECTED = global i16 0
define void @client_eventcb(%struct.bufferevent* nocapture readnone %0, i16 signext %1, i8* %2) {
%4 = load i16, i16* @BEV_EVENT_CONNECTED
%5 = icmp eq i16 %4, %1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = bitcast i8* %2 to %struct.client*
%8 = tail call i32 @free_client(%struct.client* %7)
br label %9
9: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("Interpret programovaciho jazyka IFJ06 (2006)\n"
         "Autori:\n"
         "    Lukas Marsik, xmarsi03@stud.fit.vutbr.cz\n"
         "    Libor Polcak, xpolca03@stud.fit.vutbr.cz\n"
         "    Boris Prochazka, xproch63@stud.fit.vutbr.cz\n"
         "    Martin Tomec, xtomec05@stud.fit.vutbr.cz\n"
         "    Petr Zemek, xzemek02@stud.fit.vutbr.cz\n"
         "\n"
         "Pouziti: ifj06 [volby] zdrojovy_soubor\n"
         "Volby:\n"
         "  -h --help  Zobrazi tuto napovedu k programu\n");
}


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

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

LLVM IR (-O0):
@.str = [373 x i8] c"Interpret programovaciho jazyka IFJ06 (2006)\0AAutori:\0A Lukas Marsik, xmarsi03@stud.fit.vutbr.cz\0A Libor Polcak, xpolca03@stud.fit.vutbr.cz\0A Boris Prochazka, xproch63@stud.fit.vutbr.cz\0A Martin Tomec, xtomec05@stud.fit.vutbr.cz\0A Petr Zemek, xzemek02@stud.fit.vutbr.cz\0A\0APouziti: ifj06 [volby] zdrojovy_soubor\0AVolby:\0A -h --help Zobrazi tuto napovedu k programu\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([373 x i8], [373 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [372 x i8] c"Interpret programovaciho jazyka IFJ06 (2006)\0AAutori:\0A Lukas Marsik, xmarsi03@stud.fit.vutbr.cz\0A Libor Polcak, xpolca03@stud.fit.vutbr.cz\0A Boris Prochazka, xproch63@stud.fit.vutbr.cz\0A Martin Tomec, xtomec05@stud.fit.vutbr.cz\0A Petr Zemek, xzemek02@stud.fit.vutbr.cz\0A\0APouziti: ifj06 [volby] zdrojovy_soubor\0AVolby:\0A -h --help Zobrazi tuto napovedu k programu\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([372 x i8], [372 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void uninitar_fopen(void) {
  char *filename;
  char *mode;
  FILE *fp = fopen(filename, mode);
  fclose(fp);
}


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

x86 assembly (clang, -O2):
<uninitar_fopen>:
push   %rax
call   1040 <fopen@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <fclose@plt>

LLVM IR (-O0):
define void @uninitar_fopen() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32*
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %4, i8* %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @fclose(i32* %7)
ret void
}

LLVM IR (-O2):
define void @uninitar_fopen() {
%1 = tail call i32* @fopen(i8* undef, i8* undef)
%2 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_strcpy(char *, char *, int);
void _start(void) {
  char buff[4];
  my_strcpy(
      buff,
      "AAAABBBBCCCCDDDDEEEEFFFF"
      "\x40\x00\x01\x00\x00\x00\x00\x00"
      "\x20\x00\xff\xff"
      "BBBBCCCCDDDDEEEEFFFFGGGGHHHH"
      "\x90\x90\x90\x90\x90\x31\xc0\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff\x48"
      "\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54\x5e\xb0\x3b\x0f\x05",
      sizeof(
          "AAAABBBBCCCCDDDDEEEEFFFF"
          "\x40\x00\x01\x00\x00\x00\x00\x00"
          "\x20\x00\xff\xff"
          "BBBBCCCCDDDDEEEEFFFFGGGGHHHH"
          "\x90\x90\x90\x90\x90\x31\xc0\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff"
          "\x48\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54\x5e\xb0\x3b\x0f\x05"));
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    0xedd(%rip),%rsi
mov    $0x61,%edx
call   1030 <my_strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdi
mov    $0x61,%edx
call   1030 <my_strcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [97 x i8] c"AAAABBBBCCCCDDDDEEEEFFFF@\00\01\00\00\00\00\00 \00\FF\FFBBBBCCCCDDDDEEEEFFFFGGGGHHHH\90\90\90\90\901\C0H\BB\D1\9D\96\91\D0\8C\97\FFH\F7\DBST_\99RWT^\B0;\0F\05\00"
define void @_start() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_strcpy(i8* %2, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i32 97)
ret void
}

LLVM IR (-O2):
@.str = [97 x i8] c"AAAABBBBCCCCDDDDEEEEFFFF@\00\01\00\00\00\00\00 \00\FF\FFBBBBCCCCDDDDEEEEFFFFGGGGHHHH\90\90\90\90\901\C0H\BB\D1\9D\96\91\D0\8C\97\FFH\F7\DBST_\99RWT^\B0;\0F\05\00"
define void @_start() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_strcpy(i8* %2, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0), i32 97)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __emit_expression_range(int /*<<< orphan*/, int);
void test_logical_negation(int flag) { __emit_expression_range(0, !flag); }


x86 assembly (clang, -O0):
<test_logical_negation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
xor    %edi,%edi
call   1030 <__emit_expression_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_logical_negation>:
xor    %esi,%esi
test   %edi,%edi
sete   %sil
xor    %edi,%edi
jmp    1030 <__emit_expression_range@plt>

LLVM IR (-O0):
define void @test_logical_negation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @__emit_expression_range(i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
define void @test_logical_negation(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @__emit_expression_range(i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fftss_kern_r8_ia64_b(double *, double *, double *, double *,
                                        long, long);
void fftss_r8_ia64_n_b(double *in, double *out, double *w, long bsize,
                       long blocks) {
  fftss_kern_r8_ia64_b(in, out, w, w + bsize * blocks * 12, bsize * blocks,
                       bsize);
}


x86 assembly (clang, -O0):
<fftss_r8_ia64_n_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
imul   -0x28(%rbp),%rax
imul   $0xc,%rax,%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x20(%rbp),%r8
imul   -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <fftss_kern_r8_ia64_b@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftss_r8_ia64_n_b>:
mov    %rcx,%r9
imul   %rcx,%r8
lea    (%r8,%r8,2),%rcx
shl    $0x5,%rcx
add    %rdx,%rcx
jmp    1030 <fftss_kern_r8_ia64_b@plt>

LLVM IR (-O0):
define void @fftss_r8_ia64_n_b(double* %0, double* %1, double* %2, i64 %3, i64 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i64
%10 = alloca i64
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load double*, double** %6
%12 = load double*, double** %7
%13 = load double*, double** %8
%14 = load double*, double** %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = mul nsw i64 %15, %16
%18 = mul nsw i64 %17, 12
%19 = getelementptr inbounds double, double* %14, i64 %18
%20 = load i64, i64* %9
%21 = load i64, i64* %10
%22 = mul nsw i64 %20, %21
%23 = load i64, i64* %9
%24 = call i32 @fftss_kern_r8_ia64_b(double* %11, double* %12, double* %13, double* %19, i64 %22, i64 %23)
ret void
}

LLVM IR (-O2):
define void @fftss_r8_ia64_n_b(double* %0, double* %1, double* %2, i64 %3, i64 %4) {
%6 = mul nsw i64 %4, %3
%7 = mul nsw i64 %6, 12
%8 = getelementptr inbounds double, double* %2, i64 %7
%9 = tail call i32 @fftss_kern_r8_ia64_b(double* %0, double* %1, double* %2, double* %8, i64 %6, i64 %3)
ret void
}
int test_imm_2Auint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x2A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_2Auint64_highword_reg>:
movabs $0x2a00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Auint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 42
%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_2Auint64_highword_reg(i64 %0) {
%2 = and i64 %0, 180388626432
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int _JsDict_Init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_JsDict_Init() {
ret i32 0
}