xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ scanf(char *, char *);
int /*<<< orphan*/ string_recorder(char *);
int main() {
  char s[100];
  while (scanf("%s", s) != EOF) {
    string_recorder(s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     115d <main+0x3d>
lea    -0x70(%rbp),%rdi
call   1030 <string_recorder@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
lea    0xed0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    0x2ea9(%rip),%r15
cmp    (%r15),%rax
je     1168 <main+0x48>
mov    %rsp,%rbx
lea    0xeb2(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <string_recorder@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @string_recorder(i8* %9)
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %0, %6
%7 = call i32 @string_recorder(i8* %2)
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = load i64, i64* @EOF
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %6
11: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int xprintf_print(int /*<<< orphan*/, int *);
int xprintf(const char *format, ...) {
  int *varg = (int *)(&format);
  return xprintf_print(0, varg);
}


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

x86 assembly (clang, -O2):
<xprintf>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <xprintf_print@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @xprintf(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = bitcast i8** %2 to i32*
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @xprintf_print(i32 0, i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @xprintf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i32*
%4 = call i32 @xprintf_print(i32 0, i32* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void time_sleep(int micro_seconds) { usleep(micro_seconds); }


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

x86 assembly (clang, -O2):
<time_sleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @time_sleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, void const *, int);
void ft_putchar(char c) { write(1, (const void *)&c, 1); }


x86 assembly (clang, -O0):
<ft_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @ft_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
int buscaSequencial(int v[], int n, int k) {
  int i;
  for (i = 0; i < n && v[i] != k; i++)
    ;
  return !(i == n);
}


x86 assembly (clang, -O0):
<buscaSequencial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x15(%rbp)
jge    113a <buscaSequencial+0x3a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114a <buscaSequencial+0x4a>
jmp    115d <buscaSequencial+0x5d>
jmp    114f <buscaSequencial+0x4f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <buscaSequencial+0x15>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buscaSequencial>:
test   %esi,%esi
jle    1122 <buscaSequencial+0x22>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rdi,%rcx,4)
je     1124 <buscaSequencial+0x24>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <buscaSequencial+0x10>
mov    %eax,%ecx
jmp    1124 <buscaSequencial+0x24>
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %esi,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @buscaSequencial(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %23, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %6
%19 = icmp ne i32 %17, %18
br label %20
20: ; preds = %12, %8
%21 = phi i1 [ false, %8 ], [ %19, %12 ]
br i1 %21, label %22, label %26
22: ; preds = %20
br label %23
23: ; preds = %22
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %8
26: ; preds = %20
%27 = load i32, i32* %7
%28 = load i32, i32* %5
%29 = icmp eq i32 %27, %28
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @buscaSequencial(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %1, %12 ]
%19 = icmp ne i32 %18, %1
%20 = zext i1 %19 to i32
ret i32 %20
}
/* Variables and functions */
int __reclaim(char **, int, int);
int reclaim(char **args, int num_args) {
  return __reclaim(args, num_args, 0x00);
}


x86 assembly (clang, -O0):
<reclaim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <__reclaim@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @reclaim(i8** %0, i32 %1) {
%3 = tail call i32 @__reclaim(i8** %0, i32 %1, i32 0)
ret i32 %3
}
char *strcpy(char *destination, const char *source) {
  char *src = (char *)source;
  char *dst = destination;
  while ((*(dst++) = *(src++)) != 0)
    ;
  return destination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    -0x20(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     114f <strcpy+0x4f>
jmp    111c <strcpy+0x1c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
int OR(int lol, int lel) {
  if (lol == 1 || lel == 1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<OR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     111e <OR+0x1e>
cmpl   $0x1,-0xc(%rbp)
jne    112a <OR+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <OR+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OR>:
cmp    $0x1,%edi
sete   %al
cmp    $0x1,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @OR(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
%4 = icmp eq i32 %1, 1
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m200SetPrgROMBank(int /*<<< orphan*/);
int /*<<< orphan*/ p16c8init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
void m200_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
               uint32_t prgRAMsizeIn, uint8_t *chrROMin,
               uint32_t chrROMsizeIn) {
  p16c8init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  m200SetPrgROMBank(0);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <p16c8init@plt>
xor    %edi,%edi
call   1030 <m200SetPrgROMBank@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
call   1040 <p16c8init@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <m200SetPrgROMBank@plt>

LLVM IR (-O0):
define void @m200_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @p16c8init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 @m200SetPrgROMBank(i32 0)
ret void
}

LLVM IR (-O2):
define void @m200_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @p16c8init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 @m200SetPrgROMBank(i32 0)
ret void
}
void gtk_tree_path_prev() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_path_prev() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glColorMask(unsigned char, unsigned char, unsigned char,
                               unsigned char);
void ColorMask(unsigned char r, unsigned char g, unsigned char b,
               unsigned char a) {
  glColorMask(r, g, b, a);
}


x86 assembly (clang, -O0):
<ColorMask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x2(%rbp),%cl
mov    -0x3(%rbp),%al
movzbl %dl,%edi
movzbl %cl,%esi
movzbl %al,%edx
movzbl -0x4(%rbp),%ecx
call   1030 <glColorMask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ColorMask>:
jmp    1030 <glColorMask@plt>

LLVM IR (-O0):
define void @ColorMask(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8, i8* %5
%10 = load i8, i8* %6
%11 = load i8, i8* %7
%12 = load i8, i8* %8
%13 = call i32 @glColorMask(i8 zeroext %9, i8 zeroext %10, i8 zeroext %11, i8 zeroext %12)
ret void
}

LLVM IR (-O2):
define void @ColorMask(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @glColorMask(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3)
ret void
}
/* Variables and functions */
scalar_t__ is_11_digits(char const *);
int /*<<< orphan*/ is_contain_other_char(char const *);
scalar_t__ is_start_with_1(char const *);
int isPhoneNumberOfString(const char *phoneNumber) {
  int flag = 0;
  if (is_11_digits(phoneNumber))
    if (is_start_with_1(phoneNumber))
      if (!is_contain_other_char(phoneNumber))
        flag = 1;
  return flag;
}


x86 assembly (clang, -O0):
<isPhoneNumberOfString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_11_digits@plt>
cmp    $0x0,%rax
je     118c <isPhoneNumberOfString+0x5c>
mov    -0x8(%rbp),%rdi
call   1050 <is_start_with_1@plt>
cmp    $0x0,%rax
je     1187 <isPhoneNumberOfString+0x57>
mov    -0x8(%rbp),%rdi
call   1040 <is_contain_other_char@plt>
cmp    $0x0,%eax
jne    1182 <isPhoneNumberOfString+0x52>
movl   $0x1,-0xc(%rbp)
jmp    1187 <isPhoneNumberOfString+0x57>
jmp    118c <isPhoneNumberOfString+0x5c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPhoneNumberOfString>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <is_11_digits@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     115f <isPhoneNumberOfString+0x2f>
mov    %rbx,%rdi
call   1050 <is_start_with_1@plt>
test   %rax,%rax
je     115f <isPhoneNumberOfString+0x2f>
mov    %rbx,%rdi
call   1040 <is_contain_other_char@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isPhoneNumberOfString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @is_11_digits(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i64 @is_start_with_1(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %2
%13 = call i32 @is_contain_other_char(i8* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %11
store i32 1, i32* %3
br label %16
16: ; preds = %15, %11
br label %17
17: ; preds = %16, %7
br label %18
18: ; preds = %17, %1
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @isPhoneNumberOfString(i8* %0) {
%2 = tail call i64 @is_11_digits(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i64 @is_start_with_1(i8* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @is_contain_other_char(i8* %0)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
int SerialSendChar(int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SerialSendChar(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ handle_PRIO(int /*<<< orphan*/);
int gen_PRIO() {
  handle_PRIO(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_PRIO>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_PRIO@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_PRIO() {
%1 = call i32 @handle_PRIO(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_PRIO() {
%1 = tail call i32 @handle_PRIO(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "%s: this is a test\n", argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"%s: this is a test\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"%s: this is a test\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int get_rand(int /*<<< orphan*/, int);
char gr_obj_char(void) {
  int r;
  char *rs = "%!?]=/):*";
  r = get_rand(0, 8);
  return (rs[r]);
}


x86 assembly (clang, -O0):
<gr_obj_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <get_rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gr_obj_char>:
push   %rax
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <get_rand@plt>
cltq
lea    0xeda(%rip),%rcx
mov    (%rax,%rcx,1),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%!?]=/):*\00"
define signext i8 @gr_obj_char() {
%1 = alloca i32
%2 = alloca i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 @get_rand(i32 0, i32 8)
store i32 %3, i32* %1
%4 = load i8*, i8** %2
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"%!?]=/):*\00"
define signext i8 @gr_obj_char() {
%1 = tail call i32 @get_rand(i32 0, i32 8)
%2 = sext i32 %1 to i64
%3 = getelementptr inbounds [10 x i8], [10 x i8]* @.str, i64 0, i64 %2
%4 = load i8, i8* %3
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void captura(int sennal) {
  printf("He conseguido capturar SIGKILL\n");
  fflush(NULL);
  return;
}


x86 assembly (clang, -O0):
<captura>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<captura>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"He conseguido capturar SIGKILL\0A\00"
define void @captura(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @fflush(i32* null)
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"He conseguido capturar SIGKILL\00"
define void @captura(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @fflush(i32* null)
ret void
}
double raizq(double n) {
  double rad;
  double raizq = n;
  for (rad = 0; rad < 5; ++rad) {
    raizq = raizq / 2 + n / (2 * raizq);
  }
  return (raizq);
}


x86 assembly (clang, -O0):
<raizq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedd(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1175 <raizq+0x75>
movsd  -0x18(%rbp),%xmm0
movsd  0xecd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xebc(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeaa(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    111b <raizq+0x1b>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<raizq>:
movsd  0xef8(%rip),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm0,%xmm3
addsd  %xmm0,%xmm3
movapd %xmm0,%xmm4
divsd  %xmm3,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm4
movapd %xmm0,%xmm3
divsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm3,%xmm3
movapd %xmm0,%xmm4
divsd  %xmm3,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm4
movapd %xmm0,%xmm3
divsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm3,%xmm3
divsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @raizq(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %4
store double 0.000000e+00, double* %3
br label %6
6: ; preds = %17, %1
%7 = load double, double* %3
%8 = fcmp olt double %7, 5.000000e+00
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load double, double* %4
%11 = fdiv double %10, 2.000000e+00
%12 = load double, double* %2
%13 = load double, double* %4
%14 = fmul double 2.000000e+00, %13
%15 = fdiv double %12, %14
%16 = fadd double %11, %15
store double %16, double* %4
br label %17
17: ; preds = %9
%18 = load double, double* %3
%19 = fadd double %18, 1.000000e+00
store double %19, double* %3
br label %6
20: ; preds = %6
%21 = load double, double* %4
ret double %21
}

LLVM IR (-O2):
define double @raizq(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fmul double %0, 2.000000e+00
%4 = fdiv double %0, %3
%5 = fadd double %2, %4
%6 = fmul double %5, 5.000000e-01
%7 = fmul double %5, 2.000000e+00
%8 = fdiv double %0, %7
%9 = fadd double %6, %8
%10 = fmul double %9, 5.000000e-01
%11 = fmul double %9, 2.000000e+00
%12 = fdiv double %0, %11
%13 = fadd double %10, %12
%14 = fmul double %13, 5.000000e-01
%15 = fmul double %13, 2.000000e+00
%16 = fdiv double %0, %15
%17 = fadd double %14, %16
%18 = fmul double %17, 5.000000e-01
%19 = fmul double %17, 2.000000e+00
%20 = fdiv double %0, %19
%21 = fadd double %18, %20
ret double %21
}
/* Type definitions */
struct aho_queue_node {
  int dummy;
};
struct aho_queue {
  int dummy;
};

/* Variables and functions */
struct aho_queue_node *aho_queue_dequeue(struct aho_queue *);
int /*<<< orphan*/ free(struct aho_queue_node *);
void aho_queue_destroy(struct aho_queue *restrict que) {
  struct aho_queue_node *que_node = NULL;
  while ((que_node = aho_queue_dequeue(que)) != NULL) {
    free(que_node);
  }
}


x86 assembly (clang, -O0):
<aho_queue_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <aho_queue_dequeue@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1159 <aho_queue_destroy+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    1134 <aho_queue_destroy+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aho_queue_destroy>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <aho_queue_dequeue@plt>
test   %rax,%rax
je     1147 <aho_queue_destroy+0x27>
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
jmp    1130 <aho_queue_destroy+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.aho_queue = type { i32 }
%struct.aho_queue_node = type { i32 }
define void @aho_queue_destroy(%struct.aho_queue* noalias %0) {
%2 = alloca %struct.aho_queue*
%3 = alloca %struct.aho_queue_node*
store %struct.aho_queue* %0, %struct.aho_queue** %2
store %struct.aho_queue_node* null, %struct.aho_queue_node** %3
br label %4
4: ; preds = %8, %1
%5 = load %struct.aho_queue*, %struct.aho_queue** %2
%6 = call %struct.aho_queue_node* @aho_queue_dequeue(%struct.aho_queue* %5)
store %struct.aho_queue_node* %6, %struct.aho_queue_node** %3
%7 = icmp ne %struct.aho_queue_node* %6, null
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load %struct.aho_queue_node*, %struct.aho_queue_node** %3
%10 = call i32 @free(%struct.aho_queue_node* %9)
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.aho_queue = type { i32 }
%struct.aho_queue_node = type { i32 }
define void @aho_queue_destroy(%struct.aho_queue* noalias %0) {
%2 = tail call %struct.aho_queue_node* @aho_queue_dequeue(%struct.aho_queue* %0)
%3 = icmp eq %struct.aho_queue_node* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi %struct.aho_queue_node* [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 @free(%struct.aho_queue_node* %5)
%7 = tail call %struct.aho_queue_node* @aho_queue_dequeue(%struct.aho_queue* %0)
%8 = icmp eq %struct.aho_queue_node* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int setenv(char const *, char const *, int);
int g_setenv(const char *name, const char *value, int rewrite) {
  return setenv(name, value, rewrite);
}


x86 assembly (clang, -O0):
<g_setenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <setenv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_setenv>:
jmp    1030 <setenv@plt>

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

LLVM IR (-O2):
define i32 @g_setenv(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @setenv(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int quicktime_quantize16(int number) {
  if (number && (number % 16)) {
    number += 16 - (number % 16);
  }
  return number;
}


x86 assembly (clang, -O0):
<quicktime_quantize16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113d <quicktime_quantize16+0x3d>
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     113d <quicktime_quantize16+0x3d>
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    $0x10,%eax
sub    %edx,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicktime_quantize16>:
test   %edi,%edi
je     111d <quicktime_quantize16+0x1d>
mov    %edi,%eax
lea    0xf(%rax),%edx
test   %edi,%edi
cmovns %edi,%edx
and    $0xfffffff0,%edx
mov    %edi,%ecx
sub    %edx,%ecx
je     111c <quicktime_quantize16+0x1c>
sub    %ecx,%eax
add    $0x10,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @quicktime_quantize16(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = srem i32 %0, 16
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = add i32 %0, 16
%8 = sub i32 %7, %4
br label %9
9: ; preds = %6, %3, %1
%10 = phi i32 [ %8, %6 ], [ %0, %3 ], [ 0, %1 ]
ret i32 %10
}
void calc_load_enter_idle(void) {}


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

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

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

LLVM IR (-O2):
define void @calc_load_enter_idle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copia();
int obtenlinea();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int longitud;
  extern char linea_max[1000];
  while ((longitud = obtenlinea()) > 0)
    if (longitud > 80) {
      copia();
      printf("%s", linea_max);
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <obtenlinea@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    117b <main+0x4b>
cmpl   $0x50,-0x8(%rbp)
jle    1176 <main+0x46>
mov    $0x0,%al
call   1040 <copia@plt>
lea    0xe96(%rip),%rdi
mov    0x2e6f(%rip),%rsi
call   1050 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <obtenlinea@plt>
test   %eax,%eax
jle    1174 <main+0x44>
lea    0xeba(%rip),%r14
mov    0x2e93(%rip),%rbx
jmp    115b <main+0x2b>
nop
xor    %eax,%eax
call   1030 <obtenlinea@plt>
test   %eax,%eax
jle    1174 <main+0x44>
cmp    $0x51,%eax
jb     1150 <main+0x20>
xor    %eax,%eax
call   1040 <copia@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@linea_max = external global [1000 x i8]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %12, %0
%4 = call i32 (...) @obtenlinea()
store i32 %4, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 80
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 (...) @copia()
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @linea_max, i64 0, i64 0))
br label %12
12: ; preds = %9, %6
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@linea_max = external global [1000 x i8]
define i32 @main() {
%1 = tail call i32 (...) @obtenlinea()
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %12
3: ; preds = %0, %9
%4 = phi i32 [ %10, %9 ], [ %1, %0 ]
%5 = icmp ugt i32 %4, 80
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 (...) @copia()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @linea_max, i64 0, i64 0))
br label %9
9: ; preds = %6, %3
%10 = tail call i32 (...) @obtenlinea()
%11 = icmp sgt i32 %10, 0
br i1 %11, label %3, label %12
12: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *);
int main() {
  int a;
  alarm(3);
  pause();
  printf("exit\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <alarm@plt>
xor    %eax,%eax
call   1050 <pause@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"exit\00"
define i32 @main() {
%1 = tail call i32 @alarm(i32 3)
%2 = tail call i32 (...) @pause()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ putc(unsigned char, int /*<<< orphan*/ *);
int writebyte(FILE *fp, unsigned char c) { return putc(c, fp) != EOF; }


x86 assembly (clang, -O0):
<writebyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <putc@plt>
mov    0x2eb0(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writebyte>:
push   %rax
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
call   1030 <putc@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @writebyte(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i32*, i32** %3
%7 = call i64 @putc(i8 zeroext %5, i32* %6)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @writebyte(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i64 @putc(i8 zeroext %1, i32* %0)
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: nsdd if=infile of=outfile bs=m count=t skip=i seek=j\n"
         "       if : infile, if it is /dev/zero, infile should be \"ZERO\".\n"
         "       of : outfile, if it is floppy, outfile should be \"FLOPPY\".\n"
         "       bs : the size of block.\n"
         "       count : the count of copied block from infile to outfile.\n"
         "Optional parameters:\n"
         "       skip : the count of skipped block in infile.\n"
         "       seek : the count of seeked block in outfile.\n"
         "Example: nsdd if=infile of=outfile skip=1 seek=1 bs=512 count=2880\n"
         "       It will copy [bs] bytes from infile at offset [skip*bs] to "
         "outfile\n"
         "       at offset [seek*bs], and repeat [count] times with continuous "
         "address.\n");
}


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

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

LLVM IR (-O0):
@.str = [632 x i8] c"Usage: nsdd if=infile of=outfile bs=m count=t skip=i seek=j\0A if : infile, if it is /dev/zero, infile should be \22ZERO\22.\0A of : outfile, if it is floppy, outfile should be \22FLOPPY\22.\0A bs : the size of block.\0A count : the count of copied block from infile to outfile.\0AOptional parameters:\0A skip : the count of skipped block in infile.\0A seek : the count of seeked block in outfile.\0AExample: nsdd if=infile of=outfile skip=1 seek=1 bs=512 count=2880\0A It will copy [bs] bytes from infile at offset [skip*bs] to outfile\0A at offset [seek*bs], and repeat [count] times with continuous address.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([632 x i8], [632 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [631 x i8] c"Usage: nsdd if=infile of=outfile bs=m count=t skip=i seek=j\0A if : infile, if it is /dev/zero, infile should be \22ZERO\22.\0A of : outfile, if it is floppy, outfile should be \22FLOPPY\22.\0A bs : the size of block.\0A count : the count of copied block from infile to outfile.\0AOptional parameters:\0A skip : the count of skipped block in infile.\0A seek : the count of seeked block in outfile.\0AExample: nsdd if=infile of=outfile skip=1 seek=1 bs=512 count=2880\0A It will copy [bs] bytes from infile at offset [skip*bs] to outfile\0A at offset [seek*bs], and repeat [count] times with continuous address.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([631 x i8], [631 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ptr_glPopAttrib();
extern void glPopAttrib(void) { ptr_glPopAttrib(); }


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

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

LLVM IR (-O0):
define void @glPopAttrib() {
%1 = call i32 (...) @ptr_glPopAttrib()
ret void
}

LLVM IR (-O2):
define void @glPopAttrib() {
%1 = tail call i32 (...) @ptr_glPopAttrib()
ret void
}
int nla_get_flag(const struct nlattr *nla) { return !!nla; }


x86 assembly (clang, -O0):
<nla_get_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_get_flag>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
%struct.nlattr = type opaque
define i32 @nla_get_flag(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = icmp ne %struct.nlattr* %3, null
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.nlattr = type opaque
define i32 @nla_get_flag(%struct.nlattr* readnone %0) {
%2 = icmp ne %struct.nlattr* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ con_do_putc(char);
int /*<<< orphan*/ con_flush();
void con_putc(char c) {
  con_do_putc(c);
  con_flush();
}


x86 assembly (clang, -O0):
<con_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <con_do_putc@plt>
mov    $0x0,%al
call   1030 <con_flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @con_putc(i8 signext %0) {
%2 = tail call i32 @con_do_putc(i8 signext %0)
%3 = tail call i32 (...) @con_flush()
ret void
}
int cmp_double(const void *a, const void *b) {
  if (*((double *)a) < *((double *)b))
    return -1;
  if (*((double *)a) > *((double *)b))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <cmp_double+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <cmp_double+0x5b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1154 <cmp_double+0x54>
movl   $0x1,-0x4(%rbp)
jmp    115b <cmp_double+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("error: two [indent number]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"error: two [indent number]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"error: two [indent number]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
double log(int /*<<< orphan*/);
float motorToRPM(int motorSpeed) {
  return (motorSpeed < 0) ? ((log(((abs(motorSpeed)))) * 44.486) - 105.47)
                          : -1 * ((log(((abs(motorSpeed)))) * 44.486) - 105.47);
}


x86 assembly (clang, -O0):
<motorToRPM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1166 <motorToRPM+0x46>
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movsd  0xebc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11a1 <motorToRPM+0x81>
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  0xe88(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe84(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe68(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<motorToRPM>:
push   %rax
test   %edi,%edi
js     1134 <motorToRPM+0x24>
call   1030 <log@plt>
mulsd  0xede(%rip),%xmm0
addsd  0xede(%rip),%xmm0
xorpd  0xede(%rip),%xmm0
jmp    114b <motorToRPM+0x3b>
neg    %edi
call   1030 <log@plt>
mulsd  0xebd(%rip),%xmm0
addsd  0xebd(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @motorToRPM(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @abs(i32 %6)
%8 = call double @log(i32 %7)
%9 = call double @llvm.fmuladd.f64(double %8, double 4.448600e+01, double -1.054700e+02)
br label %16
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i32 @abs(i32 %11)
%13 = call double @log(i32 %12)
%14 = call double @llvm.fmuladd.f64(double %13, double 4.448600e+01, double -1.054700e+02)
%15 = fmul double -1.000000e+00, %14
br label %16
16: ; preds = %10, %5
%17 = phi double [ %9, %5 ], [ %15, %10 ]
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @motorToRPM(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sub nsw i32 0, %0
%5 = tail call double @log(i32 %4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 4.448600e+01, double -1.054700e+02)
br label %11
7: ; preds = %1
%8 = tail call double @log(i32 %0)
%9 = tail call double @llvm.fmuladd.f64(double %8, double 4.448600e+01, double -1.054700e+02)
%10 = fneg double %9
br label %11
11: ; preds = %7, %3
%12 = phi double [ %6, %3 ], [ %10, %7 ]
%13 = fptrunc double %12 to float
ret float %13
}