xunge/DecIR huggingface dataset:
void fd218(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  p02C:
    goto p02C;
    goto a;
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd218>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd218+0x7>

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

LLVM IR (-O0):
define void @fd218(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd218(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int convert(int b, int masive[]) {
  int helper, i;
  helper = b;
  for (i = 7; i >= 0 || helper; i--) {
    masive[i] = helper % 2;
    helper = helper / 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
jge    1131 <convert+0x31>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1141 <convert+0x41>
jmp    1173 <convert+0x73>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1118 <convert+0x18>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
mov    $0x7,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%edx
mov    %rcx,%r8
shr    $0x1f,%edi
add    %edx,%edi
mov    %edi,%ecx
and    $0xfffffffe,%ecx
mov    %edx,%eax
sub    %ecx,%eax
mov    %eax,(%rsi,%r8,4)
sar    %edi
lea    -0x1(%r8),%rcx
add    $0xfffffffe,%edx
test   %r8,%r8
jg     1110 <convert+0x10>
cmp    $0xfffffffd,%edx
jb     1110 <convert+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @convert(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
%7 = load i32, i32* %3
store i32 %7, i32* %5
store i32 7, i32* %6
br label %8
8: ; preds = %25, %2
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ true, %8 ], [ %13, %11 ]
br i1 %15, label %16, label %28
16: ; preds = %14
%17 = load i32, i32* %5
%18 = srem i32 %17, 2
%19 = load i32*, i32** %4
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
store i32 %18, i32* %22
%23 = load i32, i32* %5
%24 = sdiv i32 %23, 2
store i32 %24, i32* %5
br label %25
25: ; preds = %16
%26 = load i32, i32* %6
%27 = add nsw i32 %26, -1
store i32 %27, i32* %6
br label %8
28: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @convert(i32 %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 7, %2 ], [ %9, %3 ]
%5 = phi i32 [ %0, %2 ], [ %8, %3 ]
%6 = srem i32 %5, 2
%7 = getelementptr inbounds i32, i32* %1, i64 %4
store i32 %6, i32* %7
%8 = sdiv i32 %5, 2
%9 = add i64 %4, -1
%10 = icmp sgt i64 %4, 0
%11 = add i32 %5, -2
%12 = icmp ult i32 %11, -3
%13 = select i1 %10, i1 true, i1 %12
br i1 %13, label %3, label %14
14: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int valida() {
  int segundos;
  do {
    system("clear");
    printf("\n¿Cuantos segundos quieres calcular?: ");
    scanf("%d", &segundos);
  } while (segundos < 1);
  return segundos;
}


x86 assembly (clang, -O0):
<valida>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <system@plt>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x4(%rbp)
jl     1138 <valida+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valida>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%r14
lea    0xec0(%rip),%r15
lea    0xee1(%rip),%r12
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <system@plt>
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1160 <valida+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [40 x i8] c"\0A\C2\BFCuantos segundos quieres calcular?: \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @valida() {
%1 = alloca i32
br label %2
2: ; preds = %6, %0
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
br label %6
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 1
br i1 %8, label %2, label %9
9: ; preds = %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [40 x i8] c"\0A\C2\BFCuantos segundos quieres calcular?: \00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @valida() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 1
br i1 %8, label %3, label %9
9: ; preds = %3
ret i32 %7
}
/* Variables and functions */
int strlen(char *);
int checksum(char *msg) {
  int ret = 0;
  for (int i = 0; i < strlen(msg); ++i) {
    ret += (int)msg[i];
  }
  return ret;
}


x86 assembly (clang, -O0):
<checksum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    1166 <checksum+0x56>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <checksum+0x1a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checksum>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    114c <checksum+0x3c>
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%r14,%rbx,1),%eax
add    %eax,%ebp
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <checksum+0x20>
jmp    114e <checksum+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @checksum(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %12, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i64 [ %13, %6 ], [ 0, %1 ]
%8 = phi i32 [ %12, %6 ], [ 0, %1 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %8, %11
%13 = add nuw nsw i64 %7, 1
%14 = tail call i32 @strlen(i8* %0)
%15 = sext i32 %14 to i64
%16 = icmp slt i64 %13, %15
br i1 %16, label %6, label %4
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_48(int Salt, int Parameter) {
  unsigned b = Salt ^ 0xE2A36A7;
  return yahoo_M1Common(b, Parameter);
}


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

x86 assembly (clang, -O2):
<yahoo_f01_48>:
xor    $0xe2a36a7,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_48(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* %3
%7 = xor i32 %6, 237647527
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_48(i32 %0, i32 %1) {
%3 = xor i32 %0, 237647527
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int __write_node_key(FILE *fout, void *key) {
  int i = 0;
  i = *(int *)key;
  fprintf(fout, "%d", i);
  return (1);
}


x86 assembly (clang, -O0):
<__write_node_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__write_node_key>:
push   %rax
mov    (%rsi),%edx
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @__write_node_key(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
store i32 0, i32* %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32*, i32** %3
%10 = load i32, i32* %5
%11 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @__write_node_key(i32* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 1
}
__attribute__((visibility("default"))) int main(int argc, char **argv) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t uint_log2(uint32_t value) {
  uint32_t result = 0;
  while (value >>= 1)
    result += 1;
  return result;
}


x86 assembly (clang, -O0):
<uint_log2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <uint_log2+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <uint_log2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint_log2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <uint_log2+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <uint_log2+0x10>
ret

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

LLVM IR (-O2):
define i32 @uint_log2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char *nome;
  printf("Digite seu nome: ");
  scanf("%s", nome);
  printf("Olá %s \n", nome);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed1(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1040 <scanf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Digite seu nome: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [10 x i8] c"Ol\C3\A1 %s \0A\00"
define void @main() {
%1 = alloca i8*
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Digite seu nome: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [10 x i8] c"Ol\C3\A1 %s \0A\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* undef)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* undef)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("begin\n");
  pid_t pid = getpid();
  printf("%d\n", pid);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [6 x i8] c"begin\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
struct nlattr {
  int nla_len;
};

/* Variables and functions */
void nla_nested_end(struct nlattr *nla, void *ctx) {
  nla->nla_len = (char *)ctx - (char *)nla;
}


x86 assembly (clang, -O0):
<nla_nested_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_nested_end>:
sub    %edi,%esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define void @nla_nested_end(%struct.nlattr* %0, i8* %1) {
%3 = alloca %struct.nlattr*
%4 = alloca i8*
store %struct.nlattr* %0, %struct.nlattr** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load %struct.nlattr*, %struct.nlattr** %3
%7 = bitcast %struct.nlattr* %6 to i8*
%8 = ptrtoint i8* %5 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = load %struct.nlattr*, %struct.nlattr** %3
%13 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %12, i32 0, i32 0
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define void @nla_nested_end(%struct.nlattr* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint %struct.nlattr* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %0, i64 0, i32 0
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
int clamp(int, int, int);
int clampMotor(int n) { return clamp(n, -127, 127); }


x86 assembly (clang, -O0):
<clampMotor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xffffff81,%esi
mov    $0x7f,%edx
call   1030 <clamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampMotor>:
mov    $0xffffff81,%esi
mov    $0x7f,%edx
jmp    1030 <clamp@plt>

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

LLVM IR (-O2):
define i32 @clampMotor(i32 %0) {
%2 = tail call i32 @clamp(i32 %0, i32 -127, i32 127)
ret i32 %2
}
void __attribute__((no)) HEX00_algorithmDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_algorithmDatInit() {
ret void
}
float fsmax(float x, float y) { return (x > y ? x : y); }


x86 assembly (clang, -O0):
<fsmax>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <fsmax+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <fsmax+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsmax>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fsmax(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @fsmax(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void __vsyscall() { return; }


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

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

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

LLVM IR (-O2):
define void @__vsyscall() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void printText(char *text) {
  int i = 0;
  while (text[i] != 0) {
    printf("%c", text[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<printText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115e <printText+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
lea    0xeb9(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printText+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printText>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <printText+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <printText+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printText(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int __dev_get_by_name(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @__dev_get_by_name() {
ret i32 0
}

LLVM IR (-O2):
define i32 @__dev_get_by_name() {
ret i32 0
}
void calcSetup() {}


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

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

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

LLVM IR (-O2):
define void @calcSetup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(int, char const *);
void print_notice(const char *str) { __console_tx_string(5, str); }


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

x86 assembly (clang, -O2):
<print_notice>:
mov    %rdi,%rsi
mov    $0x5,%edi
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_notice(i8* %0) {
%2 = tail call i32 @__console_tx_string(i32 5, i8* %0)
ret void
}
long SSIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) {
  ;
  if ((*((volatile unsigned long *)(ulBase + 0x0000000C))) & 0x00000004) {
    *pulData = (*((volatile unsigned long *)(ulBase + 0x00000008)));
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<SSIDataGetNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     113e <SSIDataGetNonBlocking+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movq   $0x1,-0x8(%rbp)
jmp    1146 <SSIDataGetNonBlocking+0x46>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDataGetNonBlocking>:
testq  $0x4,0xc(%rdi)
jne    110d <SSIDataGetNonBlocking+0xd>
xor    %eax,%eax
ret
mov    0x8(%rdi),%rax
mov    %rax,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @SSIDataGetNonBlocking(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
store i64 %0, i64* %4
store i64* %1, i64** %5
%6 = load i64, i64* %4
%7 = add i64 %6, 12
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, 4
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i64, i64* %4
%14 = add i64 %13, 8
%15 = inttoptr i64 %14 to i64*
%16 = load volatile i64, i64* %15
%17 = load i64*, i64** %5
store i64 %16, i64* %17
store i64 1, i64* %3
br label %19
18: ; preds = %2
store i64 0, i64* %3
br label %19
19: ; preds = %18, %12
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @SSIDataGetNonBlocking(i64 %0, i64* nocapture writeonly %1) {
%3 = add i64 %0, 12
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, 4
%7 = icmp eq i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = add i64 %0, 8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
store i64 %11, i64* %1
br label %12
12: ; preds = %2, %8
%13 = phi i64 [ 1, %8 ], [ 0, %2 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
unsigned char NsmcLucRequired(void) {
  printf("NSMC: NsmcLucRequired called.\n");
  return 1;
}


x86 assembly (clang, -O0):
<NsmcLucRequired>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NsmcLucRequired>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"NSMC: NsmcLucRequired called.\0A\00"
define zeroext i8 @NsmcLucRequired() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i8 1
}

LLVM IR (-O2):
@str = [30 x i8] c"NSMC: NsmcLucRequired called.\00"
define zeroext i8 @NsmcLucRequired() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i8 1
}
void main(void) {
  int x;
  while (x < 1) {
    x = x + 5;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x1,-0x4(%rbp)
jge    111c <main+0x1c>
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x4(%rbp)
jmp    1104 <main+0x4>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 5
store i32 %7, i32* %1
br label %2
8: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
long long bit10() { return 0x0000000000000400LL; }


x86 assembly (clang, -O0):
<bit10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @bit10() {
ret i64 1024
}

LLVM IR (-O2):
define i64 @bit10() {
ret i64 1024
}
/* Variables and functions */
char *_uitoa(int);
char *_itoa(int i) {
  char *p;
  if (i >= 0)
    return _uitoa(i);
  p = _uitoa(-i);
  *--p = '-';
  return p;
}


x86 assembly (clang, -O0):
<_itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1136 <_itoa+0x26>
mov    -0xc(%rbp),%edi
call   1030 <_uitoa@plt>
mov    %rax,-0x8(%rbp)
jmp    115f <_itoa+0x4f>
xor    %edi,%edi
sub    -0xc(%rbp),%edi
call   1030 <_uitoa@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x2d,-0x1(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_itoa>:
test   %edi,%edi
js     1119 <_itoa+0x9>
jmp    1030 <_uitoa@plt>
push   %rax
neg    %edi
call   1030 <_uitoa@plt>
movb   $0x2d,-0x1(%rax)
add    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @_itoa(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i8* @_uitoa(i32 %8)
store i8* %9, i8** %2
br label %17
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 0, %11
%13 = call i8* @_uitoa(i32 %12)
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %4
store i8 45, i8* %15
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %10, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @_itoa(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i8* @_uitoa(i32 %0)
br label %9
5: ; preds = %1
%6 = sub nsw i32 0, %0
%7 = tail call i8* @_uitoa(i32 %6)
%8 = getelementptr inbounds i8, i8* %7, i64 -1
store i8 45, i8* %8
br label %9
9: ; preds = %5, %3
%10 = phi i8* [ %4, %3 ], [ %8, %5 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ lsx_free_commandline_arguments(int *, char ***);
int /*<<< orphan*/ lsx_init_commandline_arguments(int *, char ***);
int /*<<< orphan*/ lsx_init_console();
int /*<<< orphan*/ lsx_uninit_console();
int sox_main(int, char **);
int main(int argc, char **argv) {
  int sox_argc;
  char **sox_argv;
  int exit_code;
  lsx_init_console();
  lsx_init_commandline_arguments(&sox_argc, &sox_argv);
  exit_code = sox_main(sox_argc, sox_argv);
  lsx_uninit_console();
  lsx_free_commandline_arguments(&sox_argc, &sox_argv);
  return exit_code;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <lsx_init_console@plt>
lea    -0x14(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <lsx_init_commandline_arguments@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1050 <sox_main@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <lsx_uninit_console@plt>
lea    -0x14(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1060 <lsx_free_commandline_arguments@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1070 <lsx_init_console@plt>
lea    0x4(%rsp),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <lsx_init_commandline_arguments@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%rsi
call   1050 <sox_main@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <lsx_uninit_console@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <lsx_free_commandline_arguments@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @lsx_init_console()
%10 = call i32 @lsx_init_commandline_arguments(i32* %6, i8*** %7)
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = call i32 @sox_main(i32 %11, i8** %12)
store i32 %13, i32* %8
%14 = call i32 (...) @lsx_uninit_console()
%15 = call i32 @lsx_free_commandline_arguments(i32* %6, i8*** %7)
%16 = load i32, i32* %8
ret i32 %16
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = bitcast i32* %3 to i8*
%6 = bitcast i8*** %4 to i8*
%7 = tail call i32 (...) @lsx_init_console()
%8 = call i32 @lsx_init_commandline_arguments(i32* %3, i8*** %4)
%9 = load i32, i32* %3
%10 = load i8**, i8*** %4
%11 = call i32 @sox_main(i32 %9, i8** %10)
%12 = call i32 (...) @lsx_uninit_console()
%13 = call i32 @lsx_free_commandline_arguments(i32* %3, i8*** %4)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int test_extend2(int, int);
int main() {
  int r;
  r = test_extend2(4, 3);
  assert(r == -4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <test_extend2@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffc,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <test_extend2@plt>
xor    %edi,%edi
cmp    $0xfffffffc,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 @test_extend2(i32 4, i32 3)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -4
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_extend2(i32 4, i32 3)
%2 = icmp eq i32 %1, -4
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
void dsp_zeropadder_set(__attribute__((unused)) struct DSPObject *obj,
                        __attribute__((unused)) struct DSPTag *tags) {}


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

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

LLVM IR (-O0):
%struct.DSPObject = type opaque
%struct.DSPTag = type opaque
define void @dsp_zeropadder_set(%struct.DSPObject* %0, %struct.DSPTag* %1) {
%3 = alloca %struct.DSPObject*
%4 = alloca %struct.DSPTag*
store %struct.DSPObject* %0, %struct.DSPObject** %3
store %struct.DSPTag* %1, %struct.DSPTag** %4
ret void
}

LLVM IR (-O2):
%struct.DSPObject = type opaque
%struct.DSPTag = type opaque
define void @dsp_zeropadder_set(%struct.DSPObject* nocapture %0, %struct.DSPTag* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _WarningS(long, char *, char const *);
void Warning_DeprecatedTypeName(long p_position, const char *p_string) {
  _WarningS(p_position, "Deprecated type name: use '%s'", p_string);
}


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

x86 assembly (clang, -O2):
<Warning_DeprecatedTypeName>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <_WarningS@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Deprecated type name: use '%s'\00"
define void @Warning_DeprecatedTypeName(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = load i8*, i8** %4
%7 = call i32 @_WarningS(i64 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Deprecated type name: use '%s'\00"
define void @Warning_DeprecatedTypeName(i64 %0, i8* %1) {
%3 = tail call i32 @_WarningS(i64 %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_TRIANGLES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex2f(double, double);
void draw_triangle() {
  glBegin(GL_TRIANGLES);
  glVertex2f(-.5, 0);
  glVertex2f(.5, 0);
  glVertex2f(0, .5);
  glEnd();
}


x86 assembly (clang, -O0):
<draw_triangle>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xebe(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex2f@plt>
movsd  0xea6(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xe93(%rip),%xmm1
call   1040 <glVertex2f@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_triangle>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xeb9(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex2f@plt>
movsd  0xeb1(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xe9e(%rip),%xmm1
call   1040 <glVertex2f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_TRIANGLES = global i32 0
define void @draw_triangle() {
%1 = load i32, i32* @GL_TRIANGLES
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glVertex2f(double -5.000000e-01, double 0.000000e+00)
%4 = call i32 @glVertex2f(double 5.000000e-01, double 0.000000e+00)
%5 = call i32 @glVertex2f(double 0.000000e+00, double 5.000000e-01)
%6 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_TRIANGLES = global i32 0
define void @draw_triangle() {
%1 = load i32, i32* @GL_TRIANGLES
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glVertex2f(double -5.000000e-01, double 0.000000e+00)
%4 = tail call i32 @glVertex2f(double 5.000000e-01, double 0.000000e+00)
%5 = tail call i32 @glVertex2f(double 0.000000e+00, double 5.000000e-01)
%6 = tail call i32 (...) @glEnd()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int square3(void) {
  int x;
  printf("Please enter an integer > ");
  scanf("%d", &x);
  return (x * x);
}


x86 assembly (clang, -O0):
<square3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<square3>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
imul   %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @square3() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = mul nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
@.str = [27 x i8] c"Please enter an integer > \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @square3() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void error(char *message) {
  printf("ERROR: %s\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_cmp(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_imm8_op();
void t16_cmp_imm8() { arm_arith_cmp(t16_data_imm8_op()); }


x86 assembly (clang, -O0):
<t16_cmp_imm8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <t16_data_imm8_op@plt>
mov    %eax,%edi
call   1040 <arm_arith_cmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_cmp_imm8>:
push   %rax
xor    %eax,%eax
call   1030 <t16_data_imm8_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_arith_cmp@plt>

LLVM IR (-O0):
define void @t16_cmp_imm8() {
%1 = call i32 (...) @t16_data_imm8_op()
%2 = call i32 @arm_arith_cmp(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_cmp_imm8() {
%1 = tail call i32 (...) @t16_data_imm8_op()
%2 = tail call i32 @arm_arith_cmp(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: bigfile-copy [-n Nfile] [-f newfilepath] filepath "
                  "block newblock\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [73 x i8] c"usage: bigfile-copy [-n Nfile] [-f newfilepath] filepath block newblock\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [73 x i8] c"usage: bigfile-copy [-n Nfile] [-f newfilepath] filepath block newblock\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int sb_has_quota_active(struct super_block *sb, int type) { return 0; }


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

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

LLVM IR (-O0):
%struct.super_block = type opaque
define i32 @sb_has_quota_active(%struct.super_block* %0, i32 %1) {
%3 = alloca %struct.super_block*
%4 = alloca i32
store %struct.super_block* %0, %struct.super_block** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.super_block = type opaque
define i32 @sb_has_quota_active(%struct.super_block* nocapture readnone %0, i32 %1) {
ret i32 0
}
int isinf(double x) {
  long hx, lx;
  lx = *(unsigned long long *)&x;
  hx = (*(unsigned long long *)&x) >> 32;
  lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
  lx |= -lx;
  return ~(lx >> 31) & (hx >> 30);
}


x86 assembly (clang, -O0):
<isinf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7fffffff,%rax
xor    $0x7ff00000,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sar    $0x1f,%rax
xor    $0xffffffffffffffff,%rax
mov    -0x10(%rbp),%rcx
sar    $0x1e,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isinf>:
movq   %xmm0,%rax
mov    %rax,%rcx
shr    $0x20,%rcx
and    $0x7fffffff,%ecx
xor    $0x7ff00000,%rcx
or     %rax,%rcx
neg    %rcx
or     %rax,%rcx
shr    $0x1f,%rcx
not    %ecx
shr    $0x3e,%rax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @isinf(double %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca i64
store double %0, double* %2
%5 = bitcast double* %2 to i64*
%6 = load i64, i64* %5
store i64 %6, i64* %4
%7 = bitcast double* %2 to i64*
%8 = load i64, i64* %7
%9 = lshr i64 %8, 32
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = and i64 %10, 2147483647
%12 = xor i64 %11, 2146435072
%13 = load i64, i64* %4
%14 = or i64 %13, %12
store i64 %14, i64* %4
%15 = load i64, i64* %4
%16 = sub nsw i64 0, %15
%17 = load i64, i64* %4
%18 = or i64 %17, %16
store i64 %18, i64* %4
%19 = load i64, i64* %4
%20 = ashr i64 %19, 31
%21 = xor i64 %20, -1
%22 = load i64, i64* %3
%23 = ashr i64 %22, 30
%24 = and i64 %21, %23
%25 = trunc i64 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @isinf(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 32
%4 = and i64 %3, 2147483647
%5 = xor i64 %4, 2146435072
%6 = or i64 %5, %2
%7 = sub nsw i64 0, %6
%8 = or i64 %7, %2
%9 = lshr i64 %8, 31
%10 = xor i64 %9, -1
%11 = lshr i64 %2, 62
%12 = and i64 %11, %10
%13 = trunc i64 %12 to i32
ret i32 %13
}