xunge/DecIR huggingface dataset:
int round2(int n) {
  int m;
  for (m = 1; m < n; m *= 2)
    ;
  if (m - n <= n - m / 2) {
    return m;
  } else {
    return m / 2;
  }
}


x86 assembly (clang, -O0):
<round2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    112d <round2+0x2d>
jmp    111f <round2+0x1f>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <round2+0xe>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x10(%rbp),%eax
sub    %edx,%ecx
cmp    %ecx,%eax
jg     115e <round2+0x5e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116c <round2+0x6c>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round2>:
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ecx
lea    (%rcx,%rcx,1),%eax
mov    %ecx,%edx
sub    %edi,%edx
jl     1110 <round2+0x10>
mov    %ecx,%eax
shr    %eax
sub    %eax,%edi
cmp    %edi,%edx
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @round2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %10, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
br label %10
10: ; preds = %9
%11 = load i32, i32* %4
%12 = mul nsw i32 %11, 2
store i32 %12, i32* %4
br label %5
13: ; preds = %5
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = sdiv i32 %18, 2
%20 = sub nsw i32 %17, %19
%21 = icmp sle i32 %16, %20
br i1 %21, label %22, label %24
22: ; preds = %13
%23 = load i32, i32* %4
store i32 %23, i32* %2
br label %27
24: ; preds = %13
%25 = load i32, i32* %4
%26 = sdiv i32 %25, 2
store i32 %26, i32* %2
br label %27
27: ; preds = %24, %22
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @round2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl nsw i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
%7 = sub nsw i32 %3, %0
%8 = lshr i32 %3, 1
%9 = sub nsw i32 %0, %8
%10 = icmp sgt i32 %7, %9
%11 = select i1 %10, i32 %8, i32 %3
ret i32 %11
}
/* Variables and functions */
void Default_SVC_Handler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_SVC_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_SVC_Handler+0x9>
jmp    1109 <Default_SVC_Handler+0x9>

x86 assembly (clang, -O2):
<Default_SVC_Handler>:
jmp    1100 <Default_SVC_Handler>

LLVM IR (-O0):
define void @Default_SVC_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_SVC_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int star(string, pattern)
char *string, *pattern;
{
  while (wild_match(string, pattern) == 0)
    if (*++string == '\0')
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <wild_match@plt>
cmp    $0x0,%eax
jne    1165 <star+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1160 <star+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116c <star+0x5c>
jmp    1120 <star+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<star>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <wild_match@plt>
test   %eax,%eax
jne    113f <star+0x2f>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <star+0x10>
xor    %eax,%eax
jmp    1144 <star+0x34>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @star(i8* %0, i8* %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %8, %7 ]
%5 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @wild_match to i32 (i8*, i8*, ...)*)(i8* %4, i8* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %12
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ driveRaw(int, int, int, int);
void driveTank(int speedLeft, int speedRight) {
  if (abs(speedLeft) <= 15)
    speedLeft = 0;
  if (abs(speedRight) <= 15)
    speedRight = 0;
  driveRaw(speedLeft, speedLeft, speedRight, speedRight);
}


x86 assembly (clang, -O0):
<driveTank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <abs@plt>
cmp    $0xf,%eax
jg     1146 <driveTank+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <abs@plt>
cmp    $0xf,%eax
jg     115e <driveTank+0x3e>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
call   1030 <driveRaw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveTank>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
xor    %ecx,%ecx
cmp    $0x10,%eax
cmovb  %ecx,%edi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    $0x10,%eax
cmovae %esi,%ecx
mov    %edi,%esi
mov    %ecx,%edx
jmp    1030 <driveRaw@plt>

LLVM IR (-O0):
define void @driveTank(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @abs(i32 %5)
%7 = icmp sle i32 %6, 15
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %9
9: ; preds = %8, %2
%10 = load i32, i32* %4
%11 = call i32 @abs(i32 %10)
%12 = icmp sle i32 %11, 15
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %4
br label %14
14: ; preds = %13, %9
%15 = load i32, i32* %3
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = load i32, i32* %4
%19 = call i32 @driveRaw(i32 %15, i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @driveTank(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = icmp ult i32 %3, 16
%5 = select i1 %4, i32 0, i32 %0
%6 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%7 = icmp ult i32 %6, 16
%8 = select i1 %7, i32 0, i32 %1
%9 = tail call i32 @driveRaw(i32 %5, i32 %5, i32 %8, i32 %8)
ret void
}
void ble_rsp_hardware_usb_enable(
    const struct ble_msg_hardware_usb_enable_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_hardware_usb_enable_rsp_t = type opaque
define void @ble_rsp_hardware_usb_enable(%struct.ble_msg_hardware_usb_enable_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void tbutton(int b, int s, int x, int y) {
  printf("b = %d, s = %d, x = %d, y = %d\n", b, s, x, y);
}


x86 assembly (clang, -O0):
<tbutton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tbutton>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"b = %d, s = %d, x = %d, y = %d\0A\00"
define void @tbutton(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"b = %d, s = %d, x = %d, y = %d\0A\00"
define void @tbutton(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(void) {
  int pid;
  pid = fork();
  if (pid == 0) {
    while (1) {
      printf("child\n");
      sleep(1);
    }
  } else {
    while (1) {
      printf("father\n");
      sleep(1);
    }
  }
  printf("helloworld\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1173 <main+0x43>
jmp    1158 <main+0x28>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1158 <main+0x28>
jmp    1178 <main+0x48>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1178 <main+0x48>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1164 <main+0x34>
lea    0xebd(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1150 <main+0x20>
lea    0xe9c(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1170 <main+0x40>

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

LLVM IR (-O2):
@str = [7 x i8] c"father\00"
@str.2 = [6 x i8] c"child\00"
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %3
6: ; preds = %0, %6
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @sleep(i32 1)
br label %6
}
int id_n(int n) {
  if (n < 0)
    return -n - 1;
  else
    return n;
}


x86 assembly (clang, -O0):
<id_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1121 <id_n+0x21>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <id_n+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<id_n>:
mov    %edi,%eax
sar    $0x1f,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @id_n(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, %0
ret i32 %3
}
double max(double *array) {
  int i;
  double max = 0.0;
  for (i = 0; i < 2048 * 2048; i++)
    if (array[i] > max)
      max = array[i];
  return max;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400000,-0xc(%rbp)
jge    1161 <max+0x61>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    114e <max+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1153 <max+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <max+0x17>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rax,8),%xmm1
maxsd  %xmm0,%xmm1
movsd  0x8(%rdi,%rax,8),%xmm0
maxsd  %xmm1,%xmm0
movsd  0x10(%rdi,%rax,8),%xmm1
maxsd  %xmm0,%xmm1
movsd  0x18(%rdi,%rax,8),%xmm0
maxsd  %xmm1,%xmm0
add    $0x4,%rax
cmp    $0x400000,%rax
jne    1110 <max+0x10>
ret

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

LLVM IR (-O2):
define double @max(double* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %24, %2 ]
%4 = phi double [ 0.000000e+00, %1 ], [ %23, %2 ]
%5 = getelementptr inbounds double, double* %0, i64 %3
%6 = load double, double* %5
%7 = fcmp ogt double %6, %4
%8 = select i1 %7, double %6, double %4
%9 = or i64 %3, 1
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = fcmp ogt double %11, %8
%13 = select i1 %12, double %11, double %8
%14 = or i64 %3, 2
%15 = getelementptr inbounds double, double* %0, i64 %14
%16 = load double, double* %15
%17 = fcmp ogt double %16, %13
%18 = select i1 %17, double %16, double %13
%19 = or i64 %3, 3
%20 = getelementptr inbounds double, double* %0, i64 %19
%21 = load double, double* %20
%22 = fcmp ogt double %21, %18
%23 = select i1 %22, double %21, double %18
%24 = add nuw nsw i64 %3, 4
%25 = icmp eq i64 %24, 4194304
br i1 %25, label %26, label %2
26: ; preds = %2
ret double %23
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_xor_uint(struct Var *avar, const char *areg, const char *lreg,
                     const char *rreg) {
  pA("%s = %s ^ %s;", areg, lreg, rreg);
}


x86 assembly (clang, -O0):
<__func_xor_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec5(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s ^ %s;\00"
define void @__func_xor_uint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s ^ %s;\00"
define void @__func_xor_uint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int add4(int);
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  int x = add4(1) - 5;
  if (x) {
    printf("Dead code.");
  }
  int y = getchar() < 0;
  if (y) {
    printf("Not dead code.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <add4@plt>
sub    $0x5,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1165 <main+0x35>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1191 <main+0x61>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1050 <add4@plt>
cmp    $0x5,%eax
je     114c <main+0x1c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
test   %rax,%rax
jns    1164 <main+0x34>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Dead code.\00"
@.str.1 = [15 x i8] c"Not dead code.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @add4(i32 1)
%5 = sub nsw i32 %4, 5
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
%11 = call i64 (...) @getchar()
%12 = icmp slt i64 %11, 0
%13 = zext i1 %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Dead code.\00"
@.str.1 = [15 x i8] c"Not dead code.\00"
define i32 @main() {
%1 = tail call i32 @add4(i32 1)
%2 = icmp eq i32 %1, 5
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i64 (...) @getchar()
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void devil_help(void) {
  fprintf(stdout, "usage: devil.exe [options] ...\n\n"
                  "   help    show help for a given topic or a help overview\n"
                  "   alloc   show test result of allocator module\n"
                  "   queue   show test result of queue module\n"
                  "   list    show test result of list module\n"
                  "   table   show test result of table module\n"
                  "   array   show test result of array module\n"
                  "   mutex   show test result of mutex module\n"
                  "   spin    show test result of spinlock module\n"
                  "   cond    show test result of condition module\n"
                  "   thread  show test result of thread module\n");
}


x86 assembly (clang, -O0):
<devil_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<devil_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [498 x i8] c"usage: devil.exe [options] ...\0A\0A help show help for a given topic or a help overview\0A alloc show test result of allocator module\0A queue show test result of queue module\0A list show test result of list module\0A table show test result of table module\0A array show test result of array module\0A mutex show test result of mutex module\0A spin show test result of spinlock module\0A cond show test result of condition module\0A thread show test result of thread module\0A\00"
define void @devil_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([498 x i8], [498 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [498 x i8] c"usage: devil.exe [options] ...\0A\0A help show help for a given topic or a help overview\0A alloc show test result of allocator module\0A queue show test result of queue module\0A list show test result of list module\0A table show test result of table module\0A array show test result of array module\0A mutex show test result of mutex module\0A spin show test result of spinlock module\0A cond show test result of condition module\0A thread show test result of thread module\0A\00"
define void @devil_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([498 x i8], [498 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn69() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn69");
  return result;
}


x86 assembly (clang, -O0):
<fn69>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn69>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn69\00"
define i8* @fn69() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn69\00"
define i8* @fn69() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
int MediaSetResolution(int streamid, int wigth, int height) {
  int retVal = 0;
  return retVal;
}


x86 assembly (clang, -O0):
<MediaSetResolution>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @MediaSetResolution(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @MediaSetResolution(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ oneDimPtrPtr(int **, int);
int f(int **arr, int x) {
  oneDimPtrPtr(arr, x);
  return arr[x][4];
}


x86 assembly (clang, -O0):
<f>:
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 <oneDimPtrPtr@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <oneDimPtrPtr@plt>
movslq %ebx,%rax
mov    (%r14,%rax,8),%rax
mov    0x10(%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @f(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 @oneDimPtrPtr(i32** %5, i32 %6)
%8 = load i32**, i32*** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32*, i32** %8, i64 %10
%12 = load i32*, i32** %11
%13 = getelementptr inbounds i32, i32* %12, i64 4
%14 = load i32, i32* %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f(i32** %0, i32 %1) {
%3 = tail call i32 @oneDimPtrPtr(i32** %0, i32 %1)
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32*, i32** %0, i64 %4
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 4
%8 = load i32, i32* %7
ret i32 %8
}
/* Variables and functions */
int OPENSSL_NPN_UNSUPPORTED;
int /*<<< orphan*/ SSL_get0_next_proto_negotiated(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int main() {
  SSL_get0_next_proto_negotiated(NULL, NULL, NULL);
  return OPENSSL_NPN_UNSUPPORTED;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1030 <SSL_get0_next_proto_negotiated@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <SSL_get0_next_proto_negotiated@plt>
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@OPENSSL_NPN_UNSUPPORTED = global i32 0
define i32 @main() {
%1 = tail call i32 @SSL_get0_next_proto_negotiated(i32* null, i32* null, i32* null)
%2 = load i32, i32* @OPENSSL_NPN_UNSUPPORTED
ret i32 %2
}
void Plain_NullRestoreGraphicState(void) {}


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

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

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

LLVM IR (-O2):
define void @Plain_NullRestoreGraphicState() {
ret void
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
};
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ memset(struct sigaction *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             int /*<<< orphan*/ *);
void install_sigaction(void handler(int)) {
  struct sigaction sa;
  memset(&sa, 0, sizeof(sa));
  sa.sa_handler = handler;
  sigaction(SIGSEGV, &sa, NULL);
}


x86 assembly (clang, -O0):
<install_sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<install_sigaction>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    %rbx,(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)* }
@SIGSEGV = global i32 0
define void @install_sigaction(void (i32)* %0) {
%2 = alloca void (i32)*
%3 = alloca %struct.sigaction
store void (i32)* %0, void (i32)** %2
%4 = call i32 @memset(%struct.sigaction* %3, i32 0, i32 8)
%5 = load void (i32)*, void (i32)** %2
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i32 0, i32 0
store void (i32)* %5, void (i32)** %6
%7 = load i32, i32* @SIGSEGV
%8 = call i32 @sigaction(i32 %7, %struct.sigaction* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)* }
@SIGSEGV = global i32 0
define void @install_sigaction(void (i32)* %0) {
%2 = alloca %struct.sigaction
%3 = bitcast %struct.sigaction* %2 to i8*
%4 = call i32 @memset(%struct.sigaction* %2, i32 0, i32 8)
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %2, i64 0, i32 0
store void (i32)* %0, void (i32)** %5
%6 = load i32, i32* @SIGSEGV
%7 = call i32 @sigaction(i32 %6, %struct.sigaction* %2, i32* null)
ret void
}
int use_weights(int level) {
  static int weights_level = 0;
  if (level >= 0) {
    weights_level = level;
  }
  return (weights_level);
}


x86 assembly (clang, -O0):
<use_weights>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111a <use_weights+0x1a>
mov    -0x4(%rbp),%eax
mov    %eax,0x2f0a(%rip)
mov    0x2f04(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_weights>:
test   %edi,%edi
js     110d <use_weights+0xd>
mov    %edi,%eax
mov    %edi,0x2f18(%rip)
ret
mov    0x2f11(%rip),%eax
ret

LLVM IR (-O0):
@use_weights.weights_level = internal global i32 0
define i32 @use_weights(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
store i32 %6, i32* @use_weights.weights_level
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* @use_weights.weights_level
ret i32 %8
}

LLVM IR (-O2):
@use_weights.weights_level = internal unnamed_addr global i32 0
define i32 @use_weights(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @use_weights.weights_level
br label %6
5: ; preds = %1
store i32 %0, i32* @use_weights.weights_level
br label %6
6: ; preds = %3, %5
%7 = phi i32 [ %4, %3 ], [ %0, %5 ]
ret i32 %7
}
void show_usb_info(struct atrf_dsc *dsc) {}


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

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

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

LLVM IR (-O2):
%struct.atrf_dsc = type opaque
define void @show_usb_info(%struct.atrf_dsc* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void convexOutput(int isConvex) {
  printf("Quadrilatero %sconvexo.\n", (isConvex ? "" : "não "));
}


x86 assembly (clang, -O0):
<convexOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xef4(%rip),%rsi
lea    0xeec(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convexOutput>:
test   %edi,%edi
lea    0xf00(%rip),%rax
lea    0xef8(%rip),%rsi
cmove  %rax,%rsi
lea    0xed5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Quadrilatero %sconvexo.\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [6 x i8] c"n\C3\A3o \00"
define void @convexOutput(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Quadrilatero %sconvexo.\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [6 x i8] c"n\C3\A3o \00"
define void @convexOutput(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ use(int);
void *worker_thread(void *argV) {
  int *arg = (int *)argV;
  use(arg[5]);
  return NULL;
}


x86 assembly (clang, -O0):
<worker_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%edi
call   1030 <use@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worker_thread>:
push   %rax
mov    0x14(%rdi),%edi
call   1030 <use@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @worker_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 5
%8 = load i32, i32* %7
%9 = call i32 @use(i32 %8)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @worker_thread(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 20
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @use(i32 %4)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int /*<<< orphan*/ scanf(char *, int *);
char *solve();
int main() {
  int cases;
  scanf("%d", &cases);
  int i;
  for (i = 1; i <= cases; i++) {
    printf("Case #%d: %s\n", i, solve());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     118f <main+0x5f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <solve@plt>
mov    -0x10(%rbp),%esi
mov    %rax,%rdx
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    117d <main+0x4d>
lea    0xeb1(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebp
xor    %eax,%eax
call   1030 <solve@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1040 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"Case #%d: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %10, %6 ], [ 1, %0 ]
%8 = call i8* (...) @solve()
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7, i8* %8)
%10 = add nuw nsw i32 %7, 1
%11 = load i32, i32* %1
%12 = icmp slt i32 %7, %11
br i1 %12, label %6, label %13
13: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char const *);
char *strdup(char const *);
char *xstrdup(const char *str) {
  char *new_str;
  new_str = strdup(str);
  if (new_str)
    return new_str;
  fatal("strdup(%s) failed", str);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1151 <xstrdup+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <xstrdup+0x41>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xstrdup+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"strdup(%s) failed\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
void CSQC_Init() {}


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

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

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

LLVM IR (-O2):
define void @CSQC_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_pawns_able_to_capture_west(int, int);
void w_pawns_able_to_capture_west_test(void **state) {
  assert_int_equal(
      0x0000000010000000ul,
      w_pawns_able_to_capture_west(0x0000000018000000ul, 0x0000100800000000ul));
}


x86 assembly (clang, -O0):
<w_pawns_able_to_capture_west_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18000000,%edi
xor    %esi,%esi
call   1040 <w_pawns_able_to_capture_west@plt>
mov    %eax,%esi
mov    $0x10000000,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_pawns_able_to_capture_west_test>:
push   %rax
mov    $0x18000000,%edi
xor    %esi,%esi
call   1040 <w_pawns_able_to_capture_west@plt>
mov    $0x10000000,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @w_pawns_able_to_capture_west_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_pawns_able_to_capture_west(i32 402653184, i32 0)
%4 = call i32 @assert_int_equal(i32 268435456, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_pawns_able_to_capture_west_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_pawns_able_to_capture_west(i32 402653184, i32 0)
%3 = tail call i32 @assert_int_equal(i32 268435456, i32 %2)
ret void
}
float f0(float x) { return 7.5 * __builtin_copysignf(2.0, x); }


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xf00(%rip),%xmm1
por    %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
andps  0xef9(%rip),%xmm0
orps   0xf02(%rip),%xmm0
mulss  0xf0a(%rip),%xmm0
ret

LLVM IR (-O0):
define float @f0(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.copysign.f32(float 2.000000e+00, float %3)
%5 = fpext float %4 to double
%6 = fmul double 7.500000e+00, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @f0(float %0) {
%2 = tail call float @llvm.copysign.f32(float 2.000000e+00, float %0)
%3 = fmul float %2, 7.500000e+00
ret float %3
}
/* Variables and functions */
void BusFault_Handler() {
  while (true)
    ;
}


x86 assembly (clang, -O0):
<BusFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <BusFault_Handler+0x9>
jmp    1109 <BusFault_Handler+0x9>

x86 assembly (clang, -O2):
<BusFault_Handler>:
jmp    1100 <BusFault_Handler>

LLVM IR (-O0):
define void @BusFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @BusFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
scalar_t__ mode_is_writing(char const *);
const char *access_mode_string(const char *mode) {
  return mode_is_writing(mode) ? "writing" : "reading";
}


x86 assembly (clang, -O0):
<access_mode_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mode_is_writing@plt>
mov    %rax,%rdx
lea    0xed9(%rip),%rax
lea    0xeca(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_mode_string>:
push   %rax
call   1030 <mode_is_writing@plt>
test   %rax,%rax
lea    0xee8(%rip),%rcx
lea    0xed9(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"writing\00"
@.str.1 = [8 x i8] c"reading\00"
define i8* @access_mode_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mode_is_writing(i8* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
ret i8* %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"writing\00"
@.str.1 = [8 x i8] c"reading\00"
define i8* @access_mode_string(i8* %0) {
%2 = tail call i64 @mode_is_writing(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
void SobelXYRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @SobelXYRow_SSE2() {
ret void
}
int test_imm_44int64_highword_reg(long long val) {
  return ((val >> 32) & (0x44 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_44int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x44,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_44int64_highword_reg>:
movabs $0x4400000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_44int64_highword_reg(i64 %0) {
%2 = and i64 %0, 292057776128
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_box_get_spacing() {}


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

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

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

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