xunge/DecIR huggingface dataset:
/* Variables and functions */
bool str_is_title_case(char str[]) {
  unsigned int i = 0;
  if (str[i] == '\0')
    return false;
  return false;
}


x86 assembly (clang, -O0):
<str_is_title_case>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    112f <str_is_title_case+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <str_is_title_case+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @str_is_title_case(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char tolower(char);
int HexDig(char digit) {
  digit = tolower(digit);
  if (digit >= 'a')
    return (digit - 'a') + 10;
  return (digit - '0');
}


x86 assembly (clang, -O0):
<HexDig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1149 <HexDig+0x39>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <HexDig+0x43>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexDig>:
push   %rax
call   1030 <tolower@plt>
movsbl %al,%ecx
lea    -0x30(%rcx),%edx
lea    -0x57(%rcx),%eax
cmp    $0x61,%cl
cmovl  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @HexDig(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @tolower(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %11, 97
%13 = add nsw i32 %12, 10
store i32 %13, i32* %2
br label %18
14: ; preds = %1
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 48
store i32 %17, i32* %2
br label %18
18: ; preds = %14, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @HexDig(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 signext %0)
%3 = sext i8 %2 to i32
%4 = icmp sgt i8 %2, 96
%5 = select i1 %4, i32 -87, i32 -48
%6 = add nsw i32 %5, %3
ret i32 %6
}
unsigned short C_Utils_min_ushort(const unsigned short item1,
                                  const unsigned short item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    112e <C_Utils_min_ushort+0x2e>
movzwl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <C_Utils_min_ushort+0x35>
movzwl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_min_ushort>:
mov    %esi,%eax
cmp    %ax,%di
cmova  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @C_Utils_min_ushort(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
br label %16
13: ; preds = %2
%14 = load i16, i16* %4
%15 = zext i16 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @C_Utils_min_ushort(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp ugt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
/* Variables and functions */
int printf(char *, unsigned int, unsigned int, unsigned int);
int double_to_uint(void) {
  double d1 = 1.67890e20, d2 = (1ul << 63), d3 = (0xFFFFFFFFFFFFFFFFul);
  unsigned int a = d1, b = d2, c = d3;
  return printf("(double) unsigned int %u, %u, %u\n", a, b, c);
}


x86 assembly (clang, -O0):
<double_to_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movabs $0x442233e232f618aa,%rax
33 22 44
mov    %rax,-0x8(%rbp)
movabs $0x43e0000000000000,%rax
mov    %rax,-0x10(%rbp)
movabs $0x43f0000000000000,%rax
mov    %rax,-0x18(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %eax,-0x1c(%rbp)
cvttsd2si -0x10(%rbp),%rax
mov    %eax,-0x20(%rbp)
cvttsd2si -0x18(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"(double) unsigned int %u, %u, %u\0A\00"
define i32 @double_to_uint() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store double 1.678900e+20, double* %1
store double 0x43E0000000000000, double* %2
store double 0x43F0000000000000, double* %3
%7 = load double, double* %1
%8 = fptoui double %7 to i32
store i32 %8, i32* %4
%9 = load double, double* %2
%10 = fptoui double %9 to i32
store i32 %10, i32* %5
%11 = load double, double* %3
%12 = fptoui double %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
@.str = [34 x i8] c"(double) unsigned int %u, %u, %u\0A\00"
define i32 @double_to_uint() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 poison, i32 poison, i32 poison)
ret i32 %1
}
int main() {
  int a[10];
  int *b;
  b = 10;
  *b = a[-1000000];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%eax
mov    %rax,-0x38(%rbp)
mov    -0x3d0930(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32*
store i32 0, i32* %1
store i32* inttoptr (i64 10 to i32*), i32** %3
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 -1000000
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
store i32 %5, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _uart_putc(char);
void outbyte(char c) { _uart_putc(c); }


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

x86 assembly (clang, -O2):
<outbyte>:
jmp    1030 <_uart_putc@plt>

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

LLVM IR (-O2):
define void @outbyte(i8 signext %0) {
%2 = tail call i32 @_uart_putc(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void fn_test2(void) {
  static int ia = 10, ib = 20;
  ia++;
  ib++;
  printf("fn_test2: %d, %d\n", ia, ib);
}


x86 assembly (clang, -O0):
<fn_test2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f05(%rip)
mov    0x2f03(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efa(%rip)
mov    0x2ef0(%rip),%esi
mov    0x2eee(%rip),%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_test2>:
mov    0x2f12(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f09(%rip)
mov    0x2f07(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2efe(%rip)
lea    0xecb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@fn_test2.ia = internal global i32 10
@fn_test2.ib = internal global i32 20
@.str = [18 x i8] c"fn_test2: %d, %d\0A\00"
define void @fn_test2() {
%1 = load i32, i32* @fn_test2.ia
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn_test2.ia
%3 = load i32, i32* @fn_test2.ib
%4 = add nsw i32 %3, 1
store i32 %4, i32* @fn_test2.ib
%5 = load i32, i32* @fn_test2.ia
%6 = load i32, i32* @fn_test2.ib
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@fn_test2.ia = internal unnamed_addr global i32 10
@fn_test2.ib = internal unnamed_addr global i32 20
@.str = [18 x i8] c"fn_test2: %d, %d\0A\00"
define void @fn_test2() {
%1 = load i32, i32* @fn_test2.ia
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn_test2.ia
%3 = load i32, i32* @fn_test2.ib
%4 = add nsw i32 %3, 1
store i32 %4, i32* @fn_test2.ib
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BITHLm(int);
void BIT5HLm() { BITHLm(0x20); }


x86 assembly (clang, -O0):
<BIT5HLm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1030 <BITHLm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIT5HLm>:
mov    $0x20,%edi
jmp    1030 <BITHLm@plt>

LLVM IR (-O0):
define void @BIT5HLm() {
%1 = call i32 @BITHLm(i32 32)
ret void
}

LLVM IR (-O2):
define void @BIT5HLm() {
%1 = tail call i32 @BITHLm(i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pB(char *, ...);
void init_mem(void) {
  pB("VPtr mem_ptr:P01;");
  pB("junkApi_malloc(mem_ptr, T_SINT32, %d);", (0x400000));
}


x86 assembly (clang, -O0):
<init_mem>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <pB@plt>
lea    0xee9(%rip),%rdi
mov    $0x400000,%esi
mov    $0x0,%al
call   1030 <pB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_mem>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <pB@plt>
lea    0xeec(%rip),%rdi
mov    $0x400000,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <pB@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"VPtr mem_ptr:P01;\00"
@.str.1 = [39 x i8] c"junkApi_malloc(mem_ptr, T_SINT32, %d);\00"
define void @init_mem() {
%1 = call i32 (i8*, ...) @pB(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @pB(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 4194304)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"VPtr mem_ptr:P01;\00"
@.str.1 = [39 x i8] c"junkApi_malloc(mem_ptr, T_SINT32, %d);\00"
define void @init_mem() {
%1 = tail call i32 (i8*, ...) @pB(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @pB(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 4194304)
ret void
}
/* Variables and functions */
int _get_create_bumpdrop(float);
int get_create_rbump(float lag) {
  int b = _get_create_bumpdrop(lag);
  if (b > 100000)
    return b;
  return ((b >> 0) & 0x1);
}


x86 assembly (clang, -O0):
<get_create_rbump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jle    1142 <get_create_rbump+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <get_create_rbump+0x3e>
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_create_rbump>:
push   %rax
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,%ecx
and    $0x1,%ecx
cmp    $0x186a1,%eax
cmovl  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_create_rbump(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = load float, float* %3
%6 = call i32 @_get_create_bumpdrop(float %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 100000
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %15
11: ; preds = %1
%12 = load i32, i32* %4
%13 = ashr i32 %12, 0
%14 = and i32 %13, 1
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_create_rbump(float %0) {
%2 = tail call i32 @_get_create_bumpdrop(float %0)
%3 = icmp sgt i32 %2, 100000
%4 = and i32 %2, 1
%5 = select i1 %3, i32 %2, i32 %4
ret i32 %5
}
/* Type definitions */
struct node {
  int dummy;
};
struct arguments {
  int dummy;
};

/* Variables and functions */
struct node *__build_tree(char *, struct node ***, unsigned int *,
                          unsigned int *, struct arguments *,
                          int /*<<< orphan*/);
struct node *build_tree(char *dir, struct node ***leaves, unsigned *size,
                        unsigned int *current, struct arguments *args) {
  return __build_tree(dir, leaves, size, current, args, 0);
}


x86 assembly (clang, -O0):
<build_tree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <__build_tree@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_tree>:
xor    %r9d,%r9d
jmp    1030 <__build_tree@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.arguments = type { i32 }
define %struct.node* @build_tree(i8* %0, %struct.node*** %1, i32* %2, i32* %3, %struct.arguments* %4) {
%6 = alloca i8*
%7 = alloca %struct.node***
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca %struct.arguments*
store i8* %0, i8** %6
store %struct.node*** %1, %struct.node**** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store %struct.arguments* %4, %struct.arguments** %10
%11 = load i8*, i8** %6
%12 = load %struct.node***, %struct.node**** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load %struct.arguments*, %struct.arguments** %10
%16 = call %struct.node* @__build_tree(i8* %11, %struct.node*** %12, i32* %13, i32* %14, %struct.arguments* %15, i32 0)
ret %struct.node* %16
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.arguments = type { i32 }
define %struct.node* @build_tree(i8* %0, %struct.node*** %1, i32* %2, i32* %3, %struct.arguments* %4) {
%6 = tail call %struct.node* @__build_tree(i8* %0, %struct.node*** %1, i32* %2, i32* %3, %struct.arguments* %4, i32 0)
ret %struct.node* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t get_tid(void) { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<get_tid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tid>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @get_tid() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @get_tid() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
void testCNarrowing() {
  float a = {222222222222L};
  long b = 222222222222L;
}


x86 assembly (clang, -O0):
<testCNarrowing>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movabs $0x33bd7a038e,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testCNarrowing() {
%1 = alloca float
%2 = alloca i64
store float 0x4249DEBD00000000, float* %1
store i64 222222222222, i64* %2
ret void
}

LLVM IR (-O2):
define void @testCNarrowing() {
ret void
}
float cubic_ease_in(float p) { return p * p * p; }


x86 assembly (clang, -O0):
<cubic_ease_in>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic_ease_in>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @cubic_ease_in(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @cubic_ease_in(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
ret float %3
}
/* Type definitions */
struct vector {
  int dummy;
};
typedef int __u8;
typedef int __u16;

/* Variables and functions */
int /*<<< orphan*/ copy_vector(struct vector *, unsigned int, int *, int);
void write_vector16(struct vector *v, unsigned int i, __u16 value) {
  __u8 buf[2];
  buf[0] = value & 0xff;
  buf[1] = value >> 8;
  copy_vector(v, i, buf, 2);
}


x86 assembly (clang, -O0):
<write_vector16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <copy_vector@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_vector16>:
push   %rax
movzbl %dl,%eax
mov    %eax,(%rsp)
sar    $0x8,%edx
mov    %edx,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x2,%ecx
call   1030 <copy_vector@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.vector = type { i32 }
define void @write_vector16(%struct.vector* %0, i32 %1, i32 %2) {
%4 = alloca %struct.vector*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
store %struct.vector* %0, %struct.vector** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = and i32 %8, 255
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %6
%12 = ashr i32 %11, 8
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = load %struct.vector*, %struct.vector** %4
%15 = load i32, i32* %5
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%17 = call i32 @copy_vector(%struct.vector* %14, i32 %15, i32* %16, i32 2)
ret void
}

LLVM IR (-O2):
%struct.vector = type { i32 }
define void @write_vector16(%struct.vector* %0, i32 %1, i32 %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = and i32 %2, 255
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %6, i32* %7
%8 = ashr i32 %2, 8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %8, i32* %9
%10 = call i32 @copy_vector(%struct.vector* %0, i32 %1, i32* %7, i32 2)
ret void
}
/* Variables and functions */
int w5100_read_byte(int);
unsigned w5100_readPTIMER() { return w5100_read_byte(0x0028); }


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

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

LLVM IR (-O0):
define i32 @w5100_readPTIMER() {
%1 = call i32 @w5100_read_byte(i32 40)
ret i32 %1
}

LLVM IR (-O2):
define i32 @w5100_readPTIMER() {
%1 = tail call i32 @w5100_read_byte(i32 40)
ret i32 %1
}
int rl_backward_char(count, key)
int count, key;
{ return (rl_backward_byte(count, key)); }


x86 assembly (clang, -O0):
<rl_backward_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <rl_backward_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rl_backward_char(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 (i32, i32, ...) bitcast (i32 (...)* @rl_backward_byte to i32 (i32, i32, ...)*)(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rl_backward_char(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_backward_byte to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
ret i32 %3
}
void vdma_nop(unsigned int dummy) {}


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

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

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

LLVM IR (-O2):
define void @vdma_nop(i32 %0) {
ret void
}
float acosf(float x) { return 0.0; }


x86 assembly (clang, -O0):
<acosf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosf>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @acosf(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @acosf(float %0) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA_LC898122AF(int, int);
void GyOutSignal(void) {
  RegWriteA_LC898122AF(0x0283, 0x45);
  RegWriteA_LC898122AF(0x0284, 0x43);
  RegWriteA_LC898122AF(0x0280, 0x02);
}


x86 assembly (clang, -O0):
<GyOutSignal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_LC898122AF@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_LC898122AF@plt>
mov    $0x280,%edi
mov    $0x2,%esi
call   1030 <RegWriteA_LC898122AF@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyOutSignal>:
push   %rax
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_LC898122AF@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_LC898122AF@plt>
mov    $0x280,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <RegWriteA_LC898122AF@plt>

LLVM IR (-O0):
define void @GyOutSignal() {
%1 = call i32 @RegWriteA_LC898122AF(i32 643, i32 69)
%2 = call i32 @RegWriteA_LC898122AF(i32 644, i32 67)
%3 = call i32 @RegWriteA_LC898122AF(i32 640, i32 2)
ret void
}

LLVM IR (-O2):
define void @GyOutSignal() {
%1 = tail call i32 @RegWriteA_LC898122AF(i32 643, i32 69)
%2 = tail call i32 @RegWriteA_LC898122AF(i32 644, i32 67)
%3 = tail call i32 @RegWriteA_LC898122AF(i32 640, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
char *strdup(char *);
char *mystrdup(char *in) {
  char *dummy = strdup(in);
  if (!dummy) {
    fprintf(stderr, "failed to copy string '%s': out of memory?\n", in);
    exit(1);
  }
  return dummy;
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <mystrdup+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strdup@plt>
test   %rax,%rax
je     1140 <mystrdup+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"failed to copy string '%s': out of memory?\0A\00"
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"failed to copy string '%s': out of memory?\0A\00"
define noalias i8* @mystrdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
void abort(void) { kill(getpid(), SIGABRT); }


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>

LLVM IR (-O0):
@SIGABRT = global i32 0
define void @abort() {
%1 = call i32 (...) @getpid()
%2 = load i32, i32* @SIGABRT
%3 = call i32 @kill(i32 %1, i32 %2)
unreachable
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define void @abort() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGABRT
%3 = tail call i32 @kill(i32 %1, i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
char *strutil_lowercase(char *);
int main(void) {
  char *str = "Hello, WORLD!";
  char *lower = strutil_lowercase(str);
  printf("Original:  \"%s\"\n", str);
  printf("Lowercase: \"%s\"\n", lower);
  free(lower);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strutil_lowercase@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
mov    %r14,%rdi
call   1040 <strutil_lowercase@plt>
mov    %rax,%rbx
lea    0xec1(%rip),%rdi
mov    %r14,%rsi
call   1050 <printf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, WORLD!\00"
@.str.1 = [17 x i8] c"Original: \22%s\22\0A\00"
@.str.2 = [17 x i8] c"Lowercase: \22%s\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strutil_lowercase(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, WORLD!\00"
@.str.1 = [17 x i8] c"Original: \22%s\22\0A\00"
@.str.2 = [17 x i8] c"Lowercase: \22%s\22\0A\00"
define i32 @main() {
%1 = tail call i8* @strutil_lowercase(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%4 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
float cosf(float);
float test_func_02(float x) { return cosf(x); }


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

x86 assembly (clang, -O2):
<test_func_02>:
jmp    1030 <cosf@plt>

LLVM IR (-O0):
define float @test_func_02(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @cosf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @test_func_02(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ BFS_traversal(int);
int /*<<< orphan*/ creategraph(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter how many vertices : ");
  scanf("%d", &n);
  creategraph(n);
  BFS_traversal(n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <creategraph@plt>
mov    -0x4(%rbp),%edi
call   1050 <BFS_traversal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <creategraph@plt>
mov    0x4(%rsp),%edi
call   1050 <BFS_traversal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter how many vertices : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @creategraph(i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @BFS_traversal(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter how many vertices : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @creategraph(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @BFS_traversal(i32 %7)
ret i32 0
}
/* Variables and functions */
int getofield(int, int);
scalar_t__ inlist(int, int);
int hasadjective(int obj, int adjective) {
  while (obj) {
    if (inlist(getofield(obj, ((int)4)), adjective))
      return ((int)1);
    obj = getofield(obj, ((int)0));
  }
  return ((int)0);
}


x86 assembly (clang, -O0):
<hasadjective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1177 <hasadjective+0x57>
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1040 <inlist@plt>
cmp    $0x0,%rax
je     1165 <hasadjective+0x45>
movl   $0x1,-0x4(%rbp)
jmp    117e <hasadjective+0x5e>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,-0x8(%rbp)
jmp    112e <hasadjective+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasadjective>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     115c <hasadjective+0x3c>
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nop
mov    %ebp,%edi
mov    $0x4,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1040 <inlist@plt>
test   %rax,%rax
jne    1160 <hasadjective+0x40>
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1130 <hasadjective+0x10>
jmp    1165 <hasadjective+0x45>
xor    %ebx,%ebx
jmp    1165 <hasadjective+0x45>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hasadjective(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 = %16, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %4
%11 = call i32 @getofield(i32 %10, i32 4)
%12 = load i32, i32* %5
%13 = call i64 @inlist(i32 %11, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %3
br label %20
16: ; preds = %9
%17 = load i32, i32* %4
%18 = call i32 @getofield(i32 %17, i32 0)
store i32 %18, i32* %4
br label %6
19: ; preds = %6
store i32 0, i32* %3
br label %20
20: ; preds = %19, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @hasadjective(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i32 [ %10, %9 ], [ %0, %2 ]
%6 = tail call i32 @getofield(i32 %5, i32 4)
%7 = tail call i64 @inlist(i32 %6, i32 %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 @getofield(i32 %5, i32 0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %9, %2
%13 = phi i32 [ 0, %2 ], [ 0, %9 ], [ 1, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ __inc_remove_counter();
int __renameatx_np(int, char const *, int, char const *, unsigned int);
int renameatx_np(int oldfd, const char *old, int newfd, const char *new,
                 unsigned int flags) {
  int res = __renameatx_np(oldfd, old, newfd, new, flags);
  if (res == 0)
    __inc_remove_counter();
  return res;
}


x86 assembly (clang, -O0):
<renameatx_np>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <__renameatx_np@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    1165 <renameatx_np+0x45>
mov    $0x0,%al
call   1040 <__inc_remove_counter@plt>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renameatx_np>:
push   %rbx
call   1030 <__renameatx_np@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <renameatx_np+0x13>
xor    %eax,%eax
call   1040 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @renameatx_np(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @__renameatx_np(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @__inc_remove_counter()
br label %10
10: ; preds = %8, %5
ret i32 %6
}
int DelInterface(char *dev, int index, char *ip, char *mask) {}


x86 assembly (clang, -O0):
<DelInterface>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @DelInterface(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 undef
}
/* Type definitions */
struct tree_it_obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tree_it_obj *);
void tree_it_obj_delete(struct tree_it_obj *tio) { free(tio); }


x86 assembly (clang, -O0):
<tree_it_obj_delete>:
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):
<tree_it_obj_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.tree_it_obj = type { i32 }
define void @tree_it_obj_delete(%struct.tree_it_obj* nocapture %0) {
%2 = tail call i32 @free(%struct.tree_it_obj* %0)
ret void
}
unsigned xrop3_14_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_14_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_14_1_1>:
mov    %edi,%eax
shl    $0x8,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %eax,%edx
xor    $0xffffff00,%edx
or     %edi,%eax
or     %edx,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_14_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %7
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = xor i32 %30, -1
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = and i32 %39, %40
%42 = or i32 %38, %41
%43 = load i32, i32* %5
%44 = load i32, i32* %7
%45 = and i32 %43, %44
%46 = or i32 %42, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_14_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, -256
%8 = or i32 %4, %3
%9 = or i32 %8, %7
%10 = or i32 %9, %6
%11 = xor i32 %10, -1
%12 = or i8 %1, %0
%13 = zext i8 %12 to i32
%14 = or i32 %13, %11
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void die_mem() { die("can't allocate memory"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"can't allocate memory\00"
define void @die_mem() {
%1 = call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"can't allocate memory\00"
define void @die_mem() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fact(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  long factorial = 1;
  printf("Enter number to calc the Factorial of: ");
  scanf("%d", &number);
  printf("%d! = %ld\n", number, fact(number));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <fact@plt>
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Enter number to calc the Factorial of: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"%d! = %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @fact(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Enter number to calc the Factorial of: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"%d! = %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fact(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void parseBuffer(char *string, int length) {
  printf("%d: %s\n", length, string);
}


x86 assembly (clang, -O0):
<parseBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseBuffer>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d: %s\0A\00"
define void @parseBuffer(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_stack_enter_ops();
int /*<<< orphan*/ get_stack_enter_ops_len();
int /*<<< orphan*/ write_bytes(char *, unsigned char *, unsigned int,
                               unsigned int *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
void output_stack_enter(unsigned char *buf, unsigned int buf_size,
                        unsigned int *bytes_written) {
  write_bytes("stack enter", buf, buf_size, bytes_written,
              get_stack_enter_ops(), get_stack_enter_ops_len());
}


x86 assembly (clang, -O0):
<output_stack_enter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <get_stack_enter_ops@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <get_stack_enter_ops_len@plt>
mov    -0x38(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    %eax,%r9d
lea    0xe7d(%rip),%rdi
call   1050 <write_bytes@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_stack_enter>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <get_stack_enter_ops@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <get_stack_enter_ops_len@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
mov    %ebp,%r8d
mov    %eax,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <write_bytes@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"stack enter\00"
define void @output_stack_enter(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 (...) @get_stack_enter_ops()
%11 = call i32 (...) @get_stack_enter_ops_len()
%12 = call i32 @write_bytes(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i32* %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"stack enter\00"
define void @output_stack_enter(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 (...) @get_stack_enter_ops()
%5 = tail call i32 (...) @get_stack_enter_ops_len()
%6 = tail call i32 @write_bytes(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32* %2, i32 %4, i32 %5)
ret void
}