xunge/DecIR huggingface dataset:
void InitGraph(short int *GraphDriver, short int *GraphModus,
               char *PathToDriver) {}


x86 assembly (clang, -O0):
<InitGraph>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @InitGraph(i16* %0, i16* %1, i8* %2) {
%4 = alloca i16*
%5 = alloca i16*
%6 = alloca i8*
store i16* %0, i16** %4
store i16* %1, i16** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @InitGraph(i16* nocapture %0, i16* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int rand();
int task2_random_int(void) {
  int random = 0;
  random = (rand() % 100);
  return random;
}


x86 assembly (clang, -O0):
<task2_random_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task2_random_int>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @task2_random_int() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 100
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @task2_random_int() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 100
ret i32 %2
}
int fesetround(int round) {
  unsigned short int cw;
  int mxcsr;
  if ((round & ~0xc00) != 0)
    return 1;
  asm("fnstcw %0" : "=m"(*&cw));
  cw &= ~0xc00;
  cw |= round;
  asm("fldcw %0" : : "m"(*&cw));
  asm("stmxcsr %0" : "=m"(*&mxcsr));
  mxcsr &= ~0x6000;
  mxcsr |= round << 3;
  asm("ldmxcsr %0" : : "m"(*&mxcsr));
  return 0;
}


x86 assembly (clang, -O0):
<fesetround>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffff3ff,%eax
cmp    $0x0,%eax
je     1124 <fesetround+0x24>
movl   $0x1,-0x4(%rbp)
jmp    116a <fesetround+0x6a>
fnstcw -0xa(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xfffff3ff,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
fldcw  -0xa(%rbp)
stmxcsr -0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xffff9fff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
ldmxcsr -0x10(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fesetround>:
mov    $0x1,%eax
test   $0xfffff3ff,%edi
je     110e <fesetround+0xe>
ret
fnstcw -0x6(%rsp)
movzwl -0x6(%rsp),%eax
and    $0xfffff3ff,%eax
or     %edi,%eax
mov    %ax,-0x6(%rsp)
fldcw  -0x6(%rsp)
stmxcsr -0x4(%rsp)
mov    $0xffff9fff,%eax
and    -0x4(%rsp),%eax
shl    $0x3,%edi
or     %eax,%edi
mov    %edi,-0x4(%rsp)
ldmxcsr -0x4(%rsp)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fesetround(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, -3073
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %26
10: ; preds = %1
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = and i32 %12, -3073
%14 = trunc i32 %13 to i16
store i16 %14, i16* %4
%15 = load i32, i32* %3
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = or i32 %17, %15
%19 = trunc i32 %18 to i16
store i16 %19, i16* %4
%20 = load i32, i32* %5
%21 = and i32 %20, -24577
store i32 %21, i32* %5
%22 = load i32, i32* %3
%23 = shl i32 %22, 3
%24 = load i32, i32* %5
%25 = or i32 %24, %23
store i32 %25, i32* %5
store i32 0, i32* %2
br label %26
26: ; preds = %10, %9
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @fesetround(i32 %0) {
%2 = alloca i16
%3 = alloca i32
%4 = bitcast i16* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = and i32 %0, -3073
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load i16, i16* %2
%10 = and i16 %9, -3073
%11 = trunc i32 %0 to i16
%12 = or i16 %10, %11
store i16 %12, i16* %2
%13 = load i32, i32* %3
%14 = and i32 %13, -24577
%15 = shl nuw nsw i32 %0, 3
%16 = or i32 %14, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %1, %8
%18 = phi i32 [ 0, %8 ], [ 1, %1 ]
ret i32 %18
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t eqtohuint16(const uint8_t *data) {
  return (uint16_t)((data[0] << 8) | data[1]);
}


x86 assembly (clang, -O0):
<eqtohuint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqtohuint16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @eqtohuint16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @eqtohuint16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
unsigned xrop3_225_1_0(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;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_225_1_0>:
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    -0x10(%rbp),%eax
xor    -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    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_225_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
lea    (%rax,%rdi,1),%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
or     $0xff,%eax
xor    %edx,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_225_1_0(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* %7
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = and i32 %34, %35
%37 = or i32 %33, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @xrop3_225_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = mul nuw nsw i32 %6, 257
%8 = or i32 %4, 255
%9 = xor i32 %7, %8
%10 = or i32 %5, %9
%11 = xor i32 %10, -1
%12 = or i32 %11, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("验证exit是否冲洗标准流");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"\E9\AA\8C\E8\AF\81exit\E6\98\AF\E5\90\A6\E5\86\B2\E6\B4\97\E6\A0\87\E5\87\86\E6\B5\81\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"\E9\AA\8C\E8\AF\81exit\E6\98\AF\E5\90\A6\E5\86\B2\E6\B4\97\E6\A0\87\E5\87\86\E6\B5\81\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  printf("Please enter your number: ");
  scanf("%d", &a);
  if (a >= 0) {
    printf("Positive\n");
  } else {
    printf("Negative\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1166 <main+0x46>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <main+0x52>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xecd(%rip),%rax
lea    0xebd(%rip),%rdi
cmovns %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter your number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"Positive\0A\00"
@.str.3 = [10 x i8] c"Negative\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* 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* %2)
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Please enter your number: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [9 x i8] c"Negative\00"
@str.4 = [9 x i8] c"Positive\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 = icmp sgt i32 %5, -1
%7 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
scalar_t__ LoadLibrary(char const *);
void *dlopen(const char *filename, int flag) {
  return (void *)LoadLibrary(filename);
}


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

x86 assembly (clang, -O2):
<dlopen>:
jmp    1030 <LoadLibrary@plt>

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

LLVM IR (-O2):
define i8* @dlopen(i8* %0, i32 %1) {
%3 = tail call i64 @LoadLibrary(i8* %0)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct list_item {
  int dummy;
};

/* Variables and functions */
struct list_item *create_list_item();
struct list_item *create_list() {
  return create_list_item();
}


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

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

LLVM IR (-O0):
%struct.list_item = type { i32 }
define %struct.list_item* @create_list() {
%1 = call %struct.list_item* (...) @create_list_item()
ret %struct.list_item* %1
}

LLVM IR (-O2):
%struct.list_item = type { i32 }
define %struct.list_item* @create_list() {
%1 = tail call %struct.list_item* (...) @create_list_item()
ret %struct.list_item* %1
}
/* Type definitions */
struct _stat {
  int dummy;
};

/* Variables and functions */
int _stat(char const *, struct _stat *);
int lstat(const char *path, struct _stat *sb) { return _stat(path, sb); }


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

x86 assembly (clang, -O2):
<lstat>:
jmp    1030 <_stat@plt>

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

LLVM IR (-O2):
%struct._stat = type { i32 }
define i32 @lstat(i8* %0, %struct._stat* %1) {
%3 = tail call i32 @_stat(i8* %0, %struct._stat* %1)
ret i32 %3
}
void vdeFun_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @vdeFun_decref() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xexpose_display(void *_p, void *_v) {
  ((XEvent *)_p)->xexpose.display = (Display *)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xexpose_display>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xexpose_display>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XEvent_xexpose_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xexpose_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
void test_cleanup(void) { remove("tmp/test_socket"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"tmp/test_socket\00"
define void @test_cleanup() {
%1 = call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"tmp/test_socket\00"
define void @test_cleanup() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int64_t cfs_stub_fsetxattr(int fd, const char *name, const void *data,
                           size_t size, int flags) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<cfs_stub_fsetxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_stub_fsetxattr>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_fsetxattr(i32 %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_fsetxattr(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ niceprint(char *);
void current(void) {
  niceprint("The waters here are especially turbulent. If the characters are "
            "traveling by boat "
            "or raft, the crew must succeed on a DC 13 group Dexterity check "
            "to maintain control. "
            "If the group check fails, the vessel takes 2d6 bludgeoning "
            "damage, and each occupant "
            "must succeed on a DC 10 Strength or Dexterity saving throw to "
            "avoid falling overboard.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [341 x i8] c"The waters here are especially turbulent. If the characters are traveling by boat or raft, the crew must succeed on a DC 13 group Dexterity check to maintain control. If the group check fails, the vessel takes 2d6 bludgeoning damage, and each occupant must succeed on a DC 10 Strength or Dexterity saving throw to avoid falling overboard.\0A\0A\00"
define void @current() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([341 x i8], [341 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [341 x i8] c"The waters here are especially turbulent. If the characters are traveling by boat or raft, the crew must succeed on a DC 13 group Dexterity check to maintain control. If the group check fails, the vessel takes 2d6 bludgeoning damage, and each occupant must succeed on a DC 10 Strength or Dexterity saving throw to avoid falling overboard.\0A\0A\00"
define void @current() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([341 x i8], [341 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long LPCChannelStatusGet(unsigned long ulBase,
                                  unsigned long ulChannel) {
  ;
  ;
  return ((
      *((volatile unsigned long *)(ulBase + 0x00000014 + (ulChannel * 0x10)))));
}


x86 assembly (clang, -O0):
<LPCChannelStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x14,%rax
mov    -0x10(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelStatusGet>:
shl    $0x4,%rsi
mov    0x14(%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @LPCChannelStatusGet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 20
%7 = load i64, i64* %4
%8 = mul i64 %7, 16
%9 = add i64 %6, %8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @LPCChannelStatusGet(i64 %0, i64 %1) {
%3 = add i64 %0, 20
%4 = shl i64 %1, 4
%5 = add i64 %3, %4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
ret i64 %7
}
void ms_adb_init(_self) { DPRINTF("ADB init\n"); }


x86 assembly (clang, -O0):
<ms_adb_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DPRINTF@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms_adb_init>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DPRINTF@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ADB init\0A\00"
define void @ms_adb_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @DPRINTF to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"ADB init\0A\00"
define void @ms_adb_init(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DPRINTF to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
void pthread_unlock_mutex(const pthread_mutex_t *mutex) {
  pthread_mutex_unlock((pthread_mutex_t *)mutex);
}


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

x86 assembly (clang, -O2):
<pthread_unlock_mutex>:
jmp    1030 <pthread_mutex_unlock@plt>

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

LLVM IR (-O2):
define void @pthread_unlock_mutex(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void fftw_import_wisdom_from_file(FILE *file) {}


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

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

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

LLVM IR (-O2):
define void @fftw_import_wisdom_from_file(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *, char *);
int /*<<< orphan*/ printf(char *);
int test_error(char *msg) {
  printf("   error( \"log.c:error(): test message: '%%s'\", msg );");
  error("log.c:error(): test message: '%s'", msg);
  printf(" passed\n");
  return (0);
}


x86 assembly (clang, -O0):
<test_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef4(%rip),%rdi
call   1040 <error@plt>
lea    0xf0a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xef0(%rip),%rdi
mov    %rbx,%rsi
call   1050 <error@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [55 x i8] c" error( \22log.c:error(): test message: '%%s'\22, msg );\00"
@.str.1 = [34 x i8] c"log.c:error(): test message: '%s'\00"
@.str.2 = [9 x i8] c" passed\0A\00"
define i32 @test_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [55 x i8] c" error( \22log.c:error(): test message: '%%s'\22, msg );\00"
@.str.1 = [34 x i8] c"log.c:error(): test message: '%s'\00"
@str = [8 x i8] c" passed\00"
define i32 @test_error(i8* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, int);
int ratio(unsigned int, unsigned int);
int callback(unsigned int insize, unsigned int inpos, unsigned int outpos,
             void *cbparam) {
  (void)cbparam;
  printf("\rcompressed %u -> %u bytes (%u%% done)", inpos, outpos,
         ratio(inpos, insize));
  return 1;
}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <ratio@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%esi
mov    %ebp,%edi
call   1040 <ratio@plt>
lea    0xec9(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"\0Dcompressed %u -> %u bytes (%u%% done)\00"
define i32 @callback(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = call i32 @ratio(i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %14)
ret i32 1
}

LLVM IR (-O2):
@.str = [39 x i8] c"\0Dcompressed %u -> %u bytes (%u%% done)\00"
define i32 @callback(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @ratio(i32 %1, i32 %0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %5)
ret i32 1
}
int linterp(int a, int b, double x) {
  return (int)((double)a + x * (double)(b - a) + 0.5);
}


x86 assembly (clang, -O0):
<linterp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linterp>:
cvtsi2sd %edi,%xmm1
sub    %edi,%esi
cvtsi2sd %esi,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
addsd  0xee6(%rip),%xmm2
cvttsd2si %xmm2,%eax
ret

LLVM IR (-O0):
define i32 @linterp(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load double, double* %6
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %9, double %13, double %8)
%15 = fadd double %14, 5.000000e-01
%16 = fptosi double %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @linterp(i32 %0, i32 %1, double %2) {
%4 = sitofp i32 %0 to double
%5 = sub nsw i32 %1, %0
%6 = sitofp i32 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %2, double %6, double %4)
%8 = fadd double %7, 5.000000e-01
%9 = fptosi double %8 to i32
ret i32 %9
}
int main(void) {
  char *s = "hello World!";
  *s = 'H';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x48,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello World!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
store i8 72, i8* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void init_array_2(int *data_ptr) {
  int index;
  for (index = 0; index < 10; ++index)
    *(data_ptr + index) = 0;
}


x86 assembly (clang, -O0):
<init_array_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1136 <init_array_2+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_array_2+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_array_2>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
define void @init_array_2(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
int sesc_get_num_cpus(void) { return 1; }


x86 assembly (clang, -O0):
<sesc_get_num_cpus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sesc_get_num_cpus() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sesc_get_num_cpus() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int a, b, c, temp;
  scanf("%d %d %d", &a, &b, &c);
  if (a < b && b < c) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1170 <main+0x50>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1170 <main+0x50>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    117c <main+0x5c>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
cmp    0xc(%rsp),%eax
lea    0xebe(%rip),%rdi
lea    0xeb4(%rip),%rcx
cmovge %rcx,%rdi
cmp    %eax,0x14(%rsp)
cmovge %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@str = [3 x i8] c"No\00"
@str.3 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %9, %11
%13 = select i1 %10, i1 %12, i1 false
%14 = select i1 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%15 = call i32 @puts(i8* dereferenceable(1) %14)
ret i32 0
}
__attribute__((no)) __attribute__((optimize("align-functions=32"))) void
foo2() {}


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

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

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

LLVM IR (-O2):
define void @foo2() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int offset;
};
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef TYPE_1__ ASN1_TEMPLATE;

/* Variables and functions */
ASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) {
  ASN1_VALUE **pvaltmp;
  pvaltmp = (void *)(((char *)*pval) + tt->offset);
  return pvaltmp;
}


x86 assembly (clang, -O0):
<asn1_get_field_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1_get_field_ptr>:
movslq (%rsi),%rax
add    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32** @asn1_get_field_ptr(i32** %0, %struct.TYPE_3__* %1) {
%3 = alloca i32**
%4 = alloca %struct.TYPE_3__*
%5 = alloca i32**
store i32** %0, i32*** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
%8 = bitcast i32* %7 to i8*
%9 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
%14 = bitcast i8* %13 to i32**
store i32** %14, i32*** %5
%15 = load i32**, i32*** %5
ret i32** %15
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32** @asn1_get_field_ptr(i32** nocapture %0, %struct.TYPE_3__* nocapture %1) {
%3 = bitcast i32** %0 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = bitcast i8* %8 to i32**
ret i32** %9
}
/* Variables and functions */
scalar_t__ malloc(int);
char *strcpy(char *, char *);
int strlen(char *);
char *my_strdup(char *s) {
  char *new_s;
  new_s = (char *)malloc(strlen(s) * sizeof(char));
  new_s = strcpy(new_s, s);
  return new_s;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @my_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i8* @strcpy(i8* %11, i8* %12)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Variables and functions */
double cos(double);
double f0(double x) { return x - cos(x); }


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <cos@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @cos(double %4)
%6 = fsub double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @f0(double %0) {
%2 = tail call double @cos(double %0)
%3 = fsub double %0, %2
ret double %3
}
void foo338() {}


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

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

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

LLVM IR (-O2):
define void @foo338() {
ret void
}
int get_width(int width, char val) {
  width = width * 10 + (val - '0');
  return width;
}


x86 assembly (clang, -O0):
<get_width>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
imul   $0xa,-0x4(%rbp),%eax
movsbl -0x5(%rbp),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_width>:
lea    (%rdi,%rdi,4),%eax
lea    (%rsi,%rax,2),%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @get_width(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 10
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
%10 = add nsw i32 %6, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_width(i32 %0, i8 signext %1) {
%3 = mul nsw i32 %0, 10
%4 = sext i8 %1 to i32
%5 = add i32 %3, -48
%6 = add i32 %5, %4
ret i32 %6
}
void pollen_interfaces_Led_targetInit__I() {}


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

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

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

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

/* Variables and functions */
int filter_cmdline_parser_internal(int, char **, struct filter_args_info *,
                                   struct filter_cmdline_parser_params *,
                                   int /*<<< orphan*/);
int filter_cmdline_parser_ext(int argc, char **argv,
                              struct filter_args_info *args_info,
                              struct filter_cmdline_parser_params *params) {
  int result;
  result = filter_cmdline_parser_internal(argc, argv, args_info, params, 0);
  return result;
}


x86 assembly (clang, -O0):
<filter_cmdline_parser_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <filter_cmdline_parser_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_cmdline_parser_ext>:
xor    %r8d,%r8d
jmp    1030 <filter_cmdline_parser_internal@plt>

LLVM IR (-O0):
%struct.filter_args_info = type { i32 }
%struct.filter_cmdline_parser_params = type { i32 }
define i32 @filter_cmdline_parser_ext(i32 %0, i8** %1, %struct.filter_args_info* %2, %struct.filter_cmdline_parser_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.filter_args_info*
%8 = alloca %struct.filter_cmdline_parser_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.filter_args_info* %2, %struct.filter_args_info** %7
store %struct.filter_cmdline_parser_params* %3, %struct.filter_cmdline_parser_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.filter_args_info*, %struct.filter_args_info** %7
%13 = load %struct.filter_cmdline_parser_params*, %struct.filter_cmdline_parser_params** %8
%14 = call i32 @filter_cmdline_parser_internal(i32 %10, i8** %11, %struct.filter_args_info* %12, %struct.filter_cmdline_parser_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.filter_args_info = type { i32 }
%struct.filter_cmdline_parser_params = type { i32 }
define i32 @filter_cmdline_parser_ext(i32 %0, i8** %1, %struct.filter_args_info* %2, %struct.filter_cmdline_parser_params* %3) {
%5 = tail call i32 @filter_cmdline_parser_internal(i32 %0, i8** %1, %struct.filter_args_info* %2, %struct.filter_cmdline_parser_params* %3, i32 0)
ret i32 %5
}
/* Type definitions */
struct rbtree {
  int dummy;
};
struct htable {
  int dummy;
};

/* Variables and functions */
int read_records_from_file(char *, struct htable *, struct rbtree *);
int read_root(struct htable *ds, struct rbtree *rbt) {
  return read_records_from_file("root.z", ds, rbt);
}


x86 assembly (clang, -O0):
<read_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <read_records_from_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_root>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <read_records_from_file@plt>

LLVM IR (-O0):
%struct.htable = type { i32 }
%struct.rbtree = type { i32 }
@.str = [7 x i8] c"root.z\00"
define i32 @read_root(%struct.htable* %0, %struct.rbtree* %1) {
%3 = alloca %struct.htable*
%4 = alloca %struct.rbtree*
store %struct.htable* %0, %struct.htable** %3
store %struct.rbtree* %1, %struct.rbtree** %4
%5 = load %struct.htable*, %struct.htable** %3
%6 = load %struct.rbtree*, %struct.rbtree** %4
%7 = call i32 @read_records_from_file(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.htable* %5, %struct.rbtree* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.htable = type { i32 }
%struct.rbtree = type { i32 }
@.str = [7 x i8] c"root.z\00"
define i32 @read_root(%struct.htable* %0, %struct.rbtree* %1) {
%3 = tail call i32 @read_records_from_file(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %struct.htable* %0, %struct.rbtree* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mbrtowc_base_test();
int /*<<< orphan*/ printf(char *);
int mb_wc_test() {
  mbrtowc_base_test();
  printf("mb_wc_test: Done\n");
  return 0;
}


x86 assembly (clang, -O0):
<mb_wc_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mbrtowc_base_test@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"mb_wc_test: Done\0A\00"
define i32 @mb_wc_test() {
%1 = call i32 (...) @mbrtowc_base_test()
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"mb_wc_test: Done\00"
define i32 @mb_wc_test() {
%1 = tail call i32 (...) @mbrtowc_base_test()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void load_param_1_reg_32(int reg) {
  if (reg & 8)
    addbyte(0x44);
  addbyte(0x89);
  addbyte(0xc0 | 7 | (reg << 3));
}


x86 assembly (clang, -O0):
<load_param_1_reg_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1134 <load_param_1_reg_32+0x24>
mov    $0x44,%edi
call   1030 <addbyte@plt>
mov    $0x89,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc7,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_param_1_reg_32>:
push   %rbx
mov    %edi,%ebx
test   $0x8,%bl
je     1122 <load_param_1_reg_32+0x12>
mov    $0x44,%edi
call   1030 <addbyte@plt>
mov    $0x89,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebx
or     $0xc7,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @load_param_1_reg_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 8
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @addbyte(i32 68)
br label %8
8: ; preds = %6, %1
%9 = call i32 @addbyte(i32 137)
%10 = load i32, i32* %2
%11 = shl i32 %10, 3
%12 = or i32 199, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @load_param_1_reg_32(i32 %0) {
%2 = and i32 %0, 8
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @addbyte(i32 68)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @addbyte(i32 137)
%8 = shl i32 %0, 3
%9 = or i32 %8, 199
%10 = tail call i32 @addbyte(i32 %9)
ret void
}