xunge/DecIR huggingface dataset:
void __attribute__((weak)) adc_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<adc_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.adc_isr = [8 x i8] c"adc_isr\00"
define weak void @adc_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.adc_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.adc_isr = [8 x i8] c"adc_isr\00"
define weak void @adc_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.adc_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void error(int errno, char *errstr) {
  fprintf(stderr, errstr);
  exit(errno);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @error(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* %1)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
void zsound_effect(void) {}


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

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

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

LLVM IR (-O2):
define void @zsound_effect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char *text = "some text";
  printf("%s", "text" + 2);
  printf("\n[Press Enter to close]");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec9(%rip),%rdi
lea    0xebd(%rip),%rsi
add    $0x2,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"some text\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"text\00"
@.str.3 = [24 x i8] c"\0A[Press Enter to close]\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 2))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"text\00"
@.str.3 = [24 x i8] c"\0A[Press Enter to close]\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 2))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ di16(int /*<<< orphan*/, int, int, int, int, int, int, int,
                        int, int, int, int, int, int, int, int);
int /*<<< orphan*/ fi16(int /*<<< orphan*/, int, int, int, int, int, int, int,
                        int, int, int, int, int, int, int, int);
void t() {
  di16(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
  fi16(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0xb,0x28(%rsp)
movl   $0xc,0x30(%rsp)
movl   $0xd,0x38(%rsp)
movl   $0xe,0x40(%rsp)
movl   $0xf,0x48(%rsp)
call   1040 <di16@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0xb,0x28(%rsp)
movl   $0xc,0x30(%rsp)
movl   $0xd,0x38(%rsp)
movl   $0xe,0x40(%rsp)
movl   $0xf,0x48(%rsp)
call   1030 <fi16@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0xf
push   $0xe
push   $0xd
push   $0xc
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1040 <di16@plt>
add    $0x50,%rsp
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0xf
push   $0xe
push   $0xd
push   $0xc
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1030 <fi16@plt>
add    $0x50,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @t() {
%1 = call i32 @di16(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
%2 = call i32 @fi16(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
ret void
}

LLVM IR (-O2):
define void @t() {
%1 = tail call i32 @di16(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
%2 = tail call i32 @fi16(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
ret void
}
int a_twist_l_on_corner(corner)
int corner;
{
  int temp_arr[8];
  a_corner_unpack(corner, temp_arr);
  four_cycle(temp_arr, 6, 5, 3, 2);
  adjust_corner(temp_arr, 6, 5, 3, 2);
  return a_corner_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_l_on_corner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1030 <a_corner_unpack@plt>
lea    -0x30(%rbp),%rdi
mov    $0x6,%esi
mov    $0x5,%edx
mov    $0x3,%ecx
mov    $0x2,%r8d
mov    $0x0,%al
call   1050 <four_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x6,%esi
mov    $0x5,%edx
mov    $0x3,%ecx
mov    $0x2,%r8d
mov    $0x0,%al
call   1040 <adjust_corner@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1060 <a_corner_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_l_on_corner>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <a_corner_unpack@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x5,%edx
mov    $0x3,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1050 <four_cycle@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x5,%edx
mov    $0x3,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1040 <adjust_corner@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a_corner_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_l_on_corner(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 6, i32 5, i32 3, i32 2)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_corner to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %9, i32 6, i32 5, i32 3, i32 2)
%11 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @a_twist_l_on_corner(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 6, i32 5, i32 3, i32 2)
%7 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_corner to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 6, i32 5, i32 3, i32 2)
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  fprintf(stdout, "Starting %s\n", "vala_interpreter");
  fprintf(stdout, "%s\n", "The amazing vala interpreter, version 1.0");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
lea    0xec5(%rip),%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
lea    0xee5(%rip),%rdx
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed3(%rip),%rsi
lea    0xee1(%rip),%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"Starting %s\0A\00"
@.str.1 = [17 x i8] c"vala_interpreter\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [42 x i8] c"The amazing vala interpreter, version 1.0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"Starting %s\0A\00"
@.str.1 = [17 x i8] c"vala_interpreter\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [42 x i8] c"The amazing vala interpreter, version 1.0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct rlimit {
  int dummy;
};
typedef scalar_t__ __rlimit_resource_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_setrlimit;
int syscall(int /*<<< orphan*/, long, long);
int setrlimit(__rlimit_resource_t resource, const struct rlimit *rlim) {
  return syscall(SYS_setrlimit, (long)resource, (long)rlim);
}


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

x86 assembly (clang, -O2):
<setrlimit>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@SYS_setrlimit = global i32 0
define i32 @setrlimit(i64 %0, %struct.rlimit* %1) {
%3 = alloca i64
%4 = alloca %struct.rlimit*
store i64 %0, i64* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i32, i32* @SYS_setrlimit
%6 = load i64, i64* %3
%7 = load %struct.rlimit*, %struct.rlimit** %4
%8 = ptrtoint %struct.rlimit* %7 to i64
%9 = call i32 @syscall(i32 %5, i64 %6, i64 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@SYS_setrlimit = global i32 0
define i32 @setrlimit(i64 %0, %struct.rlimit* %1) {
%3 = load i32, i32* @SYS_setrlimit
%4 = ptrtoint %struct.rlimit* %1 to i64
%5 = tail call i32 @syscall(i32 %3, i64 %0, i64 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  float fs1 = 2.0f / 6.0f;
  float fs2 = fs1 * 6.0f;
  assert((int)fs2 == 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xed3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca float
%2 = alloca float
store float 0x3FD5555560000000, float* %1
%3 = load float, float* %1
%4 = fmul float %3, 6.000000e+00
store float %4, float* %2
%5 = load float, float* %2
%6 = fptosi float %5 to i32
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output(char *, int);
int /*<<< orphan*/ sscanf(char const *, char *, int *);
void printCPUxTotalLoadInfo(const char *cmd) {
  int id;
  sscanf(cmd + 7, "%d", &id);
  output("CPU %d\t0\t100\t%%\n", id + 1);
}


x86 assembly (clang, -O0):
<printCPUxTotalLoadInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x7,%rdi
lea    0xec5(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xeb2(%rip),%rdi
call   1030 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCPUxTotalLoadInfo>:
push   %rax
add    $0x7,%rdi
lea    0xed4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%esi
add    $0x1,%esi
lea    0xebf(%rip),%rdi
call   1030 <output@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [17 x i8] c"CPU %d\090\09100\09%%\0A\00"
define void @printCPUxTotalLoadInfo(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 7
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i32 @output(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [17 x i8] c"CPU %d\090\09100\09%%\0A\00"
define void @printCPUxTotalLoadInfo(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %0, i64 7
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = call i32 @output(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ svalue;

/* Variables and functions */
int /*<<< orphan*/ opt_set_string(char const *, char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void opt_set_int(const char *section, const char *key, int value) {
  char svalue[64];
  snprintf(svalue, sizeof(svalue), "%d", value);
  opt_set_string(section, key, svalue);
}


x86 assembly (clang, -O0):
<opt_set_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    $0x40,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1040 <opt_set_string@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_set_int>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %edx,%ecx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xec8(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <opt_set_string@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @opt_set_int(i8* %0, i8* %1, i32 %2) {
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @opt_set_string(i8* %0, i8* %1, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *thread_function(void *arg) {
  int i;
  for (i = 0; i < 200; i++) {
    printf("Thread says hi! ---> thread\n");
    sleep(1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<thread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc8,-0xc(%rbp)
jge    1164 <thread_function+0x44>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <thread_function+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_function>:
push   %rbp
push   %rbx
push   %rax
mov    $0xc8,%ebp
lea    0xed1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebp
jne    1130 <thread_function+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Thread says hi! ---> thread\0A\00"
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 200
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @sleep(i32 1)
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret i8* null
}

LLVM IR (-O2):
@str = [28 x i8] c"Thread says hi! ---> thread\00"
define noalias i8* @thread_function(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 200
br i1 %7, label %8, label %2
8: ; preds = %2
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ Fork(int);
pid_t pm_fork_temporary(void) { return Fork(1); }


x86 assembly (clang, -O0):
<pm_fork_temporary>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <Fork@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_fork_temporary>:
mov    $0x1,%edi
jmp    1030 <Fork@plt>

LLVM IR (-O0):
define i32 @pm_fork_temporary() {
%1 = call i32 @Fork(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @pm_fork_temporary() {
%1 = tail call i32 @Fork(i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_cosup_poly_system();
int main(void) {
  printf("\nCalling the blackbox polynomial system solver of PHCpack\n");
  test_cosup_poly_system();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"\0ACalling the blackbox polynomial system solver of PHCpack\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_cosup_poly_system()
ret i32 0
}

LLVM IR (-O2):
@str = [58 x i8] c"\0ACalling the blackbox polynomial system solver of PHCpack\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_cosup_poly_system()
ret i32 0
}
void rop3_184_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_184_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_184_1_0>:
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_184_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = xor i32 %32, -1
%34 = and i32 %30, %33
%35 = load i8*, i8** %4
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = load i8, i8* %5
%39 = zext i8 %38 to i32
%40 = and i32 %37, %39
%41 = or i32 %34, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_184_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, -1
%6 = and i8 %5, %2
%7 = and i8 %4, %1
%8 = or i8 %7, %6
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((destructor)) void fini_func(void) {
  printf("fini_func with default priority\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"fini_func with default priority\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini_func, i8* null }]
define void @fini_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini_func, i8* null }]
@str = [32 x i8] c"fini_func with default priority\00"
define void @fini_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ print_error(char *, char const *const);
void _assert_false(const unsigned long long result,
                   const char *const expression, const char *const file,
                   const int line) {
  if (!result) {
    print_error("                "
                "expected '%s' to be false\n",
                expression);
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115e <_assert_false+0x3e>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_false>:
test   %rdi,%rdi
je     1126 <_assert_false+0x6>
ret
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
lea    0xecb(%rip),%rdi
call   1030 <print_error@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_fail@plt>

LLVM IR (-O0):
@.str = [43 x i8] c" expected '%s' to be false\0A\00"
define void @_assert_false(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i64, i64* %5
%10 = icmp ne i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %4
%12 = load i8*, i8** %6
%13 = call i32 @print_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @_fail(i8* %14, i32 %15)
br label %17
17: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c" expected '%s' to be false\0A\00"
define void @_assert_false(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i64 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i32 @print_error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @_fail(i8* %2, i32 %3)
br label %9
9: ; preds = %6, %4
ret void
}
/* Variables and functions */
scalar_t__ fun(unsigned long);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long);
void main() {
  unsigned long x;
  for (x = 10; x < 1000; x++) {
    if (fun(x * x))
      printf("%lu %lu\n", x, x * x);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0xa,-0x8(%rbp)
cmpq   $0x3e8,-0x8(%rbp)
jae    1185 <main+0x65>
mov    -0x8(%rbp),%rdi
imul   -0x8(%rbp),%rdi
call   1030 <fun@plt>
cmp    $0x0,%rax
je     116f <main+0x4f>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
imul   -0x8(%rbp),%rdx
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
jmp    1174 <main+0x54>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <main+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xa,%ebx
lea    0xecf(%rip),%r14
jmp    114d <main+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x3e8,%rbx
je     1171 <main+0x51>
mov    %rbx,%r15
imul   %rbx,%r15
mov    %r15,%rdi
call   1030 <fun@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <printf@plt>
jmp    1140 <main+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%lu %lu\0A\00"
define void @main() {
%1 = alloca i64
store i64 10, i64* %1
br label %2
2: ; preds = %18, %0
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 1000
br i1 %4, label %5, label %21
5: ; preds = %2
%6 = load i64, i64* %1
%7 = load i64, i64* %1
%8 = mul i64 %6, %7
%9 = call i64 @fun(i64 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %5
%12 = load i64, i64* %1
%13 = load i64, i64* %1
%14 = load i64, i64* %1
%15 = mul i64 %13, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %12, i64 %15)
br label %17
17: ; preds = %11, %5
br label %18
18: ; preds = %17
%19 = load i64, i64* %1
%20 = add i64 %19, 1
store i64 %20, i64* %1
br label %2
21: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%lu %lu\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i64 [ 10, %0 ], [ %9, %8 ]
%3 = mul nuw nsw i64 %2, %2
%4 = tail call i64 @fun(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %2, i64 %3)
br label %8
8: ; preds = %1, %6
%9 = add nuw nsw i64 %2, 1
%10 = icmp eq i64 %9, 1000
br i1 %10, label %11, label %1
11: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("I am test exe1.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"I am test exe1.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"I am test exe1.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int ustrlen(unsigned char data[]) {
  int i;
  for (i = 0; data[i]; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<ustrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1134 <ustrlen+0x34>
jmp    1126 <ustrlen+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ustrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ustrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ustrlen+0x10>
ret

LLVM IR (-O0):
define i32 @ustrlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %4
br label %12
12: ; preds = %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @ustrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int checksum_cx_xinfo_cloner(void *old_data, void **new_data, int flag) {
  *new_data = NULL;
  if (flag)
    return 0xE830FE89;
  if (old_data == NULL)
    return 0;
  *new_data = old_data;
  return 0;
}


x86 assembly (clang, -O0):
<checksum_cx_xinfo_cloner>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
cmpl   $0x0,-0x1c(%rbp)
je     1130 <checksum_cx_xinfo_cloner+0x30>
movl   $0xe830fe89,-0x4(%rbp)
jmp    1159 <checksum_cx_xinfo_cloner+0x59>
cmpq   $0x0,-0x10(%rbp)
jne    1147 <checksum_cx_xinfo_cloner+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1159 <checksum_cx_xinfo_cloner+0x59>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checksum_cx_xinfo_cloner>:
movq   $0x0,(%rsi)
mov    $0xe830fe89,%eax
test   %edx,%edx
je     1111 <checksum_cx_xinfo_cloner+0x11>
ret
xor    %eax,%eax
test   %rdi,%rdi
je     1110 <checksum_cx_xinfo_cloner+0x10>
mov    %rdi,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @checksum_cx_xinfo_cloner(i8* %0, i8** nocapture writeonly %1, i32 %2) {
store i8* null, i8** %1
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = icmp eq i8* %0, null
br i1 %6, label %8, label %7
7: ; preds = %5
store i8* %0, i8** %1
br label %8
8: ; preds = %5, %3, %7
%9 = phi i32 [ 0, %7 ], [ -399442295, %3 ], [ 0, %5 ]
ret i32 %9
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i;
  i = EOF;
  printf("%i", i);
}


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%i\00"
define void @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
struct img_pixmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ img_setpixel4i(struct img_pixmap *, int, int, int, int, int,
                                  int);
void img_setpixel1i(struct img_pixmap *img, int x, int y, int pix) {
  img_setpixel4i(img, x, y, pix, pix, pix, pix);
}


x86 assembly (clang, -O0):
<img_setpixel1i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x14(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <img_setpixel4i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<img_setpixel1i>:
push   %rax
mov    %ecx,(%rsp)
mov    %ecx,%r8d
mov    %ecx,%r9d
call   1030 <img_setpixel4i@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.img_pixmap = type { i32 }
define void @img_setpixel1i(%struct.img_pixmap* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.img_pixmap*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.img_pixmap* %0, %struct.img_pixmap** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.img_pixmap*, %struct.img_pixmap** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32, i32* %8
%14 = load i32, i32* %8
%15 = load i32, i32* %8
%16 = call i32 @img_setpixel4i(%struct.img_pixmap* %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.img_pixmap = type { i32 }
define void @img_setpixel1i(%struct.img_pixmap* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @img_setpixel4i(%struct.img_pixmap* %0, i32 %1, i32 %2, i32 %3, i32 %3, i32 %3, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pass_mixed(int, double);
void call_mixed(int a, float b, double c, char d) { pass_mixed(a, c); }


x86 assembly (clang, -O0):
<call_mixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1030 <pass_mixed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_mixed>:
movaps %xmm1,%xmm0
jmp    1030 <pass_mixed@plt>

LLVM IR (-O0):
define void @call_mixed(i32 %0, float %1, double %2, i8 signext %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca double
%8 = alloca i8
store i32 %0, i32* %5
store float %1, float* %6
store double %2, double* %7
store i8 %3, i8* %8
%9 = load i32, i32* %5
%10 = load double, double* %7
%11 = call i32 @pass_mixed(i32 %9, double %10)
ret void
}

LLVM IR (-O2):
define void @call_mixed(i32 %0, float %1, double %2, i8 signext %3) {
%5 = tail call i32 @pass_mixed(i32 %0, double %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ save_pcb_defaults();
int /*<<< orphan*/ save_pcb_gcode_options();
int /*<<< orphan*/ save_pcb_machine();
void save_any_changes() {
  save_pcb_defaults();
  save_pcb_gcode_options();
  save_pcb_machine();
}


x86 assembly (clang, -O0):
<save_any_changes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <save_pcb_defaults@plt>
mov    $0x0,%al
call   1030 <save_pcb_gcode_options@plt>
mov    $0x0,%al
call   1050 <save_pcb_machine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_any_changes>:
push   %rax
xor    %eax,%eax
call   1040 <save_pcb_defaults@plt>
xor    %eax,%eax
call   1030 <save_pcb_gcode_options@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <save_pcb_machine@plt>

LLVM IR (-O0):
define void @save_any_changes() {
%1 = call i32 (...) @save_pcb_defaults()
%2 = call i32 (...) @save_pcb_gcode_options()
%3 = call i32 (...) @save_pcb_machine()
ret void
}

LLVM IR (-O2):
define void @save_any_changes() {
%1 = tail call i32 (...) @save_pcb_defaults()
%2 = tail call i32 (...) @save_pcb_gcode_options()
%3 = tail call i32 (...) @save_pcb_machine()
ret void
}
int findComplement(int num) {
  int mask = ~0;
  while (mask & num) {
    mask <<= 1;
  }
  return ~mask & ~num;
}


x86 assembly (clang, -O0):
<findComplement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
je     112b <findComplement+0x2b>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <findComplement+0xe>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findComplement>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
test   %edi,%eax
jne    1110 <findComplement+0x10>
or     %edi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @findComplement(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ -1, %1 ], [ %6, %2 ]
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = shl i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = or i32 %3, %0
%9 = xor i32 %8, -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void term_coloroff() { printf("\033[0m"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0m\00"
define void @term_coloroff() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
define void @term_coloroff() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ floats_mat44_identity(float *);
void floats_mat44_scale(const float sxyz[3], float out[16]) {
  floats_mat44_identity(out);
  for (int i = 0; i < 3; i++)
    out[4 * i + i] = sxyz[i];
}


x86 assembly (clang, -O0):
<floats_mat44_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <floats_mat44_identity@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    116a <floats_mat44_scale+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <floats_mat44_scale+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_mat44_scale>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <floats_mat44_identity@plt>
movss  (%r14),%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%r14),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0x8(%r14),%xmm0
movss  %xmm0,0x28(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @floats_mat44_scale(float* nocapture %0, float* %1) {
%3 = tail call i32 @floats_mat44_identity(float* %1)
%4 = load float, float* %0
store float %4, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 5
store float %6, float* %7
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %1, i64 10
store float %9, float* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void imprimirUso() {
  printf("Uso: mips fichero [opciones]\n");
  printf("\t-h --help\tMuestra la ayuda\n");
  printf(
      "\t-c --clean\tEjecuta el programa sin mostrar información de estado\n");
  printf("\t-v --version\tMuestra la versión\n");
}


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

x86 assembly (clang, -O2):
<imprimirUso>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Uso: mips fichero [opciones]\0A\00"
@.str.1 = [29 x i8] c"\09-h --help\09Muestra la ayuda\0A\00"
@.str.2 = [68 x i8] c"\09-c --clean\09Ejecuta el programa sin mostrar informaci\C3\B3n de estado\0A\00"
@.str.3 = [35 x i8] c"\09-v --version\09Muestra la versi\C3\B3n\0A\00"
define void @imprimirUso() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"Uso: mips fichero [opciones]\00"
@str.4 = [28 x i8] c"\09-h --help\09Muestra la ayuda\00"
@str.5 = [67 x i8] c"\09-c --clean\09Ejecuta el programa sin mostrar informaci\C3\B3n de estado\00"
@str.6 = [34 x i8] c"\09-v --version\09Muestra la versi\C3\B3n\00"
define void @imprimirUso() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.6, i64 0, i64 0))
ret void
}