xunge/DecIR huggingface dataset:
/* Type definitions */
struct fix_tag_classifier {
  int dummy;
};

/* Variables and functions */
const struct fix_tag_classifier *
get_group_classifier_in_MsgTypes(size_t __tag) {
  (void)__tag;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.fix_tag_classifier = type { i32 }
define %struct.fix_tag_classifier* @get_group_classifier_in_MsgTypes(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret %struct.fix_tag_classifier* null
}

LLVM IR (-O2):
%struct.fix_tag_classifier = type { i32 }
define noalias %struct.fix_tag_classifier* @get_group_classifier_in_MsgTypes(i64 %0) {
ret %struct.fix_tag_classifier* null
}
void foo664(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo664(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atanl(long double);
long double cosl(int /*<<< orphan*/);
long double __attribute__((no, optimize("Ofast"))) cosatanl(long double x) {
  return cosl(atanl(x));
}


x86 assembly (clang, -O0):
<cosatanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <atanl@plt>
mov    %eax,%edi
call   1040 <cosl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosatanl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <atanl@plt>
mov    %eax,%edi
add    $0x18,%rsp
jmp    1040 <cosl@plt>

LLVM IR (-O0):
define x86_fp80 @cosatanl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @atanl(x86_fp80 %3)
%5 = call x86_fp80 @cosl(i32 %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @cosatanl(x86_fp80 %0) {
%2 = tail call i32 @atanl(x86_fp80 %0)
%3 = tail call x86_fp80 @cosl(i32 %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int print(int X, int Y) {
  int result = (X == 0 && Y == 0) ? 0 : 1;
  printf("%d %d", X, Y);
  return result;
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1137 <print+0x27>
cmpl   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %esi,%edx
mov    %edi,%esi
xor    %ebx,%ebx
mov    %edx,%eax
or     %edi,%eax
setne  %bl
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @print(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %5
}
/* Variables and functions */
int test2(int);
int test1(int x) {
  static int thestatic;
  int y;
  thestatic = x;
  y = thestatic;
  return y + x + test1(x - 1) + test2(x - 1);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2f00(%rip)
mov    0x2efa(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <test1@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <test2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x1(%rbx),%ebp
mov    %ebp,%edi
call   1030 <test1@plt>
lea    (%rax,%rbx,2),%ebx
mov    %ebp,%edi
call   1040 <test2@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@test1.thestatic = internal global i32 0
define i32 @test1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* @test1.thestatic
%5 = load i32, i32* @test1.thestatic
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
%11 = call i32 @test1(i32 %10)
%12 = add nsw i32 %8, %11
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 1
%15 = call i32 @test2(i32 %14)
%16 = add nsw i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @test1(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %0, -1
%4 = tail call i32 @test1(i32 %3)
%5 = add nsw i32 %4, %2
%6 = tail call i32 @test2(i32 %3)
%7 = add nsw i32 %5, %6
ret i32 %7
}
INSTRUCTION(lf_ftoi_s) {}


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

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

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

LLVM IR (-O2):
define i32 @INSTRUCTION(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int memcmp(char const *, char const *, int);
int strlen(char const *);
int strcmp(const char *s1, const char *s2) {
  int len = strlen(s1) + 1;
  return memcmp(s1, s2, len);
}


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

x86 assembly (clang, -O2):
<strcmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcmp@plt>

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call i32 @memcmp(i8* %9, i8* %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 1
%5 = tail call i32 @memcmp(i8* %0, i8* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int vixPlaybackOff(void) {
  printf("[genfb-demo-driver] "
         "playback off\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"[genfb-demo-driver] playback off\0A\00"
define i32 @vixPlaybackOff() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"[genfb-demo-driver] playback off\00"
define i32 @vixPlaybackOff() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
size_t copy_substr(char *, size_t, char const *, char);
size_t copy_str(char dst[], size_t dst_len, const char src[]) {
  return (dst == src) ? 0U : copy_substr(dst, dst_len, src, '\0');
}


x86 assembly (clang, -O0):
<copy_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113d <copy_str+0x2d>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1154 <copy_str+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <copy_substr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_str>:
cmp    %rdx,%rdi
je     111c <copy_str+0xc>
xor    %ecx,%ecx
jmp    1030 <copy_substr@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @copy_str(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %6
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %11
10: ; preds = %3
br label %16
11: ; preds = %3
%12 = load i8*, i8** %4
%13 = load i64, i64* %5
%14 = load i8*, i8** %6
%15 = call i64 @copy_substr(i8* %12, i64 %13, i8* %14, i8 signext 0)
br label %16
16: ; preds = %11, %10
%17 = phi i64 [ 0, %10 ], [ %15, %11 ]
ret i64 %17
}

LLVM IR (-O2):
define i64 @copy_str(i8* %0, i64 %1, i8* %2) {
%4 = icmp eq i8* %0, %2
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i64 @copy_substr(i8* %0, i64 %1, i8* %2, i8 signext 0)
br label %7
7: ; preds = %3, %5
%8 = phi i64 [ %6, %5 ], [ 0, %3 ]
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
int main() {
  printf("OSTYPE=%s\n", getenv("OSTYPE"));
  fflush(stdout);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec3(%rip),%rdi
call   1030 <getenv@plt>
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"OSTYPE=%s\0A\00"
@.str.1 = [7 x i8] c"OSTYPE\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"OSTYPE=%s\0A\00"
@.str.1 = [7 x i8] c"OSTYPE\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
bool eq_f(float a, float b) {
  float epsilon = 0.001;
  return ((a - epsilon) < b) && ((a + epsilon) > b) ? true : false;
}


x86 assembly (clang, -O0):
<eq_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jbe    114c <eq_f+0x4c>
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_f>:
movss  0xef8(%rip),%xmm2
addss  %xmm0,%xmm2
ucomiss %xmm2,%xmm1
seta   %al
addss  0xeea(%rip),%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @eq_f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0x3F50624DE0000000, float* %5
%6 = load float, float* %3
%7 = load float, float* %5
%8 = fsub float %6, %7
%9 = load float, float* %4
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load float, float* %3
%13 = load float, float* %5
%14 = fadd float %12, %13
%15 = load float, float* %4
%16 = fcmp ogt float %14, %15
br label %17
17: ; preds = %11, %2
%18 = phi i1 [ false, %2 ], [ %16, %11 ]
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 1, i32 0
ret i32 %20
}

LLVM IR (-O2):
define i32 @eq_f(float %0, float %1) {
%3 = fadd float %0, 0xBF50624DE0000000
%4 = fcmp olt float %3, %1
%5 = fadd float %0, 0x3F50624DE0000000
%6 = fcmp ogt float %5, %1
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void plugin_exit_button_exec(void) {}


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

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

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

LLVM IR (-O2):
define void @plugin_exit_button_exec() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct option_w {
  int dummy;
};
struct _getopt_data_w {
  int dummy;
};

/* Variables and functions */
int _getopt_internal_r_w(int, int /*<<< orphan*/ *const *,
                         int /*<<< orphan*/ const *, struct option_w const *,
                         int *, int, struct _getopt_data_w *,
                         int /*<<< orphan*/);
int _getopt_long_only_r_w(int argc, wchar_t *const *argv,
                          const wchar_t *options,
                          const struct option_w *long_options, int *opt_index,
                          struct _getopt_data_w *d) {
  return _getopt_internal_r_w(argc, argv, options, long_options, opt_index, 1,
                              d, 0);
}


x86 assembly (clang, -O0):
<_getopt_long_only_r_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    $0x1,%r9d
xor    %r10d,%r10d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <_getopt_internal_r_w@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getopt_long_only_r_w>:
push   %rax
mov    %r9,%rax
mov    $0x1,%r9d
push   $0x0
push   %rax
call   1030 <_getopt_internal_r_w@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.option_w = type { i32 }
%struct._getopt_data_w = type { i32 }
define i32 @_getopt_long_only_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, %struct._getopt_data_w* %5) {
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i32*
%10 = alloca %struct.option_w*
%11 = alloca i32*
%12 = alloca %struct._getopt_data_w*
store i32 %0, i32* %7
store i32** %1, i32*** %8
store i32* %2, i32** %9
store %struct.option_w* %3, %struct.option_w** %10
store i32* %4, i32** %11
store %struct._getopt_data_w* %5, %struct._getopt_data_w** %12
%13 = load i32, i32* %7
%14 = load i32**, i32*** %8
%15 = load i32*, i32** %9
%16 = load %struct.option_w*, %struct.option_w** %10
%17 = load i32*, i32** %11
%18 = load %struct._getopt_data_w*, %struct._getopt_data_w** %12
%19 = call i32 @_getopt_internal_r_w(i32 %13, i32** %14, i32* %15, %struct.option_w* %16, i32* %17, i32 1, %struct._getopt_data_w* %18, i32 0)
ret i32 %19
}

LLVM IR (-O2):
%struct.option_w = type { i32 }
%struct._getopt_data_w = type { i32 }
define i32 @_getopt_long_only_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, %struct._getopt_data_w* %5) {
%7 = tail call i32 @_getopt_internal_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, i32 1, %struct._getopt_data_w* %5, i32 0)
ret i32 %7
}
void caller_2_2_2_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_2_2_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void condition() { emitln("<condition>"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"<condition>\00"
define void @condition() {
%1 = call i32 @emitln(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"<condition>\00"
define void @condition() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t bitcount(unsigned x) {
  size_t b;
  for (b = 0; x > 0; x &= (x - 1))
    b++;
  return b;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1136 <bitcount+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110f <bitcount+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111d <bitcount+0x1d>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

LLVM IR (-O0):
define i64 @bitcount(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %2
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i64, i64* %3
%9 = add i64 %8, 1
store i64 %9, i64* %3
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sub i32 %11, 1
%13 = load i32, i32* %2
%14 = and i32 %13, %12
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = add i64 %4, 1
%7 = add i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i64 [ 0, %1 ], [ %6, %3 ]
ret i64 %11
}
int fun912() { return 912; }


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

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

LLVM IR (-O0):
define i32 @fun912() {
ret i32 912
}

LLVM IR (-O2):
define i32 @fun912() {
ret i32 912
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISREG(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char const *, struct stat *);
int is_file(const char *path) {
  struct stat path_stat;
  stat(path, &path_stat);
  return S_ISREG(path_stat.st_mode);
}


x86 assembly (clang, -O0):
<is_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1040 <S_ISREG@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISREG(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_file(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISREG(i32 %6)
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  short y2;
};
typedef TYPE_1__ XSegment;

/* Variables and functions */
void set_XSegment_y2(void *_p, short _v) { ((XSegment *)_p)->y2 = (short)_v; }


x86 assembly (clang, -O0):
<set_XSegment_y2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSegment_y2>:
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XSegment_y2(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ event_LOOP();
int /*<<< orphan*/ othello_ARGS(char *);
int /*<<< orphan*/ othello_INIT();
main(int argc, char **argv) {
  int i;
  othello_INIT();
  for (i = 1; i < argc; i++)
    othello_ARGS(argv[i]);
  event_LOOP();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <othello_INIT@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <othello_ARGS@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <main+0x24>
mov    $0x0,%al
call   1050 <event_LOOP@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <othello_INIT@plt>
cmp    $0x2,%ebp
jl     1162 <main+0x32>
mov    %ebp,%ebp
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1040 <othello_ARGS@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <main+0x20>
xor    %eax,%eax
call   1050 <event_LOOP@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @othello_INIT()
store i32 1, i32* %6
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @othello_ARGS(i8* %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %8
22: ; preds = %8
%23 = call i32 (...) @event_LOOP()
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @othello_INIT()
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 1, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @othello_ARGS(i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %2
%15 = tail call i32 (...) @event_LOOP()
ret i32 0
}
/* Variables and functions */
int dy_stack_size_impl();
int dy_stack_size() { return dy_stack_size_impl(); }


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

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

LLVM IR (-O0):
define i32 @dy_stack_size() {
%1 = call i32 (...) @dy_stack_size_impl()
ret i32 %1
}

LLVM IR (-O2):
define i32 @dy_stack_size() {
%1 = tail call i32 (...) @dy_stack_size_impl()
ret i32 %1
}
/* Variables and functions */
int __get_array_size(char const *);
char *strcat(char *s1, const char *s2) {
  int size1;
  int size2;
  size1 = __get_array_size(s1);
  size2 = __get_array_size(s2);
  if (size2 > size1)
    while (1)
      ;
  return s1;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_array_size@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <__get_array_size@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    114e <strcat+0x3e>
jmp    1149 <strcat+0x39>
jmp    1149 <strcat+0x39>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <__get_array_size@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <__get_array_size@plt>
cmp    %ebp,%eax
jle    1132 <strcat+0x22>
nopl   (%rax)
jmp    1130 <strcat+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @__get_array_size(i8* %0)
%4 = tail call i32 @__get_array_size(i8* %1)
%5 = icmp sgt i32 %4, %3
br i1 %5, label %6, label %7
6: ; preds = %2, %6
br label %6
7: ; preds = %2
ret i8* %0
}
void vector_subtract(double u[], double v[], double w[]) {
  for (int i = 0; i < 3; i++)
    w[i] = u[i] - v[i];
}


x86 assembly (clang, -O0):
<vector_subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1156 <vector_subtract+0x56>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <vector_subtract+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_subtract>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @vector_subtract(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %27, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %30
11: ; preds = %8
%12 = load double*, double** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = load double*, double** %5
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
%22 = fsub double %16, %21
%23 = load double*, double** %6
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
store double %22, double* %26
br label %27
27: ; preds = %11
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %8
30: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @vector_subtract(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fsub double %4, %5
store double %6, double* %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %2, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %2, i64 2
store double %17, double* %18
ret void
}
/* Variables and functions */
int mul(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int a, b;
  a = 13;
  b = 8;
  printf("a=%d, b=%d, x=%d\n", a, b, mul(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xd,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <mul@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xd,%edi
mov    $0x8,%esi
call   1040 <mul@plt>
lea    0xec9(%rip),%rdi
mov    $0xd,%esi
mov    $0x8,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"a=%d, b=%d, x=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @mul(i32 13, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 13, i32 8, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ initList(int);
int main(int argc, char *argv[]) {
  int size = 70;
  initList(size);
  return 1;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x46,%edi
call   1030 <initList@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @initList(i32 70)
ret i32 1
}
/* Variables and functions */
int FD_SETSIZE;
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%u", FD_SETSIZE); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@FD_SETSIZE = global i32 0
define i32 @main() {
%1 = load i32, i32* @FD_SETSIZE
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
char *strrchr(char *, char);
void str_setext(char *text, const char *ext) {
  char *p = strrchr(text, '.');
  if (p == NULL) {
    strcat(text, ext);
  } else {
    strcpy(p, ext);
  }
}


x86 assembly (clang, -O0):
<str_setext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <str_setext+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
jmp    117c <str_setext+0x4c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_setext>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     115b <str_setext+0x2b>
mov    %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <strcat@plt>

LLVM IR (-O0):
define void @str_setext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strrchr(i8* %6, i8 signext 46)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @strcat(i8* %11, i8* %12)
br label %18
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %15, i8* %16)
br label %18
18: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
define void @str_setext(i8* %0, i8* %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @strcat(i8* %0, i8* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %3, i8* %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _dbg(char *);
int init() {
  if (0)
    _dbg("init()\n");
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @init() {
ret i32 0
}
/* Variables and functions */
int bitcount(unsigned int const);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned const TESTNUM = 0177;
  printf("\n%d", bitcount(TESTNUM));
  printf("\nshould be 7");
  printf("\n\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7f,-0x4(%rbp)
mov    $0x7f,%edi
call   1040 <bitcount@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7f,%edi
call   1050 <bitcount@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [13 x i8] c"\0Ashould be 7\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 127, i32* %1
%2 = call i32 @bitcount(i32 127)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [13 x i8] c"\0Ashould be 7\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @bitcount(i32 127)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
void main() {
  int data = 0;
  while (__VERIFIER_nondet_int()) {
    data = __VERIFIER_nondet_int();
  }
  if (data) {
  ERROR:
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     113e <main+0x2e>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
cmpl   $0x0,-0x4(%rbp)
je     1152 <main+0x42>
jmp    114d <main+0x3d>
jmp    114d <main+0x3d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1142 <main+0x32>
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1120 <main+0x10>
test   %ebx,%ebx
je     1142 <main+0x32>
nopl   0x0(%rax,%rax,1)
jmp    1140 <main+0x30>
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = call i32 (...) @__VERIFIER_nondet_int()
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %1
br label %2
7: ; preds = %2
%8 = load i32, i32* %1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
%8 = icmp eq i32 %4, 0
br i1 %8, label %10, label %9
9: ; preds = %7, %9
br label %9
10: ; preds = %0, %7
ret void
}
/* Variables and functions */
scalar_t__ ccnl_rdr_serialize_fillTorL(int, unsigned char *);
int ccnl_rdr_serialize_fillTandL(int typ, int len, unsigned char *buf) {
  int i = 0;
  {
    *buf = 0;
    i += ccnl_rdr_serialize_fillTorL(typ, buf + i);
    i += ccnl_rdr_serialize_fillTorL(len, buf + i);
  }
  return i;
}


x86 assembly (clang, -O0):
<ccnl_rdr_serialize_fillTandL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
call   1030 <ccnl_rdr_serialize_fillTorL@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
call   1030 <ccnl_rdr_serialize_fillTorL@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_rdr_serialize_fillTandL>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
movb   $0x0,(%rdx)
mov    %rdx,%rsi
call   1030 <ccnl_rdr_serialize_fillTorL@plt>
movslq %eax,%rbp
add    %rbp,%rbx
mov    %r14d,%edi
mov    %rbx,%rsi
call   1030 <ccnl_rdr_serialize_fillTorL@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ccnl_rdr_serialize_fillTandL(i32 %0, i32 %1, i8* %2) {
store i8 0, i8* %2
%4 = tail call i64 @ccnl_rdr_serialize_fillTorL(i32 %0, i8* %2)
%5 = shl i64 %4, 32
%6 = ashr exact i64 %5, 32
%7 = getelementptr inbounds i8, i8* %2, i64 %6
%8 = tail call i64 @ccnl_rdr_serialize_fillTorL(i32 %1, i8* %7)
%9 = add i64 %8, %4
%10 = trunc i64 %9 to i32
ret i32 %10
}
void gtk_text_tag_get_priority() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_tag_get_priority() {
ret void
}
int main() {
  int arg1 = 40;
  int arg2 = 2;
  int mul = 0;
  __asm__("imull %%ebx, %%eax;" : "=a"(mul) : "a"(arg1), "b"(arg2));
  return mul;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
movl   $0x28,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ebx
imul   %ebx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%eax
mov    $0x2,%ebx
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 40, i32* %2
store i32 2, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 asm "imull %ebx, %eax;", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "imull %ebx, %eax;", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 40, i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ int2str(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, char *);
void tst_0() {
  char buf_int2str[34] = "";
  int2str(0, buf_int2str, 16);
  printf("0 #%s\n", buf_int2str);
}


x86 assembly (clang, -O0):
<tst_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x22,%edx
call   1050 <memset@plt>
lea    -0x30(%rbp),%rsi
xor    %edi,%edi
mov    $0x10,%edx
call   1030 <int2str@plt>
lea    -0x30(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_0>:
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movw   $0x0,0x20(%rsp)
mov    %rsp,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <int2str@plt>
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"0 #%s\0A\00"
define void @tst_0() {
%1 = alloca [34 x i8]
%2 = bitcast [34 x i8]* %1 to i8*
%3 = getelementptr inbounds [34 x i8], [34 x i8]* %1, i64 0, i64 0
%4 = call i32 @int2str(i32 0, i8* %3, i32 16)
%5 = getelementptr inbounds [34 x i8], [34 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"0 #%s\0A\00"
define void @tst_0() {
%1 = alloca [34 x i8]
%2 = getelementptr inbounds [34 x i8], [34 x i8]* %1, i64 0, i64 0
%3 = call i32 @int2str(i32 0, i8* %2, i32 16)
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void gen_op_flags_set(void) {}


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

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

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

LLVM IR (-O2):
define void @gen_op_flags_set() {
ret void
}