xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("proxy [-l <listening port>] -f <forward ip>:<forward port>\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"proxy [-l <listening port>] -f <forward ip>:<forward port>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [59 x i8] c"proxy [-l <listening port>] -f <forward ip>:<forward port>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
unsigned long irqsave(void) {
  unsigned long flags;
  __asm__ volatile("pushf; pop %0" : "=a"(flags));
  disable_interrupts();
  return flags;
}


x86 assembly (clang, -O0):
<irqsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
pushf
pop    %rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <disable_interrupts@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irqsave>:
push   %rbx
pushf
pop    %rax
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <disable_interrupts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @irqsave() {
%1 = alloca i64
%2 = call i64 asm sideeffect "pushf; pop $0", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = call i32 (...) @disable_interrupts()
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
define i64 @irqsave() {
%1 = tail call i64 asm sideeffect "pushf; pop $0", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 (...) @disable_interrupts()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
cleanfc() { printf(".fc\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c".fc\00"
define i32 @cleanfc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
unsigned int gcd(unsigned int x, unsigned int y) {
  for (;;) {
    if (!x)
      return y;
    if (!y)
      return x;
    if (x > y)
      x %= y;
    else
      y %= x;
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <gcd+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <gcd+0x64>
cmpl   $0x0,-0xc(%rbp)
jne    1134 <gcd+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <gcd+0x64>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    1152 <gcd+0x52>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0x8(%rbp)
jmp    115f <gcd+0x5f>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
test   %edi,%edi
jne    111c <gcd+0x1c>
jmp    1130 <gcd+0x30>
cs nopw 0x0(%rax,%rax,1)
mov    %esi,%eax
xor    %edx,%edx
div    %edi
mov    %edx,%esi
test   %edi,%edi
je     1130 <gcd+0x30>
test   %esi,%esi
je     1133 <gcd+0x33>
cmp    %esi,%edi
jbe    1110 <gcd+0x10>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%edi
test   %edi,%edi
jne    111c <gcd+0x1c>
mov    %esi,%eax
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %18, label %4
4: ; preds = %2, %14
%5 = phi i32 [ %16, %14 ], [ %1, %2 ]
%6 = phi i32 [ %15, %14 ], [ %0, %2 ]
%7 = icmp eq i32 %5, 0
br i1 %7, label %18, label %8
8: ; preds = %4
%9 = icmp ugt i32 %6, %5
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = urem i32 %6, %5
br label %14
12: ; preds = %8
%13 = urem i32 %5, %6
br label %14
14: ; preds = %12, %10
%15 = phi i32 [ %11, %10 ], [ %6, %12 ]
%16 = phi i32 [ %5, %10 ], [ %13, %12 ]
%17 = icmp eq i32 %15, 0
br i1 %17, label %18, label %4
18: ; preds = %14, %4, %2
%19 = phi i32 [ %1, %2 ], [ %6, %4 ], [ %16, %14 ]
ret i32 %19
}
extern void UserFree(void *mem) {
  __asm__ __volatile__("int $0x40" ::"a"(68), "b"(13), "c"(mem) : "memory");
}


x86 assembly (clang, -O0):
<UserFree>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x44,%eax
mov    $0xd,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<UserFree>:
push   %rbx
mov    %rdi,%rcx
mov    $0x44,%eax
mov    $0xd,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @UserFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @UserFree(i8* %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 68, i32 13, i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ tanh(double);
long double tanhl(long double x) { return (long double)tanh((double)x); }


x86 assembly (clang, -O0):
<tanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <tanh@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanhl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <tanh@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @tanh(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @tanh(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
int test_thirdBits(void) {
  int result = 0;
  int i;
  for (i = 0; i < 32; i += 3)
    result |= 1 << i;
  return result;
}


x86 assembly (clang, -O0):
<test_thirdBits>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    113a <test_thirdBits+0x3a>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <test_thirdBits+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_thirdBits() {
ret i32 1227133513
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int in2hex(char *ptr) {
  char str[3];
  int val;
  memcpy(str, ptr, 2);
  str[2] = '\0';
  sscanf(str, "%x", &val);
  return val;
}


x86 assembly (clang, -O0):
<in2hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xb(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movb   $0x0,-0x9(%rbp)
lea    -0xb(%rbp),%rdi
lea    0xeb3(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in2hex>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0x9(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movb   $0x0,0xb(%rsp)
lea    0xeba(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <sscanf@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @in2hex(i8* %0) {
%2 = alloca [3 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
%6 = call i32 @memcpy(i8* %4, i8* %0, i32 2)
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 0, i8* %7
%8 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ setup_parameters_DG();
int /*<<< orphan*/ setup_parameters_HDG();
void setup_parameters(void) {
  setup_parameters_DG();
  setup_parameters_HDG();
}


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

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

LLVM IR (-O0):
define void @setup_parameters() {
%1 = call i32 (...) @setup_parameters_DG()
%2 = call i32 (...) @setup_parameters_HDG()
ret void
}

LLVM IR (-O2):
define void @setup_parameters() {
%1 = tail call i32 (...) @setup_parameters_DG()
%2 = tail call i32 (...) @setup_parameters_HDG()
ret void
}
int _is_digit(char ch) {
  if ((ch >= '0') && (ch <= '9'))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<_is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <_is_digit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <_is_digit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <_is_digit+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @_is_digit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @_is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sigfpe(int signum __attribute__((unused))) { exit(0); }


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

x86 assembly (clang, -O2):
<sigfpe>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @sigfpe(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void show_int_vec(int *vec, int n) {
  int i;
  for (i = 0; i < n; ++i) {
    printf("%i ", vec[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<show_int_vec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <show_int_vec+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <show_int_vec+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_int_vec>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <show_int_vec+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <show_int_vec+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define void @show_int_vec(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int __cmpdi2(long long, long long);
int _COM_CMPGT64s(long long a, long long b) { return __cmpdi2(a, b) == 2; }


x86 assembly (clang, -O0):
<_COM_CMPGT64s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__cmpdi2@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_COM_CMPGT64s>:
push   %rax
call   1030 <__cmpdi2@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_COM_CMPGT64s(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @__cmpdi2(i64 %5, i64 %6)
%8 = icmp eq i32 %7, 2
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_COM_CMPGT64s(i64 %0, i64 %1) {
%3 = tail call i32 @__cmpdi2(i64 %0, i64 %1)
%4 = icmp eq i32 %3, 2
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct date_body {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct date_body *);
void free_date(struct date_body *db) { free((db)); }


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

x86 assembly (clang, -O2):
<free_date>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.date_body = type { i32 }
define void @free_date(%struct.date_body* %0) {
%2 = alloca %struct.date_body*
store %struct.date_body* %0, %struct.date_body** %2
%3 = load %struct.date_body*, %struct.date_body** %2
%4 = call i32 @free(%struct.date_body* %3)
ret void
}

LLVM IR (-O2):
%struct.date_body = type { i32 }
define void @free_date(%struct.date_body* nocapture %0) {
%2 = tail call i32 @free(%struct.date_body* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  printf("Sleeping for 5 seconds\n");
  sleep(5);
  printf("Slept for 5 seconds\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Sleeping for 5 seconds\0A\00"
@.str.1 = [21 x i8] c"Slept for 5 seconds\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sleep(i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Sleeping for 5 seconds\00"
@str.2 = [20 x i8] c"Slept for 5 seconds\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 5)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int *primesum(int, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int lenArray;
  int *array = primesum(10, &lenArray);
  printf("%d,%d", array[0], array[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
lea    -0x4(%rbp),%rsi
call   1040 <primesum@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0xa,%edi
call   1040 <primesum@plt>
mov    (%rax),%esi
mov    0x4(%rax),%edx
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d,%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32* @primesum(i32 10, i32* %1)
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %3, i64 1
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6)
ret i32 0
}
int is_eol_char(c)
char c;
{ return (c == '\n' || c == ';'); }


x86 assembly (clang, -O0):
<is_eol_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_eol_char+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x3b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eol_char>:
shl    $0x18,%edi
cmp    $0xa000000,%edi
sete   %al
cmp    $0x3b000000,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_eol_char(i32 %0) {
%2 = shl i32 %0, 24
%3 = icmp eq i32 %2, 167772160
%4 = icmp eq i32 %2, 989855744
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
Bool HostBasedAuthProc(char *hostname) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @HostBasedAuthProc(i8* nocapture readnone %0) {
ret i32 0
}
void test1(int a) {
  int b = 0;
  __asm__("mov $5, %%eax \n"
          "mov %%eax, %0 \n /* Ignore comment. */"
          "mov $3, %%ebx \n"
          "add %%ebx, %1 \n"
          : "=m"(a), "=m"(b)
          :);
  assert(a == 5);
  assert(b == 3);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x5,%eax
mov    %eax,-0x4(%rbp)
mov    $0x3,%ebx
add    %ebx,-0x8(%rbp)
cmpl   $0x5,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
cmpl   $0x3,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rax
mov    %edi,0x4(%rsp)
movl   $0x0,(%rsp)
mov    $0x5,%eax
mov    %eax,0x4(%rsp)
mov    $0x3,%ebx
add    %ebx,(%rsp)
xor    %edi,%edi
cmpl   $0x5,0x4(%rsp)
sete   %dil
xor    %eax,%eax
call   1030 <assert@plt>
xor    %edi,%edi
cmpl   $0x3,(%rsp)
sete   %dil
xor    %eax,%eax
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 5
%6 = zext i1 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %6)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 3
%10 = zext i1 %9 to i32
%11 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %10)
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 5
%7 = zext i1 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %7)
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 3
%11 = zext i1 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %11)
ret void
}
int Bematech_FI_ContadorBilhetePassagem(Var, Retorno) {
  return Formata("\x1b|35|31|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_ContadorBilhetePassagem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_ContadorBilhetePassagem>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|31|\1B\00"
define i32 @Bematech_FI_ContadorBilhetePassagem(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|31|\1B\00"
define i32 @Bematech_FI_ContadorBilhetePassagem(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clean(void) {
  printf("\033[2J");
  printf("\033[0;0f");
}


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

x86 assembly (clang, -O2):
<clean>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @clean() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @clean() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char const *const);
int /*<<< orphan*/ stdout;
int snoopy_output_stdoutoutput(char const *const logMessage, int errorOrMessage,
                               char const *const arg) {
  return fprintf(stdout, "%s\n", logMessage);
}


x86 assembly (clang, -O0):
<snoopy_output_stdoutoutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @snoopy_output_stdoutoutput(i8* %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_MSP(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_MSP() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_MSP() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Variables and functions */
int atoi(char *);
int param_check(int, char **);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int rc, wtime;
  rc = param_check(argc, argv);
  if (rc != 0) {
    return -1;
  }
  wtime = atoi(argv[1]);
  sleep(wtime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <param_check@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116b <main+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    118a <main+0x5a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1050 <sleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
call   1030 <param_check@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
test   %ecx,%ecx
je     1146 <main+0x16>
pop    %rbx
ret
mov    0x8(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @param_check(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @sleep(i32 %8)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int isroot(char *path) {
  if (!strcmp(path, "/"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <isroot+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <isroot+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isroot>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @isroot(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void ff_hevc_put_hevc_uni_epel_v16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v16_10_sse4() {
ret void
}
void swapThree(int *a, int *b, int *c) {
  *a = *a + *b + *c;
  *b = *a - (*b + *c);
  *c = *a - (*b + *c);
  *a = *a - (*b + *c);
}


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

x86 assembly (clang, -O2):
<swapThree>:
mov    (%rsi),%eax
add    (%rdi),%eax
add    (%rdx),%eax
mov    %eax,(%rdi)
mov    (%rsi),%ecx
add    (%rdx),%ecx
sub    %ecx,%eax
mov    %eax,(%rsi)
mov    (%rdi),%ecx
add    (%rdx),%eax
sub    %eax,%ecx
mov    %ecx,(%rdx)
add    (%rsi),%ecx
sub    %ecx,(%rdi)
ret

LLVM IR (-O0):
define void @swapThree(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
%15 = load i32*, i32** %4
store i32 %14, i32* %15
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = load i32*, i32** %6
%21 = load i32, i32* %20
%22 = add nsw i32 %19, %21
%23 = sub nsw i32 %17, %22
%24 = load i32*, i32** %5
store i32 %23, i32* %24
%25 = load i32*, i32** %4
%26 = load i32, i32* %25
%27 = load i32*, i32** %5
%28 = load i32, i32* %27
%29 = load i32*, i32** %6
%30 = load i32, i32* %29
%31 = add nsw i32 %28, %30
%32 = sub nsw i32 %26, %31
%33 = load i32*, i32** %6
store i32 %32, i32* %33
%34 = load i32*, i32** %4
%35 = load i32, i32* %34
%36 = load i32*, i32** %5
%37 = load i32, i32* %36
%38 = load i32*, i32** %6
%39 = load i32, i32* %38
%40 = add nsw i32 %37, %39
%41 = sub nsw i32 %35, %40
%42 = load i32*, i32** %4
store i32 %41, i32* %42
ret void
}

LLVM IR (-O2):
define void @swapThree(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %0
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add i32 %9, %10
%12 = sub i32 %8, %11
store i32 %12, i32* %1
%13 = load i32, i32* %0
%14 = load i32, i32* %2
%15 = add i32 %12, %14
%16 = sub i32 %13, %15
store i32 %16, i32* %2
%17 = load i32, i32* %0
%18 = load i32, i32* %1
%19 = add i32 %16, %18
%20 = sub i32 %17, %19
store i32 %20, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ u_char_iswide(int /*<<< orphan*/);
scalar_t__ u_char_iszerowidth(int /*<<< orphan*/);
size_t u_char_width(uint32_t c) {
  return u_char_iswide(c) ? 2 : u_char_iszerowidth(c) ? 0 : 1;
}


x86 assembly (clang, -O0):
<u_char_width>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <u_char_iswide@plt>
cmp    $0x0,%rax
je     114a <u_char_width+0x2a>
mov    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <u_char_width+0x46>
mov    -0x4(%rbp),%edi
call   1040 <u_char_iszerowidth@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_char_width>:
push   %rbx
mov    %edi,%ebx
call   1030 <u_char_iswide@plt>
mov    %rax,%rcx
mov    $0x2,%eax
test   %rcx,%rcx
je     1137 <u_char_width+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <u_char_iszerowidth@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i64 @u_char_width(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @u_char_iswide(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i64 @u_char_iszerowidth(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 1
br label %13
13: ; preds = %7, %6
%14 = phi i32 [ 2, %6 ], [ %12, %7 ]
%15 = sext i32 %14 to i64
ret i64 %15
}

LLVM IR (-O2):
define i64 @u_char_width(i32 %0) {
%2 = tail call i64 @u_char_iswide(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @u_char_iszerowidth(i32 %0)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i64
br label %8
8: ; preds = %1, %4
%9 = phi i64 [ %7, %4 ], [ 2, %1 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello\n");
  printf("\tba!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
@str.2 = [5 x i8] c"\09ba!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
unsigned char swim_chang(unsigned char cahrchar) {
  unsigned char tmp, tmp1;
  tmp = cahrchar >> 4;
  tmp1 = cahrchar << 4;
  return (tmp | tmp1);
}


x86 assembly (clang, -O0):
<swim_chang>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x4,%eax
mov    %al,-0x3(%rbp)
movzbl -0x2(%rbp),%eax
movzbl -0x3(%rbp),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swim_chang>:
mov    %edi,%eax
rol    $0x4,%al
ret

LLVM IR (-O0):
define zeroext i8 @swim_chang(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = ashr i32 %6, 4
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 4
%12 = trunc i32 %11 to i8
store i8 %12, i8* %4
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @swim_chang(i8 zeroext %0) {
%2 = tail call i8 @llvm.fshl.i8(i8 %0, i8 %0, i8 4)
ret i8 %2
}
void cleardevice() {}


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

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

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

LLVM IR (-O2):
define void @cleardevice() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ hash_put1(char *, char const *);
int /*<<< orphan*/ qprintf(char *, int, char *, char const *, char const *,
                           char const *);
void hash_put3(const char *key1, const char *key2, const char *key3,
               const char *val) {
  char key[32];
  qprintf(key, sizeof(key), "%s.%s.%s", key1, key2, key3);
  hash_put1(key, val);
}


x86 assembly (clang, -O0):
<hash_put3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    $0x20,%esi
lea    0xeac(%rip),%rdx
call   1040 <qprintf@plt>
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <hash_put1@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_put3>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rcx,%rbx
mov    %rdx,%r9
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xec6(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1040 <qprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <hash_put1@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s.%s.%s\00"
define void @hash_put3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [32 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i32 @qprintf(i8* %10, i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @hash_put1(i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s.%s.%s\00"
define void @hash_put3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [32 x i8]
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = call i32 @qprintf(i8* %6, i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%8 = call i32 @hash_put1(i8* %6, i8* %3)
ret void
}
int test_imm_81int8_reg(signed char val) {
  return ((val) & (0x81 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_81int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x81,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_81int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 129
%6 = icmp ne i32 %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_81int8_reg(i8 signext %0) {
%2 = and i8 %0, -127
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int do_dup2(struct tcb *, int);
int sys_dup3(struct tcb *tcp) { return do_dup2(tcp, 2); }


x86 assembly (clang, -O0):
<sys_dup3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <do_dup2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_dup3>:
mov    $0x2,%esi
jmp    1030 <do_dup2@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
define i32 @sys_dup3(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @do_dup2(%struct.tcb* %3, i32 2)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_dup3(%struct.tcb* %0) {
%2 = tail call i32 @do_dup2(%struct.tcb* %0, i32 2)
ret i32 %2
}
void g_object_connect() {}


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

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

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

LLVM IR (-O2):
define void @g_object_connect() {
ret void
}
unsigned int perfctr_cstatus_enabled(unsigned int cstatus) { return cstatus; }


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

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

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

LLVM IR (-O2):
define i32 @perfctr_cstatus_enabled(i32 returned %0) {
ret i32 %0
}
signed long int signedlongint_ignoring_unsignedchar(signed long int x,
                                                    unsigned char y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlongint_ignoring_unsignedchar>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @signedlongint_ignoring_unsignedchar(i64 returned %0, i8 zeroext %1) {
ret i64 %0
}
__typeof__(isspace((void *)1)) test_isspace_57(void) {
  return isspace((void *)1);
}


x86 assembly (clang, -O0):
<test_isspace_57>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
mov    %eax,%edi
call   1030 <isspace@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isspace_57>:
mov    $0x1,%edi
jmp    1030 <isspace@plt>

LLVM IR (-O0):
define i32 @test_isspace_57() {
%1 = call i32 @isspace(i32 ptrtoint (i8* inttoptr (i64 1 to i8*) to i32))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isspace_57() {
%1 = tail call i32 @isspace(i32 1)
ret i32 %1
}
int regulator_enable(struct regulator *regulator) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.regulator = type opaque
define i32 @regulator_enable(%struct.regulator* nocapture readnone %0) {
ret i32 0
}