xunge/DecIR huggingface dataset:
int isblank(int c) { return (c == '\t') || (c == ' '); }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isblank+0x20>
cmpl   $0x20,-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):
<isblank>:
cmp    $0x9,%edi
sete   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float get(char *);
int /*<<< orphan*/ printf(char *, float);
void subtract() {
  float firstNum = get("Enter your first number");
  float secondNum = get("Enter your second number");
  float result = firstNum - secondNum;
  printf("Result: %f", result);
}


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <get@plt>
movss  %xmm0,-0x4(%rbp)
lea    0xed8(%rip),%rdi
call   1040 <get@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <get@plt>
movss  %xmm0,0x4(%rsp)
lea    0xede(%rip),%rdi
call   1040 <get@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
lea    0xee1(%rip),%rdi
movaps %xmm1,%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Enter your first number\00"
@.str.1 = [25 x i8] c"Enter your second number\00"
@.str.2 = [11 x i8] c"Result: %f\00"
define void @subtract() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call float @get(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store float %4, float* %1
%5 = call float @get(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store float %5, float* %2
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fsub float %6, %7
store float %8, float* %3
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %9)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Enter your first number\00"
@.str.1 = [25 x i8] c"Enter your second number\00"
@.str.2 = [11 x i8] c"Result: %f\00"
define void @subtract() {
%1 = tail call float @get(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call float @get(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = fsub float %1, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %3)
ret void
}
/* Type definitions */
struct ata_port {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __const_udelay(unsigned long);
int /*<<< orphan*/ ata_altstatus(struct ata_port *);
void(ata_pause)(struct ata_port *ap) {
  {
    ata_altstatus(ap);
    __const_udelay(2000UL);
    return;
  }
}


x86 assembly (clang, -O0):
<ata_pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ata_altstatus@plt>
mov    $0x7d0,%edi
call   1040 <__const_udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_pause>:
push   %rax
call   1030 <ata_altstatus@plt>
mov    $0x7d0,%edi
pop    %rax
jmp    1040 <__const_udelay@plt>

LLVM IR (-O0):
%struct.ata_port = type { i32 }
define void @ata_pause(%struct.ata_port* %0) {
%2 = alloca %struct.ata_port*
store %struct.ata_port* %0, %struct.ata_port** %2
%3 = load %struct.ata_port*, %struct.ata_port** %2
%4 = call i32 @ata_altstatus(%struct.ata_port* %3)
%5 = call i32 @__const_udelay(i64 2000)
ret void
}

LLVM IR (-O2):
%struct.ata_port = type { i32 }
define void @ata_pause(%struct.ata_port* %0) {
%2 = tail call i32 @ata_altstatus(%struct.ata_port* %0)
%3 = tail call i32 @__const_udelay(i64 2000)
ret void
}
/* Variables and functions */
char *str_quotefin2(char *, char);
char *char_quotefin(char *s) { return str_quotefin2(s, '\''); }


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

x86 assembly (clang, -O2):
<char_quotefin>:
mov    $0x27,%esi
jmp    1030 <str_quotefin2@plt>

LLVM IR (-O0):
define i8* @char_quotefin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @str_quotefin2(i8* %3, i8 signext 39)
ret i8* %4
}

LLVM IR (-O2):
define i8* @char_quotefin(i8* %0) {
%2 = tail call i8* @str_quotefin2(i8* %0, i8 signext 39)
ret i8* %2
}
char *strchrnul(const char *s, int c) {
  while (*s && (*s != c))
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchrnul+0x40>
jmp    1151 <strchrnul+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <strchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xc2() {
  Assert_real((isalnum(194) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              975, ("isalnum should be 0 for 0xc2"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xc2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc2,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3cf,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xc2>:
push   %rax
mov    $0xc2,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3cf,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc2\00"
define void @t_isalnum_0xc2() {
%1 = call i64 @isalnum(i32 194)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 975, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc2\00"
define void @t_isalnum_0xc2() {
%1 = tail call i64 @isalnum(i32 194)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 975, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_args(int, char const **);
int main(int argc, const char *argv[]) {
  parse_args(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_args(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t be32(uint8_t *p) {
  uint32_t a;
  a = p[0] << 24;
  a |= p[1] << 16;
  a |= p[2] << 8;
  a |= p[3] << 0;
  return a;
}


x86 assembly (clang, -O0):
<be32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x0,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @be32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = shl i32 %6, 24
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32, i32* %15
%17 = shl i32 %16, 8
%18 = load i32, i32* %3
%19 = or i32 %18, %17
store i32 %19, i32* %3
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
%23 = shl i32 %22, 0
%24 = load i32, i32* %3
%25 = or i32 %24, %23
store i32 %25, i32* %3
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @be32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void checkRetVal(int retVal, char const errMsg[]) {
  if (retVal == -1) {
    fprintf(stderr, "%s", errMsg);
  }
}


x86 assembly (clang, -O0):
<checkRetVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1142 <checkRetVal+0x32>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkRetVal>:
cmp    $0xffffffff,%edi
je     1116 <checkRetVal+0x6>
ret
mov    %rsi,%rdx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @checkRetVal(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
unsigned int genrand_int32();
void generate_rand_unsigned_int_set(unsigned int *D, unsigned int D_size) {
  int j;
  for (j = 0; j < D_size; j++)
    D[j] = genrand_int32();
}


x86 assembly (clang, -O0):
<generate_rand_unsigned_int_set>:
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
jae    1154 <generate_rand_unsigned_int_set+0x44>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <generate_rand_unsigned_int_set+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_rand_unsigned_int_set>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1144 <generate_rand_unsigned_int_set+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <genrand_int32@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <generate_rand_unsigned_int_set+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @generate_rand_unsigned_int_set(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 = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call i32 (...) @genrand_int32()
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
store i32 %11, i32* %15
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @generate_rand_unsigned_int_set(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call i32 (...) @genrand_int32()
%9 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %8, i32* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
rename_file(from, to) char *from, *to;
{ return (rename(from, to)); }


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

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

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

LLVM IR (-O2):
define i32 @rename_file(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rename to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
unsigned char gf4_mul_2(unsigned char);
unsigned char gf4_squ(unsigned char);
unsigned char gf16_squ(unsigned char a) {
  unsigned char a0 = a & 3;
  unsigned char a1 = (a >> 2);
  a1 = gf4_squ(a1);
  unsigned char a1squ_x2 = gf4_mul_2(a1);
  return (a1 << 2) ^ a1squ_x2 ^ gf4_squ(a0);
}


x86 assembly (clang, -O0):
<gf16_squ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%edi
call   1040 <gf4_squ@plt>
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%edi
call   1030 <gf4_mul_2@plt>
mov    %al,-0x4(%rbp)
movzbl -0x3(%rbp),%eax
shl    $0x2,%eax
movzbl -0x4(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%edi
call   1040 <gf4_squ@plt>
mov    %al,%cl
mov    -0x8(%rbp),%eax
movzbl %cl,%ecx
xor    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf16_squ>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    %ebx,%eax
shr    $0x2,%al
movzbl %al,%edi
call   1040 <gf4_squ@plt>
movzbl %al,%ebp
mov    %ebp,%edi
call   1030 <gf4_mul_2@plt>
mov    %eax,%r14d
shl    $0x2,%bpl
and    $0x3,%ebx
mov    %ebx,%edi
call   1040 <gf4_squ@plt>
xor    %bpl,%al
xor    %r14b,%al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @gf16_squ(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %2
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 3
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = ashr i32 %11, 2
%13 = trunc i32 %12 to i8
store i8 %13, i8* %4
%14 = load i8, i8* %4
%15 = call zeroext i8 @gf4_squ(i8 zeroext %14)
store i8 %15, i8* %4
%16 = load i8, i8* %4
%17 = call zeroext i8 @gf4_mul_2(i8 zeroext %16)
store i8 %17, i8* %5
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 2
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = xor i32 %20, %22
%24 = load i8, i8* %3
%25 = call zeroext i8 @gf4_squ(i8 zeroext %24)
%26 = zext i8 %25 to i32
%27 = xor i32 %23, %26
%28 = trunc i32 %27 to i8
ret i8 %28
}

LLVM IR (-O2):
define zeroext i8 @gf16_squ(i8 zeroext %0) {
%2 = and i8 %0, 3
%3 = lshr i8 %0, 2
%4 = tail call zeroext i8 @gf4_squ(i8 zeroext %3)
%5 = tail call zeroext i8 @gf4_mul_2(i8 zeroext %4)
%6 = shl i8 %4, 2
%7 = xor i8 %6, %5
%8 = tail call zeroext i8 @gf4_squ(i8 zeroext %2)
%9 = xor i8 %7, %8
ret i8 %9
}
void host_build_sender_fullhost(void) {}


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

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

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

LLVM IR (-O2):
define void @host_build_sender_fullhost() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bar(void) { printf("Augh! I've been hacked!\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Augh! I've been hacked!\0A\00"
define void @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Augh! I've been hacked!\00"
define void @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "ns2pgm input_files ... (outputs to input.0.pgm, "
                  "input.1.pgm, input.2.pgm, etc...)\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"ns2pgm input_files ... (outputs to input.0.pgm, input.1.pgm, input.2.pgm, etc...)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"ns2pgm input_files ... (outputs to input.0.pgm, input.1.pgm, input.2.pgm, etc...)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int SampleAddInt(int i1, int i2) { return i1 + i2; }


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

x86 assembly (clang, -O2):
<SampleAddInt>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @SampleAddInt(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @SampleAddInt(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;
typedef int /*<<< orphan*/ u_int;
struct sockaddr_in {
  int dummy;
};
typedef int /*<<< orphan*/ CLIENT;

/* Variables and functions */
CLIENT *clnttcp_create(struct sockaddr_in *addr, u_long prognum, u_long versnum,
                       int *fdp, u_int sendsz, u_int recvsz) {
  CLIENT *rv;
  rv = (CLIENT *)NULL;
  return rv;
}


x86 assembly (clang, -O0):
<clnttcp_create>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define i32* @clnttcp_create(%struct.sockaddr_in* %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5) {
%7 = alloca %struct.sockaddr_in*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
store %struct.sockaddr_in* %0, %struct.sockaddr_in** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32* null, i32** %13
%14 = load i32*, i32** %13
ret i32* %14
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define noalias i32* @clnttcp_create(%struct.sockaddr_in* nocapture readnone %0, i32 %1, i32 %2, i32* nocapture readnone %3, i32 %4, i32 %5) {
ret i32* null
}
/* Variables and functions */
scalar_t__ getpid();
scalar_t__ getppid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("pid %d\n", (int)getpid());
  printf("ppid %d\n", (int)getppid());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"pid %d\0A\00"
@.str.1 = [9 x i8] c"ppid %d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 (...) @getppid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int _write_sysfs_int(char const *, char const *, int, int);
int write_sysfs_int_and_verify(const char *filename, const char *basedir,
                               int val) {
  return _write_sysfs_int(filename, basedir, val, 1);
}


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

x86 assembly (clang, -O2):
<write_sysfs_int_and_verify>:
mov    $0x1,%ecx
jmp    1030 <_write_sysfs_int@plt>

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

LLVM IR (-O2):
define i32 @write_sysfs_int_and_verify(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_write_sysfs_int(i8* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ menu();
int /*<<< orphan*/ titre(char *);
int main(void) {
  titre("INTERPOLATION PAR LA METHODE DE LAGRANGE");
  menu();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <titre@plt>
mov    $0x0,%al
call   1030 <menu@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <titre@plt>
xor    %eax,%eax
call   1030 <menu@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"INTERPOLATION PAR LA METHODE DE LAGRANGE\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @titre(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @menu()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [41 x i8] c"INTERPOLATION PAR LA METHODE DE LAGRANGE\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @titre(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @menu()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
struct AngleIter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ angle_iter_start_with_range(struct AngleIter *, int, int,
                                               int, int /*<<< orphan*/, int);
void angle_iter_start(struct AngleIter *iter, int w, int h, int sides) {
  angle_iter_start_with_range(iter, w, h, sides, 0, sides);
}


x86 assembly (clang, -O0):
<angle_iter_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r9d
xor    %r8d,%r8d
call   1030 <angle_iter_start_with_range@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<angle_iter_start>:
xor    %r8d,%r8d
mov    %ecx,%r9d
jmp    1030 <angle_iter_start_with_range@plt>

LLVM IR (-O0):
%struct.AngleIter = type { i32 }
define void @angle_iter_start(%struct.AngleIter* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.AngleIter*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.AngleIter* %0, %struct.AngleIter** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.AngleIter*, %struct.AngleIter** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @angle_iter_start_with_range(%struct.AngleIter* %9, i32 %10, i32 %11, i32 %12, i32 0, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.AngleIter = type { i32 }
define void @angle_iter_start(%struct.AngleIter* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @angle_iter_start_with_range(%struct.AngleIter* %0, i32 %1, i32 %2, i32 %3, i32 0, i32 %3)
ret void
}
int test_imm_95uint8_reg(unsigned char val) {
  return ((val) & (0x95 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_95uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 149
%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_95uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -107
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("seconds per year: %lu\n", 365 * 24 * 3600UL);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"seconds per year: %lu\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 31536000)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"seconds per year: %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 31536000)
ret i32 0
}
void ff_hevc_put_hevc_bi_w_pel_pixels24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels24_12_sse4() {
ret void
}
void port_error_uinit(struct ifpga_feature *feature) { (void)(feature); }


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

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

LLVM IR (-O0):
%struct.ifpga_feature = type opaque
define void @port_error_uinit(%struct.ifpga_feature* %0) {
%2 = alloca %struct.ifpga_feature*
store %struct.ifpga_feature* %0, %struct.ifpga_feature** %2
%3 = load %struct.ifpga_feature*, %struct.ifpga_feature** %2
ret void
}

LLVM IR (-O2):
%struct.ifpga_feature = type opaque
define void @port_error_uinit(%struct.ifpga_feature* nocapture %0) {
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_del(struct list_head *);
struct list_head *list_last(struct list_head *);
struct list_head *list_pop(struct list_head *head) {
  struct list_head *entry = list_last(head);
  list_del(entry);
  return entry;
}


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

x86 assembly (clang, -O2):
<list_pop>:
push   %rbx
call   1040 <list_last@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <list_del@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.list_head = type { i32 }
define %struct.list_head* @list_pop(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
%3 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%4 = load %struct.list_head*, %struct.list_head** %2
%5 = call %struct.list_head* @list_last(%struct.list_head* %4)
store %struct.list_head* %5, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %3
%7 = call i32 @list_del(%struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
ret %struct.list_head* %8
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define %struct.list_head* @list_pop(%struct.list_head* %0) {
%2 = tail call %struct.list_head* @list_last(%struct.list_head* %0)
%3 = tail call i32 @list_del(%struct.list_head* %2)
ret %struct.list_head* %2
}
/* Variables and functions */
int my_func(int arg) { return arg; }


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

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

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

LLVM IR (-O2):
define i32 @my_func(i32 returned %0) {
ret i32 %0
}
int isword(char c) {
  if (c >= 'A' && c <= 'z') {
    return 1;
  } else {
    return 0;
  }
}


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

x86 assembly (clang, -O2):
<isword>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x3a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isword(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, 65
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, 122
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 @isword(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 58
%4 = zext i1 %3 to i32
ret i32 %4
}
float reverseFloat(const float inFloat) {
  float retVal;
  char *floatToConvert = (char *)&inFloat;
  char *returnFloat = (char *)&retVal;
  returnFloat[0] = floatToConvert[3];
  returnFloat[1] = floatToConvert[2];
  returnFloat[2] = floatToConvert[1];
  returnFloat[3] = floatToConvert[0];
  return retVal;
}


x86 assembly (clang, -O0):
<reverseFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseFloat>:
movd   %xmm0,%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @reverseFloat(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i8*
%5 = alloca i8*
store float %0, float* %2
%6 = bitcast float* %2 to i8*
store i8* %6, i8** %4
%7 = bitcast float* %3 to i8*
store i8* %7, i8** %5
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 3
%10 = load i8, i8* %9
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
%28 = load float, float* %3
ret float %28
}

LLVM IR (-O2):
define float @reverseFloat(float %0) {
%2 = bitcast float %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = bitcast i32 %3 to float
ret float %4
}
/* Variables and functions */
int atoi(scalar_t__);
scalar_t__ strrchr(char const *, char);
int HTS_name2num(const char *buff) { return (atoi(strrchr(buff, '_') + 1)); }


x86 assembly (clang, -O0):
<HTS_name2num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTS_name2num>:
push   %rax
mov    $0x5f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdi
pop    %rax
jmp    1040 <atoi@plt>

LLVM IR (-O0):
define i32 @HTS_name2num(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strrchr(i8* %3, i8 signext 95)
%5 = add nsw i64 %4, 1
%6 = call i32 @atoi(i64 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @HTS_name2num(i8* %0) {
%2 = tail call i64 @strrchr(i8* %0, i8 signext 95)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @atoi(i64 %3)
ret i32 %4
}
int rusa(int x, int y) {
  int r = 0;
  if (x == 1) {
    return (y);
  } else {
    if (x % 2 != 0)
      r = y;
    return r + (rusa(x / 2, y * 2));
  }
}


x86 assembly (clang, -O0):
<rusa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113a <rusa+0x2a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <rusa+0x6c>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1154 <rusa+0x44>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
call   1030 <rusa@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rusa>:
xor    %eax,%eax
cmp    $0x1,%edi
je     112e <rusa+0x2e>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
neg    %edx
and    %esi,%edx
add    %edx,%eax
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    %esi,%esi
and    $0xfffffffe,%edi
cmp    $0x2,%edi
mov    %ecx,%edi
jne    1110 <rusa+0x10>
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @rusa(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %16, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %12, %4 ], [ %1, %2 ]
%6 = phi i32 [ %11, %4 ], [ %0, %2 ]
%7 = phi i32 [ %13, %4 ], [ 0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 %5
%11 = sdiv i32 %6, 2
%12 = shl nsw i32 %5, 1
%13 = add nsw i32 %10, %7
%14 = and i32 %6, -2
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %4
16: ; preds = %4, %2
%17 = phi i32 [ 0, %2 ], [ %13, %4 ]
%18 = phi i32 [ %1, %2 ], [ %12, %4 ]
%19 = add nsw i32 %18, %17
ret i32 %19
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strerror_r(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void vesh_sys_error(char *fmt, va_list ap) {
  char errmsg[1024];
  strerror_r(errno, errmsg, sizeof errmsg);
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "%s\n", errmsg);
}


x86 assembly (clang, -O0):
<vesh_sys_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1040 <strerror_r@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <vfprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    -0x410(%rbp),%rdx
lea    0xe78(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vesh_sys_error>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%r14
mov    %r14,%rsi
mov    $0x400,%edx
call   1040 <strerror_r@plt>
mov    0x2e7e(%rip),%r15
mov    (%r15),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <vfprintf@plt>
mov    (%r15),%edi
lea    0xe87(%rip),%rsi
mov    %r14,%rdx
call   1030 <fprintf@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @vesh_sys_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* @errno
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%8 = call i32 @strerror_r(i32 %6, i8* %7, i32 1024)
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32 @vfprintf(i32 %9, i8* %10, i32 %11)
%13 = load i32, i32* @stderr
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%15 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @vesh_sys_error(i8* %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @errno
%6 = call i32 @strerror_r(i32 %5, i8* %4, i32 1024)
%7 = load i32, i32* @stderr
%8 = call i32 @vfprintf(i32 %7, i8* %0, i32 %1)
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int twoWay(int terminate, int n) {
  if (n < 0) {
    return 1;
  } else {
    int m = n;
    if (terminate) {
      m--;
    } else {
      m++;
    }
    return m * twoWay(terminate, m);
  }
}


x86 assembly (clang, -O0):
<twoWay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1134 <twoWay+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1177 <twoWay+0x67>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1152 <twoWay+0x42>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    115b <twoWay+0x4b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <twoWay@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twoWay>:
test   %esi,%esi
js     111a <twoWay+0x1a>
neg    %edi
sbb    %ecx,%ecx
or     $0x1,%ecx
mov    $0x1,%eax
add    %ecx,%esi
imul   %esi,%eax
test   %esi,%esi
jns    1110 <twoWay+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @twoWay(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 0
%6 = select i1 %5, i32 1, i32 -1
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ %1, %4 ], [ %10, %7 ]
%9 = phi i32 [ 1, %4 ], [ %11, %7 ]
%10 = add nsw i32 %8, %6
%11 = mul nsw i32 %10, %9
%12 = icmp slt i32 %10, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %2
%14 = phi i32 [ 1, %2 ], [ %11, %7 ]
ret i32 %14
}