xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x, y, z;
  x = 30, y = 20, z = 10;
  x = (x /= y, x += 10, x *= 2);
  printf("value of x: %d", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"value of x: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 20, i32* %3
store i32 10, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = sdiv i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 10
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = mul nsw i32 %10, 2
store i32 %11, i32* %2
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"value of x: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 22)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doubler(int /*<<< orphan*/ *);
int main() {
  doubler(NULL);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @doubler(i32* null)
ret i32 0
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%08X\n", atoi(argv[1]));
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%08X\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%08X\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fflush(FILE *f) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @fflush(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sendBlink(int, int, int, int);
int /*<<< orphan*/ sendConf(int, int);
void setRedStill(int sockfd) {
  sendConf(sockfd, (1 << 7) | (3 << 3) | (3 << 1));
  sendBlink(sockfd, 0x11, 101, 100);
  sendBlink(sockfd, 0x13, 0, 0);
}


x86 assembly (clang, -O0):
<setRedStill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x9e,%esi
call   1040 <sendConf@plt>
mov    -0x4(%rbp),%edi
mov    $0x11,%esi
mov    $0x65,%edx
mov    $0x64,%ecx
call   1030 <sendBlink@plt>
mov    -0x4(%rbp),%edi
mov    $0x13,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <sendBlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setRedStill>:
push   %rbx
mov    %edi,%ebx
mov    $0x9e,%esi
call   1040 <sendConf@plt>
mov    %ebx,%edi
mov    $0x11,%esi
mov    $0x65,%edx
mov    $0x64,%ecx
call   1030 <sendBlink@plt>
mov    %ebx,%edi
mov    $0x13,%esi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <sendBlink@plt>

LLVM IR (-O0):
define void @setRedStill(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sendConf(i32 %3, i32 158)
%5 = load i32, i32* %2
%6 = call i32 @sendBlink(i32 %5, i32 17, i32 101, i32 100)
%7 = load i32, i32* %2
%8 = call i32 @sendBlink(i32 %7, i32 19, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @setRedStill(i32 %0) {
%2 = tail call i32 @sendConf(i32 %0, i32 158)
%3 = tail call i32 @sendBlink(i32 %0, i32 17, i32 101, i32 100)
%4 = tail call i32 @sendBlink(i32 %0, i32 19, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t bbp_swap64(uint64_t n) {
  return (n >> 56) | ((n & 0xff000000000000) >> 40) |
         ((n & 0xff0000000000) >> 24) | ((n & 0xff00000000) >> 8) |
         ((n & 0xff000000) << 8) | ((n & 0xff0000) << 24) |
         ((n & 0xff00) << 40) | ((n & 0xff) << 56);
}


x86 assembly (clang, -O0):
<bbp_swap64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x38,%ecx
sar    %cl,%eax
cltq
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
sar    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
sar    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
sar    $0x8,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x8,%ecx
mov    %ecx,%ecx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shl    $0x18,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%edx
and    $0xff00,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%edx
and    $0xff,%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bbp_swap64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 56
%5 = sext i32 %4 to i64
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = and i64 %7, 71776119061217280
%9 = ashr i64 %8, 40
%10 = or i64 %5, %9
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = and i64 %12, 280375465082880
%14 = ashr i64 %13, 24
%15 = or i64 %10, %14
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = and i64 %17, 1095216660480
%19 = ashr i64 %18, 8
%20 = or i64 %15, %19
%21 = load i32, i32* %2
%22 = and i32 %21, -16777216
%23 = shl i32 %22, 8
%24 = zext i32 %23 to i64
%25 = or i64 %20, %24
%26 = load i32, i32* %2
%27 = and i32 %26, 16711680
%28 = shl i32 %27, 24
%29 = sext i32 %28 to i64
%30 = or i64 %25, %29
%31 = load i32, i32* %2
%32 = and i32 %31, 65280
%33 = shl i32 %32, 40
%34 = sext i32 %33 to i64
%35 = or i64 %30, %34
%36 = load i32, i32* %2
%37 = and i32 %36, 255
%38 = shl i32 %37, 56
%39 = sext i32 %38 to i64
%40 = or i64 %35, %39
%41 = trunc i64 %40 to i32
ret i32 %41
}

LLVM IR (-O2):
define i32 @bbp_swap64(i32 %0) {
ret i32 poison
}
/* Variables and functions */
char toupper(char);
void strupper(char *str) {
  while (*str != '\0') {
    *str = toupper(*str);
    *str++;
  }
}


x86 assembly (clang, -O0):
<strupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <strupper+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strupper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <strupper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strupper+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
double gt();
int /*<<< orphan*/ printf(char *, double);
int safe_run();
int main() {
  int res;
  double start, end;
  start = gt();
  res = safe_run();
  end = gt();
  printf("res = %d\n", res);
  printf("time = %.3f\n", end - start);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1050 <gt@plt>
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <safe_run@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <gt@plt>
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <gt@plt>
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <safe_run@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <gt@plt>
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"res = %d\0A\00"
@.str.1 = [13 x i8] c"time = %.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = call double (...) @gt()
store double %4, double* %2
%5 = call i32 (...) @safe_run()
store i32 %5, i32* %1
%6 = call double (...) @gt()
store double %6, double* %3
%7 = load i32, i32* %1
%8 = sitofp i32 %7 to double
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load double, double* %3
%11 = load double, double* %2
%12 = fsub double %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"res = %d\0A\00"
@.str.1 = [13 x i8] c"time = %.3f\0A\00"
define i32 @main() {
%1 = tail call double (...) @gt()
%2 = tail call i32 (...) @safe_run()
%3 = tail call double (...) @gt()
%4 = sitofp i32 %2 to double
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
%6 = fsub double %3, %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
/* Type definitions */
typedef size_t uint32_t;

/* Variables and functions */
void load_message(uint32_t *message, uint32_t offset, uint32_t m0, uint32_t m1,
                  uint32_t m2, uint32_t m3) {
  message[offset++] = m0;
  message[offset++] = m1;
  message[offset++] = m2;
  message[offset] = m3;
}


x86 assembly (clang, -O0):
<load_message>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x10(%rbp)
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x10(%rbp)
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x10(%rbp)
mov    %rdx,(%rax,%rcx,8)
mov    -0x30(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_message>:
mov    %rdx,(%rdi,%rsi,8)
mov    %rcx,0x8(%rdi,%rsi,8)
mov    %r8,0x10(%rdi,%rsi,8)
mov    %r9,0x18(%rdi,%rsi,8)
ret

LLVM IR (-O0):
define void @load_message(i64* %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i64* %0, i64** %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%13 = load i64, i64* %9
%14 = load i64*, i64** %7
%15 = load i64, i64* %8
%16 = add i64 %15, 1
store i64 %16, i64* %8
%17 = getelementptr inbounds i64, i64* %14, i64 %15
store i64 %13, i64* %17
%18 = load i64, i64* %10
%19 = load i64*, i64** %7
%20 = load i64, i64* %8
%21 = add i64 %20, 1
store i64 %21, i64* %8
%22 = getelementptr inbounds i64, i64* %19, i64 %20
store i64 %18, i64* %22
%23 = load i64, i64* %11
%24 = load i64*, i64** %7
%25 = load i64, i64* %8
%26 = add i64 %25, 1
store i64 %26, i64* %8
%27 = getelementptr inbounds i64, i64* %24, i64 %25
store i64 %23, i64* %27
%28 = load i64, i64* %12
%29 = load i64*, i64** %7
%30 = load i64, i64* %8
%31 = getelementptr inbounds i64, i64* %29, i64 %30
store i64 %28, i64* %31
ret void
}

LLVM IR (-O2):
define void @load_message(i64* nocapture writeonly %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = add i64 %1, 1
%8 = getelementptr inbounds i64, i64* %0, i64 %1
store i64 %2, i64* %8
%9 = add i64 %1, 2
%10 = getelementptr inbounds i64, i64* %0, i64 %7
store i64 %3, i64* %10
%11 = add i64 %1, 3
%12 = getelementptr inbounds i64, i64* %0, i64 %9
store i64 %4, i64* %12
%13 = getelementptr inbounds i64, i64* %0, i64 %11
store i64 %5, i64* %13
ret void
}
unsigned int finalize_crc_32(unsigned int crc) {
  int i;
  unsigned int result = 0;
  for (i = 0; i < 32; i++)
    ((result) |= (((((crc) >> (i)) & 0x1)) << (32 - (i + 1))));
  return result;
}


x86 assembly (clang, -O0):
<finalize_crc_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    114d <finalize_crc_32+0x4d>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
mov    -0x8(%rbp),%edx
add    $0x1,%edx
mov    $0x20,%ecx
sub    %edx,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <finalize_crc_32+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_crc_32>:
xor    %eax,%eax
mov    $0x1c,%r8d
xor    %r9d,%r9d
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
mov    %r9d,%ecx
shr    %cl,%edx
and    $0x1,%edx
lea    0x3(%r8),%ecx
shl    %cl,%edx
lea    0x1(%r9),%ecx
mov    %edi,%r10d
shr    %cl,%r10d
and    $0x1,%r10d
lea    0x2(%r8),%ecx
shl    %cl,%r10d
lea    0x2(%r9),%ecx
mov    %edi,%esi
shr    %cl,%esi
or     %eax,%edx
or     %edx,%r10d
and    $0x1,%esi
lea    0x1(%r8),%ecx
shl    %cl,%esi
lea    0x3(%r9),%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
mov    %r8d,%ecx
shl    %cl,%eax
or     %esi,%eax
or     %r10d,%eax
add    $0xfffffffc,%r8d
add    $0x4,%r9d
cmp    $0x20,%r9d
jne    1110 <finalize_crc_32+0x10>
ret

LLVM IR (-O0):
define i32 @finalize_crc_32(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 = %19, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 32
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = lshr i32 %9, %10
%12 = and i32 %11, 1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = sub nsw i32 32, %14
%16 = shl i32 %12, %15
%17 = load i32, i32* %4
%18 = or i32 %17, %16
store i32 %18, i32* %4
br label %19
19: ; preds = %8
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %5
22: ; preds = %5
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @finalize_crc_32(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %28, %2 ]
%4 = phi i32 [ 0, %1 ], [ %25, %2 ]
%5 = lshr i32 %0, %4
%6 = and i32 %5, 1
%7 = or i32 %4, 1
%8 = sub nuw nsw i32 31, %4
%9 = shl nuw i32 %6, %8
%10 = or i32 %9, %3
%11 = lshr i32 %0, %7
%12 = and i32 %11, 1
%13 = or i32 %4, 2
%14 = sub nsw i32 30, %4
%15 = shl nuw i32 %12, %14
%16 = or i32 %15, %10
%17 = lshr i32 %0, %13
%18 = and i32 %17, 1
%19 = or i32 %4, 3
%20 = sub nsw i32 29, %4
%21 = shl nuw i32 %18, %20
%22 = or i32 %21, %16
%23 = lshr i32 %0, %19
%24 = and i32 %23, 1
%25 = add nuw nsw i32 %4, 4
%26 = sub nuw nsw i32 31, %19
%27 = shl nuw i32 %24, %26
%28 = or i32 %27, %22
%29 = icmp eq i32 %25, 32
br i1 %29, label %30, label %2
30: ; preds = %2
ret i32 %28
}
/* Variables and functions */
int PnameDef();
PcellNameDef() {
  int b = -1;
  ;
  b = PnameDef();
  return (b);
}


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

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

LLVM IR (-O0):
define i32 @PcellNameDef() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i32 (...) @PnameDef()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @PcellNameDef() {
%1 = tail call i32 (...) @PnameDef()
ret i32 %1
}
/* Variables and functions */
char *ehnlc_strrchr(const char *s, int c) {
  char *r;
  for (r = NULL; *s; ++s) {
    if (*s == c) {
      r = (char *)s;
    }
  }
  return r;
}


x86 assembly (clang, -O0):
<ehnlc_strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <ehnlc_strrchr+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1138 <ehnlc_strrchr+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    113d <ehnlc_strrchr+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <ehnlc_strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_strrchr>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1125 <ehnlc_strrchr+0x25>
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ehnlc_strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @ehnlc_strrchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ null, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = icmp eq i32 %9, %1
%11 = select i1 %10, i8* %8, i8* %7
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ null, %2 ], [ %11, %5 ]
ret i8* %16
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *dupe_string(const char *src) {
  char *dst = NULL;
  if (src && (dst = malloc(strlen(src) + 1)))
    strcpy(dst, src);
  return dst;
}


x86 assembly (clang, -O0):
<dupe_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117f <dupe_string+0x4f>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     117f <dupe_string+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dupe_string>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <dupe_string+0x2f>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <dupe_string+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1161 <dupe_string+0x31>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @dupe_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %8, %3, %1
%11 = phi i8* [ %6, %8 ], [ null, %3 ], [ null, %1 ]
ret i8* %11
}
void CFGMR3GetNextChild(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3GetNextChild() {
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buflist_bar_item_update(int);
void buflist_config_change_use_items(const void *pointer, void *data,
                                     struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  buflist_bar_item_update(2);
}


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

x86 assembly (clang, -O2):
<buflist_config_change_use_items>:
mov    $0x2,%edi
jmp    1030 <buflist_bar_item_update@plt>

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

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @buflist_config_change_use_items(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 @buflist_bar_item_update(i32 2)
ret void
}
/* Variables and functions */
double M_PI;
double rad2deg(double theta) { return (theta * 180.0 / M_PI); }


x86 assembly (clang, -O0):
<rad2deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    0x2ecb(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2deg>:
mulsd  0xef8(%rip),%xmm0
mov    0x2ed9(%rip),%rax
divsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @rad2deg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = load double, double* @M_PI
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @rad2deg(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = load double, double* @M_PI
%4 = fdiv double %2, %3
ret double %4
}
/* Type definitions */
struct Position {
  int dummy;
};
struct Movelist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gen_captures(struct Position *, struct Movelist *);
int /*<<< orphan*/ gen_quiet_proms(struct Position *, struct Movelist *);
void gen_quiesce_moves(struct Position *pos, struct Movelist *list) {
  gen_captures(pos, list);
  gen_quiet_proms(pos, list);
}


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

x86 assembly (clang, -O2):
<gen_quiesce_moves>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <gen_captures@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <gen_quiet_proms@plt>

LLVM IR (-O0):
%struct.Position = type { i32 }
%struct.Movelist = type { i32 }
define void @gen_quiesce_moves(%struct.Position* %0, %struct.Movelist* %1) {
%3 = alloca %struct.Position*
%4 = alloca %struct.Movelist*
store %struct.Position* %0, %struct.Position** %3
store %struct.Movelist* %1, %struct.Movelist** %4
%5 = load %struct.Position*, %struct.Position** %3
%6 = load %struct.Movelist*, %struct.Movelist** %4
%7 = call i32 @gen_captures(%struct.Position* %5, %struct.Movelist* %6)
%8 = load %struct.Position*, %struct.Position** %3
%9 = load %struct.Movelist*, %struct.Movelist** %4
%10 = call i32 @gen_quiet_proms(%struct.Position* %8, %struct.Movelist* %9)
ret void
}

LLVM IR (-O2):
%struct.Position = type { i32 }
%struct.Movelist = type { i32 }
define void @gen_quiesce_moves(%struct.Position* %0, %struct.Movelist* %1) {
%3 = tail call i32 @gen_captures(%struct.Position* %0, %struct.Movelist* %1)
%4 = tail call i32 @gen_quiet_proms(%struct.Position* %0, %struct.Movelist* %1)
ret void
}
/* Variables and functions */
int fib();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[], char *envp[]) {
  int local0;
  int o0;
  printf("Input number: ");
  scanf("%d", &local0);
  o0 = fib();
  printf("fibonacci(%d) = %d\n", local0, o0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x0,%al
call   1050 <fib@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Input number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"fibonacci(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%12 = call i32 (...) @fib()
store i32 %12, i32* %9
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Input number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"fibonacci(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%8 = call i32 (...) @fib()
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int /*<<< orphan*/ syscall(int);
int main(int argc, char *argv[]) {
  syscall(317);
  kill(1, SIGKILL);
  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    $0x13d,%edi
call   1030 <syscall@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1040 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x13d,%edi
call   1030 <syscall@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGKILL = global i32 0
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 @syscall(i32 317)
%7 = load i32, i32* @SIGKILL
%8 = call i32 @kill(i32 1, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @syscall(i32 317)
%4 = load i32, i32* @SIGKILL
%5 = tail call i32 @kill(i32 1, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ mpz_clear(int /*<<< orphan*/);
void finalize_vector_mpz(mpz_t **vector, unsigned int n) {
  for (; n > 0; --n)
    mpz_clear((*vector)[n - 1]);
  free(*vector);
  *vector = 0;
}


x86 assembly (clang, -O0):
<finalize_vector_mpz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    115e <finalize_vector_mpz+0x3e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%edi
call   1040 <mpz_clear@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <finalize_vector_mpz+0xf>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_vector_mpz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
je     1142 <finalize_vector_mpz+0x22>
mov    %esi,%ebx
nopl   (%rax)
mov    (%r14),%rax
mov    -0x4(%rax,%rbx,4),%edi
call   1040 <mpz_clear@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <finalize_vector_mpz+0x10>
mov    (%r14),%rdi
call   1030 <free@plt>
movq   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @finalize_vector_mpz(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %17, %2
%6 = load i32, i32* %4
%7 = icmp ugt i32 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
%11 = load i32, i32* %4
%12 = sub i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @mpz_clear(i32 %15)
br label %17
17: ; preds = %8
%18 = load i32, i32* %4
%19 = add i32 %18, -1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i32**, i32*** %3
%22 = load i32*, i32** %21
%23 = call i32 @free(i32* %22)
%24 = load i32**, i32*** %3
store i32* null, i32** %24
ret void
}

LLVM IR (-O2):
define void @finalize_vector_mpz(i32** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %9, %6 ]
%8 = load i32*, i32** %0
%9 = add nsw i64 %7, -1
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @mpz_clear(i32 %11)
%13 = icmp eq i64 %9, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = load i32*, i32** %0
%16 = tail call i32 @free(i32* %15)
store i32* null, i32** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_long(long);
long strlen(char *);
long write(int, char *, long);
int /*<<< orphan*/ x_perror(char *);
void send_string(char *string) {
  long length = strlen(string);
  send_long(length);
  if (write(1, string, length) != length)
    x_perror("send_string");
}


x86 assembly (clang, -O0):
<send_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <send_long@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1050 <write@plt>
cmp    -0x10(%rbp),%rax
je     118a <send_string+0x4a>
lea    0xe7b(%rip),%rdi
call   1040 <x_perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1060 <strlen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <send_long@plt>
mov    $0x1,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <write@plt>
cmp    %rbx,%rax
jne    1174 <send_string+0x34>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe85(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <x_perror@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"send_string\00"
define void @send_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @send_long(i64 %6)
%8 = load i8*, i8** %2
%9 = load i64, i64* %3
%10 = call i64 @write(i32 1, i8* %8, i64 %9)
%11 = load i64, i64* %3
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 @x_perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"send_string\00"
define void @send_string(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 @send_long(i64 %2)
%4 = tail call i64 @write(i32 1, i8* %0, i64 %2)
%5 = icmp eq i64 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @x_perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xae() {
  Assert_real((isascii(174) == 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_isascii.c",
              875, ("isascii should be 0 for 0xae"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xae>:
push   %rax
mov    $0xae,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x36b,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xae\00"
define void @t_isascii_0xae() {
%1 = call i64 @isascii(i32 174)
%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 875, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xae\00"
define void @t_isascii_0xae() {
%1 = tail call i64 @isascii(i32 174)
%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 875, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_19int8_mem(signed char *val) {
  return ((*val) & (0x19 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_19int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 25
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct tms {
  scalar_t__ tms_utime;
};

/* Variables and functions */
int /*<<< orphan*/ _SC_CLK_TCK;
int sysconf(int /*<<< orphan*/);
double wall_time(const struct tms *t) {
  int ticks_per_sec = sysconf(_SC_CLK_TCK);
  return ((double)t->tms_utime) / ticks_per_sec;
}


x86 assembly (clang, -O0):
<wall_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdq (%rax),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wall_time>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
cvtsi2sdq (%rbx),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
%struct.tms = type { i64 }
@_SC_CLK_TCK = global i32 0
define double @wall_time(%struct.tms* %0) {
%2 = alloca %struct.tms*
%3 = alloca i32
store %struct.tms* %0, %struct.tms** %2
%4 = load i32, i32* @_SC_CLK_TCK
%5 = call i32 @sysconf(i32 %4)
store i32 %5, i32* %3
%6 = load %struct.tms*, %struct.tms** %2
%7 = getelementptr inbounds %struct.tms, %struct.tms* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
ret double %12
}

LLVM IR (-O2):
%struct.tms = type { i64 }
@_SC_CLK_TCK = global i32 0
define double @wall_time(%struct.tms* nocapture %0) {
%2 = load i32, i32* @_SC_CLK_TCK
%3 = tail call i32 @sysconf(i32 %2)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %0, i64 0, i32 0
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = sitofp i32 %3 to double
%8 = fdiv double %6, %7
ret double %8
}
void ABGRToYRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToYRow_Any_NEON() {
ret void
}
iscat(sym) {
  static int ctab[] = {300, 345, 327, 310, 325, 321, 309, 344, 333, 320,
                       '(', 273, 279, 343, '$', 280, 256, 260, 0};
  register int i, j;
  for (i = 0; j = ctab[i]; i++)
    if (sym == j)
      break;
  return j;
}


x86 assembly (clang, -O0):
<iscat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
lea    0x2f17(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     114c <iscat+0x4c>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1139 <iscat+0x39>
jmp    114c <iscat+0x4c>
jmp    113e <iscat+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <iscat+0xe>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscat>:
xor    %ecx,%ecx
lea    0xef7(%rip),%rdx
nopl   0x0(%rax)
mov    (%rcx,%rdx,1),%eax
cmp    $0x48,%rcx
je     1121 <iscat+0x21>
add    $0x4,%rcx
cmp    %edi,%eax
jne    1110 <iscat+0x10>
ret

LLVM IR (-O0):
@iscat.ctab = internal global [19 x i32] [i32 300, i32 345, i32 327, i32 310, i32 325, i32 321, i32 309, i32 344, i32 333, i32 320, i32 40, i32 273, i32 279, i32 343, i32 36, i32 280, i32 256, i32 260, i32 0]
define i32 @iscat(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [19 x i32], [19 x i32]* @iscat.ctab, i64 0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %5
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
br label %20
16: ; preds = %11
br label %17
17: ; preds = %16
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %15, %5
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@iscat.ctab = internal unnamed_addr constant [19 x i32] [i32 300, i32 345, i32 327, i32 310, i32 325, i32 321, i32 309, i32 344, i32 333, i32 320, i32 40, i32 273, i32 279, i32 343, i32 36, i32 280, i32 256, i32 260, i32 0]
define i32 @iscat(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %9, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds [19 x i32], [19 x i32]* @iscat.ctab, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = icmp eq i64 %3, 18
%7 = icmp eq i32 %5, %0
%8 = select i1 %6, i1 true, i1 %7
%9 = add nuw nsw i64 %3, 1
br i1 %8, label %10, label %2
10: ; preds = %2
ret i32 %5
}
/* Variables and functions */
int netAcceptingSocketFrom(int, int, int /*<<< orphan*/ *);
int netAcceptingSocket(int port, int queueSize) {
  return netAcceptingSocketFrom(port, queueSize, NULL);
}


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

x86 assembly (clang, -O2):
<netAcceptingSocket>:
xor    %edx,%edx
jmp    1030 <netAcceptingSocketFrom@plt>

LLVM IR (-O0):
define i32 @netAcceptingSocket(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @netAcceptingSocketFrom(i32 %5, i32 %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @netAcceptingSocket(i32 %0, i32 %1) {
%3 = tail call i32 @netAcceptingSocketFrom(i32 %0, i32 %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Hi();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world!\n");
  Hi();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @Hi()
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @Hi()
ret i32 0
}