xunge/DecIR huggingface dataset:
const char *pathconN_nm10_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathconN_nm10_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <pathconN_nm10_name_out+0x2b>
jmp    111a <pathconN_nm10_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <pathconN_nm10_name_out+0x3b>
jmp    114b <pathconN_nm10_name_out+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathconN_nm10_name_out+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathconN_nm10_name_out+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm10_name_out>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @pathconN_nm10_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
define i8* @pathconN_nm10_name_out(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void test12(int x[const 4]) { int Y[x[1]]; }


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test12(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i32, i64 %8
store i64 %8, i64* %4
%11 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @test12(i32* nocapture %0) {
ret void
}
const char *Int_Description(void) { return "64-bit signed integer Object."; }


x86 assembly (clang, -O0):
<Int_Description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_Description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"64-bit signed integer Object.\00"
define i8* @Int_Description() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [30 x i8] c"64-bit signed integer Object.\00"
define i8* @Int_Description() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int remote_send(char *);
int remote_sig_gui_show(void) { return remote_send("gui show"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"gui show\00"
define i32 @remote_sig_gui_show() {
%1 = call i32 @remote_send(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"gui show\00"
define i32 @remote_sig_gui_show() {
%1 = tail call i32 @remote_send(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ msm_watchdog_reset(int /*<<< orphan*/);
void trigger_watchdog_reset(void) { msm_watchdog_reset(0); }


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

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

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

LLVM IR (-O2):
define void @trigger_watchdog_reset() {
%1 = tail call i32 @msm_watchdog_reset(i32 0)
ret void
}
void test_reply_false_if_term_lt_current_term() {}


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

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

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

LLVM IR (-O2):
define void @test_reply_false_if_term_lt_current_term() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, size_t);
void delete_between(char *string, size_t length, size_t start, size_t end) {
  memmove(string + start, string + end, length - end + 1);
}


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

x86 assembly (clang, -O2):
<delete_between>:
lea    (%rdx,%rdi,1),%rax
lea    (%rdi,%rcx,1),%r8
sub    %rcx,%rsi
lea    0x1(%rsi),%rdx
mov    %rax,%rdi
mov    %r8,%rsi
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define void @delete_between(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %7
%11 = getelementptr inbounds i8, i8* %9, i64 %10
%12 = load i8*, i8** %5
%13 = load i64, i64* %8
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i64, i64* %6
%16 = load i64, i64* %8
%17 = sub i64 %15, %16
%18 = add i64 %17, 1
%19 = call i32 @memmove(i8* %11, i8* %14, i64 %18)
ret void
}

LLVM IR (-O2):
define void @delete_between(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = getelementptr inbounds i8, i8* %0, i64 %2
%6 = getelementptr inbounds i8, i8* %0, i64 %3
%7 = add i64 %1, 1
%8 = sub i64 %7, %3
%9 = tail call i32 @memmove(i8* %5, i8* %6, i64 %8)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_get_fd(void *bus) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_get_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_get_fd>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_get_fd(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void ref_div_int8_t(int8_t arg1, int8_t arg2, int8_t *result) {
  *result = arg1 / arg2;
}


x86 assembly (clang, -O0):
<ref_div_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_div_int8_t>:
mov    %rdx,%rcx
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
define void @ref_div_int8_t(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sdiv i32 %7, %8
%10 = load i32*, i32** %6
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @ref_div_int8_t(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = sdiv i32 %0, %1
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
unsigned int mtdLib_str_splitByDelimiter(char *array_in, char *array_out,
                                         char delimiter) {
  if (strlen(array_in) != strlen(array_out))
    return 1;
  int pos = 0;
}


x86 assembly (clang, -O0):
<mtdLib_str_splitByDelimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1157 <mtdLib_str_splitByDelimiter+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115e <mtdLib_str_splitByDelimiter+0x4e>
movl   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mtdLib_str_splitByDelimiter(i8* nocapture readnone %0, i8* nocapture readnone %1, i8 signext %2) {
ret i32 1
}
void INT_Excep_RSPI0_SPII0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RSPI0_SPII0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __cmpxchg_called_with_bad_pointer();
unsigned long __cmpxchg_u32(void volatile *, unsigned long, unsigned long);
unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
                        unsigned long new, int size) {
  switch (size) {
  case 4:
    return __cmpxchg_u32(ptr, old, new);
  }
  __cmpxchg_called_with_bad_pointer();
  return old;
}


x86 assembly (clang, -O0):
<__cmpxchg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x4,%eax
jne    1162 <__cmpxchg+0x42>
jmp    1148 <__cmpxchg+0x28>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <__cmpxchg_u32@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <__cmpxchg+0x51>
mov    $0x0,%al
call   1030 <__cmpxchg_called_with_bad_pointer@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cmpxchg>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x4,%ecx
jne    1132 <__cmpxchg+0x12>
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <__cmpxchg_u32@plt>
xor    %eax,%eax
call   1030 <__cmpxchg_called_with_bad_pointer@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @__cmpxchg(i8* %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
switch i32 %10, label %16 [
i32 4, label %11
]
11: ; preds = %4
%12 = load i8*, i8** %6
%13 = load i64, i64* %7
%14 = load i64, i64* %8
%15 = call i64 @__cmpxchg_u32(i8* %12, i64 %13, i64 %14)
store i64 %15, i64* %5
br label %19
16: ; preds = %4
%17 = call i32 (...) @__cmpxchg_called_with_bad_pointer()
%18 = load i64, i64* %7
store i64 %18, i64* %5
br label %19
19: ; preds = %16, %11
%20 = load i64, i64* %5
ret i64 %20
}

LLVM IR (-O2):
define i64 @__cmpxchg(i8* %0, i64 %1, i64 %2, i32 %3) {
%5 = icmp eq i32 %3, 4
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i64 @__cmpxchg_u32(i8* %0, i64 %1, i64 %2)
br label %10
8: ; preds = %4
%9 = tail call i32 (...) @__cmpxchg_called_with_bad_pointer()
br label %10
10: ; preds = %8, %6
%11 = phi i64 [ %7, %6 ], [ %1, %8 ]
ret i64 %11
}
void mc_alarm(int signum) { return; }


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

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

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

LLVM IR (-O2):
define void @mc_alarm(i32 %0) {
ret void
}
void _ZTVN5javax8security4sasl23AuthenticationExceptionE(void) {}


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

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

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

LLVM IR (-O2):
define void @_ZTVN5javax8security4sasl23AuthenticationExceptionE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_stratego_comments() {
  test_parser_verify_parse(test_parser_sourcefile("stratego", " // comment"),
                           "stratego", "", "// comment", 0);
}


x86 assembly (clang, -O0):
<test_stratego_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xebc(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stratego_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xeda(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xeca(%rip),%rdx
lea    0xec5(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"stratego\00"
@.str.1 = [12 x i8] c" // comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [11 x i8] c"// comment\00"
define void @test_stratego_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"stratego\00"
@.str.1 = [12 x i8] c" // comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [11 x i8] c"// comment\00"
define void @test_stratego_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
void ADC0_ISR(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC0_ISR() {
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ sa_cli;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int accept_and(int listen_sock) {
  int sock;
  struct sockaddr_in sa_cli;
  size_t client_len;
  client_len = sizeof(sa_cli);
  sock =
      accept(listen_sock, (struct sockaddr *)&sa_cli, (socklen_t *)&client_len);
  return sock;
}


x86 assembly (clang, -O0):
<accept_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x4,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_and>:
sub    $0x18,%rsp
movq   $0x4,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_and(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca i64
store i32 %0, i32* %2
store i64 4, i64* %5
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = bitcast i64* %5 to i32*
%9 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_and(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i64
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i64* %3 to i8*
store i64 4, i64* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = bitcast i64* %3 to i32*
%8 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long);
int main(void) {
  long num = 5;
  long count = 1;
  while (num <= 150) {
    num = (num - count) * 2;
    printf("After the week %ld, the number of friends is %ld.\n", count, num);
    count++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x5,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
cmpq   $0x96,-0x10(%rbp)
jg     1172 <main+0x62>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112f <main+0x1f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    $0x5,%r13d
mov    $0x1,%r12d
xor    %ebx,%ebx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
lea    (%rbx,%r13,1),%rax
lea    (%rax,%rax,1),%r15
add    $0xfffffffffffffffe,%r15
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <printf@plt>
add    $0x1,%r12
lea    (%rbx,%r13,1),%rax
add    $0xffffffffffffffff,%rax
add    $0xffffffffffffffff,%rbx
mov    %r15,%r13
cmp    $0x4c,%rax
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [51 x i8] c"After the week %ld, the number of friends is %ld.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 5, i64* %2
store i64 1, i64* %3
br label %4
4: ; preds = %7, %0
%5 = load i64, i64* %2
%6 = icmp sle i64 %5, 150
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = sub nsw i64 %8, %9
%11 = mul nsw i64 %10, 2
store i64 %11, i64* %2
%12 = load i64, i64* %3
%13 = load i64, i64* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i64 %12, i64 %13)
%15 = load i64, i64* %3
%16 = add nsw i64 %15, 1
store i64 %16, i64* %3
br label %4
17: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [51 x i8] c"After the week %ld, the number of friends is %ld.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 1, %0 ], [ %7, %1 ]
%3 = phi i64 [ 5, %0 ], [ %5, %1 ]
%4 = sub nsw i64 %3, %2
%5 = shl nsw i64 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i64 %2, i64 %5)
%7 = add nuw nsw i64 %2, 1
%8 = icmp slt i64 %4, 76
br i1 %8, label %1, label %9
9: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clog_set_buffer_len(int *);
void clog_set_buffer_len__(int *w) { clog_set_buffer_len(w); }


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

x86 assembly (clang, -O2):
<clog_set_buffer_len__>:
jmp    1030 <clog_set_buffer_len@plt>

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

LLVM IR (-O2):
define void @clog_set_buffer_len__(i32* %0) {
%2 = tail call i32 @clog_set_buffer_len(i32* %0)
ret void
}
void vhdcReset() {}


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

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

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

LLVM IR (-O2):
define void @vhdcReset() {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
float __sqrt_approx(float x) {
  int32_t i;
  i = *((int32_t *)&x);
  i = 0x1FC00000 + (i >> 1);
  x = *((float *)&i);
  return x;
}


x86 assembly (clang, -O0):
<__sqrt_approx>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
add    $0x1fc00000,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sqrt_approx>:
movd   %xmm0,%eax
sar    %eax
add    $0x1fc00000,%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @__sqrt_approx(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast float* %2 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = ashr i32 %6, 1
%8 = add nsw i32 532676608, %7
store i32 %8, i32* %3
%9 = bitcast i32* %3 to float*
%10 = load float, float* %9
store float %10, float* %2
%11 = load float, float* %2
ret float %11
}

LLVM IR (-O2):
define float @__sqrt_approx(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = add nsw i32 %3, 532676608
%5 = bitcast i32 %4 to float
ret float %5
}
void WidgetMutexPut(unsigned char *pcMutex) { *pcMutex = 0; }


x86 assembly (clang, -O0):
<WidgetMutexPut>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WidgetMutexPut>:
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @WidgetMutexPut(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
void DefaultIntHandler() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<DefaultIntHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DefaultIntHandler+0x9>
jmp    1109 <DefaultIntHandler+0x9>

x86 assembly (clang, -O2):
<DefaultIntHandler>:
jmp    1100 <DefaultIntHandler>

LLVM IR (-O0):
define void @DefaultIntHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DefaultIntHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
long int sas_fetch_and_and(unsigned int *pointer, int delta) {
  return __atomic_fetch_and(pointer, delta, 4);
}


x86 assembly (clang, -O0):
<sas_fetch_and_and>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    %ecx,-0x1c(%rbp)
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x28(%rbp),%rcx
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x2c(%rbp)
test   $0x1,%cl
mov    %eax,-0x18(%rbp)
jne    114d <sas_fetch_and_and+0x4d>
jmp    1124 <sas_fetch_and_and+0x24>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_fetch_and_and>:
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
and    %esi,%ecx
lock cmpxchg %ecx,(%rdi)
jne    1110 <sas_fetch_and_and+0x10>
mov    %eax,%eax
ret

LLVM IR (-O0):
define i64 @sas_fetch_and_and(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = atomicrmw and i32* %7, i32 %9 acq_rel
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @sas_fetch_and_and(i32* nocapture %0, i32 %1) {
%3 = atomicrmw and i32* %0, i32 %1 acq_rel
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int receive_uint8();
uint32_t receive_uint32() {
  int32_t value = 0;
  value |= receive_uint8() << 0;
  value |= receive_uint8() << 8;
  value |= receive_uint8() << 16;
  value |= receive_uint8() << 24;
  return value;
}


x86 assembly (clang, -O0):
<receive_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <receive_uint8@plt>
shl    $0x0,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <receive_uint8@plt>
shl    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <receive_uint8@plt>
shl    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <receive_uint8@plt>
shl    $0x18,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receive_uint32>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <receive_uint8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <receive_uint8@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1030 <receive_uint8@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
xor    %eax,%eax
call   1030 <receive_uint8@plt>
shl    $0x18,%eax
or     %ebx,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @receive_uint32() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @receive_uint8()
%3 = shl i32 %2, 0
%4 = load i32, i32* %1
%5 = or i32 %4, %3
store i32 %5, i32* %1
%6 = call i32 (...) @receive_uint8()
%7 = shl i32 %6, 8
%8 = load i32, i32* %1
%9 = or i32 %8, %7
store i32 %9, i32* %1
%10 = call i32 (...) @receive_uint8()
%11 = shl i32 %10, 16
%12 = load i32, i32* %1
%13 = or i32 %12, %11
store i32 %13, i32* %1
%14 = call i32 (...) @receive_uint8()
%15 = shl i32 %14, 24
%16 = load i32, i32* %1
%17 = or i32 %16, %15
store i32 %17, i32* %1
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @receive_uint32() {
%1 = tail call i32 (...) @receive_uint8()
%2 = tail call i32 (...) @receive_uint8()
%3 = shl i32 %2, 8
%4 = or i32 %3, %1
%5 = tail call i32 (...) @receive_uint8()
%6 = shl i32 %5, 16
%7 = or i32 %4, %6
%8 = tail call i32 (...) @receive_uint8()
%9 = shl i32 %8, 24
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ glutTimerFunc(int, void (*)(int), int);
void OnTimer(int value) {
  glutPostRedisplay();
  glutTimerFunc(5, &OnTimer, value);
}


x86 assembly (clang, -O0):
<OnTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <glutPostRedisplay@plt>
mov    -0x4(%rbp),%edx
mov    $0x5,%edi
mov    0x2e9f(%rip),%rsi
call   1030 <glutTimerFunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OnTimer>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <glutPostRedisplay@plt>
mov    0x2eaf(%rip),%rsi
mov    $0x5,%edi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <glutTimerFunc@plt>

LLVM IR (-O0):
define void @OnTimer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @glutPostRedisplay()
%4 = load i32, i32* %2
%5 = call i32 @glutTimerFunc(i32 5, void (i32)* @OnTimer, i32 %4)
ret void
}

LLVM IR (-O2):
define void @OnTimer(i32 %0) {
%2 = tail call i32 (...) @glutPostRedisplay()
%3 = tail call i32 @glutTimerFunc(i32 5, void (i32)* @OnTimer, i32 %0)
ret void
}
long dbl2lng(double d) {
  union {
    double d;
    long l;
    int i;
  } u;
  if (d > 0) {
    u.d = d;
    return sizeof(double) == sizeof(long) ? u.l : u.i;
  } else if (d < 0) {
    u.d = -d;
    return sizeof(double) == sizeof(long) ? -u.l : -u.i;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<dbl2lng>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1132 <dbl2lng+0x32>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <dbl2lng+0x78>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1170 <dbl2lng+0x70>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <dbl2lng+0x78>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl2lng>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1110 <dbl2lng+0x10>
movq   %xmm0,%rax
ret
ucomisd %xmm0,%xmm1
jbe    112d <dbl2lng+0x2d>
movq   %xmm0,%rcx
movabs $0x7fffffffffffffff,%rax
ff ff 7f
xor    %rcx,%rax
add    $0x1,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i64 @dbl2lng(double %0) {
%2 = alloca i64
%3 = alloca double
%4 = alloca %union.anon
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = bitcast %union.anon* %4 to double*
store double %8, double* %9
%10 = bitcast %union.anon* %4 to i64*
%11 = load i64, i64* %10
store i64 %11, i64* %2
br label %23
12: ; preds = %1
%13 = load double, double* %3
%14 = fcmp olt double %13, 0.000000e+00
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load double, double* %3
%17 = fneg double %16
%18 = bitcast %union.anon* %4 to double*
store double %17, double* %18
%19 = bitcast %union.anon* %4 to i64*
%20 = load i64, i64* %19
%21 = sub nsw i64 0, %20
store i64 %21, i64* %2
br label %23
22: ; preds = %12
store i64 0, i64* %2
br label %23
23: ; preds = %22, %15, %7
%24 = load i64, i64* %2
ret i64 %24
}

LLVM IR (-O2):
define i64 @dbl2lng(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = bitcast double %0 to i64
br label %11
5: ; preds = %1
%6 = fcmp olt double %0, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %5
%8 = fneg double %0
%9 = bitcast double %8 to i64
%10 = sub nsw i64 0, %9
br label %11
11: ; preds = %5, %7, %3
%12 = phi i64 [ %4, %3 ], [ %10, %7 ], [ 0, %5 ]
ret i64 %12
}
long main() { long l; }


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

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

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

LLVM IR (-O2):
define i64 @main() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int matrix[4][5];
  int M[4][5] = {{10, 5, 3, 17, 82},
                 {9, 0, 0, 8, 7},
                 {10, 33, 2, 1, 1},
                 {100, 2, 22, 13, 5}};
  printf("M[2][2] = %i\n", M[2][2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
mov    -0x80(%rbp),%esi
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.M = [4 x [5 x i32]] [[5 x i32] [i32 10, i32 5, i32 3, i32 17, i32 82], [5 x i32] [i32 9, i32 0, i32 0, i32 8, i32 7], [5 x i32] [i32 10, i32 33, i32 2, i32 1, i32 1], [5 x i32] [i32 100, i32 2, i32 22, i32 13, i32 5]]
@.str = [14 x i8] c"M[2][2] = %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [5 x i32]]
%7 = alloca [4 x [5 x i32]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x [5 x i32]]* %7 to i8*
%9 = getelementptr inbounds [4 x [5 x i32]], [4 x [5 x i32]]* %7, i64 0, i64 2
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 2
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"M[2][2] = %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ r_type_inst(int, int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/);
void trap_inst() { r_type_inst(303, 0, 0, 0); }


x86 assembly (clang, -O0):
<trap_inst>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12f,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <r_type_inst@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_inst>:
mov    $0x12f,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <r_type_inst@plt>

LLVM IR (-O0):
define void @trap_inst() {
%1 = call i32 @r_type_inst(i32 303, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @trap_inst() {
%1 = tail call i32 @r_type_inst(i32 303, i32 0, i32 0, i32 0)
ret void
}
void rho_ruby_add_to_hash(unsigned long hash, unsigned long key,
                          unsigned long item) {}


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

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

LLVM IR (-O0):
define void @rho_ruby_add_to_hash(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
define void @rho_ruby_add_to_hash(i64 %0, i64 %1, i64 %2) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t _reverse(uint8_t b) {
  b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
  b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
  b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
  return (b);
}


x86 assembly (clang, -O0):
<_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xcc,%eax
sar    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0x33,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xaa,%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x55,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_reverse>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x55,%al
add    %al,%al
shr    %dil
and    $0x55,%dil
or     %al,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @_reverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 240
%5 = ashr i32 %4, 4
%6 = load i32, i32* %2
%7 = and i32 %6, 15
%8 = shl i32 %7, 4
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 204
%12 = ashr i32 %11, 2
%13 = load i32, i32* %2
%14 = and i32 %13, 51
%15 = shl i32 %14, 2
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %17, 170
%19 = ashr i32 %18, 1
%20 = load i32, i32* %2
%21 = and i32 %20, 85
%22 = shl i32 %21, 1
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @_reverse(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i8 @llvm.bitreverse.i8(i8 %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ game_done();
int /*<<< orphan*/ game_init();
int /*<<< orphan*/ game_run();
int main(void) {
  game_init();
  game_run();
  game_done();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <game_init@plt>
mov    $0x0,%al
call   1050 <game_run@plt>
mov    $0x0,%al
call   1030 <game_done@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @game_init()
%3 = call i32 (...) @game_run()
%4 = call i32 (...) @game_done()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @game_init()
%2 = tail call i32 (...) @game_run()
%3 = tail call i32 (...) @game_done()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct lu_phy_attr {
  int dummy;
};

/* Variables and functions */
uint8_t T9840_media_load(struct lu_phy_attr *lu, int load) {
  ;
  return 0;
}


x86 assembly (clang, -O0):
<T9840_media_load>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.lu_phy_attr = type { i32 }
define i32 @T9840_media_load(%struct.lu_phy_attr* nocapture readnone %0, i32 %1) {
ret i32 0
}
void HitWDT(void) {}


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

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

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

LLVM IR (-O2):
define void @HitWDT() {
ret void
}
/* Variables and functions */
int *malloc(int);
extern int *ReturnArray() {
  int *i = malloc(3 * sizeof(int));
  i[0] = 1;
  i[1] = 2;
  i[2] = 3;
  return i;
}


x86 assembly (clang, -O0):
<ReturnArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x8(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnArray>:
push   %rax
mov    $0xc,%edi
call   1030 <malloc@plt>
movabs $0x200000001,%rcx
mov    %rcx,(%rax)
movl   $0x3,0x8(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @ReturnArray() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 1, i32* %4
%5 = load i32*, i32** %1
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 2, i32* %6
%7 = load i32*, i32** %1
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 3, i32* %8
%9 = load i32*, i32** %1
ret i32* %9
}

LLVM IR (-O2):
define noalias i32* @ReturnArray() {
%1 = tail call i32* @malloc(i32 12)
store i32 1, i32* %1
%2 = getelementptr inbounds i32, i32* %1, i64 1
store i32 2, i32* %2
%3 = getelementptr inbounds i32, i32* %1, i64 2
store i32 3, i32* %3
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_object_node_get_boolean(void *p, int *boolean, char **error) {
  mdea_error(error, "Expected boolean, got object");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_object_node_get_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_object_node_get_boolean>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Expected boolean, got object\00"
define i32 @mdea_object_node_get_boolean(i8* %0, i32* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8**
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [29 x i8] c"Expected boolean, got object\00"
define i32 @mdea_object_node_get_boolean(i8* nocapture readnone %0, i32* nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int jump(int, int);
extern int call(int a, int b) {
  if (a < b)
    a = jump(a, b);
  return a;
}


x86 assembly (clang, -O0):
<call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1138 <call+0x28>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <jump@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call>:
cmp    %esi,%edi
jge    1119 <call+0x9>
jmp    1030 <jump@plt>
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @call(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @jump(i32 %9, i32 %10)
store i32 %11, i32* %3
br label %12
12: ; preds = %8, %2
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @call(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @jump(i32 %0, i32 %1)
br label %6
6: ; preds = %4, %2
%7 = phi i32 [ %5, %4 ], [ %0, %2 ]
ret i32 %7
}
int fun573() { return 573; }


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

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

LLVM IR (-O0):
define i32 @fun573() {
ret i32 573
}

LLVM IR (-O2):
define i32 @fun573() {
ret i32 573
}
/* Variables and functions */
int /*<<< orphan*/ exact_square();
void main(void) { exact_square(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @exact_square()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void refcnt_getdata_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_refcnt@%p::getdata (refcnt_getdata) is invoked after "
          "destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<refcnt_getdata_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<refcnt_getdata_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [78 x i8] c"Method rtpp_refcnt@%p::getdata (refcnt_getdata) is invoked after destruction\0A\00"
define void @refcnt_getdata_fin(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 ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [78 x i8] c"Method rtpp_refcnt@%p::getdata (refcnt_getdata) is invoked after destruction\0A\00"
define void @refcnt_getdata_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *TIME_get_gmt(void) {
  static char s[30];
  struct tm tim;
  time_t now;
  now = time(NULL);
  tim = *(gmtime(&now));
  strftime(s, 30, "%d-%m-%Y %H:%M:%S", &tim);
  return ((char *)&s);
}


x86 assembly (clang, -O0):
<TIME_get_gmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <gmtime@plt>
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
lea    0x2ef7(%rip),%rdi
mov    $0x1e,%esi
lea    0xe9b(%rip),%rdx
lea    -0x8(%rbp),%rcx
call   1040 <strftime@plt>
lea    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TIME_get_gmt>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <gmtime@plt>
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
lea    0x2ef9(%rip),%rbx
lea    0xea2(%rip),%rdx
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1040 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@TIME_get_gmt.s = internal global [30 x i8] zeroinitializer
@.str = [18 x i8] c"%d-%m-%Y %H:%M:%S\00"
define i8* @TIME_get_gmt() {
%1 = alloca %struct.tm
%2 = alloca i32
%3 = call i32 @time(i32* null)
store i32 %3, i32* %2
%4 = call %struct.tm* @gmtime(i32* %2)
%5 = bitcast %struct.tm* %1 to i8*
%6 = bitcast %struct.tm* %4 to i8*
%7 = call i32 @strftime(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @TIME_get_gmt.s, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %1)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @TIME_get_gmt.s, i32 0, i32 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@TIME_get_gmt.s = internal global [30 x i8] zeroinitializer
@.str = [18 x i8] c"%d-%m-%Y %H:%M:%S\00"
define i8* @TIME_get_gmt() {
%1 = alloca %struct.tm
%2 = alloca i32
%3 = bitcast %struct.tm* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %2
%6 = call %struct.tm* @gmtime(i32* %2)
%7 = getelementptr %struct.tm, %struct.tm* %6, i64 0, i32 0
%8 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%9 = load i32, i32* %7
store i32 %9, i32* %8
%10 = call i32 @strftime(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @TIME_get_gmt.s, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %1)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @TIME_get_gmt.s, i64 0, i64 0)
}