xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ afficherAide();
int /*<<< orphan*/ appuyezEntree(char *);
int /*<<< orphan*/ menuPrincipal();
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ titre(char *, int);
void aide(void) {
  system("clear");
  titre("Aide", 32);
  afficherAide();
  appuyezEntree("Appuyez sur ENTREE pour revenir au menu principal...");
  menuPrincipal();
}


x86 assembly (clang, -O0):
<aide>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
call   1040 <system@plt>
lea    0xe9f(%rip),%rdi
mov    $0x20,%esi
call   1050 <titre@plt>
mov    $0x0,%al
call   1070 <afficherAide@plt>
lea    0xe8c(%rip),%rdi
call   1060 <appuyezEntree@plt>
mov    $0x0,%al
call   1030 <menuPrincipal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aide>:
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <system@plt>
lea    0xea2(%rip),%rdi
mov    $0x20,%esi
call   1050 <titre@plt>
xor    %eax,%eax
call   1070 <afficherAide@plt>
lea    0xe8f(%rip),%rdi
call   1060 <appuyezEntree@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <menuPrincipal@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [5 x i8] c"Aide\00"
@.str.2 = [53 x i8] c"Appuyez sur ENTREE pour revenir au menu principal...\00"
define void @aide() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @titre(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 32)
%3 = call i32 (...) @afficherAide()
%4 = call i32 @appuyezEntree(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @menuPrincipal()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [5 x i8] c"Aide\00"
@.str.2 = [53 x i8] c"Appuyez sur ENTREE pour revenir au menu principal...\00"
define void @aide() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @titre(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 32)
%3 = tail call i32 (...) @afficherAide()
%4 = tail call i32 @appuyezEntree(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (...) @menuPrincipal()
ret void
}
int ti_tan_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_tan_start(double* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
double DymosimError(char *);
double getMemory(double memory[], int n1, int n2) {
  if (n1 == 1 && n2 == 1)
    return DymosimError("Memory argument to getMemory must be a vector.");
  return memory[0];
}


x86 assembly (clang, -O0):
<getMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114c <getMemory+0x3c>
cmpl   $0x1,-0x18(%rbp)
jne    114c <getMemory+0x3c>
lea    0xec3(%rip),%rdi
call   1030 <DymosimError@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1159 <getMemory+0x49>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMemory>:
cmp    $0x1,%esi
jne    1126 <getMemory+0x16>
cmp    $0x1,%edx
jne    1126 <getMemory+0x16>
lea    0xedf(%rip),%rdi
jmp    1030 <DymosimError@plt>
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Memory argument to getMemory must be a vector.\00"
define double @getMemory(double* %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %7
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call double @DymosimError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
store double %14, double* %4
br label %19
15: ; preds = %10, %3
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
store double %18, double* %4
br label %19
19: ; preds = %15, %13
%20 = load double, double* %4
ret double %20
}

LLVM IR (-O2):
@.str = [47 x i8] c"Memory argument to getMemory must be a vector.\00"
define double @getMemory(double* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 1
%5 = icmp eq i32 %2, 1
%6 = and i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call double @DymosimError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %3
%10 = load double, double* %0
br label %11
11: ; preds = %9, %7
%12 = phi double [ %8, %7 ], [ %10, %9 ]
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ line;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ process_line(char *);
int /*<<< orphan*/ stdin;
int main() {
  char line[((2 * 2048) - 1) + 1];
  while (fgets(line, sizeof(line), stdin)) {
    process_line(line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
mov    $0x1000,%esi
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     1167 <main+0x47>
lea    -0x1010(%rbp),%rdi
call   1040 <process_line@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    0x2eb7(%rip),%r14
mov    (%r14),%edx
mov    %rsp,%rdi
mov    $0x1000,%esi
call   1030 <fgets@plt>
test   %rax,%rax
je     116d <main+0x4d>
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <process_line@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1030 <fgets@plt>
test   %rax,%rax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4096 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @fgets(i8* %4, i32 4096, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%10 = call i32 @process_line(i8* %9)
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* %2, i32 4096, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 @process_line(i8* %2)
%8 = load i32, i32* @stdin
%9 = call i64 @fgets(i8* %2, i32 4096, i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret i32 0
}
void selection_sort(int *v, int length) {
  void swapmin(int *v, int length);
  if (length > 1) {
    swapmin(v, length);
    selection_sort(v + 1, length - 1);
  }
}


x86 assembly (clang, -O0):
<selection_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1158 <selection_sort+0x38>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <swapmin@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <selection_sort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<selection_sort>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     113c <selection_sort+0x2c>
mov    %esi,%r14d
mov    %rdi,%rbx
nop
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <swapmin@plt>
add    $0x4,%rbx
lea    -0x1(%r14),%eax
cmp    $0x2,%r14d
mov    %eax,%r14d
ja     1120 <selection_sort+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @selection_sort(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32* [ %7, %4 ], [ %0, %2 ]
tail call void @swapmin(i32* %6, i32 %5)
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add nsw i32 %5, -1
%9 = icmp ugt i32 %5, 2
br i1 %9, label %4, label %10
10: ; preds = %4, %2
ret void
}
ovmain(screenmode) unsigned screenmode;
{
  switch (screenmode) {
  case 1:
    scr_clear();
    d2hireson();
    clearhgr(911);
    maintoaux(0x4000, 0x4000 + 8191, 0x4000);
    break;
  case 2:
    d2hiresoff();
    scr_clear();
  }
  return 0;
}


x86 assembly (clang, -O0):
<ovmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1180 <ovmain+0x30>
jmp    116f <ovmain+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     11b2 <ovmain+0x62>
jmp    11c0 <ovmain+0x70>
mov    $0x0,%al
call   1050 <scr_clear@plt>
mov    $0x0,%al
call   1070 <d2hireson@plt>
mov    $0x38f,%edi
mov    $0x0,%al
call   1060 <clearhgr@plt>
mov    $0x4000,%edx
mov    $0x5fff,%esi
mov    %edx,%edi
mov    $0x0,%al
call   1040 <maintoaux@plt>
jmp    11c0 <ovmain+0x70>
mov    $0x0,%al
call   1030 <d2hiresoff@plt>
mov    $0x0,%al
call   1050 <scr_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ovmain>:
push   %rax
cmp    $0x2,%edi
je     118d <ovmain+0x3d>
cmp    $0x1,%edi
jne    119b <ovmain+0x4b>
xor    %eax,%eax
call   1050 <scr_clear@plt>
xor    %eax,%eax
call   1070 <d2hireson@plt>
mov    $0x38f,%edi
xor    %eax,%eax
call   1060 <clearhgr@plt>
mov    $0x4000,%edi
mov    $0x5fff,%esi
mov    $0x4000,%edx
xor    %eax,%eax
call   1040 <maintoaux@plt>
jmp    119b <ovmain+0x4b>
xor    %eax,%eax
call   1030 <d2hiresoff@plt>
xor    %eax,%eax
call   1050 <scr_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ovmain(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %12 [
i32 1, label %4
i32 2, label %9
]
4: ; preds = %1
%5 = call i32 (...) @scr_clear()
%6 = call i32 (...) @d2hireson()
%7 = call i32 (i32, ...) bitcast (i32 (...)* @clearhgr to i32 (i32, ...)*)(i32 911)
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @maintoaux to i32 (i32, i32, i32, ...)*)(i32 16384, i32 24575, i32 16384)
br label %12
9: ; preds = %1
%10 = call i32 (...) @d2hiresoff()
%11 = call i32 (...) @scr_clear()
br label %12
12: ; preds = %9, %1, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @ovmain(i32 %0) {
switch i32 %0, label %10 [
i32 1, label %2
i32 2, label %7
]
2: ; preds = %1
%3 = tail call i32 (...) @scr_clear()
%4 = tail call i32 (...) @d2hireson()
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @clearhgr to i32 (i32, ...)*)(i32 911)
%6 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @maintoaux to i32 (i32, i32, i32, ...)*)(i32 16384, i32 24575, i32 16384)
br label %10
7: ; preds = %1
%8 = tail call i32 (...) @d2hiresoff()
%9 = tail call i32 (...) @scr_clear()
br label %10
10: ; preds = %7, %1, %2
ret i32 0
}
void rop3_1_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_1_0_0>:
or     %edx,%esi
or     (%rdi),%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_1_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_1_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %4, %5
%7 = xor i8 %6, -1
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int sucesso();
int simulacao(int n) {
  int i, canoasSeguranca = 0;
  for (i = 0; i < n; i++)
    if (sucesso() == 1)
      canoasSeguranca++;
  return canoasSeguranca;
}


x86 assembly (clang, -O0):
<simulacao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1161 <simulacao+0x51>
mov    $0x0,%al
call   1030 <sucesso@plt>
cmp    $0x1,%eax
jne    114e <simulacao+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <simulacao+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <simulacao+0x19>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulacao>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1138 <simulacao+0x28>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <sucesso@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ebp
add    $0xffffffff,%ebx
jne    1120 <simulacao+0x10>
jmp    113a <simulacao+0x2a>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @simulacao(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i32 [ %10, %3 ], [ 0, %1 ]
%6 = tail call i32 (...) @sucesso()
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %4, %8
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_ptr;

/* Variables and functions */
int /*<<< orphan*/ mpz_mod(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void gmp_mul(mpz_ptr out, mpz_ptr in, mpz_ptr order) {
  mpz_mul(out, out, in);
  mpz_mod(out, out, order);
}


x86 assembly (clang, -O0):
<gmp_mul>:
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    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <mpz_mul@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <mpz_mod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmp_mul>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%edx
mov    %edi,%ebp
mov    %edi,%esi
call   1030 <mpz_mul@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mpz_mod@plt>

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

LLVM IR (-O2):
define void @gmp_mul(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mpz_mul(i32 %0, i32 %0, i32 %1)
%5 = tail call i32 @mpz_mod(i32 %0, i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_FLAT);
}


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

x86 assembly (clang, -O2):
<init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_FLAT = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = call i32 @glShadeModel(i32 %2)
ret void
}

LLVM IR (-O2):
@GL_FLAT = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = tail call i32 @glShadeModel(i32 %2)
ret void
}
/* Type definitions */
struct ipam_line {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __fprint_ipam_fmt(int /*<<< orphan*/ *, struct ipam_line const *,
                      char const *, int /*<<< orphan*/);
int fprint_ipam_fmt(FILE *output, const struct ipam_line *r, const char *fmt) {
  return __fprint_ipam_fmt(output, r, fmt, 0);
}


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

x86 assembly (clang, -O2):
<fprint_ipam_fmt>:
xor    %ecx,%ecx
jmp    1030 <__fprint_ipam_fmt@plt>

LLVM IR (-O0):
%struct.ipam_line = type { i32 }
define i32 @fprint_ipam_fmt(i32* %0, %struct.ipam_line* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca %struct.ipam_line*
%6 = alloca i8*
store i32* %0, i32** %4
store %struct.ipam_line* %1, %struct.ipam_line** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load %struct.ipam_line*, %struct.ipam_line** %5
%9 = load i8*, i8** %6
%10 = call i32 @__fprint_ipam_fmt(i32* %7, %struct.ipam_line* %8, i8* %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.ipam_line = type { i32 }
define i32 @fprint_ipam_fmt(i32* %0, %struct.ipam_line* %1, i8* %2) {
%4 = tail call i32 @__fprint_ipam_fmt(i32* %0, %struct.ipam_line* %1, i8* %2, i32 0)
ret i32 %4
}
int charType(char ch) {
  if (ch >= 'A' && ch <= 'Z')
    return 1;
  if (ch >= 'a' && ch <= 'z')
    return 2;
  if (ch >= '0' && ch <= '9')
    return 3;
  return 0;
}


x86 assembly (clang, -O0):
<charType>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1130 <charType+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1130 <charType+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1183 <charType+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1156 <charType+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1156 <charType+0x56>
movl   $0x2,-0x4(%rbp)
jmp    1183 <charType+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     117c <charType+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     117c <charType+0x7c>
movl   $0x3,-0x4(%rbp)
jmp    1183 <charType+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charType>:
lea    -0x41(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x1a,%cl
jb     112a <charType+0x2a>
lea    -0x61(%rdi),%ecx
mov    $0x2,%eax
cmp    $0x1a,%cl
jb     112a <charType+0x2a>
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
lea    (%rax,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @charType(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %31
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 97
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 122
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 2, i32* %2
br label %31
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 48
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 57
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 3, i32* %2
br label %31
30: ; preds = %25, %21
store i32 0, i32* %2
br label %31
31: ; preds = %30, %29, %20, %11
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @charType(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = add i8 %0, -97
%6 = icmp ult i8 %5, 26
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = add i8 %0, -48
%9 = icmp ult i8 %8, 10
%10 = select i1 %9, i32 3, i32 0
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %1 ], [ 2, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
double pow(double, double);
double innermost_planet(double stellar_mass_ratio) {
  return (0.3 * pow(stellar_mass_ratio, (1.0 / 3.0)));
}


x86 assembly (clang, -O0):
<innermost_planet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<innermost_planet>:
push   %rax
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @innermost_planet(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 0x3FD5555555555555)
%5 = fmul double 3.000000e-01, %4
ret double %5
}

LLVM IR (-O2):
define double @innermost_planet(double %0) {
%2 = tail call double @pow(double %0, double 0x3FD5555555555555)
%3 = fmul double %2, 3.000000e-01
ret double %3
}
int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.obd_device = type opaque
define i32 @sptlrpc_lprocfs_cliobd_attach(%struct.obd_device* nocapture readnone %0) {
ret i32 0
}
float sign(const float x) {
  if (x < 0)
    return -1;
  if (x > 0)
    return +1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1128 <sign+0x28>
movss  0xee6(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <sign+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm0,%xmm2
movss  0xeed(%rip),%xmm3
andps  %xmm2,%xmm3
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andnps %xmm3,%xmm1
movss  0xedb(%rip),%xmm2
andps  %xmm2,%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sign(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float -1.000000e+00, float* %2
br label %12
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ogt float %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store float 1.000000e+00, float* %2
br label %12
11: ; preds = %7
store float 0.000000e+00, float* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load float, float* %2
ret float %13
}

LLVM IR (-O2):
define float @sign(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 0.000000e+00
%4 = select i1 %3, float 1.000000e+00, float 0.000000e+00
%5 = select i1 %2, float -1.000000e+00, float %4
ret float %5
}
/* Variables and functions */
int fabs(float);
int if_strategy(float expr_result) { return fabs(expr_result) >= 1e-5; }


x86 assembly (clang, -O0):
<if_strategy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xecd(%rip),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @if_strategy(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @fabs(float %3)
%5 = sitofp i32 %4 to double
%6 = fcmp oge double %5, 1.000000e-05
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @if_strategy(float %0) {
%2 = tail call i32 @fabs(float %0)
%3 = icmp sgt i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ min_maps;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
int get_Screen_min_maps(void *_p) { return (int)((Screen *)_p)->min_maps; }


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

x86 assembly (clang, -O2):
<get_Screen_min_maps>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_Screen_min_maps(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_Screen_min_maps(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int qd_lt_qd_d(const double *a, double b) {
  return (a[0] < b || (a[0] == b && a[1] < 0.0)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<qd_lt_qd_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
ja     115f <qd_lt_qd_d+0x5f>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x12(%rbp)
jne    1159 <qd_lt_qd_d+0x59>
jp     1159 <qd_lt_qd_d+0x59>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x8(%rax),%xmm0
seta   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_lt_qd_d>:
movsd  (%rdi),%xmm1
mov    $0x1,%eax
ucomisd %xmm1,%xmm0
ja     1125 <qd_lt_qd_d+0x25>
ucomisd %xmm0,%xmm1
jne    1126 <qd_lt_qd_d+0x26>
jp     1126 <qd_lt_qd_d+0x26>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd 0x8(%rdi),%xmm0
seta   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @qd_lt_qd_d(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fcmp olt double %7, %8
br i1 %9, label %23, label %10
10: ; preds = %2
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %4
%15 = fcmp oeq double %13, %14
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fcmp olt double %19, 0.000000e+00
br label %21
21: ; preds = %16, %10
%22 = phi i1 [ false, %10 ], [ %20, %16 ]
br label %23
23: ; preds = %21, %2
%24 = phi i1 [ true, %2 ], [ %22, %21 ]
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @qd_lt_qd_d(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp olt double %3, %1
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = fcmp oeq double %3, %1
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fcmp olt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %7, %2
%13 = phi i32 [ 1, %2 ], [ 0, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isblank(char);
int can_print_it(char ch) { return isalpha(ch) || isblank(ch); }


x86 assembly (clang, -O0):
<can_print_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <can_print_it+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_print_it>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <can_print_it+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isblank@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @can_print_it(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isblank(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @can_print_it(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isblank(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tm *);
struct tm *getLocalTime(int /*<<< orphan*/ *);
int getSec() {
  struct tm *mytime;
  int sec = 0;
  mytime = getLocalTime((time_t *)NULL);
  sec = mytime->tm_sec;
  free(mytime);
  return sec;
}


x86 assembly (clang, -O0):
<getSec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <getLocalTime@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSec>:
push   %rbx
xor    %edi,%edi
call   1040 <getLocalTime@plt>
mov    (%rax),%ebx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @getSec() {
%1 = alloca %struct.tm*
%2 = alloca i32
store i32 0, i32* %2
%3 = call %struct.tm* @getLocalTime(i32* null)
store %struct.tm* %3, %struct.tm** %1
%4 = load %struct.tm*, %struct.tm** %1
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i32, i32* %5
store i32 %6, i32* %2
%7 = load %struct.tm*, %struct.tm** %1
%8 = call i32 @free(%struct.tm* %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @getSec() {
%1 = tail call %struct.tm* @getLocalTime(i32* null)
%2 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @free(%struct.tm* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ MIDI_PauseSong();
void MUSIC_Pause(void) { MIDI_PauseSong(); }


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

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

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

LLVM IR (-O2):
define void @MUSIC_Pause() {
%1 = tail call i32 (...) @MIDI_PauseSong()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ r();
void good_paired1(void) {
  a();
  r();
}


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

x86 assembly (clang, -O2):
<good_paired1>:
push   %rax
xor    %eax,%eax
call   1040 <a@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <r@plt>

LLVM IR (-O0):
define void @good_paired1() {
%1 = call i32 (...) @a()
%2 = call i32 (...) @r()
ret void
}

LLVM IR (-O2):
define void @good_paired1() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @r()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
size_t uint64_pack(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ zigzag64(int /*<<< orphan*/);
size_t sint64_pack(int64_t value, uint8_t *out) {
  return uint64_pack(zigzag64(value), out);
}


x86 assembly (clang, -O0):
<sint64_pack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <zigzag64@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <uint64_pack@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sint64_pack>:
push   %rbx
mov    %rsi,%rbx
call   1040 <zigzag64@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <uint64_pack@plt>

LLVM IR (-O0):
define i64 @sint64_pack(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 = call i32 @zigzag64(i32 %5)
%7 = load i32*, i32** %4
%8 = call i64 @uint64_pack(i32 %6, i32* %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @sint64_pack(i32 %0, i32* %1) {
%3 = tail call i32 @zigzag64(i32 %0)
%4 = tail call i64 @uint64_pack(i32 %3, i32* %1)
ret i64 %4
}
int array_check_index(long int index) {
  return index >= 0 && index <= 16777215 ? 0 : 11;
}


x86 assembly (clang, -O0):
<array_check_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1126 <array_check_index+0x26>
cmpq   $0xffffff,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
mov    $0xb,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_check_index>:
xor    %ecx,%ecx
cmp    $0x1000000,%rdi
mov    $0xb,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @array_check_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 16777215
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 11
ret i32 %11
}

LLVM IR (-O2):
define i32 @array_check_index(i64 %0) {
%2 = icmp ult i64 %0, 16777216
%3 = select i1 %2, i32 0, i32 11
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ val;
typedef int __u32;

/* Variables and functions */
__u32 ___swahw32(__u32 val) {
  return ((__u32)((((__u32)(val) & (__u32)0x0000ffffUL) << 16) |
                  (((__u32)(val) & (__u32)0xffff0000UL) >> 16)));
}


x86 assembly (clang, -O0):
<___swahw32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
shl    $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff0000,%ecx
sar    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @___swahw32(i32 %0) {
%2 = shl i32 %0, 16
%3 = ashr i32 %0, 16
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
char *tokquote_r(char *, char const *, char **);
char *tokquote(char *s, const char *delim) {
  static char *last;
  return (tokquote_r(s, delim, &last));
}


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

x86 assembly (clang, -O2):
<tokquote>:
lea    0x2f19(%rip),%rdx
jmp    1030 <tokquote_r@plt>

LLVM IR (-O0):
@tokquote.last = internal global i8* null
define i8* @tokquote(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @tokquote_r(i8* %5, i8* %6, i8** @tokquote.last)
ret i8* %7
}

LLVM IR (-O2):
@tokquote.last = internal global i8* null
define i8* @tokquote(i8* %0, i8* %1) {
%3 = tail call i8* @tokquote_r(i8* %0, i8* %1, i8** @tokquote.last)
ret i8* %3
}
/* Type definitions */
struct world_circular {
  int dummy;
};

/* Variables and functions */
void *world_circular_at(struct world_circular *, int /*<<< orphan*/, size_t);
void *world_circular_front(struct world_circular *c, size_t size) {
  return world_circular_at(c, 0, size);
}


x86 assembly (clang, -O0):
<world_circular_front>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <world_circular_at@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world_circular_front>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <world_circular_at@plt>

LLVM IR (-O0):
%struct.world_circular = type { i32 }
define i8* @world_circular_front(%struct.world_circular* %0, i64 %1) {
%3 = alloca %struct.world_circular*
%4 = alloca i64
store %struct.world_circular* %0, %struct.world_circular** %3
store i64 %1, i64* %4
%5 = load %struct.world_circular*, %struct.world_circular** %3
%6 = load i64, i64* %4
%7 = call i8* @world_circular_at(%struct.world_circular* %5, i32 0, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.world_circular = type { i32 }
define i8* @world_circular_front(%struct.world_circular* %0, i64 %1) {
%3 = tail call i8* @world_circular_at(%struct.world_circular* %0, i32 0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ smsc911x_disable_multicast_reception();
void disableMulticastReception(void) { smsc911x_disable_multicast_reception(); }


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

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

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

LLVM IR (-O2):
define void @disableMulticastReception() {
%1 = tail call i32 (...) @smsc911x_disable_multicast_reception()
ret void
}
/* Variables and functions */
size_t hash(int key) { return key * (4294967291L); }


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xfffffffb,%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
movslq %edi,%rcx
mov    $0xfffffffb,%eax
imul   %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @hash(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, 4294967291
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int main() {
  int count = 0;
  while (1) {
    sleep(1);
    if (count > 10)
      count = 0;
    printf("%d\n", count);
    count++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
cmpl   $0xa,-0x8(%rbp)
jle    1151 <main+0x31>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
lea    0xed2(%rip),%rbx
xor    %ebp,%ebp
mov    $0x1,%edi
call   1040 <sleep@plt>
cmp    $0xb,%ebp
cmovge %r14d,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%ebp
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %8
%4 = call i32 @sleep(i32 1)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 10
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 0, i32* %2
br label %8
8: ; preds = %7, %3
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i32 @sleep(i32 1)
%4 = icmp sgt i32 %2, 10
%5 = select i1 %4, i32 0, i32 %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nsw i32 %5, 1
br label %1
}
int main(int argc, const char *argv[]) {
  int a[3][2] = {{0, 1}, {2, 3}, {4, 5}};
  double b[3][2] = {{0, 0.1}, {0.2, 0.3}, {0.4, 5.0}};
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xf03(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xf00(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xefd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x [2 x i32]] [[2 x i32] [i32 0, i32 1], [2 x i32] [i32 2, i32 3], [2 x i32] [i32 4, i32 5]]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x [2 x i32]]
%7 = alloca [3 x [2 x double]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [3 x [2 x i32]]* %6 to i8*
%9 = bitcast [3 x [2 x double]]* %7 to i8*
%10 = bitcast i8* %9 to [3 x [2 x double]]*
%11 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %10, i32 0, i32 0
%12 = getelementptr inbounds [2 x double], [2 x double]* %11, i32 0, i32 1
store double 1.000000e-01, double* %12
%13 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %10, i32 0, i32 1
%14 = getelementptr inbounds [2 x double], [2 x double]* %13, i32 0, i32 0
store double 2.000000e-01, double* %14
%15 = getelementptr inbounds [2 x double], [2 x double]* %13, i32 0, i32 1
store double 3.000000e-01, double* %15
%16 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %10, i32 0, i32 2
%17 = getelementptr inbounds [2 x double], [2 x double]* %16, i32 0, i32 0
store double 4.000000e-01, double* %17
%18 = getelementptr inbounds [2 x double], [2 x double]* %16, i32 0, i32 1
store double 5.000000e+00, double* %18
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}