xunge/DecIR huggingface dataset:
int ft_isspace(int c) {
  if (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' ')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
je     1143 <ft_isspace+0x43>
cmpl   $0xa,-0x8(%rbp)
je     1143 <ft_isspace+0x43>
cmpl   $0xb,-0x8(%rbp)
je     1143 <ft_isspace+0x43>
cmpl   $0xc,-0x8(%rbp)
je     1143 <ft_isspace+0x43>
cmpl   $0xd,-0x8(%rbp)
je     1143 <ft_isspace+0x43>
cmpl   $0x20,-0x8(%rbp)
jne    114f <ft_isspace+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <ft_isspace+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <ft_isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <ft_isspace+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 11, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void SmallError(const char *INErr) {
  fprintf(stderr,
          "\033[31m"
          "* "
          "\033[0m"
          "%s\n",
          INErr);
}


x86 assembly (clang, -O0):
<SmallError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SmallError>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"\1B[31m* \1B[0m%s\0A\00"
define void @SmallError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"\1B[31m* \1B[0m%s\0A\00"
define void @SmallError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int(_rl_to_lower)(c) int c;
{
  return ((((unsigned char)(c) == (c)) && (1 && isupper(c)))
              ? tolower((unsigned char)c)
              : (c));
}


x86 assembly (clang, -O0):
<_rl_to_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    -0x4(%rbp),%eax
jne    115e <_rl_to_lower+0x3e>
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     115e <_rl_to_lower+0x3e>
mov    -0x4(%rbp),%eax
movzbl %al,%edi
call   1030 <tolower@plt>
mov    %eax,-0x8(%rbp)
jmp    1164 <_rl_to_lower+0x44>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rl_to_lower>:
push   %rbx
mov    %edi,%ebx
cmp    $0xff,%edi
ja     113f <_rl_to_lower+0x1f>
mov    %ebx,%edi
call   1040 <isupper@plt>
test   %eax,%eax
je     113f <_rl_to_lower+0x1f>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <tolower@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @_rl_to_lower(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp ult i32 %0, 256
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @isupper(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @tolower(i32 %2)
br label %9
9: ; preds = %1, %4, %7
%10 = phi i32 [ %8, %7 ], [ %0, %4 ], [ %0, %1 ]
ret i32 %10
}
int test_imm_BEuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xBE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_BEuint64_midword_reg>:
test   $0xbe0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BEuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 12451840
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main() {
  int i;
  int j;
  j = 100;
  i = 0;
  while (i < j) {
    if (51 < j) {
      i = i + 1;
      j = j - 1;
    } else {
      i = i - 1;
      j = j + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <main+0x61>
mov    $0x33,%eax
cmp    -0xc(%rbp),%eax
jge    114a <main+0x4a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <main+0x5c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %21, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %22
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp slt i32 51, %9
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %21
16: ; preds = %8
%17 = load i32, i32* %2
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %2
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %21
21: ; preds = %16, %11
br label %4
22: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void print_num_e(char a, char b, char c, char d) {
  ft_putchar(a);
  ft_putchar(b);
  ft_putchar(' ');
  ft_putchar(c);
  ft_putchar(d);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<print_num_e>:
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)
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x4(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_num_e>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
call   1030 <ft_putchar@plt>
mov    %ebx,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    %ebp,%edi
call   1030 <ft_putchar@plt>
mov    %r14d,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @print_num_e(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %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 = call i32 @ft_putchar(i8 signext %9)
%11 = load i8, i8* %6
%12 = call i32 @ft_putchar(i8 signext %11)
%13 = call i32 @ft_putchar(i8 signext 32)
%14 = load i8, i8* %7
%15 = call i32 @ft_putchar(i8 signext %14)
%16 = load i8, i8* %8
%17 = call i32 @ft_putchar(i8 signext %16)
%18 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @print_num_e(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = tail call i32 @ft_putchar(i8 signext %0)
%6 = tail call i32 @ft_putchar(i8 signext %1)
%7 = tail call i32 @ft_putchar(i8 signext 32)
%8 = tail call i32 @ft_putchar(i8 signext %2)
%9 = tail call i32 @ft_putchar(i8 signext %3)
%10 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
char *term_erase_from_name(char const *);
int term_erase(const char *name) {
  const char *s = term_erase_from_name(name);
  if (!s)
    return -1;
  printf("\e[%s", s);
  return 0;
}


x86 assembly (clang, -O0):
<term_erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <term_erase_from_name@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1150 <term_erase+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <term_erase+0x47>
mov    -0x18(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_erase>:
push   %rax
call   1040 <term_erase_from_name@plt>
test   %rax,%rax
je     113e <term_erase+0x1e>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[%s\00"
define i32 @term_erase(i8* %0) {
%2 = tail call i8* @term_erase_from_name(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ inlinable();
void not_inlinable() { inlinable(); }


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

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

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

LLVM IR (-O2):
define void @not_inlinable() {
%1 = tail call i32 (...) @inlinable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  char s[1000];
  scanf("%d", &n);
  itoa(n, s, 1);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
mov    $0x1,%edx
call   1050 <itoa@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%edx
call   1050 <itoa@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @itoa(i32 %6, i8* %4, i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int tanh(double);
double math_coth(double x) { return 1 / tanh(x); }


x86 assembly (clang, -O0):
<math_coth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_coth>:
push   %rax
call   1030 <tanh@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @math_coth(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @tanh(double %3)
%5 = sdiv i32 1, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @math_coth(double %0) {
%2 = tail call i32 @tanh(double %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = sitofp i32 %5 to double
ret double %6
}
void gtk_icon_theme_rescan_if_needed() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_rescan_if_needed() {
ret void
}
int getLenghtOfInt(int var) {
  if (var >= 100000)
    return 6;
  if (var >= 10000)
    return 5;
  if (var >= 1000)
    return 4;
  if (var >= 100)
    return 3;
  else if (var >= 10)
    return 2;
  else
    return 1;
}


x86 assembly (clang, -O0):
<getLenghtOfInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x186a0,-0x8(%rbp)
jl     1120 <getLenghtOfInt+0x20>
movl   $0x6,-0x4(%rbp)
jmp    1185 <getLenghtOfInt+0x85>
cmpl   $0x2710,-0x8(%rbp)
jl     1139 <getLenghtOfInt+0x39>
movl   $0x5,-0x4(%rbp)
jmp    1185 <getLenghtOfInt+0x85>
cmpl   $0x3e8,-0x8(%rbp)
jl     1152 <getLenghtOfInt+0x52>
movl   $0x4,-0x4(%rbp)
jmp    1185 <getLenghtOfInt+0x85>
cmpl   $0x64,-0x8(%rbp)
jl     1168 <getLenghtOfInt+0x68>
movl   $0x3,-0x4(%rbp)
jmp    1185 <getLenghtOfInt+0x85>
cmpl   $0xa,-0x8(%rbp)
jl     117e <getLenghtOfInt+0x7e>
movl   $0x2,-0x4(%rbp)
jmp    1185 <getLenghtOfInt+0x85>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLenghtOfInt>:
mov    $0x6,%eax
cmp    $0x1869f,%edi
jg     113c <getLenghtOfInt+0x3c>
mov    $0x5,%eax
cmp    $0x270f,%edi
jg     113c <getLenghtOfInt+0x3c>
mov    $0x4,%eax
cmp    $0x3e7,%edi
jg     113c <getLenghtOfInt+0x3c>
mov    $0x3,%eax
cmp    $0x63,%edi
jg     113c <getLenghtOfInt+0x3c>
xor    %eax,%eax
cmp    $0xa,%edi
setge  %al
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @getLenghtOfInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 100000
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 6, i32* %2
br label %24
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 10000
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 5, i32* %2
br label %24
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sge i32 %12, 1000
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 4, i32* %2
br label %24
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 100
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 3, i32* %2
br label %24
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp sge i32 %20, 10
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 2, i32* %2
br label %24
23: ; preds = %19
store i32 1, i32* %2
br label %24
24: ; preds = %23, %22, %18, %14, %10, %6
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @getLenghtOfInt(i32 %0) {
%2 = icmp sgt i32 %0, 99999
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 9999
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp sgt i32 %0, 999
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = icmp sgt i32 %0, 99
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp sgt i32 %0, 9
%11 = select i1 %10, i32 2, i32 1
br label %12
12: ; preds = %9, %7, %5, %3, %1
%13 = phi i32 [ 6, %1 ], [ 5, %3 ], [ 4, %5 ], [ 3, %7 ], [ %11, %9 ]
ret i32 %13
}
/* Variables and functions */
int findWatch(int);
int /*<<< orphan*/ logMessage(int /*<<< orphan*/, char *, int);
int findWatchChecked(int wd) {
  int slot;
  slot = findWatch(wd);
  if (slot >= 0)
    return slot;
  logMessage(0, "Could not find watch %d\n", wd);
}


x86 assembly (clang, -O0):
<findWatchChecked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <findWatch@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     114b <findWatchChecked+0x2b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <findWatchChecked+0x3c>
mov    -0x8(%rbp),%edx
xor    %edi,%edi
lea    0xea9(%rip),%rsi
call   1040 <logMessage@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findWatchChecked>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <findWatch@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1140 <findWatchChecked+0x20>
lea    0xec9(%rip),%rsi
xor    %edi,%edi
mov    %ebx,%edx
call   1040 <logMessage@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Could not find watch %d\0A\00"
define i32 @findWatchChecked(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @findWatch(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %3
%13 = call i32 @logMessage(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"Could not find watch %d\0A\00"
define i32 @findWatchChecked(i32 %0) {
%2 = tail call i32 @findWatch(i32 %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @logMessage(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %1, %4
ret i32 %2
}
/* Variables and functions */
char CiphChr(char);
int CiphStr(char *to, char *from) {
  while (*from) {
    *to = CiphChr(*from);
    *++to;
    *++from;
  }
}


x86 assembly (clang, -O0):
<CiphStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <CiphStr+0x4e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <CiphChr@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <CiphStr+0x10>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CiphStr>:
push   %r15
push   %r14
push   %rbx
mov    (%rsi),%al
test   %al,%al
je     114a <CiphStr+0x3a>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <CiphChr@plt>
mov    %al,(%r14,%rbx,1)
movzbl 0x1(%r15,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <CiphStr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @CiphStr(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = tail call signext i8 @CiphChr(i8 signext %6)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
ret i32 undef
}
__attribute__((always_)) void check_highest_zone(int k) {}


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

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

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

LLVM IR (-O2):
define void @check_highest_zone(i32 %0) {
ret void
}
int iprint_int(num)
int num;
{
  char buf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)];
  inttoa(num, buf);
  putstr(buf);
  return (strlen(buf));
}


x86 assembly (clang, -O0):
<iprint_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xf(%rbp),%rsi
mov    $0x0,%al
call   1040 <inttoa@plt>
lea    -0xf(%rbp),%rdi
mov    $0x0,%al
call   1050 <putstr@plt>
lea    -0xf(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iprint_int>:
push   %rbx
sub    $0x10,%rsp
lea    0x5(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <inttoa@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <putstr@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @iprint_int(i32 %0) {
%2 = alloca i32
%3 = alloca [11 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%6 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @inttoa to i32 (i32, i8*, ...)*)(i32 %4, i8* %5)
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @putstr to i32 (i8*, ...)*)(i8* %7)
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%10 = call i64 @strlen(i8* %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @iprint_int(i32 %0) {
%2 = alloca [11 x i8]
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%4 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @inttoa to i32 (i32, i8*, ...)*)(i32 %0, i8* %3)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @putstr to i32 (i8*, ...)*)(i8* %3)
%6 = call i64 @strlen(i8* %3)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
double SFMSanitizeDegrees(double);
double SFMRadiansToDegrees(double r) {
  return (SFMSanitizeDegrees(r * (180 / 3.14159265)));
}


x86 assembly (clang, -O0):
<SFMRadiansToDegrees>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <SFMSanitizeDegrees@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFMRadiansToDegrees>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <SFMSanitizeDegrees@plt>

LLVM IR (-O0):
define double @SFMRadiansToDegrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x404CA5DC1AF05A77
%5 = call double @SFMSanitizeDegrees(double %4)
ret double %5
}

LLVM IR (-O2):
define double @SFMRadiansToDegrees(double %0) {
%2 = fmul double %0, 0x404CA5DC1AF05A77
%3 = tail call double @SFMSanitizeDegrees(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ ft_nputchar(char, int);
int /*<<< orphan*/ ft_putchar(char);
int main() {
  ft_nputchar('@', 42);
  ft_putchar('\n');
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x40,%edi
mov    $0x2a,%esi
call   1040 <ft_nputchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @ft_nputchar(i8 signext 64, i32 42)
%3 = call i32 @ft_putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ft_nputchar(i8 signext 64, i32 42)
%2 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(size_t, int);
int /*<<< orphan*/ post(char *);
void *getbytes(size_t nbytes) {
  void *ret;
  if (nbytes < 1)
    nbytes = 1;
  ret = (void *)calloc(nbytes, 1);
  if (!ret)
    post("pd: getbytes() failed -- out of memory");
  return (ret);
}


x86 assembly (clang, -O0):
<getbytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
jae    113f <getbytes+0x1f>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1168 <getbytes+0x48>
lea    0xe9d(%rip),%rdi
call   1040 <post@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbytes>:
push   %rbx
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <getbytes+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <post@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"pd: getbytes() failed -- out of memory\00"
define i8* @getbytes(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %7
7: ; preds = %6, %1
%8 = load i64, i64* %2
%9 = call i64 @calloc(i64 %8, i32 1)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %7
%14 = call i32 @post(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %7
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [39 x i8] c"pd: getbytes() failed -- out of memory\00"
define i8* @getbytes(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @post(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = inttoptr i64 %4 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ out8(int, int);
void init_pic(void) {
  out8(0x20, 0x11);
  out8(0x21, 0x20);
  out8(0x21, 1 << 2);
  out8(0x21, 0x01);
  out8(0xA0, 0x11);
  out8(0xA1, 0x28);
  out8(0xA1, 2);
  out8(0xA1, 0x01);
  out8(0x21, -1);
  out8(0xA1, -1);
}


x86 assembly (clang, -O0):
<init_pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <out8@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0xffffffff,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0xffffffff,%esi
call   1030 <out8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_pic>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <out8@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <out8@plt>
mov    $0x21,%edi
mov    $0xffffffff,%esi
call   1030 <out8@plt>
mov    $0xa1,%edi
mov    $0xffffffff,%esi
pop    %rax
jmp    1030 <out8@plt>

LLVM IR (-O0):
define void @init_pic() {
%1 = call i32 @out8(i32 32, i32 17)
%2 = call i32 @out8(i32 33, i32 32)
%3 = call i32 @out8(i32 33, i32 4)
%4 = call i32 @out8(i32 33, i32 1)
%5 = call i32 @out8(i32 160, i32 17)
%6 = call i32 @out8(i32 161, i32 40)
%7 = call i32 @out8(i32 161, i32 2)
%8 = call i32 @out8(i32 161, i32 1)
%9 = call i32 @out8(i32 33, i32 -1)
%10 = call i32 @out8(i32 161, i32 -1)
ret void
}

LLVM IR (-O2):
define void @init_pic() {
%1 = tail call i32 @out8(i32 32, i32 17)
%2 = tail call i32 @out8(i32 33, i32 32)
%3 = tail call i32 @out8(i32 33, i32 4)
%4 = tail call i32 @out8(i32 33, i32 1)
%5 = tail call i32 @out8(i32 160, i32 17)
%6 = tail call i32 @out8(i32 161, i32 40)
%7 = tail call i32 @out8(i32 161, i32 2)
%8 = tail call i32 @out8(i32 161, i32 1)
%9 = tail call i32 @out8(i32 33, i32 -1)
%10 = tail call i32 @out8(i32 161, i32 -1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ feof(int /*<<< orphan*/ *);
bool is_eof(FILE *f) { return (feof(f) != 0); }


x86 assembly (clang, -O0):
<is_eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eof>:
push   %rax
call   1030 <feof@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_eof(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @feof(i32* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_eof(i32* nocapture %0) {
%2 = tail call i64 @feof(i32* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_set_font() { exit(1); }


x86 assembly (clang, -O0):
<caml_gr_set_font>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_gr_set_font>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_gr_set_font() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_set_font() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
void TransposePlane() {}


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

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

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

LLVM IR (-O2):
define void @TransposePlane() {
ret void
}
char CtrlSymbol(char c) {
  char ctrlVal = 0;
  switch (c) {
  case '/':
    ctrlVal = 1;
    break;
  case '*':
    ctrlVal = 2;
    break;
  case '\n':
    ctrlVal = 3;
    break;
  case '\"':
    ctrlVal = 4;
    break;
  case '\\':
    ctrlVal = 5;
    break;
  }
  return ctrlVal;
}


x86 assembly (clang, -O0):
<CtrlSymbol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xa,%eax
je     1179 <CtrlSymbol+0x79>
jmp    1123 <CtrlSymbol+0x23>
mov    -0x8(%rbp),%eax
sub    $0x22,%eax
je     1182 <CtrlSymbol+0x82>
jmp    1134 <CtrlSymbol+0x34>
mov    -0x8(%rbp),%eax
sub    $0x2a,%eax
je     1170 <CtrlSymbol+0x70>
jmp    1145 <CtrlSymbol+0x45>
mov    -0x8(%rbp),%eax
sub    $0x2f,%eax
je     1167 <CtrlSymbol+0x67>
jmp    1156 <CtrlSymbol+0x56>
mov    -0x8(%rbp),%eax
sub    $0x5c,%eax
je     118b <CtrlSymbol+0x8b>
jmp    118f <CtrlSymbol+0x8f>
movb   $0x1,-0x2(%rbp)
jmp    118f <CtrlSymbol+0x8f>
movb   $0x2,-0x2(%rbp)
jmp    118f <CtrlSymbol+0x8f>
movb   $0x3,-0x2(%rbp)
jmp    118f <CtrlSymbol+0x8f>
movb   $0x4,-0x2(%rbp)
jmp    118f <CtrlSymbol+0x8f>
movb   $0x5,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtrlSymbol>:
xor    %eax,%eax
lea    -0xa(%rdi),%ecx
cmp    $0x25,%ecx
ja     111d <CtrlSymbol+0x1d>
lea    0xeef(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x3,%al
ret
cmp    $0x5c,%edi
jne    1127 <CtrlSymbol+0x27>
mov    $0x5,%al
ret
mov    $0x4,%al
ret
mov    $0x2,%al
ret
mov    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @CtrlSymbol(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 47, label %6
i32 42, label %7
i32 10, label %8
i32 34, label %9
i32 92, label %10
]
6: ; preds = %1
store i8 1, i8* %3
br label %11
7: ; preds = %1
store i8 2, i8* %3
br label %11
8: ; preds = %1
store i8 3, i8* %3
br label %11
9: ; preds = %1
store i8 4, i8* %3
br label %11
10: ; preds = %1
store i8 5, i8* %3
br label %11
11: ; preds = %1, %10, %9, %8, %7, %6
%12 = load i8, i8* %3
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @CtrlSymbol(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 47, label %3
i32 42, label %4
i32 10, label %5
i32 34, label %6
i32 92, label %7
]
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3
%9 = phi i8 [ 0, %1 ], [ 5, %7 ], [ 4, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ]
ret i8 %9
}
int test_imm_EDint64_lowword_reg(long long val) {
  return ((val) & (0xED << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_EDint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 237
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationSettingsBank2Handle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void StabilizationSettingsBank2Logging() {
  UAVObjLogging(StabilizationSettingsBank2Handle());
}


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

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

LLVM IR (-O0):
define void @StabilizationSettingsBank2Logging() {
%1 = call i32 (...) @StabilizationSettingsBank2Handle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationSettingsBank2Logging() {
%1 = tail call i32 (...) @StabilizationSettingsBank2Handle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
int is_new_only(int dir_id) { return dir_id == 0x02; }


x86 assembly (clang, -O0):
<is_new_only>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_new_only>:
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_new_only(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int createEmptyFile(char *filename) {
  FILE *f = fopen(filename, "w");
  if (f == NULL) {
    return 0;
  }
  fclose(f);
  return 1;
}


x86 assembly (clang, -O0):
<createEmptyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <createEmptyFile+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <createEmptyFile+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createEmptyFile>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <createEmptyFile+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define i32 @createEmptyFile(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
void snd_config_lock(void) {}


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

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

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

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

/* Variables and functions */
int main() {
  struct student *creat(struct student * head, int *num);
  void Prin(struct student * head, int n);
  struct student *insert(struct student * head);
  struct student *head = NULL;
  int num;
  head = creat(head, &num);
  Prin(head, num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <creat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <Prin@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1040 <creat@plt>
mov    0x4(%rsp),%esi
mov    %rax,%rdi
call   1030 <Prin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.student = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.student*
%3 = alloca i32
store i32 0, i32* %1
store %struct.student* null, %struct.student** %2
%4 = load %struct.student*, %struct.student** %2
%5 = call %struct.student* @creat(%struct.student* %4, i32* %3)
store %struct.student* %5, %struct.student** %2
%6 = load %struct.student*, %struct.student** %2
%7 = load i32, i32* %3
ret i32 0
}

LLVM IR (-O2):
%struct.student = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call %struct.student* @creat(%struct.student* null, i32* %1)
%4 = load i32, i32* %1
ret i32 0
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int damage(int strength, int defense) {
  srand(time(NULL));
  int rnd = rand() % 3;
  return strength * rnd / defense;
}


x86 assembly (clang, -O0):
<damage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<damage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
imul   %ebp,%eax
cltd
idiv   %ebx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @damage(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @time(i32* null)
%7 = call i32 @srand(i32 %6)
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 3
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
%13 = load i32, i32* %4
%14 = sdiv i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @damage(i32 %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 3
%7 = mul nsw i32 %6, %0
%8 = sdiv i32 %7, %1
ret i32 %8
}
/* Variables and functions */
double __uniform__();
double tan(double);
double THRandom_cauchy(double median, double sigma) {
  return (median + sigma * tan(3.14159265358979323846 * (__uniform__() - 0.5)));
}


x86 assembly (clang, -O0):
<THRandom_cauchy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__uniform__@plt>
movaps %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9c(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <tan@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<THRandom_cauchy>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <__uniform__@plt>
addsd  0xec1(%rip),%xmm0
mulsd  0xec1(%rip),%xmm0
call   1040 <tan@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @THRandom_cauchy(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double (...) @__uniform__()
%8 = fsub double %7, 5.000000e-01
%9 = fmul double 0x400921FB54442D18, %8
%10 = call double @tan(double %9)
%11 = call double @llvm.fmuladd.f64(double %6, double %10, double %5)
ret double %11
}

LLVM IR (-O2):
define double @THRandom_cauchy(double %0, double %1) {
%3 = tail call double (...) @__uniform__()
%4 = fadd double %3, -5.000000e-01
%5 = fmul double %4, 0x400921FB54442D18
%6 = tail call double @tan(double %5)
%7 = tail call double @llvm.fmuladd.f64(double %1, double %6, double %0)
ret double %7
}
int isextend(int t) { return t == 0x05 || t == 0x0f || t == 0x85; }


x86 assembly (clang, -O0):
<isextend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x5,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1132 <isextend+0x32>
mov    $0x1,%al
cmpl   $0xf,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1132 <isextend+0x32>
cmpl   $0x85,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isextend>:
mov    $0x1,%eax
cmp    $0x5,%edi
je     110f <isextend+0xf>
cmp    $0xf,%edi
jne    1110 <isextend+0x10>
ret
xor    %eax,%eax
cmp    $0x85,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isextend(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 15
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 133
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isextend(i32 %0) {
switch i32 %0, label %2 [
i32 15, label %5
i32 5, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 133
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
int get_ext_div_from_latency(int latency) {
  return ((latency & 0x03ff0000) >> 16);
}


x86 assembly (clang, -O0):
<get_ext_div_from_latency>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3ff0000,%eax
sar    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ext_div_from_latency>:
mov    %edi,%eax
shr    $0x10,%eax
and    $0x3ff,%eax
ret

LLVM IR (-O0):
define i32 @get_ext_div_from_latency(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 67043328
%5 = ashr i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_ext_div_from_latency(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 1023
ret i32 %3
}