xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cli_puts(char *);
void cli_print_notfound(char *strcmd) { cli_puts("Command not found\r\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Command not found\0D\0A\00"
define void @cli_print_notfound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @cli_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Command not found\0D\0A\00"
define void @cli_print_notfound(i8* nocapture readnone %0) {
%2 = tail call i32 @cli_puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isprint(unsigned char);
int /*<<< orphan*/ tprintf(char *, unsigned char);
void tputchar_safe(int c) {
  unsigned char ch = (unsigned char)(c & 0xff);
  if (isprint(ch))
    tprintf("%c", ch);
  else
    tprintf("\\0x%02x", ch);
}


x86 assembly (clang, -O0):
<tputchar_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1040 <isprint@plt>
cmp    $0x0,%rax
je     115e <tputchar_safe+0x3e>
lea    0xeb0(%rip),%rdi
movzbl -0x5(%rbp),%esi
call   1030 <tprintf@plt>
jmp    116e <tputchar_safe+0x4e>
lea    0xe9e(%rip),%rdi
movzbl -0x5(%rbp),%esi
call   1030 <tprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tputchar_safe>:
push   %rbx
movzbl %dil,%ebx
mov    %ebx,%edi
call   1040 <isprint@plt>
test   %rax,%rax
lea    0xecd(%rip),%rax
lea    0xec3(%rip),%rdi
cmove  %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <tprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [8 x i8] c"\\0x%02x\00"
define void @tputchar_safe(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = call i64 @isprint(i8 zeroext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8, i8* %3
%12 = call i32 @tprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %11)
br label %16
13: ; preds = %1
%14 = load i8, i8* %3
%15 = call i32 @tprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %14)
br label %16
16: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [8 x i8] c"\\0x%02x\00"
define void @tputchar_safe(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i64 @isprint(i8 zeroext %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @tprintf(i8* %5, i8 zeroext %2)
ret void
}
double min(double a, double b) {
  if (a <= b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t no_rnd_avg32(uint32_t a, uint32_t b) {
  return (a & b) + (((a ^ b) & ~((0x01) * 0x01010101UL)) >> 1);
}


x86 assembly (clang, -O0):
<no_rnd_avg32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cltq
mov    -0x4(%rbp),%ecx
xor    -0x8(%rbp),%ecx
movslq %ecx,%rcx
and    $0xfffffffffefefefe,%rcx
shr    $0x1,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_rnd_avg32>:
mov    %esi,%eax
and    %edi,%eax
xor    %edi,%esi
sar    %esi
and    $0xff7f7f7f,%esi
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @no_rnd_avg32(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 = and i32 %5, %6
%8 = sext i32 %7 to i64
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = xor i32 %9, %10
%12 = sext i32 %11 to i64
%13 = and i64 %12, -16843010
%14 = lshr i64 %13, 1
%15 = add i64 %8, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @no_rnd_avg32(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = xor i32 %1, %0
%5 = ashr i32 %4, 1
%6 = and i32 %5, -8421505
%7 = add i32 %6, %3
ret i32 %7
}
int squares(int n1, int n2) {
  int i = 1;
  while (1) {
    if (i * i >= n1) {
      break;
    }
    i++;
  }
  int c = 1;
  while (1) {
    if (i * i > n2) {
      break;
    }
    i++;
    c++;
  }
  return c - 1;
}


x86 assembly (clang, -O0):
<squares>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1126 <squares+0x26>
jmp    1134 <squares+0x34>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <squares+0x11>
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1150 <squares+0x50>
jmp    1167 <squares+0x67>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <squares+0x3b>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squares>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%edx
imul   %ecx,%edx
add    $0x1,%ecx
cmp    %edi,%edx
jl     1110 <squares+0x10>
xor    %eax,%eax
cmp    %esi,%edx
jg     113d <squares+0x3d>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rcx,%rax,1),%edx
imul   %edx,%edx
add    $0x1,%eax
cmp    %esi,%edx
jle    1130 <squares+0x30>
ret

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

LLVM IR (-O2):
define i32 @squares(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 1, %2 ], [ %7, %3 ]
%5 = mul nsw i32 %4, %4
%6 = icmp slt i32 %5, %0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %3, label %8
8: ; preds = %3
%9 = icmp sgt i32 %5, %1
br i1 %9, label %17, label %10
10: ; preds = %8, %10
%11 = phi i32 [ %14, %10 ], [ 1, %8 ]
%12 = phi i32 [ %13, %10 ], [ %4, %8 ]
%13 = add nuw nsw i32 %12, 1
%14 = add nuw nsw i32 %11, 1
%15 = mul nsw i32 %13, %13
%16 = icmp sgt i32 %15, %1
br i1 %16, label %17, label %10
17: ; preds = %10, %8
%18 = phi i32 [ 0, %8 ], [ %11, %10 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int);
int main() {
  f(7);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 7)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 7)
%2 = tail call i32 @exit(i32 0)
unreachable
}
int main(int argc, const char *argv[]) {
  int valor;
  valor = 25;
  printf("Ejemplo de almancemaniento a memoria [ %d ]\n", &valor);
  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)
movl   $0x19,-0x14(%rbp)
lea    0xecc(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x19,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Ejemplo de almancemaniento a memoria [ %d ]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 25, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Ejemplo de almancemaniento a memoria [ %d ]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 25, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ acpi_add_byte(char **, int);
int acpi_add_EndResource(char **data, int dlen) {
  if (dlen >= 2) {
    acpi_add_byte(data, 0x79);
    acpi_add_byte(data, 0);
  }
  return 2;
}


x86 assembly (clang, -O0):
<acpi_add_EndResource>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jl     1142 <acpi_add_EndResource+0x32>
mov    -0x8(%rbp),%rdi
mov    $0x79,%esi
call   1030 <acpi_add_byte@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <acpi_add_byte@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acpi_add_EndResource>:
cmp    $0x2,%esi
jl     112e <acpi_add_EndResource+0x1e>
push   %rbx
mov    %rdi,%rbx
mov    $0x79,%esi
call   1030 <acpi_add_byte@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <acpi_add_byte@plt>
pop    %rbx
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @acpi_add_EndResource(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 2
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i8**, i8*** %3
%9 = call i32 @acpi_add_byte(i8** %8, i32 121)
%10 = load i8**, i8*** %3
%11 = call i32 @acpi_add_byte(i8** %10, i32 0)
br label %12
12: ; preds = %7, %2
ret i32 2
}

LLVM IR (-O2):
define i32 @acpi_add_EndResource(i8** %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @acpi_add_byte(i8** %0, i32 121)
%6 = tail call i32 @acpi_add_byte(i8** %0, i32 0)
br label %7
7: ; preds = %4, %2
ret i32 2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ntohl(uint32_t val) {
  val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF);
  return (val << 16) | (val >> 16);
}


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

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

LLVM IR (-O0):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = and i32 %4, -16711936
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 16711935
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = shl i32 %10, 16
%12 = load i32, i32* %2
%13 = ashr i32 %12, 16
%14 = or i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, -16711936
%4 = lshr i32 %0, 8
%5 = and i32 %4, 16711935
%6 = or i32 %3, %5
%7 = shl i32 %6, 16
%8 = ashr i32 %6, 16
%9 = or i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ halt_isr();
__attribute__((weak)) void DebugMon_Handler() { halt_isr(); }


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

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

LLVM IR (-O0):
define weak void @DebugMon_Handler() {
%1 = call i32 (...) @halt_isr()
ret void
}

LLVM IR (-O2):
define weak void @DebugMon_Handler() {
%1 = tail call i32 (...) @halt_isr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int u, v, t;
  u = 35;
  v = 28;
  while (v != 0) {
    t = u % v;
    u = v;
    v = t;
  }
  printf("%d\n", u);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x23,-0x8(%rbp)
movl   $0x1c,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1152 <main+0x42>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1c,%edx
mov    $0x23,%eax
nopw   0x0(%rax,%rax,1)
mov    %edx,%esi
cltd
idiv   %esi
mov    %esi,%eax
test   %edx,%edx
jne    1120 <main+0x10>
push   %rax
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 35, %0 ], [ %3, %1 ]
%3 = phi i32 [ 28, %0 ], [ %4, %1 ]
%4 = srem i32 %2, %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void CFGMR3QueryBool(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryBool() {
ret void
}
/* Variables and functions */
int cppGetc();
scalar_t__ isspace(int);
int skipToNonWhite() {
  int c;
  do
    c = cppGetc();
  while (isspace(c));
  return c;
}


x86 assembly (clang, -O0):
<skipToNonWhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <cppGetc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
jne    1128 <skipToNonWhite+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipToNonWhite>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <cppGetc@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1130 <skipToNonWhite+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @skipToNonWhite() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 (...) @cppGetc()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = call i64 @isspace(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @skipToNonWhite() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @cppGetc()
%3 = tail call i64 @isspace(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret i32 %2
}
int do_quit(int fd, char *param) { return 0; }


x86 assembly (clang, -O0):
<do_quit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_quit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @do_quit(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
int test_imm_FDuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xFD << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FDuint64_lowword_reg>:
test   $0xfd,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FDuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 253
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *hash_plugin_detailed(void) {
  return ("samsungpin - Samsung Android PIN lock plugin\n"
          "-------------------------------\n"
          "Use this module to crack Samsung PINs\n"
          "Input should be in form: \'hash:salt\'\n"
          "Known software that uses this password hashing method:\n"
          "Android OS\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [264 x i8] c"samsungpin - Samsung Android PIN lock plugin\0A-------------------------------\0AUse this module to crack Samsung PINs\0AInput should be in form: 'hash:salt'\0AKnown software that uses this password hashing method:\0AAndroid OS\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [264 x i8] c"samsungpin - Samsung Android PIN lock plugin\0A-------------------------------\0AUse this module to crack Samsung PINs\0AInput should be in form: 'hash:salt'\0AKnown software that uses this password hashing method:\0AAndroid OS\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0)
}
unsigned char answer_5(unsigned char arg0) { return ~arg0; }


x86 assembly (clang, -O0):
<answer_5>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer_5>:
mov    %edi,%eax
not    %al
ret

LLVM IR (-O0):
define zeroext i8 @answer_5(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @answer_5(i8 zeroext %0) {
%2 = xor i8 %0, -1
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int hora_valida(int hora, char *msg_error) {
  if (hora < 1 || hora > 6) {
    printf("%s", msg_error);
    puts("");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<hora_valida>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     1143 <hora_valida+0x23>
cmpl   $0x6,-0x8(%rbp)
jle    116b <hora_valida+0x4b>
mov    -0x10(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1172 <hora_valida+0x52>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hora_valida>:
add    $0xfffffff9,%edi
mov    $0x1,%eax
cmp    $0xfffffff9,%edi
ja     114a <hora_valida+0x2a>
push   %rax
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @hora_valida(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 6
br i1 %10, label %11, label %15
11: ; preds = %8, %2
%12 = load i8*, i8** %5
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %16
15: ; preds = %8
store i32 1, i32* %3
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @hora_valida(i32 %0, i8* %1) {
%3 = add i32 %0, -7
%4 = icmp ult i32 %3, -6
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = tail call i32 @putchar(i32 10)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printXmlEightDigits(int *data, unsigned int offset, const char *name) {
  if (offset > 0) {
    printf("%*c", offset, ' ');
  }
  printf("<%s>%i</%s>\n", name, *data, name);
}


x86 assembly (clang, -O0):
<printXmlEightDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1143 <printXmlEightDigits+0x33>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printXmlEightDigits>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
test   %esi,%esi
je     1131 <printXmlEightDigits+0x21>
lea    0xedb(%rip),%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14),%edx
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlEightDigits(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10, i32 32)
br label %12
12: ; preds = %9, %3
%13 = load i8*, i8** %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlEightDigits(i32* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1, i32 32)
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %8, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintName(char *name, void (*print)(char *)) {
  print(name);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<PrintName>:
push   %rax
call   *%rsi
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @PrintName(i8* %0, void (i8*)* nocapture %1) {
tail call void %1(i8* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t QEIPositionGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000008))));
}


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

x86 assembly (clang, -O2):
<QEIPositionGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x8(%rax),%rax
ret

LLVM IR (-O0):
define i64 @QEIPositionGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @QEIPositionGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int mm_qname_len(char const *);
scalar_t__ strncmp(char const *, char const *, int);
int mm_qname_same(const char *s1, const char *s2) {
  int l1, l2;
  l1 = mm_qname_len(s1);
  l2 = mm_qname_len(s2);
  return (l1 == l2 && strncmp(s1, s2, l1) == 0);
}


x86 assembly (clang, -O0):
<mm_qname_same>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mm_qname_len@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mm_qname_len@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x19(%rbp)
jne    1173 <mm_qname_same+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_qname_same>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <mm_qname_len@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <mm_qname_len@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%ebp
jne    1159 <mm_qname_same+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mm_qname_same(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @mm_qname_len(i8* %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = call i32 @mm_qname_len(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = load i32, i32* %5
%18 = call i64 @strncmp(i8* %15, i8* %16, i32 %17)
%19 = icmp eq i64 %18, 0
br label %20
20: ; preds = %14, %2
%21 = phi i1 [ false, %2 ], [ %19, %14 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @mm_qname_same(i8* %0, i8* %1) {
%3 = tail call i32 @mm_qname_len(i8* %0)
%4 = tail call i32 @mm_qname_len(i8* %1)
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 0, %2 ], [ %9, %6 ]
ret i32 %11
}
int _sel_entries_delete_all(void *x, void *y) { return (1); }


x86 assembly (clang, -O0):
<_sel_entries_delete_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sel_entries_delete_all>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @_sel_entries_delete_all(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 1
}

LLVM IR (-O2):
define i32 @_sel_entries_delete_all(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int magic_index(int *, int /*<<< orphan*/, int);
int test_magic_index() {
  int array[] = {-2, -1, 0, 2, 4, 15};
  return 4 == magic_index(array, 0, 5);
}


x86 assembly (clang, -O0):
<test_magic_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <magic_index@plt>
mov    %eax,%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_magic_index>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <magic_index@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
sete   %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_magic_index.array = [6 x i32] [i32 -2, i32 -1, i32 0, i32 2, i32 4, i32 15]
define i32 @test_magic_index() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @magic_index(i32* %3, i32 0, i32 5)
%5 = icmp eq i32 4, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@__const.test_magic_index.array = [6 x i32] [i32 -2, i32 -1, i32 0, i32 2, i32 4, i32 15]
define i32 @test_magic_index() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @magic_index(i32* %3, i32 0, i32 5)
%5 = icmp eq i32 %4, 4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ RFCCpe1IntSelect(int /*<<< orphan*/);
int /*<<< orphan*/ RFCCpeIntClear(int /*<<< orphan*/);
int /*<<< orphan*/ RFCCpeIntEnable(int /*<<< orphan*/);
void RFCCpe1IntSelectClearEnable(uint32_t ui32Mask) {
  RFCCpe1IntSelect(ui32Mask);
  RFCCpeIntClear(ui32Mask);
  RFCCpeIntEnable(ui32Mask);
}


x86 assembly (clang, -O0):
<RFCCpe1IntSelectClearEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <RFCCpe1IntSelect@plt>
mov    -0x4(%rbp),%edi
call   1040 <RFCCpeIntClear@plt>
mov    -0x4(%rbp),%edi
call   1030 <RFCCpeIntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RFCCpe1IntSelectClearEnable>:
push   %rbx
mov    %edi,%ebx
call   1050 <RFCCpe1IntSelect@plt>
mov    %ebx,%edi
call   1040 <RFCCpeIntClear@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <RFCCpeIntEnable@plt>

LLVM IR (-O0):
define void @RFCCpe1IntSelectClearEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @RFCCpe1IntSelect(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @RFCCpeIntClear(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @RFCCpeIntEnable(i32 %7)
ret void
}

LLVM IR (-O2):
define void @RFCCpe1IntSelectClearEnable(i32 %0) {
%2 = tail call i32 @RFCCpe1IntSelect(i32 %0)
%3 = tail call i32 @RFCCpeIntClear(i32 %0)
%4 = tail call i32 @RFCCpeIntEnable(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pict2png_usage(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void pict2png_help(void) {
  pict2png_usage(stdout);
  fputs("Convert QuickDraw pictures to PNG.\n"
        "\n"
        "options:\n"
        "  -all-picts    dump all PICT resources\n"
        "  -dir <dir>    write PNG files to <dir>\n"
        "  -id <id>      dump PICT resource id <id>\n"
        "  -out <file>   write output to <file> (if only one output)\n"
        "  -no-header    the pictures do not have a 512-byte header\n",
        stdout);
}


x86 assembly (clang, -O0):
<pict2png_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <pict2png_usage@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pict2png_help>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
call   1040 <pict2png_usage@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [289 x i8] c"Convert QuickDraw pictures to PNG.\0A\0Aoptions:\0A -all-picts dump all PICT resources\0A -dir <dir> write PNG files to <dir>\0A -id <id> dump PICT resource id <id>\0A -out <file> write output to <file> (if only one output)\0A -no-header the pictures do not have a 512-byte header\0A\00"
define void @pict2png_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @pict2png_usage(i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([289 x i8], [289 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [289 x i8] c"Convert QuickDraw pictures to PNG.\0A\0Aoptions:\0A -all-picts dump all PICT resources\0A -dir <dir> write PNG files to <dir>\0A -id <id> dump PICT resource id <id>\0A -out <file> write output to <file> (if only one output)\0A -no-header the pictures do not have a 512-byte header\0A\00"
define void @pict2png_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @pict2png_usage(i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([289 x i8], [289 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void INT_Excep_PERIA_INTA237(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA237() {
ret void
}
/* Variables and functions */
void strclear(char cadena[]) {
  if (cadena != NULL) {
    *cadena = 0;
  }
}


x86 assembly (clang, -O0):
<strclear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111a <strclear+0x1a>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strclear>:
test   %rdi,%rdi
je     1108 <strclear+0x8>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @strclear(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i8*, i8** %2
store i8 0, i8* %6
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @strclear(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
store i8 0, i8* %0
br label %4
4: ; preds = %3, %1
ret void
}
/* Variables and functions */
long get_request_dun_max_lev(int, int);
long get_request_dun_max_lev_easy(void) {
  return get_request_dun_max_lev(1, 50);
}


x86 assembly (clang, -O0):
<get_request_dun_max_lev_easy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x32,%esi
call   1030 <get_request_dun_max_lev@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_request_dun_max_lev_easy>:
mov    $0x1,%edi
mov    $0x32,%esi
jmp    1030 <get_request_dun_max_lev@plt>

LLVM IR (-O0):
define i64 @get_request_dun_max_lev_easy() {
%1 = call i64 @get_request_dun_max_lev(i32 1, i32 50)
ret i64 %1
}

LLVM IR (-O2):
define i64 @get_request_dun_max_lev_easy() {
%1 = tail call i64 @get_request_dun_max_lev(i32 1, i32 50)
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ vbuencode(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint64_t vbiencode(uint8_t *buffer, int64_t value) {
  uint64_t nv = (uint64_t)((value >> 63) ^ (value << 1));
  return vbuencode(buffer, nv);
}


x86 assembly (clang, -O0):
<vbiencode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <vbuencode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vbiencode>:
jmp    1030 <vbuencode@plt>

LLVM IR (-O0):
define i32 @vbiencode(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = ashr i32 %6, 63
%8 = load i32, i32* %4
%9 = shl i32 %8, 1
%10 = xor i32 %7, %9
store i32 %10, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = call i32 @vbuencode(i32* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @vbiencode(i32* %0, i32 %1) {
%3 = tail call i32 @vbuencode(i32* %0, i32 poison)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  int secondNumber = 2;
  int firstNumber = 1;
  unsigned int sum = 0;
  while (secondNumber < 4000000) {
    secondNumber += firstNumber;
    int tmp = secondNumber;
    secondNumber = firstNumber;
    firstNumber = tmp;
    if (firstNumber % 2 == 0)
      sum += firstNumber;
  }
  printf("result: %d", sum);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3d0900,-0x8(%rbp)
jge    118e <main+0x6e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1189 <main+0x69>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <main+0x24>
mov    -0x10(%rbp),%esi
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"result: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %23, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 4000000
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
store i32 %13, i32* %5
%14 = load i32, i32* %3
store i32 %14, i32* %2
%15 = load i32, i32* %5
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = srem i32 %16, 2
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %9
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = add i32 %21, %20
store i32 %22, i32* %4
br label %23
23: ; preds = %19, %9
br label %6
24: ; preds = %6
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"result: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10316618)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
int /*<<< orphan*/ print_set(int);
void ewrin() {
  print_set(66);
  print("[", 7);
  print("EPIC WRIN", 10);
  print("]\r\n", 7);
}


x86 assembly (clang, -O0):
<ewrin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x42,%edi
call   1030 <print_set@plt>
lea    0xecb(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
lea    0xebc(%rip),%rdi
mov    $0xa,%esi
call   1040 <print@plt>
lea    0xeb5(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ewrin>:
push   %rax
mov    $0x42,%edi
call   1030 <print_set@plt>
lea    0xece(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
lea    0xebf(%rip),%rdi
mov    $0xa,%esi
call   1040 <print@plt>
lea    0xeb8(%rip),%rdi
mov    $0x7,%esi
pop    %rax
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
@.str.1 = [10 x i8] c"EPIC WRIN\00"
@.str.2 = [4 x i8] c"]\0D\0A\00"
define void @ewrin() {
%1 = call i32 @print_set(i32 66)
%2 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10)
%4 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"[\00"
@.str.1 = [10 x i8] c"EPIC WRIN\00"
@.str.2 = [4 x i8] c"]\0D\0A\00"
define void @ewrin() {
%1 = tail call i32 @print_set(i32 66)
%2 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = tail call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10)
%4 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}
int isprime(unsigned int number) {
  unsigned int divisor = 3;
  while (divisor * divisor < number && number % divisor != 0)
    divisor += 2;
  return number % divisor != 0;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
jae    1134 <isprime+0x34>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x0,%edx
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1144 <isprime+0x44>
jmp    1152 <isprime+0x52>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <isprime+0xe>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x0,%edx
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
mov    $0x3,%ecx
cmp    $0xa,%edi
jb     1126 <isprime+0x26>
mov    $0x3,%ecx
nop
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
test   %edx,%edx
je     1126 <isprime+0x26>
add    $0x2,%ecx
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
jb     1110 <isprime+0x10>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
xor    %eax,%eax
test   %edx,%edx
setne  %al
ret

LLVM IR (-O0):
define i32 @isprime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 3, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul i32 %5, %6
%8 = load i32, i32* %2
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %4
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = urem i32 %11, %12
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %10, %4
%16 = phi i1 [ false, %4 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add i32 %18, 2
store i32 %19, i32* %3
br label %4
20: ; preds = %15
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = urem i32 %21, %22
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp ugt i32 %0, 9
br i1 %2, label %3, label %11
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ 3, %1 ]
%5 = urem i32 %0, %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = add i32 %4, 2
%9 = mul i32 %8, %8
%10 = icmp ult i32 %9, %0
br i1 %10, label %3, label %11
11: ; preds = %3, %7, %1
%12 = phi i32 [ 3, %1 ], [ %8, %7 ], [ %4, %3 ]
%13 = urem i32 %0, %12
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}