xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void foo(void) { puts("Foo to you too!"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Foo to you too!\00"
define void @foo() {
%1 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Foo to you too!\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
char *strcat(char *dest, const char *src) {
  while (*dest != 0) {
    dest++;
  }
  do {
    *dest++ = *src++;
  } while (*src != 0);
  return dest;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     112d <strcat+0x2d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    1132 <strcat+0x32>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1110 <strcat+0x10>
mov    (%rsi),%dl
mov    $0xffffffffffffffff,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %dl,(%rax,%rcx,1)
movzbl 0x2(%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1130 <strcat+0x30>
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
br label %10
10: ; preds = %8, %10
%11 = phi i8 [ %16, %10 ], [ %9, %8 ]
%12 = phi i8* [ %15, %10 ], [ %4, %8 ]
%13 = phi i8* [ %14, %10 ], [ %1, %8 ]
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %12
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %10
18: ; preds = %10
ret i8* %15
}
int is_space(char c) { return (c == ' ' || c == '\t'); }


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_space+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
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 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ TFT_7_Write_Command(unsigned char);
int /*<<< orphan*/ TFT_7_Write_Data(unsigned char);
void TFT_7_Command_Write(unsigned char REG, unsigned char VALUE) {
  TFT_7_Write_Command(REG);
  TFT_7_Write_Data(VALUE);
}


x86 assembly (clang, -O0):
<TFT_7_Command_Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%edi
call   1040 <TFT_7_Write_Command@plt>
movzbl -0x2(%rbp),%edi
call   1030 <TFT_7_Write_Data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TFT_7_Command_Write>:
push   %rbx
mov    %esi,%ebx
call   1040 <TFT_7_Write_Command@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <TFT_7_Write_Data@plt>

LLVM IR (-O0):
define void @TFT_7_Command_Write(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call i32 @TFT_7_Write_Command(i8 zeroext %5)
%7 = load i8, i8* %4
%8 = call i32 @TFT_7_Write_Data(i8 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @TFT_7_Command_Write(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @TFT_7_Write_Command(i8 zeroext %0)
%4 = tail call i32 @TFT_7_Write_Data(i8 zeroext %1)
ret void
}
double freq_glo(int freq, int freqn) {
  switch (freq) {
  case 0:
    return 1.60200E9 + 0.56250E6 * freqn;
  case 1:
    return 1.24600E9 + 0.43750E6 * freqn;
  }
  return 0.0;
}


x86 assembly (clang, -O0):
<freq_glo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     112e <freq_glo+0x2e>
jmp    111d <freq_glo+0x1d>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
je     1155 <freq_glo+0x55>
jmp    117c <freq_glo+0x7c>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <freq_glo+0x84>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <freq_glo+0x84>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<freq_glo>:
cmp    $0x1,%edi
je     111e <freq_glo+0x1e>
test   %edi,%edi
jne    1133 <freq_glo+0x33>
cvtsi2sd %esi,%xmm0
mulsd  0xefb(%rip),%xmm0
addsd  0xefb(%rip),%xmm0
ret
cvtsi2sd %esi,%xmm0
mulsd  0xed6(%rip),%xmm0
addsd  0xed6(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @freq_glo(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %15 [
i32 0, label %7
i32 1, label %11
]
7: ; preds = %2
%8 = load i32, i32* %5
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double 5.625000e+05, double %9, double 1.602000e+09)
store double %10, double* %3
br label %16
11: ; preds = %2
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double 4.375000e+05, double %13, double 1.246000e+09)
store double %14, double* %3
br label %16
15: ; preds = %2
store double 0.000000e+00, double* %3
br label %16
16: ; preds = %15, %11, %7
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @freq_glo(i32 %0, i32 %1) {
switch i32 %0, label %9 [
i32 0, label %3
i32 1, label %6
]
3: ; preds = %2
%4 = sitofp i32 %1 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 5.625000e+05, double 1.602000e+09)
br label %9
6: ; preds = %2
%7 = sitofp i32 %1 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 4.375000e+05, double 1.246000e+09)
br label %9
9: ; preds = %2, %6, %3
%10 = phi double [ %8, %6 ], [ %5, %3 ], [ 0.000000e+00, %2 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ key_registry_exit();
int /*<<< orphan*/ nonces_exit();
void exit_crypto_lib() {
  nonces_exit();
  key_registry_exit();
}


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

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

LLVM IR (-O0):
define void @exit_crypto_lib() {
%1 = call i32 (...) @nonces_exit()
%2 = call i32 (...) @key_registry_exit()
ret void
}

LLVM IR (-O2):
define void @exit_crypto_lib() {
%1 = tail call i32 (...) @nonces_exit()
%2 = tail call i32 (...) @key_registry_exit()
ret void
}
/* Type definitions */
struct rtas_event {
  int dummy;
};
struct rtas_epow_scn {
  int dummy;
};

/* Variables and functions */
scalar_t__ get_re_scn(struct rtas_event *, int);
struct rtas_epow_scn *rtas_get_epow_scn(struct rtas_event *re) {
  return (struct rtas_epow_scn *)get_re_scn(re, 3);
}


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

x86 assembly (clang, -O2):
<rtas_get_epow_scn>:
mov    $0x3,%esi
jmp    1030 <get_re_scn@plt>

LLVM IR (-O0):
%struct.rtas_epow_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_epow_scn* @rtas_get_epow_scn(%struct.rtas_event* %0) {
%2 = alloca %struct.rtas_event*
store %struct.rtas_event* %0, %struct.rtas_event** %2
%3 = load %struct.rtas_event*, %struct.rtas_event** %2
%4 = call i64 @get_re_scn(%struct.rtas_event* %3, i32 3)
%5 = inttoptr i64 %4 to %struct.rtas_epow_scn*
ret %struct.rtas_epow_scn* %5
}

LLVM IR (-O2):
%struct.rtas_epow_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_epow_scn* @rtas_get_epow_scn(%struct.rtas_event* %0) {
%2 = tail call i64 @get_re_scn(%struct.rtas_event* %0, i32 3)
%3 = inttoptr i64 %2 to %struct.rtas_epow_scn*
ret %struct.rtas_epow_scn* %3
}
/* Variables and functions */
int /*<<< orphan*/ fizz_buzz(int);
int main(void) {
  fizz_buzz(100);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fizz_buzz(i32 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("A START %d\n", getpid());
  execl("./p2b", "./p2b", NULL);
  printf("A STOP %d\n", getpid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rdi
call   1050 <execl@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
mov    %rdi,%rsi
xor    %edx,%edx
call   1050 <execl@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"A START %d\0A\00"
@.str.1 = [6 x i8] c"./p2b\00"
@.str.2 = [11 x i8] c"A STOP %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @execl(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* null)
%5 = call i32 (...) @getpid()
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"A START %d\0A\00"
@.str.1 = [6 x i8] c"./p2b\00"
@.str.2 = [11 x i8] c"A STOP %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @execl(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* null)
%4 = tail call i32 (...) @getpid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}
char tm1640_invertVertical(char input) {
  return (input & 0xC0) | ((input & 0x01) << 3) | ((input & 0x08) >> 3) |
         ((input & 0x02) << 1) | ((input & 0x04) >> 1) | ((input & 0x10) << 1) |
         ((input & 0x20) >> 1);
}


x86 assembly (clang, -O0):
<tm1640_invertVertical>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xc0,%eax
movsbl -0x1(%rbp),%ecx
and    $0x1,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%ecx
and    $0x8,%ecx
sar    $0x3,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%ecx
and    $0x2,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%ecx
and    $0x4,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%ecx
and    $0x10,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%ecx
and    $0x20,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm1640_invertVertical>:
mov    %edi,%eax
and    $0xc0,%eax
mov    %edi,%ecx
and    $0x1,%ecx
lea    (%rax,%rcx,8),%eax
mov    %edi,%ecx
shr    $0x3,%ecx
and    $0x1,%ecx
or     %eax,%ecx
lea    (%rdi,%rdi,1),%eax
mov    %eax,%edx
and    $0x4,%edx
or     %ecx,%edx
shr    %edi
mov    %edi,%ecx
and    $0x2,%ecx
or     %edx,%ecx
and    $0x20,%eax
or     %ecx,%eax
and    $0x10,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @tm1640_invertVertical(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 192
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = and i32 %7, 1
%9 = shl i32 %8, 3
%10 = or i32 %5, %9
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = and i32 %12, 8
%14 = ashr i32 %13, 3
%15 = or i32 %10, %14
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = and i32 %17, 2
%19 = shl i32 %18, 1
%20 = or i32 %15, %19
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = and i32 %22, 4
%24 = ashr i32 %23, 1
%25 = or i32 %20, %24
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = and i32 %27, 16
%29 = shl i32 %28, 1
%30 = or i32 %25, %29
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = and i32 %32, 32
%34 = ashr i32 %33, 1
%35 = or i32 %30, %34
%36 = trunc i32 %35 to i8
ret i8 %36
}

LLVM IR (-O2):
define signext i8 @tm1640_invertVertical(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, 192
%4 = shl nsw i32 %2, 3
%5 = and i32 %4, 8
%6 = or i32 %5, %3
%7 = lshr i32 %2, 3
%8 = and i32 %7, 1
%9 = or i32 %6, %8
%10 = shl nsw i32 %2, 1
%11 = and i32 %10, 4
%12 = or i32 %9, %11
%13 = lshr i32 %2, 1
%14 = and i32 %13, 2
%15 = or i32 %12, %14
%16 = and i32 %10, 32
%17 = or i32 %15, %16
%18 = and i32 %13, 16
%19 = or i32 %17, %18
%20 = trunc i32 %19 to i8
ret i8 %20
}
/* Type definitions */
struct vector {
  int dummy;
};
struct object {
  int dummy;
};

/* Variables and functions */
struct object *new_plane2(int /*<<< orphan*/);
int /*<<< orphan*/ new_polyline2(struct vector *, unsigned int);
struct object *new_polygon(struct vector *vs, unsigned n) {
  return new_plane2(new_polyline2(vs, n));
}


x86 assembly (clang, -O0):
<new_polygon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <new_polyline2@plt>
mov    %eax,%edi
call   1040 <new_plane2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_polygon>:
push   %rax
call   1030 <new_polyline2@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <new_plane2@plt>

LLVM IR (-O0):
%struct.object = type { i32 }
%struct.vector = type { i32 }
define %struct.object* @new_polygon(%struct.vector* %0, i32 %1) {
%3 = alloca %struct.vector*
%4 = alloca i32
store %struct.vector* %0, %struct.vector** %3
store i32 %1, i32* %4
%5 = load %struct.vector*, %struct.vector** %3
%6 = load i32, i32* %4
%7 = call i32 @new_polyline2(%struct.vector* %5, i32 %6)
%8 = call %struct.object* @new_plane2(i32 %7)
ret %struct.object* %8
}

LLVM IR (-O2):
%struct.object = type { i32 }
%struct.vector = type { i32 }
define %struct.object* @new_polygon(%struct.vector* %0, i32 %1) {
%3 = tail call i32 @new_polyline2(%struct.vector* %0, i32 %1)
%4 = tail call %struct.object* @new_plane2(i32 %3)
ret %struct.object* %4
}
/* Variables and functions */
int /*<<< orphan*/ error0(char *, char *);
void ac_liv(int v, char *vv) {
  if (!v) {
    error0("Loop Invariant Violation.", vv);
  }
}


x86 assembly (clang, -O0):
<ac_liv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1139 <ac_liv+0x29>
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <error0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ac_liv>:
test   %edi,%edi
je     1115 <ac_liv+0x5>
ret
lea    0xee4(%rip),%rdi
jmp    1030 <error0@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Loop Invariant Violation.\00"
define void @ac_liv(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @error0(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Loop Invariant Violation.\00"
define void @ac_liv(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @error0(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
const char *selftest(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @selftest() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @selftest() {
ret i8* null
}
/* Variables and functions */
scalar_t__ foo();
int main(void) {
  int i;
  float a = 0, b = 0;
  for (i = 0; i < 100; i++) {
    a += foo();
    b += foo();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    117a <main+0x6a>
mov    $0x0,%al
call   1030 <foo@plt>
cvtsi2ss %rax,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
cvtsi2ss %rax,%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store i32 0, i32* %2
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = call i64 (...) @foo()
%10 = sitofp i64 %9 to float
%11 = load float, float* %3
%12 = fadd float %11, %10
store float %12, float* %3
%13 = call i64 (...) @foo()
%14 = sitofp i64 %13 to float
%15 = load float, float* %4
%16 = fadd float %15, %14
store float %16, float* %4
br label %17
17: ; preds = %8
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %5
20: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i64 (...) @foo()
%4 = tail call i64 (...) @foo()
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
char *strcat(char *s, const char *t) {
  while (*s++)
    ;
  s--;
  while ((*s++ = *t++) != 0)
    ;
  return s;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1129 <strcat+0x29>
jmp    110c <strcat+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1168 <strcat+0x68>
jmp    1135 <strcat+0x35>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1110 <strcat+0x10>
mov    $0xffffffffffffffff,%rcx
movzbl 0x1(%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <strcat+0x20>
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %13
}
/* Variables and functions */
int isdigit(int);
int is_digit(int c) { return isdigit(c); }


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

x86 assembly (clang, -O2):
<is_digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sgetrf_(int *, int *, float *, int *, int *, int *);
int aa_cla_sgetrf(int m, int n, float *A, int lda, int *ipiv) {
  int info = 0;
  sgetrf_(&m, &n, A, &lda, ipiv, &info);
  return info;
}


x86 assembly (clang, -O0):
<aa_cla_sgetrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rcx
lea    -0x24(%rbp),%r9
call   1030 <sgetrf_@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_sgetrf>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %esi,0x10(%rsp)
mov    %ecx,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r9
call   1030 <sgetrf_@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @aa_cla_sgetrf(i32 %0, i32 %1, float* %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca float*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store float* %2, float** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
store i32 0, i32* %11
%12 = load float*, float** %8
%13 = load i32*, i32** %10
%14 = call i32 @sgetrf_(i32* %6, i32* %7, float* %12, i32* %9, i32* %13, i32* %11)
%15 = load i32, i32* %11
ret i32 %15
}

LLVM IR (-O2):
define i32 @aa_cla_sgetrf(i32 %0, i32 %1, float* %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %3, i32* %8
%10 = bitcast i32* %9 to i8*
store i32 0, i32* %9
%11 = call i32 @sgetrf_(i32* %6, i32* %7, float* %2, i32* %8, i32* %4, i32* %9)
%12 = load i32, i32* %9
ret i32 %12
}
/* Variables and functions */
int siphash_test();
int main(void) { return siphash_test(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @siphash_test()
ret i32 %1
}
void clean_matrix(char v[23][30], int m) {
  int i;
  for (i = 0; i < m; i++) {
    free(v[i]);
  }
  free(v);
}


x86 assembly (clang, -O0):
<clean_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <clean_matrix+0x44>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
imul   $0x1e,%rax,%rax
add    %rax,%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <clean_matrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <clean_matrix+0x32>
mov    %esi,%r15d
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x1e,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <clean_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @clean_matrix([30 x i8]* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %9, %6 ]
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 %7, i64 0
tail call void @free(i8* %8)
%9 = add nuw nsw i64 %7, 1
%10 = icmp eq i64 %9, %5
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = getelementptr [30 x i8], [30 x i8]* %0, i64 0, i64 0
tail call void @free(i8* %12)
ret void
}
void RemoveFileFromPath(char *path) {
  char *ls = 0;
  while (*path) {
    if (*path == '\\' || *path == '/')
      ls = path;
    path++;
  }
  if (ls)
    *ls = 0;
}


x86 assembly (clang, -O0):
<RemoveFileFromPath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <RemoveFileFromPath+0x56>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     113d <RemoveFileFromPath+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1145 <RemoveFileFromPath+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <RemoveFileFromPath+0x10>
cmpq   $0x0,-0x10(%rbp)
je     1168 <RemoveFileFromPath+0x68>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveFileFromPath>:
xor    %eax,%eax
jmp    1117 <RemoveFileFromPath+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdi,%rax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x2f,%cl
je     1110 <RemoveFileFromPath+0x10>
cmp    $0x5c,%cl
je     1110 <RemoveFileFromPath+0x10>
test   %cl,%cl
jne    1113 <RemoveFileFromPath+0x13>
test   %rax,%rax
je     1130 <RemoveFileFromPath+0x30>
movb   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @RemoveFileFromPath(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 92
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %18, label %20
18: ; preds = %13, %8
%19 = load i8*, i8** %2
store i8* %19, i8** %3
br label %20
20: ; preds = %18, %13
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %4
23: ; preds = %4
%24 = load i8*, i8** %3
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i8*, i8** %3
store i8 0, i8* %27
br label %28
28: ; preds = %26, %23
ret void
}

LLVM IR (-O2):
define void @RemoveFileFromPath(i8* %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %9, %7 ]
%4 = phi i8* [ null, %1 ], [ %8, %7 ]
%5 = load i8, i8* %3
switch i8 %5, label %7 [
i8 0, label %10
i8 92, label %6
i8 47, label %6
]
6: ; preds = %2, %2
br label %7
7: ; preds = %2, %6
%8 = phi i8* [ %3, %6 ], [ %4, %2 ]
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2
%11 = icmp eq i8* %4, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i8 0, i8* %4
br label %13
13: ; preds = %12, %10
ret void
}
const char *engine_status_str(int status) {
  const char *list[] = {"spawned", "inited", "started"};
  const int n = sizeof(list) / sizeof(list[0]);
  if (status < 0 || status >= n)
    return "-";
  return list[status];
}


x86 assembly (clang, -O0):
<engine_status_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    0x2d22(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2d1f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2d1c(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x3,-0x34(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1143 <engine_status_str+0x43>
cmpl   $0x3,-0xc(%rbp)
jl     1153 <engine_status_str+0x53>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <engine_status_str+0x60>
movslq -0xc(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<engine_status_str>:
cmp    $0x2,%edi
jbe    110d <engine_status_str+0xd>
lea    0xf0b(%rip),%rax
ret
mov    %edi,%eax
lea    0xf06(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"spawned\00"
@.str.1 = [7 x i8] c"inited\00"
@.str.2 = [8 x i8] c"started\00"
@__const.engine_status_str.list = [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [2 x i8] c"-\00"
define i8* @engine_status_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [3 x i8*]
%5 = alloca i32
store i32 %0, i32* %3
%6 = bitcast [3 x i8*]* %4 to i8*
store i32 3, i32* %5
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 3
br i1 %11, label %12, label %13
12: ; preds = %9, %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %18
13: ; preds = %9
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 %15
%17 = load i8*, i8** %16
store i8* %17, i8** %2
br label %18
18: ; preds = %13, %12
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"spawned\00"
@.str.1 = [7 x i8] c"inited\00"
@.str.2 = [8 x i8] c"started\00"
@reltable.engine_status_str = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.engine_status_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.engine_status_str to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.engine_status_str to i64)) to i32)]
@.str.3 = [2 x i8] c"-\00"
define i8* @engine_status_str(i32 %0) {
%2 = icmp ugt i32 %0, 2
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = zext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.engine_status_str to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Type definitions */
struct pilha {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pilha *);
int /*<<< orphan*/ makenull(struct pilha *);
void destroy(struct pilha *p) {
  makenull(p);
  free(p);
}


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

x86 assembly (clang, -O2):
<destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <makenull@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.pilha = type { i32 }
define void @destroy(%struct.pilha* %0) {
%2 = alloca %struct.pilha*
store %struct.pilha* %0, %struct.pilha** %2
%3 = load %struct.pilha*, %struct.pilha** %2
%4 = call i32 @makenull(%struct.pilha* %3)
%5 = load %struct.pilha*, %struct.pilha** %2
%6 = call i32 @free(%struct.pilha* %5)
ret void
}

LLVM IR (-O2):
%struct.pilha = type { i32 }
define void @destroy(%struct.pilha* %0) {
%2 = tail call i32 @makenull(%struct.pilha* %0)
%3 = tail call i32 @free(%struct.pilha* %0)
ret void
}
void ConfigureOscillator(void) {}


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

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

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

LLVM IR (-O2):
define void @ConfigureOscillator() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ k_disp_str(char *);
void sys_disp_str(char *str) { k_disp_str(str); }


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

x86 assembly (clang, -O2):
<sys_disp_str>:
jmp    1030 <k_disp_str@plt>

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

LLVM IR (-O2):
define void @sys_disp_str(i8* %0) {
%2 = tail call i32 @k_disp_str(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_bit(int);
void flush_bits(void) {
  int i;
  for (i = 0; i < 63; i++) {
    process_bit(!(i & 1));
  }
}


x86 assembly (clang, -O0):
<flush_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3f,-0x4(%rbp)
jge    114f <flush_bits+0x3f>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <process_bit@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <flush_bits+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_bits>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
not    %edi
and    $0x1,%edi
call   1030 <process_bit@plt>
add    $0x1,%ebx
cmp    $0x3f,%ebx
jne    1120 <flush_bits+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @flush_bits() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 63
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i32, i32* %1
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @process_bit(i32 %10)
br label %12
12: ; preds = %5
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @flush_bits() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
%5 = tail call i32 @process_bit(i32 %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 63
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double a, b;
  scanf("%lf %lf", &a, &b);
  printf("%d %d", (int)(a * b), (int)a * (int)b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%esi
cvttsd2si -0x10(%rbp),%edx
cvttsd2si -0x18(%rbp),%eax
imul   %eax,%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%eax
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
cvttsd2si %xmm1,%edx
imul   %eax,%edx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %2
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = fptosi double %7 to i32
%9 = load double, double* %2
%10 = fptosi double %9 to i32
%11 = load double, double* %3
%12 = fptosi double %11 to i32
%13 = mul nsw i32 %10, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = fptosi double %8 to i32
%10 = fptosi double %6 to i32
%11 = fptosi double %7 to i32
%12 = mul nsw i32 %11, %10
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %12)
ret i32 0
}
/* Variables and functions */
int sscanf(char const *, char *, float *);
int parse_float(float *f, const char *str) {
  return (sscanf(str, "%f", f) != 1);
}


x86 assembly (clang, -O0):
<parse_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <sscanf@plt>
cmp    $0x1,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_float>:
push   %rax
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee2(%rip),%rsi
mov    %rax,%rdi
call   1030 <sscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @parse_float(float* %0, i8* %1) {
%3 = alloca float*
%4 = alloca i8*
store float* %0, float** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load float*, float** %3
%7 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%8 = icmp ne i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @parse_float(float* %0, i8* nocapture %1) {
%3 = tail call i32 @sscanf(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %0)
%4 = icmp ne i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ g_mk_socket_path(int /*<<< orphan*/);
int g_fork(void) {
  int rv;
  rv = fork();
  if (rv == 0) {
    g_mk_socket_path(0);
  }
  return rv;
}


x86 assembly (clang, -O0):
<g_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1143 <g_fork+0x23>
xor    %edi,%edi
call   1030 <g_mk_socket_path@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_fork>:
push   %rbx
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1135 <g_fork+0x15>
xor    %edi,%edi
call   1030 <g_mk_socket_path@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @g_fork() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @g_mk_socket_path(i32 0)
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @g_fork() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @g_mk_socket_path(i32 0)
br label %5
5: ; preds = %3, %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ hosts();
int /*<<< orphan*/ nets();
int /*<<< orphan*/ protocols();
int main(int argc, char *argv[]) {
  hosts();
  nets();
  protocols();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @hosts()
%7 = call i32 (...) @nets()
%8 = call i32 (...) @protocols()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @hosts()
%4 = tail call i32 (...) @nets()
%5 = tail call i32 (...) @protocols()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xab() {
  Assert_real((isupper(171) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              860, ("isupper should be 0 for 0xab"));
}


x86 assembly (clang, -O0):
<t_isupper_0xab>:
push   %rbp
mov    %rsp,%rbp
mov    $0xab,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x35c,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xab>:
push   %rax
mov    $0xab,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x35c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xab\00"
define void @t_isupper_0xab() {
%1 = call i64 @isupper(i32 171)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xab\00"
define void @t_isupper_0xab() {
%1 = tail call i64 @isupper(i32 171)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_button_box_get_layout() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_box_get_layout() {
ret void
}