xunge/DecIR huggingface dataset:
const char *__attribute__((weak)) __attribute__((short_call))
__attribute__((section(".test.c"))) __attribute__((no)) weak_s3(void) {
  return "weak_s3";
}


x86 assembly (clang, -O0):
<weak_s3>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<weak_s3>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"weak_s3\00"
define weak i8* @weak_s3() section ".test.c" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"weak_s3\00"
define weak i8* @weak_s3() section ".test.c" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int write_ith_record(int /*<<< orphan*/ *, int /*<<< orphan*/,
                     int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int fini_ith(FILE *f) { return write_ith_record(f, 0, 0, 1, NULL); }


x86 assembly (clang, -O0):
<fini_ith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %edx,%esi
call   1030 <write_ith_record@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fini_ith>:
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
jmp    1030 <write_ith_record@plt>

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

LLVM IR (-O2):
define i32 @fini_ith(i32* %0) {
%2 = tail call i32 @write_ith_record(i32* %0, i32 0, i32 0, i32 1, i32* null)
ret i32 %2
}
/* Variables and functions */
int mToIn(float);
float mToFt(float m) { return mToIn(m) / 12; }


x86 assembly (clang, -O0):
<mToFt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <mToIn@plt>
mov    $0xc,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mToFt>:
push   %rax
call   1030 <mToIn@plt>
cltq
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mToFt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @mToIn(float %3)
%5 = sdiv i32 %4, 12
%6 = sitofp i32 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @mToFt(float %0) {
%2 = tail call i32 @mToIn(float %0)
%3 = sdiv i32 %2, 12
%4 = sitofp i32 %3 to float
ret float %4
}
float p(int d, int h) {
  if (h > d)
    return (1 / (float)d) * p(d, h - d);
  else
    return (1 / (float)d * (d - h + 1));
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1164 <p+0x54>
cvtsi2ssl -0x8(%rbp),%xmm1
movss  0xec9(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
call   1030 <p@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118b <p+0x7b>
cvtsi2ssl -0x8(%rbp),%xmm1
movss  0xe8f(%rip),%xmm0
divss  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%eax
sub    %edi,%eax
jle    1124 <p+0x14>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <p@plt>
jmp    112f <p+0x1f>
mov    %ebx,%eax
sub    %esi,%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
cvtsi2ss %ebx,%xmm2
movss  0xec5(%rip),%xmm1
divss  %xmm2,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @p(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to float
%12 = fdiv float 1.000000e+00, %11
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = call float @p(i32 %13, i32 %16)
%18 = fmul float %12, %17
store float %18, float* %3
br label %29
19: ; preds = %2
%20 = load i32, i32* %4
%21 = sitofp i32 %20 to float
%22 = fdiv float 1.000000e+00, %21
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = sub nsw i32 %23, %24
%26 = add nsw i32 %25, 1
%27 = sitofp i32 %26 to float
%28 = fmul float %22, %27
store float %28, float* %3
br label %29
29: ; preds = %19, %9
%30 = load float, float* %3
ret float %30
}

LLVM IR (-O2):
define float @p(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
br i1 %3, label %9, label %12
4: ; preds = %12, %9
%5 = phi float [ %15, %12 ], [ %11, %9 ]
%6 = sitofp i32 %0 to float
%7 = fdiv float 1.000000e+00, %6
%8 = fmul float %7, %5
ret float %8
9: ; preds = %2
%10 = sub nsw i32 %1, %0
%11 = tail call float @p(i32 %0, i32 %10)
br label %4
12: ; preds = %2
%13 = add i32 %0, 1
%14 = sub i32 %13, %1
%15 = sitofp i32 %14 to float
br label %4
}
int zone_span_seqretry(struct zone *zone, unsigned iv) { return 0; }


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

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

LLVM IR (-O0):
%struct.zone = type opaque
define i32 @zone_span_seqretry(%struct.zone* %0, i32 %1) {
%3 = alloca %struct.zone*
%4 = alloca i32
store %struct.zone* %0, %struct.zone** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.zone = type opaque
define i32 @zone_span_seqretry(%struct.zone* nocapture readnone %0, i32 %1) {
ret i32 0
}
int find_count_of_lines(const char *str) {
  int liness = 0, i = 0;
  for (i = 0; str[i] != '\0'; i++) {
    if (str[i] == '\n') {
      liness += 1;
    }
  }
  return liness;
}


x86 assembly (clang, -O0):
<find_count_of_lines>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1163 <find_count_of_lines+0x63>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1150 <find_count_of_lines+0x50>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <find_count_of_lines+0x55>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111d <find_count_of_lines+0x1d>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_count_of_lines>:
xor    %eax,%eax
jmp    1117 <find_count_of_lines+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0xa,%cl
je     1110 <find_count_of_lines+0x10>
test   %cl,%cl
jne    1113 <find_count_of_lines+0x13>
ret

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

LLVM IR (-O2):
define i32 @find_count_of_lines(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %11, %9 ], [ 0, %1 ]
%4 = phi i32 [ %10, %9 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
switch i8 %6, label %9 [
i8 0, label %12
i8 10, label %7
]
7: ; preds = %2
%8 = add nsw i32 %4, 1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ %4, %2 ]
%11 = add nuw i64 %3, 1
br label %2
12: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int my_func(void) {
  int ret = 81;
  return ret;
  printf("This is a test\n");
}


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

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

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

LLVM IR (-O2):
define i32 @my_func() {
ret i32 81
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void notimpl(char s[]) {
  fprintf(stderr, "\n%s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<notimpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<notimpl>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define void @notimpl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define void @notimpl(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void child_access(void) {}


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

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

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

LLVM IR (-O2):
define void @child_access() {
ret void
}
/* Type definitions */
struct plist {
  int dummy;
};
typedef int /*<<< orphan*/ ino_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int read_directory_recurr_internal(char const *, struct plist *,
                                   int /*<<< orphan*/ **, int *);
int read_directory_recurr(const char *directory, struct plist *plist) {
  int ret;
  int depth = 0;
  ino_t *dir_stack = NULL;
  ret = read_directory_recurr_internal(directory, plist, &dir_stack, &depth);
  if (dir_stack)
    free(dir_stack);
  return ret;
}


x86 assembly (clang, -O0):
<read_directory_recurr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <read_directory_recurr_internal@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     116b <read_directory_recurr+0x4b>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_directory_recurr>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x4(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <read_directory_recurr_internal@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     1156 <read_directory_recurr+0x36>
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.plist = type { i32 }
define i32 @read_directory_recurr(i8* %0, %struct.plist* %1) {
%3 = alloca i8*
%4 = alloca %struct.plist*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %3
store %struct.plist* %1, %struct.plist** %4
store i32 0, i32* %6
store i32* null, i32** %7
%8 = load i8*, i8** %3
%9 = load %struct.plist*, %struct.plist** %4
%10 = call i32 @read_directory_recurr_internal(i8* %8, %struct.plist* %9, i32** %7, i32* %6)
store i32 %10, i32* %5
%11 = load i32*, i32** %7
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32*, i32** %7
%15 = call i32 @free(i32* %14)
br label %16
16: ; preds = %13, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
%struct.plist = type { i32 }
define i32 @read_directory_recurr(i8* %0, %struct.plist* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32** %4 to i8*
store i32* null, i32** %4
%7 = call i32 @read_directory_recurr_internal(i8* %0, %struct.plist* %1, i32** %4, i32* %3)
%8 = load i32*, i32** %4
%9 = icmp eq i32* %8, null
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @free(i32* %8)
br label %12
12: ; preds = %10, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char rep_buff[1000];
  scanf("%s", rep_buff);
  printf("child middle pipe print : %s", rep_buff);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xeeb(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [29 x i8] c"child middle pipe print : %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [29 x i8] c"child middle pipe print : %s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
unsigned xrop3_124_0_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;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~S;
  stk3 = D | stk4;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_124_0_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    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_124_0_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
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %5
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %7
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
ret i32 %35
}

LLVM IR (-O2):
define i32 @xrop3_124_0_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 = xor i32 %4, -1
%9 = and i32 %7, %8
%10 = xor i32 %9, %5
ret i32 %10
}
void constant_rotating_frame_hessian_3d(double t, double *pars, double *qp,
                                        int n_dim, double *d2H) {}


x86 assembly (clang, -O0):
<constant_rotating_frame_hessian_3d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @constant_rotating_frame_hessian_3d(double %0, double* %1, double* %2, i32 %3, double* %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double*
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store double* %4, double** %10
ret void
}

LLVM IR (-O2):
define void @constant_rotating_frame_hessian_3d(double %0, double* nocapture %1, double* nocapture %2, i32 %3, double* nocapture %4) {
ret void
}
/* Variables and functions */
double M_PI;
const double rad(double deg) { return (M_PI / 180.0 * deg); }


x86 assembly (clang, -O0):
<rad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
movsd  (%rax),%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm1
divsd  0xeed(%rip),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @rad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* @M_PI
%4 = fdiv double %3, 1.800000e+02
%5 = load double, double* %2
%6 = fmul double %4, %5
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @rad(double %0) {
%2 = load double, double* @M_PI
%3 = fdiv double %2, 1.800000e+02
%4 = fmul double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int math;
  int physics;
  int check;
  math = 5;
  physics = 5;
  check = math == 6 && physics == 5;
  printf("%d", check);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x6,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1146 <main+0x36>
cmpl   $0x5,-0xc(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_movx_to_atRi(char *str, unsigned char i) {
  sprintf(str, "MOVX  @R%X, A                    ", i);
}


x86 assembly (clang, -O0):
<sprint_movx_to_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_movx_to_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOVX @R%X, A \00"
define void @sprint_movx_to_atRi(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOVX @R%X, A \00"
define void @sprint_movx_to_atRi(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
double *InitializeEachReduce(double *eachReduce, int number) {
  int i;
  for (i = 0; i < number; i++)
    eachReduce[i] = 0;
  return eachReduce;
}


x86 assembly (clang, -O0):
<InitializeEachReduce>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <InitializeEachReduce+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <InitializeEachReduce+0x12>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitializeEachReduce>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jle    1128 <InitializeEachReduce+0x18>
mov    %esi,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define double* @InitializeEachReduce(double* returned writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret double* %0
}
void RTSocketFromNative(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSocketFromNative() {
ret void
}
/* Variables and functions */
double sqrt(double);
double mag(double v1[3]) {
  double mag;
  mag = sqrt(v1[0] * v1[0] + v1[1] * v1[1] + v1[2] * v1[2]);
  return mag;
}


x86 assembly (clang, -O0):
<mag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mag>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <mag+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @mag(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fmul double %12, %15
%17 = call double @llvm.fmuladd.f64(double %6, double %9, double %16)
%18 = load double*, double** %2
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = load double*, double** %2
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = call double @llvm.fmuladd.f64(double %20, double %23, double %17)
%25 = call double @sqrt(double %24)
store double %25, double* %3
%26 = load double, double* %3
ret double %26
}

LLVM IR (-O2):
define double @mag(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int _mm_extract_epi32(int /*<<< orphan*/, int);
int test_mm_extract_epi32(__m128i x) { return _mm_extract_epi32(x, 1); }


x86 assembly (clang, -O0):
<test_mm_extract_epi32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <_mm_extract_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_extract_epi32>:
mov    $0x1,%esi
jmp    1030 <_mm_extract_epi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_extract_epi32(i32 %0) {
%2 = tail call i32 @_mm_extract_epi32(i32 %0, i32 1)
ret i32 %2
}
int prv_isReserved(char sign) {
  if (sign == '[' || sign == '{' || sign == ']' || sign == '}' || sign == ':' ||
      sign == ',' || sign == '"') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<prv_isReserved>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x5b,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x7b,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x5d,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x7d,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2c,%eax
je     1165 <prv_isReserved+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x22,%eax
jne    1171 <prv_isReserved+0x71>
movl   $0x1,-0x4(%rbp)
jmp    1178 <prv_isReserved+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_isReserved>:
mov    $0x1,%eax
lea    -0x22(%rdi),%ecx
cmp    $0x3b,%cl
ja     1121 <prv_isReserved+0x21>
movzbl %cl,%ecx
movabs $0xa00000001000401,%rdx
bt     %rcx,%rdx
jae    1121 <prv_isReserved+0x21>
ret
cmp    $0x7b,%dil
je     1120 <prv_isReserved+0x20>
cmp    $0x7d,%dil
je     1120 <prv_isReserved+0x20>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @prv_isReserved(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 91
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 123
br i1 %10, label %31, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 93
br i1 %14, label %31, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 125
br i1 %18, label %31, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 58
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 44
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 34
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %33
32: ; preds = %27
store i32 0, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @prv_isReserved(i8 signext %0) {
switch i8 %0, label %2 [
i8 125, label %3
i8 123, label %3
i8 93, label %3
i8 91, label %3
i8 58, label %3
i8 44, label %3
i8 34, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
unsigned long usec_to_msec(unsigned long usec) { return usec / 1000; }


x86 assembly (clang, -O0):
<usec_to_msec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<usec_to_msec>:
mov    %rdi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
mov    %rdx,%rax
shr    $0x4,%rax
ret

LLVM IR (-O0):
define i64 @usec_to_msec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = udiv i64 %3, 1000
ret i64 %4
}

LLVM IR (-O2):
define i64 @usec_to_msec(i64 %0) {
%2 = udiv i64 %0, 1000
ret i64 %2
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_p_sep_by_space(struct _Locale_monetary *lmon) { return CHAR_MAX; }


x86 assembly (clang, -O0):
<_Locale_p_sep_by_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_p_sep_by_space>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sep_by_space(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sep_by_space(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char name[]) {
  fprintf(stderr, "Usage: %s [megabytes]\n", name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s [megabytes]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s [megabytes]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int run(const char *argument) {
  printf("Hello World, %s!\n", argument);
  return 1;
}


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

x86 assembly (clang, -O2):
<run>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Hello World, %s!\0A\00"
define i32 @run(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [18 x i8] c"Hello World, %s!\0A\00"
define i32 @run(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ remote_power_off();
int /*<<< orphan*/ remote_power_on();
unsigned char rom_read(int);
void remote_initialize(void) {
  unsigned char val;
  val = rom_read(14);
  if (val) {
    remote_power_on();
  } else {
    remote_power_off();
  }
}


x86 assembly (clang, -O0):
<remote_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe,%edi
call   1050 <rom_read@plt>
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     115b <remote_initialize+0x2b>
mov    $0x0,%al
call   1030 <remote_power_on@plt>
jmp    1162 <remote_initialize+0x32>
mov    $0x0,%al
call   1040 <remote_power_off@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remote_initialize>:
push   %rax
mov    $0xe,%edi
call   1050 <rom_read@plt>
test   %al,%al
je     1147 <remote_initialize+0x17>
xor    %eax,%eax
pop    %rcx
jmp    1030 <remote_power_on@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <remote_power_off@plt>

LLVM IR (-O0):
define void @remote_initialize() {
%1 = alloca i8
%2 = call zeroext i8 @rom_read(i32 14)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @remote_power_on()
br label %9
7: ; preds = %0
%8 = call i32 (...) @remote_power_off()
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @remote_initialize() {
%1 = tail call zeroext i8 @rom_read(i32 14)
%2 = icmp eq i8 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @remote_power_on()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @remote_power_off()
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ critical_section_exit();
void nrf_802154_critical_section_exit(void) {
  (void)(0x0205UL);
  critical_section_exit();
  (void)(0x0205UL);
}


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

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

LLVM IR (-O0):
define void @nrf_802154_critical_section_exit() {
%1 = call i32 (...) @critical_section_exit()
ret void
}

LLVM IR (-O2):
define void @nrf_802154_critical_section_exit() {
%1 = tail call i32 (...) @critical_section_exit()
ret void
}
void stripcrlf(char *buf) {
  register char *p = buf;
  while (p && *p) {
    if (*p == '\n' || *p == '\r')
      *p = '\0';
    p++;
  }
}


x86 assembly (clang, -O0):
<stripcrlf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1130 <stripcrlf+0x30>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1140 <stripcrlf+0x40>
jmp    1178 <stripcrlf+0x78>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1160 <stripcrlf+0x60>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1167 <stripcrlf+0x67>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <stripcrlf+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripcrlf>:
test   %rdi,%rdi
jne    1117 <stripcrlf+0x17>
jmp    1126 <stripcrlf+0x26>
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0xa,%al
je     1110 <stripcrlf+0x10>
cmp    $0xd,%al
je     1110 <stripcrlf+0x10>
test   %al,%al
jne    1113 <stripcrlf+0x13>
ret

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

LLVM IR (-O2):
define void @stripcrlf(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %8, %7 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 10, label %6
i8 13, label %6
]
6: ; preds = %3, %3
store i8 0, i8* %4
br label %7
7: ; preds = %3, %6
%8 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
9: ; preds = %3, %1
ret void
}
int count(int list[]) {
  int i, c;
  for (i = 0; (c = list[i]) != 2147483647; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x7fffffff,%eax
je     113b <count+0x3b>
jmp    112d <count+0x2d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <count+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpl   $0x7fffffff,(%rdi)
lea    0x4(%rdi),%rdi
jne    1110 <count+0x10>
ret

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

LLVM IR (-O2):
define i32 @count(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 2147483647
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ get_source_code_line_number();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void compound_statement_error_handler(void) {
  printf("ERROR: Line %5lu\tIllegal token between function prototype and "
         "function body.\n",
         get_source_code_line_number());
}


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

x86 assembly (clang, -O2):
<compound_statement_error_handler>:
push   %rax
xor    %eax,%eax
call   1040 <get_source_code_line_number@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"ERROR: Line %5lu\09Illegal token between function prototype and function body.\0A\00"
define void @compound_statement_error_handler() {
%1 = call i32 (...) @get_source_code_line_number()
%2 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"ERROR: Line %5lu\09Illegal token between function prototype and function body.\0A\00"
define void @compound_statement_error_handler() {
%1 = tail call i32 (...) @get_source_code_line_number()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char **);
int wordCount(char **words) {
  assert(words);
  int count = 0;
  while (words[count]) {
    ++count;
  }
  return count;
}


x86 assembly (clang, -O0):
<wordCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     114d <wordCount+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <wordCount+0x1c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordCount>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    $0xffffffff,%eax
xchg   %ax,%ax
add    $0x1,%eax
cmpq   $0x0,(%rbx)
lea    0x8(%rbx),%rbx
jne    1120 <wordCount+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @wordCount(i8** %0) {
%2 = tail call i32 @assert(i8** %0)
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
ret i32 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t librpip_pwm_get_sysfs_id(uint32_t id) {
  switch (id) {
  case 0:
    return 2;
  case 1:
    return 3;
  }
  return 0;
}


x86 assembly (clang, -O0):
<librpip_pwm_get_sysfs_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     112b <librpip_pwm_get_sysfs_id+0x2b>
jmp    111a <librpip_pwm_get_sysfs_id+0x1a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1137 <librpip_pwm_get_sysfs_id+0x37>
jmp    1143 <librpip_pwm_get_sysfs_id+0x43>
movl   $0x2,-0x4(%rbp)
jmp    114a <librpip_pwm_get_sysfs_id+0x4a>
movl   $0x3,-0x4(%rbp)
jmp    114a <librpip_pwm_get_sysfs_id+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<librpip_pwm_get_sysfs_id>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
lea    (%rax,%rax,2),%ecx
test   %edi,%edi
mov    $0x2,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @librpip_pwm_get_sysfs_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i32 2, i32* %2
br label %8
6: ; preds = %1
store i32 3, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @librpip_pwm_get_sysfs_id(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 3, i32 0
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 2, i32 %3
ret i32 %5
}
void gtk_orientation_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_orientation_get_type() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int sum(int *, int);
int main(void) {
  int my_data[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
  int res = sum(my_data, 10);
  printf("Sum is: %d\n", res);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sum@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <sum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.my_data = [10 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60, i32 70, i32 80, i32 90, i32 100]
@.str = [12 x i8] c"Sum is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = call i32 @sum(i32* %5, i32 10)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@__const.main.my_data = [10 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60, i32 70, i32 80, i32 90, i32 100]
@.str = [12 x i8] c"Sum is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @sum(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}