xunge/DecIR huggingface dataset:
int get_len(char s[]) {
  int i = 0;
  while (*(s + i) != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<get_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <get_len+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%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
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ endmntent(int /*<<< orphan*/ *);
void closeMountsTable(FILE *table) { endmntent(table); }


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

x86 assembly (clang, -O2):
<closeMountsTable>:
jmp    1030 <endmntent@plt>

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

LLVM IR (-O2):
define void @closeMountsTable(i32* %0) {
%2 = tail call i32 @endmntent(i32* %0)
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int memcmp(struct in6_addr const *, struct in6_addr const *, int);
int ls_addr_cmp6(const struct in6_addr *a, const struct in6_addr *b) {
  return memcmp(a, b, sizeof(struct in6_addr));
}


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

x86 assembly (clang, -O2):
<ls_addr_cmp6>:
mov    $0x4,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
define i32 @ls_addr_cmp6(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = tail call i32 @memcmp(%struct.in6_addr* %0, %struct.in6_addr* %1, i32 4)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, long);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void set_brightness(FILE *sysfs_fp, long int brightness_value) {
  rewind(sysfs_fp);
  if (fprintf(sysfs_fp, "%ld", brightness_value) < 0) {
    err(1, "Error writing brightness to sysfs");
  }
}


x86 assembly (clang, -O0):
<set_brightness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jge    1178 <set_brightness+0x48>
mov    $0x1,%edi
lea    0xe91(%rip),%rsi
call   1050 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_brightness>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <rewind@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <fprintf@plt>
test   %rax,%rax
js     115e <set_brightness+0x2e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe9f(%rip),%rsi
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <err@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [34 x i8] c"Error writing brightness to sysfs\00"
define void @set_brightness(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = call i32 @rewind(i32* %5)
%7 = load i32*, i32** %3
%8 = load i64, i64* %4
%9 = call i64 @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @err(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [34 x i8] c"Error writing brightness to sysfs\00"
define void @set_brightness(i32* nocapture %0, i64 %1) {
%3 = tail call i32 @rewind(i32* %0)
%4 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ fork();
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
int main(void) {
  pid_t f, w;
  int status;
  printf("Processo principal (PID=%u)\n", getpid());
  while (1) {
    f = fork();
    sleep(10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x8(%rbp)
mov    $0xa,%edi
call   1050 <sleep@plt>
jmp    1164 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <fork@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
@.str = [29 x i8] c"Processo principal (PID=%u)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @getpid()
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %0, %7
%8 = call i32 (...) @fork()
store i32 %8, i32* %2
%9 = call i32 @sleep(i32 10)
br label %7
}

LLVM IR (-O2):
@.str = [29 x i8] c"Processo principal (PID=%u)\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @fork()
%5 = tail call i32 @sleep(i32 10)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ vector_only_slot_free(void *);
void vector_only_index_free(void *slot) { vector_only_slot_free(slot); }


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

x86 assembly (clang, -O2):
<vector_only_index_free>:
jmp    1030 <vector_only_slot_free@plt>

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

LLVM IR (-O2):
define void @vector_only_index_free(i8* %0) {
%2 = tail call i32 @vector_only_slot_free(i8* %0)
ret void
}
void entity_Tick(void) {}


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

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

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

LLVM IR (-O2):
define void @entity_Tick() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_clear_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_dup_m1(int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_mod(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_new();
BIGNUM *n_mod_p_m1(BIGNUM *n, BIGNUM *p, BN_CTX *ctx) {
  BIGNUM *p_m1 = BN_dup_m1(p);
  BIGNUM *ret = BN_new();
  BN_mod(ret, n, p_m1, ctx);
  BN_clear_free(p_m1);
  return ret;
}


x86 assembly (clang, -O0):
<n_mod_p_m1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <BN_dup_m1@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1050 <BN_mod@plt>
mov    -0x20(%rbp),%rdi
call   1060 <BN_clear_free@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_mod_p_m1>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <BN_dup_m1@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
call   1050 <BN_mod@plt>
mov    %r12,%rdi
call   1060 <BN_clear_free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @n_mod_p_m1(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i32*, i32** %5
%10 = call i32* @BN_dup_m1(i32* %9)
store i32* %10, i32** %7
%11 = call i32* (...) @BN_new()
store i32* %11, i32** %8
%12 = load i32*, i32** %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %7
%15 = load i32*, i32** %6
%16 = call i32 @BN_mod(i32* %12, i32* %13, i32* %14, i32* %15)
%17 = load i32*, i32** %7
%18 = call i32 @BN_clear_free(i32* %17)
%19 = load i32*, i32** %8
ret i32* %19
}

LLVM IR (-O2):
define i32* @n_mod_p_m1(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32* @BN_dup_m1(i32* %1)
%5 = tail call i32* (...) @BN_new()
%6 = tail call i32 @BN_mod(i32* %5, i32* %0, i32* %4, i32* %2)
%7 = tail call i32 @BN_clear_free(i32* %4)
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void sig_usr2(int signo) {
  printf("SIGUSR2%% \n");
  printf("Sleeping for 10 seconds \n");
  sleep(10);
  printf("Out of SIGUSR2%% \n");
}


x86 assembly (clang, -O0):
<sig_usr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_usr2>:
push   %rax
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
lea    0xea6(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"SIGUSR2%% \0A\00"
@.str.1 = [26 x i8] c"Sleeping for 10 seconds \0A\00"
@.str.2 = [19 x i8] c"Out of SIGUSR2%% \0A\00"
define void @sig_usr2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @sleep(i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"SIGUSR2%% \0A\00"
@.str.2 = [19 x i8] c"Out of SIGUSR2%% \0A\00"
@str = [25 x i8] c"Sleeping for 10 seconds \00"
define void @sig_usr2(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 10)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgNum();
int /*<<< orphan*/ ArgText();
int /*<<< orphan*/ SetFlag(int /*<<< orphan*/, int);
char *TextOf(int /*<<< orphan*/);
scalar_t__ strlen(char *);
void Act_LenText(void) {
  char *t = TextOf(ArgText());
  SetFlag(ArgNum(), (int)strlen(t));
}


x86 assembly (clang, -O0):
<Act_LenText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <ArgText@plt>
mov    %eax,%edi
call   1070 <TextOf@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <ArgNum@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <SetFlag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_LenText>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <ArgText@plt>
mov    %eax,%edi
call   1070 <TextOf@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <ArgNum@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <SetFlag@plt>

LLVM IR (-O0):
define void @Act_LenText() {
%1 = alloca i8*
%2 = call i32 (...) @ArgText()
%3 = call i8* @TextOf(i32 %2)
store i8* %3, i8** %1
%4 = call i32 (...) @ArgNum()
%5 = load i8*, i8** %1
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
%8 = call i32 @SetFlag(i32 %4, i32 %7)
ret void
}

LLVM IR (-O2):
define void @Act_LenText() {
%1 = tail call i32 (...) @ArgText()
%2 = tail call i8* @TextOf(i32 %1)
%3 = tail call i32 (...) @ArgNum()
%4 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @SetFlag(i32 %3, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void string_free(void *a) { free((char *)a); }


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

x86 assembly (clang, -O2):
<string_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @string_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int test_trueThreeFourths(int x) {
  long long int x3 = (long long int)x * 3;
  return (int)(x3 / 4);
}


x86 assembly (clang, -O0):
<test_trueThreeFourths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
imul   $0x3,%rax,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_trueThreeFourths>:
movslq %edi,%rax
lea    (%rax,%rax,2),%rcx
lea    (%rax,%rax,2),%rax
add    $0x3,%rax
test   %rcx,%rcx
cmovns %rcx,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @test_trueThreeFourths(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul nsw i64 %5, 3
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = sdiv i64 %7, 4
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_trueThreeFourths(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, 3
%4 = sdiv i64 %3, 4
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ __le32;

/* Variables and functions */
int /*<<< orphan*/ le32toh(int /*<<< orphan*/);
uint32_t le32_to_cpu(__le32 x) { return le32toh(x); }


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

x86 assembly (clang, -O2):
<le32_to_cpu>:
jmp    1030 <le32toh@plt>

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

LLVM IR (-O2):
define i32 @le32_to_cpu(i32 %0) {
%2 = tail call i32 @le32toh(i32 %0)
ret i32 %2
}
/* Variables and functions */
int my_put_long_int_base(long, int, int /*<<< orphan*/);
int my_put_long_int(long int li) { return (my_put_long_int_base(li, 10, 0)); }


x86 assembly (clang, -O0):
<my_put_long_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
xor    %edx,%edx
call   1030 <my_put_long_int_base@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put_long_int>:
mov    $0xa,%esi
xor    %edx,%edx
jmp    1030 <my_put_long_int_base@plt>

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

LLVM IR (-O2):
define i32 @my_put_long_int(i64 %0) {
%2 = tail call i32 @my_put_long_int_base(i64 %0, i32 10, i32 0)
ret i32 %2
}
signed long long f38(signed long long v_foo) {
  signed long long v_ashr = v_foo >> 32;
  signed long long v_shl = v_ashr << 5;
  return v_shl;
}


x86 assembly (clang, -O0):
<f38>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f38>:
mov    %rdi,%rax
sar    $0x1b,%rax
and    $0xffffffffffffffe0,%rax
ret

LLVM IR (-O0):
define i64 @f38(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = ashr i64 %5, 32
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = shl i64 %7, 5
store i64 %8, i64* %4
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
define i64 @f38(i64 %0) {
%2 = ashr i64 %0, 27
%3 = and i64 %2, -32
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void deallocate_String(char **s) {
  if (*s)
    free(*s);
  *s = 0;
}


x86 assembly (clang, -O0):
<deallocate_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <deallocate_String+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocate_String>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <deallocate_String+0x11>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @deallocate_String(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
br label %6
6: ; preds = %4, %1
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
int main(void) {
  char *str;
  str = "I do not fear computers. I fear the lack of them - Isaac Asimov\n";
  print_string(str);
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [65 x i8] c"I do not fear computers. I fear the lack of them - Isaac Asimov\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_string(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [65 x i8] c"I do not fear computers. I fear the lack of them - Isaac Asimov\0A\00"
define i32 @main() {
%1 = tail call i32 @print_string(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ enomem();
char *strdup(char const *);
char *estrdup(const char *str) {
  char *p;
  if ((p = strdup(str)) == NULL)
    enomem();
  return (p);
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114a <estrdup+0x2a>
mov    $0x0,%al
call   1030 <enomem@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <estrdup+0x15>
xor    %eax,%eax
call   1030 <enomem@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @enomem()
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @enomem()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
unsigned long long int
unsignedlonglongint_ignoring_longdouble(unsigned long long int x,
                                        long double y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedlonglongint_ignoring_longdouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedlonglongint_ignoring_longdouble>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlonglongint_ignoring_longdouble(i64 %0, x86_fp80 %1) {
%3 = alloca i64
%4 = alloca x86_fp80
store i64 %0, i64* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_longdouble(i64 returned %0, x86_fp80 %1) {
ret i64 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpf_t;

/* Variables and functions */
int /*<<< orphan*/ fp_euler_mascheroni_limit(int /*<<< orphan*/, int,
                                             unsigned int);
double log(unsigned int);
void fp_euler_mascheroni_compute(mpf_t gam, unsigned int prec) {
  double en = log(prec * 3.322);
  en = 1.442695041 * en;
  int n = (int)(en + 1.0);
  fp_euler_mascheroni_limit(gam, n, prec);
}


x86 assembly (clang, -O0):
<fp_euler_mascheroni_compute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,%edi
call   1040 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xead(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe93(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <fp_euler_mascheroni_limit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_euler_mascheroni_compute>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%eax
cvtsi2sd %rax,%xmm0
mulsd  0xeca(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <log@plt>
mulsd  0xec0(%rip),%xmm0
addsd  0xec0(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %ebp,%edi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fp_euler_mascheroni_limit@plt>

LLVM IR (-O0):
define void @fp_euler_mascheroni_compute(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = uitofp i32 %7 to double
%9 = fmul double %8, 3.322000e+00
%10 = fptoui double %9 to i32
%11 = call double @log(i32 %10)
store double %11, double* %5
%12 = load double, double* %5
%13 = fmul double 0x3FF715476533245E, %12
store double %13, double* %5
%14 = load double, double* %5
%15 = fadd double %14, 1.000000e+00
%16 = fptosi double %15 to i32
store i32 %16, i32* %6
%17 = load i32, i32* %3
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = call i32 @fp_euler_mascheroni_limit(i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @fp_euler_mascheroni_compute(i32 %0, i32 %1) {
%3 = uitofp i32 %1 to double
%4 = fmul double %3, 3.322000e+00
%5 = fptoui double %4 to i32
%6 = tail call double @log(i32 %5)
%7 = fmul double %6, 0x3FF715476533245E
%8 = fadd double %7, 1.000000e+00
%9 = fptosi double %8 to i32
%10 = tail call i32 @fp_euler_mascheroni_limit(i32 %0, i32 %9, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: testcall [-?] [-v] [-i] [-t SILENCE_THRESHOLD] [-s "
                  "SOUND_FILENAME] [-f OUTPUT_FILENAME] [-u USERNAME -p "
                  "PASSWORD -h HOST]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [130 x i8] c"Usage: testcall [-?] [-v] [-i] [-t SILENCE_THRESHOLD] [-s SOUND_FILENAME] [-f OUTPUT_FILENAME] [-u USERNAME -p PASSWORD -h HOST]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [130 x i8] c"Usage: testcall [-?] [-v] [-i] [-t SILENCE_THRESHOLD] [-s SOUND_FILENAME] [-f OUTPUT_FILENAME] [-u USERNAME -p PASSWORD -h HOST]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("天\n地\n人\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"\E5\A4\A9\0A\E5\9C\B0\0A\E4\BA\BA\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"\E5\A4\A9\0A\E5\9C\B0\0A\E4\BA\BA\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
unsigned int __builtin_arm_cls64(int /*<<< orphan*/);
unsigned int clsll(uint64_t v) { return __builtin_arm_cls64(v); }


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

x86 assembly (clang, -O2):
<clsll>:
jmp    1030 <__builtin_arm_cls64@plt>

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

LLVM IR (-O2):
define i32 @clsll(i32 %0) {
%2 = tail call i32 @__builtin_arm_cls64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ce_coroutine_pause(int);
void ce_coroutine_yield() { ce_coroutine_pause(3); }


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

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

LLVM IR (-O0):
define void @ce_coroutine_yield() {
%1 = call i32 @ce_coroutine_pause(i32 3)
ret void
}

LLVM IR (-O2):
define void @ce_coroutine_yield() {
%1 = tail call i32 @ce_coroutine_pause(i32 3)
ret void
}
int xmlUCSIsIdeographicDescriptionCharacters(int code) {
  return (((code >= 0x2FF0) && (code <= 0x2FFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsIdeographicDescriptionCharacters>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2ff0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsIdeographicDescriptionCharacters+0x26>
cmpl   $0x2fff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsIdeographicDescriptionCharacters>:
and    $0xfffffff0,%edi
xor    %eax,%eax
cmp    $0x2ff0,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsIdeographicDescriptionCharacters(i32 %0) {
%2 = and i32 %0, -16
%3 = icmp eq i32 %2, 12272
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __dev_setupPortMapping(int);
int /*<<< orphan*/ get_group_membership(int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_group_membership(int *);
void setupEth2pvc() {
  int mbr[5];
  get_group_membership(mbr);
  set_group_membership(&mbr[0]);
  __dev_setupPortMapping(1);
  printf("Port Mapping: Ethernet to pvc mapping started\n");
}


x86 assembly (clang, -O0):
<setupEth2pvc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
call   1030 <get_group_membership@plt>
lea    -0x20(%rbp),%rdi
call   1060 <set_group_membership@plt>
mov    $0x1,%edi
call   1040 <__dev_setupPortMapping@plt>
lea    0xe95(%rip),%rdi
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupEth2pvc>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <get_group_membership@plt>
mov    %rbx,%rdi
call   1060 <set_group_membership@plt>
mov    $0x1,%edi
call   1050 <__dev_setupPortMapping@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Port Mapping: Ethernet to pvc mapping started\0A\00"
define void @setupEth2pvc() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%3 = call i32 @get_group_membership(i32* %2)
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 @set_group_membership(i32* %4)
%6 = call i32 @__dev_setupPortMapping(i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"Port Mapping: Ethernet to pvc mapping started\00"
define void @setupEth2pvc() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @get_group_membership(i32* %3)
%5 = call i32 @set_group_membership(i32* %3)
%6 = call i32 @__dev_setupPortMapping(i32 1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fail_and_exit();
int vasprintf(char **, char const *, int /*<<< orphan*/);
int cc_vasprintf(char **string, const char *format, va_list arguments) {
  int result = vasprintf(string, format, arguments);
  if (-1 == result)
    fail_and_exit();
  ;
  return result;
}


x86 assembly (clang, -O0):
<cc_vasprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <vasprintf@plt>
mov    %eax,-0x18(%rbp)
mov    $0xffffffff,%eax
cmp    -0x18(%rbp),%eax
jne    115b <cc_vasprintf+0x3b>
mov    $0x0,%al
call   1040 <fail_and_exit@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_vasprintf>:
push   %rbx
call   1030 <vasprintf@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1134 <cc_vasprintf+0x14>
xor    %eax,%eax
call   1040 <fail_and_exit@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cc_vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @vasprintf(i8** %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @fail_and_exit()
br label %8
8: ; preds = %6, %3
ret i32 %4
}
void ioh_convertToPlatform(char *path) {
  char *pathIndex;
  pathIndex = path;
  while (*pathIndex != '\0') {
    if ((*pathIndex == '\\' || *pathIndex == '/') && (*pathIndex != '/'))
      *pathIndex = '/';
    pathIndex++;
  }
}


x86 assembly (clang, -O0):
<ioh_convertToPlatform>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1168 <ioh_convertToPlatform+0x68>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1140 <ioh_convertToPlatform+0x40>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1157 <ioh_convertToPlatform+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1157 <ioh_convertToPlatform+0x57>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ioh_convertToPlatform+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioh_convertToPlatform>:
jmp    1117 <ioh_convertToPlatform+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x5c,%al
je     1110 <ioh_convertToPlatform+0x10>
test   %al,%al
jne    1113 <ioh_convertToPlatform+0x13>
ret

LLVM IR (-O0):
define void @ioh_convertToPlatform(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 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %30
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 92
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 47
br i1 %19, label %20, label %27
20: ; preds = %15, %10
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 47
br i1 %24, label %25, label %27
25: ; preds = %20
%26 = load i8*, i8** %3
store i8 47, i8* %26
br label %27
27: ; preds = %25, %20, %15
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
br label %5
30: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ioh_convertToPlatform(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 92, label %5
]
5: ; preds = %2
store i8 47, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int pow(int, double);
double PDFt4(double x, double m, double s) {
  double z = (x - m) / s, pdf;
  pdf = 3 / (4 * 1.414213562 * s) * pow(1 + z * z / 2, -2.5);
  return pdf;
}


x86 assembly (clang, -O0):
<PDFt4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xedd(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xec8(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xea5(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe79(%rip),%xmm0
call   1030 <pow@plt>
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDFt4>:
push   %rax
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
mulsd  0xedf(%rip),%xmm2
movsd  0xedf(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
mulsd  %xmm0,%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0xed2(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xece(%rip),%xmm0
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @PDFt4(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fsub double %9, %10
%12 = load double, double* %6
%13 = fdiv double %11, %12
store double %13, double* %7
%14 = load double, double* %6
%15 = fmul double 0x4016A09E6665983E, %14
%16 = fdiv double 3.000000e+00, %15
%17 = load double, double* %7
%18 = load double, double* %7
%19 = fmul double %17, %18
%20 = fdiv double %19, 2.000000e+00
%21 = fadd double 1.000000e+00, %20
%22 = fptosi double %21 to i32
%23 = call i32 @pow(i32 %22, double -2.500000e+00)
%24 = sitofp i32 %23 to double
%25 = fmul double %16, %24
store double %25, double* %8
%26 = load double, double* %8
ret double %26
}

LLVM IR (-O2):
define double @PDFt4(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fdiv double %4, %2
%6 = fmul double %2, 0x4016A09E6665983E
%7 = fdiv double 3.000000e+00, %6
%8 = fmul double %5, %5
%9 = fmul double %8, 5.000000e-01
%10 = fadd double %9, 1.000000e+00
%11 = fptosi double %10 to i32
%12 = tail call i32 @pow(i32 %11, double -2.500000e+00)
%13 = sitofp i32 %12 to double
%14 = fmul double %7, %13
ret double %14
}
int pathconN_nm4_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathconN_nm4_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathconN_nm4_n_out() {
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gluOrtho2D(float, int /*<<< orphan*/, float,
                              int /*<<< orphan*/);
void reshape(int w, int h) {
  glViewport(0, 0, (GLsizei)w, (GLsizei)h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluOrtho2D(0.0f, (GLdouble)w, 0.0f, (GLdouble)h);
}


x86 assembly (clang, -O0):
<reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1050 <gluOrtho2D@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reshape>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1060 <glViewport@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <gluOrtho2D@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @gluOrtho2D(float 0.000000e+00, i32 %11, float 0.000000e+00, i32 %12)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @gluOrtho2D(float 0.000000e+00, i32 %0, float 0.000000e+00, i32 %1)
ret void
}
int foo3() { return 10; }


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

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

LLVM IR (-O0):
define i32 @foo3() {
ret i32 10
}

LLVM IR (-O2):
define i32 @foo3() {
ret i32 10
}
/* Variables and functions */
int f49(int *);
int f50(int *p) { return f49(p); }


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

x86 assembly (clang, -O2):
<f50>:
jmp    1030 <f49@plt>

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

LLVM IR (-O2):
define i32 @f50(i32* %0) {
%2 = tail call i32 @f49(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int puts(const char *p) {
  fputs(p, stdout);
  putc('\n', stdout);
  return (0);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
call   1030 <fputs@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 @putc(i8 signext 10, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @putc(i8 signext 10, i32 %4)
ret i32 0
}
/* Variables and functions */
int x11_init();
int module_x11_init(void) { return x11_init(); }


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

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

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

LLVM IR (-O2):
define i32 @module_x11_init() {
%1 = tail call i32 (...) @x11_init()
ret i32 %1
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_wins_wstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_wins_wstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_wins_wstr+0x2a>
jmp    1170 <cmd_wins_wstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_wins_wstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_wins_wstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wins_wstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}