xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
bool starts_with(const char *s1, const char *s2) {
  return strncmp(s1, s2, strlen(s2)) == 0;
}


x86 assembly (clang, -O0):
<starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @starts_with(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @starts_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
void usb_storage_proc_info(int i) { f(1); }


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

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

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

LLVM IR (-O2):
define void @usb_storage_proc_info(i32 %0) {
%2 = tail call i32 @f(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c(char *);
int /*<<< orphan*/ mark_back();
void Do() {
  c("(do)");
  mark_back();
}


x86 assembly (clang, -O0):
<Do>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <c@plt>
mov    $0x0,%al
call   1030 <mark_back@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Do>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <c@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mark_back@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"(do)\00"
define void @Do() {
%1 = tail call i32 @c(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @mark_back()
ret void
}
/* Variables and functions */
int multiplicacao(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  printf("Insira 2 números para serem multiplicados: ");
  scanf("%d %d", &a, &b);
  printf("Resultado: %d\n", multiplicacao(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <multiplicacao@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <multiplicacao@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Insira 2 n\C3\BAmeros para serem multiplicados: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [15 x i8] c"Resultado: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @multiplicacao(i32 %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Insira 2 n\C3\BAmeros para serem multiplicados: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [15 x i8] c"Resultado: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @multiplicacao(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
void glClipPlanef(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glClipPlanef() {
ret void
}
/* Variables and functions */
int max(int, int);
int min(int, int);
int median(int r, int g, int b) { return max(min(r, g), min(max(r, g), b)); }


x86 assembly (clang, -O0):
<median>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <min@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <max@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <min@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <max@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<median>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <min@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <max@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1030 <min@plt>
mov    %r15d,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <max@plt>

LLVM IR (-O0):
define i32 @median(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 = call i32 @min(i32 %7, i32 %8)
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @max(i32 %10, i32 %11)
%13 = load i32, i32* %6
%14 = call i32 @min(i32 %12, i32 %13)
%15 = call i32 @max(i32 %9, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @median(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @min(i32 %0, i32 %1)
%5 = tail call i32 @max(i32 %0, i32 %1)
%6 = tail call i32 @min(i32 %5, i32 %2)
%7 = tail call i32 @max(i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ foo(int);
int /*<<< orphan*/ take_address(int *);
int __attribute__((no, noclone)) bar(int j) {
  foo(~j);
  foo(abs(j));
  foo(j);
  take_address(&j);
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
call   1040 <foo@plt>
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <foo@plt>
mov    -0x4(%rbp),%edi
call   1040 <foo@plt>
lea    -0x4(%rbp),%rdi
call   1050 <take_address@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %edi,0xc(%rsp)
not    %edi
call   1030 <foo@plt>
mov    %ebx,%edi
neg    %edi
cmovs  %ebx,%edi
call   1030 <foo@plt>
mov    %ebx,%edi
call   1030 <foo@plt>
lea    0xc(%rsp),%rdi
call   1040 <take_address@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = call i32 @foo(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @abs(i32 %6)
%8 = call i32 @foo(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @foo(i32 %9)
%11 = call i32 @take_address(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = xor i32 %0, -1
%4 = tail call i32 @foo(i32 %3)
%5 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%6 = tail call i32 @foo(i32 %5)
%7 = tail call i32 @foo(i32 %0)
%8 = call i32 @take_address(i32* %2)
ret i32 0
}
/* Variables and functions */
int sol_message_digest_init();
int sol_crypto_init(void) { return sol_message_digest_init(); }


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

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

LLVM IR (-O0):
define i32 @sol_crypto_init() {
%1 = call i32 (...) @sol_message_digest_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @sol_crypto_init() {
%1 = tail call i32 (...) @sol_message_digest_init()
ret i32 %1
}
ipr(num) long num;
{ printf(" %7ld", num); }


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

x86 assembly (clang, -O2):
<ipr>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" %7ld\00"
define i32 @ipr(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [6 x i8] c" %7ld\00"
define i32 @ipr(i64 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 undef
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_quaddobl_step_size(double *step) {
  int fail;
  int precision = 2;
  int *b;
  fail = _ada_use_c2phc4c(868, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_quaddobl_step_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x364,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_quaddobl_step_size>:
push   %rax
mov    %rdi,%rcx
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x364,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_quaddobl_step_size(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 2, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 868, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_quaddobl_step_size(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 868, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int func2(int);
int func1(int x) {
  int ret = 0;
  ret = func2(x + 1);
  return ret;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <func2@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
add    $0x1,%edi
jmp    1030 <func2@plt>

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

LLVM IR (-O2):
define i32 @func1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @func2(i32 %2)
ret i32 %3
}
int abs(int __n) { return (__n < 0) ? -__n : __n; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ close_file(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ get_n_pass(int /*<<< orphan*/ *, char **, int);
scalar_t__ malloc(int /*<<< orphan*/);
int /*<<< orphan*/ *open_file(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  FILE *fp;
  char *data;
  fp = open_file("dict.txt");
  data = (char *)malloc(0);
  get_n_pass(fp, &data, 2);
  printf("%s\n", data);
  free(data);
  close_file(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe91(%rip),%rdi
call   1060 <open_file@plt>
mov    %rax,-0x8(%rbp)
xor    %edi,%edi
call   1080 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1040 <get_n_pass@plt>
mov    -0x10(%rbp),%rsi
lea    0xe69(%rip),%rdi
call   1070 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <close_file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe94(%rip),%rdi
call   1060 <open_file@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <get_n_pass@plt>
mov    0x8(%rsp),%rsi
lea    0xe6b(%rip),%rdi
call   1070 <printf@plt>
mov    0x8(%rsp),%rdi
call   1050 <free@plt>
mov    %rbx,%rdi
call   1030 <close_file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"dict.txt\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = alloca i8*
%3 = call i32* @open_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32* %3, i32** %1
%4 = call i64 @malloc(i32 0)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i32*, i32** %1
%7 = call i32 @get_n_pass(i32* %6, i8** %2, i32 2)
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
%12 = load i32*, i32** %1
%13 = call i32 @close_file(i32* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"dict.txt\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = tail call i32* @open_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i64 @malloc(i32 0)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = call i32 @get_n_pass(i32* %3, i8** %1, i32 2)
%7 = load i8*, i8** %1
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %1
%10 = call i32 @free(i8* %9)
%11 = call i32 @close_file(i32* %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void test_vmvn_u16x4(uint16_t *__restrict__ dest, uint16_t *a) {
  int i;
  for (i = 0; i < 4; i++) {
    dest[i] = ~a[i];
  }
}


x86 assembly (clang, -O0):
<test_vmvn_u16x4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1144 <test_vmvn_u16x4+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vmvn_u16x4+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vmvn_u16x4>:
movdqu (%rsi),%xmm0
pcmpeqd %xmm1,%xmm1
pxor   %xmm0,%xmm1
movdqu %xmm1,(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vmvn_u16x4(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = xor <4 x i32> %4, <i32 -1, i32 -1, i32 -1, i32 -1>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
ret void
}
int main() {
  int x[10], i, k;
  for (k = 0; k < 10; k++) {
    for (i = 1; i < 10; i++) {
      x[i] = 1;
    }
    for (i = 1; i < 10; i++) {
      x[i] = 2;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    1185 <main+0x85>
movl   $0x1,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1147 <main+0x47>
movslq -0x34(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1123 <main+0x23>
movl   $0x1,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1172 <main+0x72>
movslq -0x34(%rbp),%rax
movl   $0x2,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    114e <main+0x4e>
jmp    1177 <main+0x77>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char *get_goodbye(void) { return "Goodbye World\n"; }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Goodbye World\0A\00"
define i8* @get_goodbye() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"Goodbye World\0A\00"
define i8* @get_goodbye() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void setpgrp_error() { perror("setpgrp error"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"setpgrp error\00"
define void @setpgrp_error() {
%1 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"setpgrp error\00"
define void @setpgrp_error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
int myrand(int n) { return rand() % n; }


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrand>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @myrand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @myrand(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
unsigned int processorClockFrequency(void) {
  return 12000000 * ((*((volatile unsigned char *)0xE01FC080)) & 1
                         ? ((*((volatile unsigned char *)0xE01FC084)) & 0xF) + 1
                         : 1);
}


x86 assembly (clang, -O0):
<processorClockFrequency>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe01fc080,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1132 <processorClockFrequency+0x32>
mov    $0xe01fc084,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xf,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <processorClockFrequency+0x3f>
mov    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <processorClockFrequency+0x3f>
mov    -0x4(%rbp),%eax
imul   $0xb71b00,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<processorClockFrequency>:
mov    $0xe01fc080,%ecx
mov    $0xb71b00,%eax
testb  $0x1,(%rcx)
je     1121 <processorClockFrequency+0x21>
movzbl 0x4(%rcx),%eax
and    $0xf,%eax
imul   $0xb71b00,%eax,%eax
add    $0xb71b00,%eax
ret

LLVM IR (-O0):
define i32 @processorClockFrequency() {
%1 = load volatile i8, i8* inttoptr (i64 3760177280 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load volatile i8, i8* inttoptr (i64 3760177284 to i8*)
%7 = zext i8 %6 to i32
%8 = and i32 %7, 15
%9 = add nsw i32 %8, 1
br label %11
10: ; preds = %0
br label %11
11: ; preds = %10, %5
%12 = phi i32 [ %9, %5 ], [ 1, %10 ]
%13 = mul nsw i32 12000000, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @processorClockFrequency() {
%1 = load volatile i8, i8* inttoptr (i64 3760177280 to i8*)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = load volatile i8, i8* inttoptr (i64 3760177284 to i8*)
%6 = and i8 %5, 15
%7 = zext i8 %6 to i32
%8 = mul nuw nsw i32 %7, 12000000
%9 = add nuw nsw i32 %8, 12000000
br label %10
10: ; preds = %0, %4
%11 = phi i32 [ %9, %4 ], [ 12000000, %0 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Platform is little-endian...\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [30 x i8] c"Platform is little-endian...\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Platform is little-endian...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int save_floating_point_precision(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @save_floating_point_precision() {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t byte_swap16(uint16_t k) { return (k << 8) | (k >> 8); }


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

x86 assembly (clang, -O2):
<byte_swap16>:
mov    %edi,%eax
shl    $0x8,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @byte_swap16(i32 %0) {
%2 = shl i32 %0, 8
%3 = ashr i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
unsigned long strtol(char *, char **, int);
void convertToAscii(char *input, int in_base) {
  unsigned long tmp = strtol(input, &input, in_base);
  printf("%c\x20", (char)tmp);
}


x86 assembly (clang, -O0):
<convertToAscii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1040 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    0xeb2(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertToAscii>:
push   %rax
mov    %esi,%edx
mov    %rdi,(%rsp)
mov    %rsp,%rsi
call   1040 <strtol@plt>
movsbl %al,%esi
lea    0xec7(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%c \00"
define void @convertToAscii(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i64 @strtol(i8* %6, i8** %3, i32 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = trunc i64 %9 to i8
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
define void @convertToAscii(i8* %0, i32 %1) {
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 @strtol(i8* %0, i8** %3, i32 %1)
%5 = trunc i64 %4 to i8
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}
/* Type definitions */
typedef int __u32;

/* Variables and functions */
unsigned int tipc_zone(__u32 addr) { return addr >> 24; }


x86 assembly (clang, -O0):
<tipc_zone>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipc_zone>:
mov    %edi,%eax
sar    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @tipc_zone(i32 %0) {
%2 = ashr i32 %0, 24
ret i32 %2
}
int gnttab_dma_local_pfn(struct page *page) { return 0; }


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

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

LLVM IR (-O0):
%struct.page = type opaque
define i32 @gnttab_dma_local_pfn(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
ret i32 0
}

LLVM IR (-O2):
%struct.page = type opaque
define i32 @gnttab_dma_local_pfn(%struct.page* nocapture readnone %0) {
ret i32 0
}
int test_imm_68int32_mem(int *val) {
  return ((*val) & (0x68 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_68int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x68,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_68int32_mem>:
testb  $0x68,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_68int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 104
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_68int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 104
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int SIGINT;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sigintHandler(int arg) {
  if (SIGINT == arg) {
    printf("\ninterrupted\n");
    exit(EXIT_SUCCESS);
  }
}


x86 assembly (clang, -O0):
<sigintHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
jne    1157 <sigintHandler+0x37>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigintHandler>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
je     112e <sigintHandler+0xe>
pop    %rax
ret
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [14 x i8] c"\0Ainterrupted\0A\00"
@EXIT_SUCCESS = global i32 0
define void @sigintHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGINT
%4 = load i32, i32* %2
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [13 x i8] c"\0Ainterrupted\00"
define void @sigintHandler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int fabs(double const);
double sin(double);
double Sinc(const double x) {
  if (fabs(x) < 1e-15)
    return 1.0;
  return sin(3.14159265358979323846 * x) / (3.14159265358979323846 * x);
}


x86 assembly (clang, -O0):
<Sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    115f <Sinc+0x3f>
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1187 <Sinc+0x67>
movsd  0xea1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  0xe8f(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sinc>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    114d <Sinc+0x2d>
movsd  (%rsp),%xmm0
mulsd  0xecc(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xeab(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @fabs(double %4)
%6 = sitofp i32 %5 to double
%7 = fcmp olt double %6, 1.000000e-15
br i1 %7, label %8, label %9
8: ; preds = %1
store double 1.000000e+00, double* %2
br label %16
9: ; preds = %1
%10 = load double, double* %3
%11 = fmul double 0x400921FB54442D18, %10
%12 = call double @sin(double %11)
%13 = load double, double* %3
%14 = fmul double 0x400921FB54442D18, %13
%15 = fdiv double %12, %14
store double %15, double* %2
br label %16
16: ; preds = %9, %8
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @Sinc(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = fmul double %0, 0x400921FB54442D18
%6 = tail call double @sin(double %5)
%7 = fdiv double %6, %5
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 1.000000e+00, %1 ]
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int CHAR_BIT;
int /*<<< orphan*/ putchar(char);
void print_binary(unsigned n) {
  unsigned i = 1 << (sizeof(i) * CHAR_BIT - 1);
  while (i != 0) {
    putchar('0' + !!(n & i));
    i >>= 1;
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1171 <print_binary+0x61>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <print_binary+0x29>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_binary>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    0x2ec2(%rip),%rax
mov    (%rax),%cl
shl    $0x2,%cl
add    $0xff,%cl
mov    $0x1,%ebx
shl    %cl,%ebx
mov    %ebx,%ebp
nop
mov    %ebx,%eax
and    %r14d,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <print_binary+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define void @print_binary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @CHAR_BIT
%5 = sext i32 %4 to i64
%6 = mul i64 4, %5
%7 = sub i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = shl i32 1, %8
store i32 %9, i32* %3
br label %10
10: ; preds = %13, %1
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = and i32 %14, %15
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
%21 = add nsw i32 48, %20
%22 = trunc i32 %21 to i8
%23 = call i32 @putchar(i8 signext %22)
%24 = load i32, i32* %3
%25 = lshr i32 %24, 1
store i32 %25, i32* %3
br label %10
26: ; preds = %10
%27 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define void @print_binary(i32 %0) {
%2 = load i32, i32* @CHAR_BIT
%3 = shl i32 %2, 2
%4 = add i32 %3, -1
%5 = shl nuw i32 1, %4
br label %6
6: ; preds = %1, %6
%7 = phi i32 [ %5, %1 ], [ %12, %6 ]
%8 = and i32 %7, %0
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8 48, i8 49
%11 = tail call i32 @putchar(i8 signext %10)
%12 = lshr i32 %7, 1
%13 = icmp ult i32 %7, 2
br i1 %13, label %14, label %6
14: ; preds = %6
%15 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  int j;
  i = j;
  int c;
  c = 0;
  while (c < 100) {
    i = i + 1;
    j = j + 2;
    c = c + 1;
  }
  assert(i + 100 == j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    1156 <main+0x46>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112c <main+0x1c>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
cmp    -0xc(%rbp),%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
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
struct binary_exponential_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
add_string_to_binary_exponential_buffer(void *,
                                        struct binary_exponential_buffer *);
void add_endif(struct binary_exponential_buffer *output) {
  unsigned char *c = (unsigned char *)"#endif\n";
  add_string_to_binary_exponential_buffer((void *)c, output);
}


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

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

LLVM IR (-O0):
%struct.binary_exponential_buffer = type { i32 }
@.str = [8 x i8] c"#endif\0A\00"
define void @add_endif(%struct.binary_exponential_buffer* %0) {
%2 = alloca %struct.binary_exponential_buffer*
%3 = alloca i8*
store %struct.binary_exponential_buffer* %0, %struct.binary_exponential_buffer** %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load %struct.binary_exponential_buffer*, %struct.binary_exponential_buffer** %2
%6 = call i32 @add_string_to_binary_exponential_buffer(i8* %4, %struct.binary_exponential_buffer* %5)
ret void
}

LLVM IR (-O2):
%struct.binary_exponential_buffer = type { i32 }
@.str = [8 x i8] c"#endif\0A\00"
define void @add_endif(%struct.binary_exponential_buffer* %0) {
%2 = tail call i32 @add_string_to_binary_exponential_buffer(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %struct.binary_exponential_buffer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Hw_ISR_Init();
int /*<<< orphan*/ Hw_Led_Init();
int /*<<< orphan*/ Hw_PLL_Init();
int /*<<< orphan*/ Hw_Uart_Init();
void Hw_Init(void) {
  Hw_PLL_Init();
  Hw_ISR_Init();
  (*(volatile unsigned long *)(0x40010800 + 0x0000)) = 0x33333333;
  (*(volatile unsigned long *)(0x40010800 + 0x0004)) = 0x333334B3;
  (*(volatile unsigned long *)(0x40010C00 + 0x0000)) = 0x33333333;
  (*(volatile unsigned long *)(0x40010C00 + 0x0004)) = 0x33333333;
  (*(volatile unsigned long *)(0x40011000 + 0x0004)) = 0x33444444;
  Hw_Uart_Init();
  Hw_Led_Init();
}


x86 assembly (clang, -O0):
<Hw_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <Hw_PLL_Init@plt>
mov    $0x0,%al
call   1030 <Hw_ISR_Init@plt>
mov    $0x40010800,%eax
movq   $0x33333333,(%rax)
mov    $0x40010804,%eax
movq   $0x333334b3,(%rax)
mov    $0x40010c00,%eax
movq   $0x33333333,(%rax)
mov    $0x40010c04,%eax
movq   $0x33333333,(%rax)
mov    $0x40011004,%eax
movq   $0x33444444,(%rax)
mov    $0x0,%al
call   1050 <Hw_Uart_Init@plt>
mov    $0x0,%al
call   1040 <Hw_Led_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hw_Init>:
push   %rax
xor    %eax,%eax
call   1060 <Hw_PLL_Init@plt>
xor    %eax,%eax
call   1030 <Hw_ISR_Init@plt>
movq   $0x33333333,0x40010800
40 33 33 33 33
movq   $0x333334b3,0x40010804
40 b3 34 33 33
movq   $0x33333333,0x40010c00
40 33 33 33 33
movq   $0x33333333,0x40010c04
40 33 33 33 33
movq   $0x33444444,0x40011004
40 44 44 44 33
xor    %eax,%eax
call   1050 <Hw_Uart_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Hw_Led_Init@plt>

LLVM IR (-O0):
define void @Hw_Init() {
%1 = call i32 (...) @Hw_PLL_Init()
%2 = call i32 (...) @Hw_ISR_Init()
store volatile i64 858993459, i64* inttoptr (i64 1073809408 to i64*)
store volatile i64 858993843, i64* inttoptr (i64 1073809412 to i64*)
store volatile i64 858993459, i64* inttoptr (i64 1073810432 to i64*)
store volatile i64 858993459, i64* inttoptr (i64 1073810436 to i64*)
store volatile i64 860111940, i64* inttoptr (i64 1073811460 to i64*)
%3 = call i32 (...) @Hw_Uart_Init()
%4 = call i32 (...) @Hw_Led_Init()
ret void
}

LLVM IR (-O2):
define void @Hw_Init() {
%1 = tail call i32 (...) @Hw_PLL_Init()
%2 = tail call i32 (...) @Hw_ISR_Init()
store volatile i64 858993459, i64* inttoptr (i64 1073809408 to i64*)
store volatile i64 858993843, i64* inttoptr (i64 1073809412 to i64*)
store volatile i64 858993459, i64* inttoptr (i64 1073810432 to i64*)
store volatile i64 858993459, i64* inttoptr (i64 1073810436 to i64*)
store volatile i64 860111940, i64* inttoptr (i64 1073811460 to i64*)
%3 = tail call i32 (...) @Hw_Uart_Init()
%4 = tail call i32 (...) @Hw_Led_Init()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t op_logical_or(uint32_t a, uint32_t b) { return a || b; }


x86 assembly (clang, -O0):
<op_logical_or>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <op_logical_or+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_logical_or>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @op_logical_or(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 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @op_logical_or(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int isnum(char *c) {
  int i = 0;
  while (*(c + i) != '\0') {
    if (!(*(c + i) >= 48 && *(c + i) <= 57))
      break;
    else
      i++;
  }
  if (*(c + i) == '\0')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <isnum+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     114e <isnum+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1153 <isnum+0x53>
jmp    1161 <isnum+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <isnum+0xf>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1182 <isnum+0x82>
movl   $0x1,-0x4(%rbp)
jmp    1189 <isnum+0x89>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%eax
add    $0x1,%rdi
cmp    $0xa,%al
jb     1100 <isnum>
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @isnum(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %33, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 48
br i1 %20, label %21, label %29
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 57
br i1 %28, label %30, label %29
29: ; preds = %21, %13
br label %34
30: ; preds = %21
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %33
33: ; preds = %30
br label %5
34: ; preds = %29, %5
%35 = load i8*, i8** %3
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %34
store i32 1, i32* %2
br label %44
43: ; preds = %34
store i32 0, i32* %2
br label %44
44: ; preds = %43, %42
%45 = load i32, i32* %2
ret i32 %45
}

LLVM IR (-O2):
define i32 @isnum(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %8, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = add i8 %5, -48
%7 = icmp ult i8 %6, 10
%8 = add nuw i64 %3, 1
br i1 %7, label %2, label %9
9: ; preds = %2
%10 = icmp eq i8 %5, 0
%11 = zext i1 %10 to i32
ret i32 %11
}