xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *asciitime() {
  time_t t;
  time(&t);
  return ctime(&t);
}


x86 assembly (clang, -O0):
<asciitime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asciitime>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @asciitime() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = call i8* @ctime(i32* %1)
ret i8* %3
}

LLVM IR (-O2):
define i8* @asciitime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int _mm_cvtsi128_si32(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_si128();
int main(void) {
  __m128i a = _mm_add_epi16(_mm_setzero_si128(), _mm_setzero_si128());
  return _mm_cvtsi128_si32(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <_mm_setzero_si128@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <_mm_setzero_si128@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <_mm_cvtsi128_si32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <_mm_setzero_si128@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <_mm_setzero_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <_mm_cvtsi128_si32@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @_mm_setzero_si128()
%4 = call i32 (...) @_mm_setzero_si128()
%5 = call i32 @_mm_add_epi16(i32 %3, i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @_mm_cvtsi128_si32(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @_mm_setzero_si128()
%2 = tail call i32 (...) @_mm_setzero_si128()
%3 = tail call i32 @_mm_add_epi16(i32 %1, i32 %2)
%4 = tail call i32 @_mm_cvtsi128_si32(i32 %3)
ret i32 %4
}
main() { int i = i; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pios_fbconsole_write(char *);
int cake(int argc, char **argv) {
  pios_fbconsole_write("Oh, you found it.\n");
  pios_fbconsole_write("       ,\n    ___|___\n   {~*~*~*~}\n   `-------`\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<cake>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <pios_fbconsole_write@plt>
lea    0xeef(%rip),%rdi
call   1030 <pios_fbconsole_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Oh, you found it.\0A\00"
@.str.1 = [48 x i8] c" ,\0A ___|___\0A {~*~*~*~}\0A `-------`\0A\00"
define i32 @cake(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @pios_fbconsole_write(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @pios_fbconsole_write(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Oh, you found it.\0A\00"
@.str.1 = [48 x i8] c" ,\0A ___|___\0A {~*~*~*~}\0A `-------`\0A\00"
define i32 @cake(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @pios_fbconsole_write(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @pios_fbconsole_write(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put_x_mmx(int, int, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ const *, int);
void MC_put_x_8_mmx(uint8_t *dest, const uint8_t *ref, int stride, int height) {
  MC_put_x_mmx(8, height, dest, ref, stride);
}


x86 assembly (clang, -O0):
<MC_put_x_8_mmx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x8,%edi
call   1030 <MC_put_x_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_x_8_mmx>:
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%rdx
mov    $0x8,%edi
mov    %ecx,%esi
mov    %rax,%rcx
jmp    1030 <MC_put_x_mmx@plt>

LLVM IR (-O0):
define void @MC_put_x_8_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @MC_put_x_mmx(i32 8, i32 %9, i32* %10, i32* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @MC_put_x_8_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put_x_mmx(i32 8, i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
void parse_file(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @parse_file(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ boardCoardStringEqual(char *, char *);
void validStringCopiedToBoardCoordString(void) {
  boardCoardStringEqual("f5", "f5");
}


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

x86 assembly (clang, -O2):
<validStringCopiedToBoardCoordString>:
lea    0xee9(%rip),%rdi
mov    %rdi,%rsi
jmp    1030 <boardCoardStringEqual@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"f5\00"
define void @validStringCopiedToBoardCoordString() {
%1 = call i32 @boardCoardStringEqual(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"f5\00"
define void @validStringCopiedToBoardCoordString() {
%1 = tail call i32 @boardCoardStringEqual(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage:\n");
  printf("    bit_op flag mask\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [22 x i8] c" bit_op flag mask\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [7 x i8] c"usage:\00"
@str.2 = [21 x i8] c" bit_op flag mask\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ alphabet(int /*<<< orphan*/);
void main() { alphabet(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <alphabet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <alphabet@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @alphabet(i32 0)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @alphabet(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ T3D_OutputMessage(char *);
void T3D_PrintHeader(void) {
  T3D_OutputMessage(
      "Syntax : manip2d <input files> -o <output file pattern> [options]\n"
      "\nValid options are :\n\n");
}


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

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

LLVM IR (-O0):
@.str = [89 x i8] c"Syntax : manip2d <input files> -o <output file pattern> [options]\0A\0AValid options are :\0A\0A\00"
define void @T3D_PrintHeader() {
%1 = call i32 @T3D_OutputMessage(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [89 x i8] c"Syntax : manip2d <input files> -o <output file pattern> [options]\0A\0AValid options are :\0A\0A\00"
define void @T3D_PrintHeader() {
%1 = tail call i32 @T3D_OutputMessage(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char toupper(char);
void ht_str_to_upper(char *str) {
  while (*str) {
    *str = toupper(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<ht_str_to_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <ht_str_to_upper+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ht_str_to_upper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_str_to_upper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <ht_str_to_upper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ht_str_to_upper+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ht_str_to_upper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int fc8080_scan_status(void *);
int bbm_com_scan_status(void *handle) {
  int res;
  res = fc8080_scan_status(handle);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_scan_status>:
jmp    1030 <fc8080_scan_status@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_scan_status(i8* %0) {
%2 = tail call i32 @fc8080_scan_status(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_bit_false(int /*<<< orphan*/ volatile *, int);
int /*<<< orphan*/ set_bit_true(int /*<<< orphan*/ volatile *, int);
void set_led_green(volatile uint8_t *buffer) {
  set_bit_true(buffer, 1);
  set_bit_false(buffer, 3);
  set_bit_true(buffer, 2);
}


x86 assembly (clang, -O0):
<set_led_green>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <set_bit_true@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <set_bit_false@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1040 <set_bit_true@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led_green>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <set_bit_true@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <set_bit_false@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
pop    %rbx
jmp    1040 <set_bit_true@plt>

LLVM IR (-O0):
define void @set_led_green(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @set_bit_true(i32* %3, i32 1)
%5 = load i32*, i32** %2
%6 = call i32 @set_bit_false(i32* %5, i32 3)
%7 = load i32*, i32** %2
%8 = call i32 @set_bit_true(i32* %7, i32 2)
ret void
}

LLVM IR (-O2):
define void @set_led_green(i32* %0) {
%2 = tail call i32 @set_bit_true(i32* %0, i32 1)
%3 = tail call i32 @set_bit_false(i32* %0, i32 3)
%4 = tail call i32 @set_bit_true(i32* %0, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void EthernetIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  ;
  ;
  IntRegister(58, pfnHandler);
  IntEnable(58);
}


x86 assembly (clang, -O0):
<EthernetIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x3a,%edi
call   1040 <IntRegister@plt>
mov    $0x3a,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetIntRegister>:
push   %rax
mov    $0x3a,%edi
call   1040 <IntRegister@plt>
mov    $0x3a,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @EthernetIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %4
%6 = bitcast void ()* %5 to void (...)*
%7 = call i32 @IntRegister(i32 58, void (...)* %6)
%8 = call i32 @IntEnable(i32 58)
ret void
}

LLVM IR (-O2):
define void @EthernetIntRegister(i64 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 58, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 58)
ret void
}
/* Variables and functions */
long shim_enosys(int /*<<< orphan*/, unsigned int *, unsigned int *, void *);
long shim_getcpu(unsigned *cpu, unsigned *node, void *tcache) {
  return shim_enosys(0, cpu, node, tcache);
}


x86 assembly (clang, -O0):
<shim_getcpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_getcpu>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i64 @shim_getcpu(i32* %0, i32* %1, i8* %2) {
%4 = tail call i64 @shim_enosys(i32 0, i32* %0, i32* %1, i8* %2)
ret i64 %4
}
void RTUuidIsNull(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUuidIsNull() {
ret void
}
/* Variables and functions */
int get_mixer_value();
int /*<<< orphan*/ iface_set_mixer_value(int);
void update_mixer_value() {
  int val = get_mixer_value();
  iface_set_mixer_value(val >= 0 ? val : 0);
}


x86 assembly (clang, -O0):
<update_mixer_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <get_mixer_value@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1147 <update_mixer_value+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1151 <update_mixer_value+0x31>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1151 <update_mixer_value+0x31>
mov    -0x8(%rbp),%edi
call   1030 <iface_set_mixer_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_mixer_value>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <get_mixer_value@plt>
test   %eax,%eax
cmovns %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <iface_set_mixer_value@plt>

LLVM IR (-O0):
define void @update_mixer_value() {
%1 = alloca i32
%2 = call i32 (...) @get_mixer_value()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i32, i32* %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 0, %7 ]
%10 = call i32 @iface_set_mixer_value(i32 %9)
ret void
}

LLVM IR (-O2):
define void @update_mixer_value() {
%1 = tail call i32 (...) @get_mixer_value()
%2 = icmp sgt i32 %1, 0
%3 = select i1 %2, i32 %1, i32 0
%4 = tail call i32 @iface_set_mixer_value(i32 %3)
ret void
}
int ioprio_value(int class, int prio) { return (class << 13) | prio; }


x86 assembly (clang, -O0):
<ioprio_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xd,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioprio_value>:
mov    %edi,%eax
shl    $0xd,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @ioprio_value(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 = shl i32 %5, 13
%7 = load i32, i32* %4
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ioprio_value(i32 %0, i32 %1) {
%3 = shl i32 %0, 13
%4 = or i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int inb(int);
void datoListo() {
  while (!(inb(0x0260) & 1))
    ;
}


x86 assembly (clang, -O0):
<datoListo>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <datoListo+0x9>
mov    $0x260,%edi
call   1030 <inb@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113b <datoListo+0x2b>
jmp    1140 <datoListo+0x30>
jmp    1119 <datoListo+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<datoListo>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x260,%edi
call   1030 <inb@plt>
test   $0x1,%al
je     1120 <datoListo+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @datoListo() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @inb(i32 608)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @datoListo() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inb(i32 608)
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret void
}
/* Variables and functions */
int write(int, int *, int);
int _write_nonbuf(int c) { return write(1, &c, sizeof(char)); }


x86 assembly (clang, -O0):
<_write_nonbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edx
lea    -0x4(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write_nonbuf>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_write_nonbuf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 1)
ret i32 %3
}

LLVM IR (-O2):
define i32 @_write_nonbuf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 1)
ret i32 %3
}
void gdk_draw_rgb_image_dithalign() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_rgb_image_dithalign() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr,
          "Usage: %s [-rw] [-b block-size] [-i interval-size] [-s offset-step] "
          "[-c count] [-k skip-count] file\n",
          progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [101 x i8] c"Usage: %s [-rw] [-b block-size] [-i interval-size] [-s offset-step] [-c count] [-k skip-count] file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [101 x i8] c"Usage: %s [-rw] [-b block-size] [-i interval-size] [-s offset-step] [-c count] [-k skip-count] file\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef char *uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint32_t inportd(uint16_t port) {
  uint32_t ret;
  asm volatile("in %%dx,%%eax" : "=a"(ret) : "d"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inportd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inportd>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i8* @inportd(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* asm sideeffect "in %dx,%eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @inportd(i32 %0) {
%2 = tail call i8* asm sideeffect "in %dx,%eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
void joinWorkers(pthread_t *tid, int threads) {
  int i = 0;
  for (i = 0; i < threads; i++) {
    pthread_join(tid[i], NULL);
  }
}


x86 assembly (clang, -O0):
<joinWorkers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <joinWorkers+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_join@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <joinWorkers+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<joinWorkers>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1144 <joinWorkers+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
xor    %esi,%esi
call   1030 <pthread_join@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <joinWorkers+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @joinWorkers(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @pthread_join(i32 %9, i32* null)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _insw(unsigned short *, short *, int);
void insw(int port, short *ptr, int len) {
  unsigned short *io_ptr =
      (unsigned short *)(((unsigned long)0x80000000) + port);
  _insw(io_ptr, ptr, len);
}


x86 assembly (clang, -O0):
<insw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x80000000,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <_insw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insw>:
movslq %edi,%rdi
sub    $0xffffffff80000000,%rdi
jmp    1030 <_insw@plt>

LLVM IR (-O0):
define void @insw(i32 %0, i16* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i32
%7 = alloca i16*
store i32 %0, i32* %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = add i64 2147483648, %9
%11 = inttoptr i64 %10 to i16*
store i16* %11, i16** %7
%12 = load i16*, i16** %7
%13 = load i16*, i16** %5
%14 = load i32, i32* %6
%15 = call i32 @_insw(i16* %12, i16* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @insw(i32 %0, i16* %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = add nsw i64 %4, 2147483648
%6 = inttoptr i64 %5 to i16*
%7 = tail call i32 @_insw(i16* %6, i16* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_02(void) { panic("NMI Interrupt", "#--", 0); }


x86 assembly (clang, -O0):
<int_02>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_02>:
lea    0xee9(%rip),%rdi
lea    0xef0(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"NMI Interrupt\00"
@.str.1 = [4 x i8] c"#--\00"
define void @int_02() {
%1 = call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"NMI Interrupt\00"
@.str.1 = [4 x i8] c"#--\00"
define void @int_02() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int keyDestructor(char *key) {
  free(key);
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @keyDestructor(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ link(char const *, char const *);
int slate_LinkFile(const char *pathExisting, const char *pathNew) {
  return !link(pathExisting, pathNew);
}


x86 assembly (clang, -O0):
<slate_LinkFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <link@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slate_LinkFile>:
push   %rax
call   1030 <link@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @slate_LinkFile(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 @link(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @slate_LinkFile(i8* %0, i8* %1) {
%3 = tail call i32 @link(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int Double_compare(double *ptr1, double *ptr2) {
  if (*ptr1 == *ptr2)
    return 0;
  return *ptr1 < *ptr2 ? -1 : 1;
}


x86 assembly (clang, -O0):
<Double_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1134 <Double_compare+0x34>
jp     1134 <Double_compare+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1158 <Double_compare+0x58>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_compare>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
setbe  %cl
xor    %eax,%eax
ucomisd %xmm1,%xmm0
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Double_compare(double* %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = load double*, double** %5
%9 = load double, double* %8
%10 = fcmp oeq double %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %20
12: ; preds = %2
%13 = load double*, double** %4
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = load double, double* %15
%17 = fcmp olt double %14, %16
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 -1, i32 1
store i32 %19, i32* %3
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @Double_compare(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp oeq double %3, %4
%6 = fcmp olt double %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _error(char const *message, int ret) {
  fputs("oinit"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"oinit: \00"
@stderr = global i32 0
define i32 @_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"oinit: \00"
@stderr = global i32 0
define i32 @_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  struct TYPE_2__ *next;
};
typedef TYPE_1__ XExtData;

/* Variables and functions */
void set_XExtData_next(void *_p, void *_v) {
  ((XExtData *)_p)->next = (XExtData *)_v;
}


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

x86 assembly (clang, -O2):
<set_XExtData_next>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { %struct.TYPE_2__* }
define void @set_XExtData_next(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.TYPE_2__*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store %struct.TYPE_2__* %6, %struct.TYPE_2__** %9
ret void
}

LLVM IR (-O2):
define void @set_XExtData_next(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char *);
char *strcat(char *dest, const char *src) {
  size_t n = strlen(dest);
  strcpy((char *)(dest + n), src);
  return dest;
}


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

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    (%rax,%rbx,1),%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @strcpy(i8* %4, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void test98_Test_pollen__run__E() { exit(0); }


x86 assembly (clang, -O0):
<test98_Test_pollen__run__E>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<test98_Test_pollen__run__E>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @test98_Test_pollen__run__E() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @test98_Test_pollen__run__E() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__9__Compare__default__fired();
void Msp430TimerCapComP__9__Compare__fired(void) {
  Msp430TimerCapComP__9__Compare__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__9__Compare__fired() {
%1 = tail call i32 (...) @Msp430TimerCapComP__9__Compare__default__fired()
ret void
}
int square4(int i) { return (i * i); }


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

x86 assembly (clang, -O2):
<square4>:
mov    %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @square4(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ccr_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<ccr_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ccr_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int toupper(int ch) {
  if (ch >= 'a' && ch <= 'z')
    return ch + ('A' - 'a');
  return ch;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x8(%rbp)
jg     1129 <toupper+0x29>
mov    -0x8(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, -32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
bool cmp2(unsigned int a1, unsigned int a2, unsigned int b1, unsigned int b2) {
  if (a1 == b1)
    return (a2 <= b2);
  return (a1 < b1);
}


x86 assembly (clang, -O0):
<cmp2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1132 <cmp2+0x32>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <cmp2+0x43>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp2>:
xor    %eax,%eax
cmp    %ecx,%esi
setbe  %al
xor    %ecx,%ecx
cmp    %edx,%edi
setb   %cl
cmove  %eax,%ecx
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %2
%6 = icmp ule i32 %1, %3
%7 = icmp ult i32 %0, %2
%8 = select i1 %5, i1 %6, i1 %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, char);
void draw_point(int x, int y, char c) {
  printf("\33[%u;%uH%c", y + 1, x + 1, c);
}


x86 assembly (clang, -O0):
<draw_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
lea    0xeca(%rip),%rdi
movsbl -0x9(%rbp),%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_point>:
mov    %edx,%ecx
add    $0x1,%esi
lea    0x1(%rdi),%edx
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[%u;%uH%c\00"
define void @draw_point(i32 %0, i32 %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = load i8, i8* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10, i8 signext %11)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[%u;%uH%c\00"
define void @draw_point(i32 %0, i32 %1, i8 signext %2) {
%4 = add nsw i32 %1, 1
%5 = add nsw i32 %0, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i8 signext %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t gd54xx_get_aperture(uint32_t addr) {
  uint32_t ap = addr >> 22;
  return (uint8_t)(ap & 0x03);
}


x86 assembly (clang, -O0):
<gd54xx_get_aperture>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x16,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gd54xx_get_aperture>:
mov    %edi,%eax
shr    $0x16,%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @gd54xx_get_aperture(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 22
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 3
ret i32 %7
}

LLVM IR (-O2):
define i32 @gd54xx_get_aperture(i32 %0) {
%2 = lshr i32 %0, 22
%3 = and i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum_of_multiples(int);
int main() {
  printf("%d\n", sum_of_multiples(1000));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3e8,%edi
call   1040 <sum_of_multiples@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e8,%edi
call   1040 <sum_of_multiples@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sum_of_multiples(i32 1000)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @sum_of_multiples(i32 1000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
const char *lag_sign_str(int lag) {
  if (lag > 0)
    return "-";
  if (lag < 0)
    return "+";
  else
    return "";
}


x86 assembly (clang, -O0):
<lag_sign_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1121 <lag_sign_str+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <lag_sign_str+0x46>
cmpl   $0x0,-0xc(%rbp)
jge    113b <lag_sign_str+0x3b>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <lag_sign_str+0x46>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lag_sign_str>:
test   %edi,%edi
lea    0xef9(%rip),%rax
lea    0xef3(%rip),%rcx
cmovs  %rax,%rcx
lea    0xee5(%rip),%rax
cmovle %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"+\00"
@.str.2 = [1 x i8] zeroinitializer
define i8* @lag_sign_str(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = icmp slt i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%5 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
/* Variables and functions */
int raid_cpu_match_sse(int, int);
int raid_cpu_has_ssse3(void) { return raid_cpu_match_sse(1 << 9, 1 << 26); }


x86 assembly (clang, -O0):
<raid_cpu_has_ssse3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x200,%edi
mov    $0x4000000,%esi
call   1030 <raid_cpu_match_sse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<raid_cpu_has_ssse3>:
mov    $0x200,%edi
mov    $0x4000000,%esi
jmp    1030 <raid_cpu_match_sse@plt>

LLVM IR (-O0):
define i32 @raid_cpu_has_ssse3() {
%1 = call i32 @raid_cpu_match_sse(i32 512, i32 67108864)
ret i32 %1
}

LLVM IR (-O2):
define i32 @raid_cpu_has_ssse3() {
%1 = tail call i32 @raid_cpu_match_sse(i32 512, i32 67108864)
ret i32 %1
}