xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int getLine(FILE *fp) {
  int ch, c = 0;
  while ((ch = fgetc(fp)) != EOF)
    if (ch == '\n')
      c++;
  rewind(fp);
  return c;
}


x86 assembly (clang, -O0):
<getLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%eax
je     1166 <getLine+0x46>
cmpl   $0xa,-0xc(%rbp)
jne    1161 <getLine+0x41>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <getLine+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLine>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1040 <fgetc@plt>
mov    0x2eb5(%rip),%r14
xor    %ebp,%ebp
cmp    (%r14),%eax
je     1157 <getLine+0x37>
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebp
mov    %rbx,%rdi
call   1040 <fgetc@plt>
cmp    (%r14),%eax
jne    1140 <getLine+0x20>
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @getLine(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %3
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %5
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 10
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %10
br label %5
17: ; preds = %5
%18 = load i32*, i32** %2
%19 = call i32 @rewind(i32* %18)
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @getLine(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ %2, %1 ]
%7 = phi i32 [ %10, %5 ], [ 0, %1 ]
%8 = icmp eq i32 %6, 10
%9 = zext i1 %8 to i32
%10 = add nuw nsw i32 %7, %9
%11 = tail call i32 @fgetc(i32* %0)
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %5
14: ; preds = %5, %1
%15 = phi i32 [ 0, %1 ], [ %10, %5 ]
%16 = tail call i32 @rewind(i32* %0)
ret i32 %15
}
void ff_hevc_put_hevc_bi_w_qpel_v8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_v8_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int square(int);
void fig05_06() {
  int a = 10;
  printf("%d square: %d\n", a, square(a));
}


x86 assembly (clang, -O0):
<fig05_06>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <square@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fig05_06>:
push   %rax
mov    $0xa,%edi
call   1030 <square@plt>
lea    0xece(%rip),%rdi
mov    $0xa,%esi
mov    %eax,%edx
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d square: %d\0A\00"
define void @fig05_06() {
%1 = tail call i32 @square(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i32 %1)
ret void
}
/* Variables and functions */
char *strdup(char const *);
char *javacall_strdup(const char *str) { return strdup(str); }


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

x86 assembly (clang, -O2):
<javacall_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @javacall_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int between(int /*<<< orphan*/, char, char);
int num(char c) { return between('0', '9', c); }


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

x86 assembly (clang, -O2):
<num>:
mov    %edi,%edx
mov    $0x30,%edi
mov    $0x39,%esi
jmp    1030 <between@plt>

LLVM IR (-O0):
define i32 @num(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @between(i32 48, i8 signext 57, i8 signext %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @num(i8 signext %0) {
%2 = tail call i32 @between(i32 48, i8 signext 57, i8 signext %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int *);
main() {
  int s, c, x;
  char a[] = "c";
  f(&s);
  a[c = 0] = s == 0 ? (x = 1, 'a') : (x = 2, 'b');
  if (a[c] != 'a')
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <f@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1171 <main+0x41>
movl   $0x1,-0x10(%rbp)
mov    $0x61,%eax
mov    %eax,-0x18(%rbp)
jmp    1180 <main+0x50>
movl   $0x2,-0x10(%rbp)
mov    $0x62,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
movl   $0x0,-0xc(%rbp)
mov    %al,-0x12(%rbp)
movslq -0xc(%rbp),%rax
movsbl -0x12(%rbp,%rax,1),%eax
cmp    $0x61,%eax
je     11a6 <main+0x76>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <f@plt>
cmpl   $0x0,0x4(%rsp)
jne    1149 <main+0x19>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [2 x i8] c"c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i8]
store i32 0, i32* %1
%6 = bitcast [2 x i8]* %5 to i8*
%7 = call i32 @f(i32* %2)
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %4
br label %12
11: ; preds = %0
store i32 2, i32* %4
br label %12
12: ; preds = %11, %10
%13 = phi i32 [ 97, %10 ], [ 98, %11 ]
%14 = trunc i32 %13 to i8
store i32 0, i32* %3
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %14, i8* %15
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 97
br i1 %21, label %22, label %24
22: ; preds = %12
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %12
%25 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @f(i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_port;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  scalar_t__ sa_family;
};
typedef int /*<<< orphan*/ in_port_t;

/* Variables and functions */
scalar_t__ AF_INET;
in_port_t get_in_port(const struct sockaddr *sa) {
  if (sa->sa_family == AF_INET)
    return ((struct sockaddr_in *)sa)->sin_port;
  return ((struct sockaddr_in6 *)sa)->sin6_port;
}


x86 assembly (clang, -O0):
<get_in_port>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112d <get_in_port+0x2d>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <get_in_port+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_in_port>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@AF_INET = global i64 0
define i32 @get_in_port(%struct.sockaddr* %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = load i64, i64* @AF_INET
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load %struct.sockaddr*, %struct.sockaddr** %3
%11 = bitcast %struct.sockaddr* %10 to %struct.sockaddr_in*
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %2
br label %19
14: ; preds = %1
%15 = load %struct.sockaddr*, %struct.sockaddr** %3
%16 = bitcast %struct.sockaddr* %15 to %struct.sockaddr_in6*
%17 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %16, i32 0, i32 0
%18 = load i32, i32* %17
store i32 %18, i32* %2
br label %19
19: ; preds = %14, %9
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
%struct.sockaddr = type { i64 }
@AF_INET = global i64 0
define i32 @get_in_port(%struct.sockaddr* nocapture %0) {
%2 = bitcast %struct.sockaddr* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void generate_salt(const char *password, char *salt) {
  salt[0] = password[1];
  salt[1] = password[2];
  salt[2] = 'H';
  salt[3] = '.';
  salt[4] = '\0';
}


x86 assembly (clang, -O0):
<generate_salt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x48,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2e,0x3(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_salt>:
mov    0x1(%rdi),%al
mov    %al,(%rsi)
mov    0x2(%rdi),%al
mov    %al,0x1(%rsi)
movw   $0x2e48,0x2(%rsi)
movb   $0x0,0x4(%rsi)
ret

LLVM IR (-O0):
define void @generate_salt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 2
store i8 72, i8* %16
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 3
store i8 46, i8* %18
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 4
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
define void @generate_salt(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = getelementptr inbounds i8, i8* %1, i64 2
store i8 72, i8* %8
%9 = getelementptr inbounds i8, i8* %1, i64 3
store i8 46, i8* %9
%10 = getelementptr inbounds i8, i8* %1, i64 4
store i8 0, i8* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void version() {
  printf("'ga_reads_region' in genome analysis tools version: %d.%d.%d\n", 1, 0,
         0);
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"'ga_reads_region' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [62 x i8] c"'ga_reads_region' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int sayi_oku() {
  int r;
  printf("sayi girin:");
  scanf("%d", &r);
  return r;
}


x86 assembly (clang, -O0):
<sayi_oku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sayi_oku>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"sayi girin:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @sayi_oku() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [12 x i8] c"sayi girin:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @sayi_oku() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
scalar_t__ ptsname_r(int, char *, int);
char *ptsname(int fd) {
  static char buf[64];
  return ptsname_r(fd, buf, sizeof(buf)) == 0 ? buf : NULL;
}


x86 assembly (clang, -O0):
<ptsname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
mov    $0x40,%edx
call   1030 <ptsname_r@plt>
mov    %rax,%rdx
xor    %eax,%eax
lea    0x2f05(%rip),%rcx
cmp    $0x0,%rdx
cmove  %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptsname>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
mov    $0x40,%edx
call   1030 <ptsname_r@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ptsname.buf = internal global [64 x i8] zeroinitializer
define i8* @ptsname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ptsname_r(i32 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @ptsname.buf, i64 0, i64 0), i32 64)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @ptsname.buf, i64 0, i64 0), i8* null
ret i8* %7
}

LLVM IR (-O2):
@ptsname.buf = internal global [64 x i8] zeroinitializer
define i8* @ptsname(i32 %0) {
%2 = tail call i64 @ptsname_r(i32 %0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @ptsname.buf, i64 0, i64 0), i32 64)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @ptsname.buf, i64 0, i64 0), i8* null
ret i8* %4
}
unsigned int is_symbol(unsigned char ch) {
  return ((('!' <= ch) && (ch <= '@')) || (('[' <= ch) && (ch <= '`')) ||
          (('{' <= ch) && (ch <= '~')));
}


x86 assembly (clang, -O0):
<is_symbol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0x21,%eax
cmp    %ecx,%eax
jg     112d <is_symbol+0x2d>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x40,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <is_symbol+0x79>
movzbl -0x1(%rbp),%ecx
mov    $0x5b,%eax
cmp    %ecx,%eax
jg     1150 <is_symbol+0x50>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x60,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <is_symbol+0x79>
movzbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x7b,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     1173 <is_symbol+0x73>
movzbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_symbol>:
lea    -0x21(%rdi),%eax
cmp    $0x20,%al
setb   %al
lea    -0x5b(%rdi),%ecx
cmp    $0x6,%cl
setb   %cl
or     %al,%cl
add    $0x85,%dil
cmp    $0x4,%dil
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_symbol(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sle i32 33, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 64
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = icmp sle i32 91, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = icmp sle i32 %16, 96
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = zext i8 %19 to i32
%21 = icmp sle i32 123, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = zext i8 %23 to i32
%25 = icmp sle i32 %24, 126
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_symbol(i8 zeroext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 32
%4 = add i8 %0, -91
%5 = icmp ult i8 %4, 6
%6 = or i1 %3, %5
%7 = add i8 %0, -123
%8 = icmp ult i8 %7, 4
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int bind(int, struct sockaddr const *, int /*<<< orphan*/);
int plat_bind(int s, const struct sockaddr *my_addr, socklen_t addrlen) {
  return (bind(s, my_addr, addrlen));
}


x86 assembly (clang, -O0):
<plat_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bind@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_bind>:
jmp    1030 <bind@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @plat_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32, i32* %6
%10 = call i32 @bind(i32 %7, %struct.sockaddr* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @plat_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
char tolower(char);
int SetToLowercase(char *Text) {
  int i;
  for (i = 0; Text[i] != 0x00; i++) {
    Text[i] = tolower(Text[i]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<SetToLowercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
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     1164 <SetToLowercase+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <SetToLowercase+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetToLowercase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <SetToLowercase+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <SetToLowercase+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @SetToLowercase(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %23, %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 %26
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call signext i8 @tolower(i8 signext %17)
%19 = load i8*, i8** %2
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 %18, i8* %22
br label %23
23: ; preds = %12
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %4
26: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @SetToLowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = tail call signext i8 @tolower(i8 signext %6)
store i8 %8, i8* %7
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret i32 0
}
void secuenciaConfiguracion() {}


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

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

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

LLVM IR (-O2):
define void @secuenciaConfiguracion() {
ret void
}
int main() {
  int arr[2];
  int *p;
  p = &arr[0];
  p += 1;
  *p = 123;
  if (arr[1] != 123)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x7b,(%rax)
cmpl   $0x7b,-0x8(%rbp)
je     113f <main+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <main+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca i32*
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32* %6, i32** %3
%7 = load i32*, i32** %3
store i32 123, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 123
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 1, i32* %1
br label %13
12: ; preds = %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
char *skipToNumeric(char *s) {
  while (*s != 0 && !isdigit(*s))
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<skipToNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skipToNumeric+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skipToNumeric+0x48>
jmp    1169 <skipToNumeric+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skipToNumeric+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipToNumeric>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <skipToNumeric+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
jne    1138 <skipToNumeric+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skipToNumeric+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skipToNumeric(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isdigit(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @skipToNumeric(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isdigit(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
unsigned int hta_test_constant_hash(void *key) {
  (void)key;
  return 4;
}


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

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

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

LLVM IR (-O2):
define i32 @hta_test_constant_hash(i8* nocapture readnone %0) {
ret i32 4
}
int btpic_clamp255(int x) {
  if (x < 0)
    return (x);
  if (x > 255)
    return (255);
  return (x);
}


x86 assembly (clang, -O0):
<btpic_clamp255>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111c <btpic_clamp255+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113b <btpic_clamp255+0x3b>
cmpl   $0xff,-0x8(%rbp)
jle    1135 <btpic_clamp255+0x35>
movl   $0xff,-0x4(%rbp)
jmp    113b <btpic_clamp255+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btpic_clamp255>:
cmp    $0xff,%edi
mov    $0xff,%eax
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @btpic_clamp255(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
ret i32 %3
}
/* Variables and functions */
unsigned char *blake224_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_blake224(unsigned char *out, const unsigned char *in,
                                    size_t in_len) {
  return blake224_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_blake224>:
jmp    1030 <blake224_buffer@plt>

LLVM IR (-O0):
define i8* @hash_buffer_blake224(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @blake224_buffer(i8* %7, i8* %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @hash_buffer_blake224(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @blake224_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ gotoxy(int, int);
void home() { gotoxy(1, 1); }


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

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

LLVM IR (-O0):
define void @home() {
%1 = call i32 @gotoxy(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @home() {
%1 = tail call i32 @gotoxy(i32 1, i32 1)
ret void
}
void ch(int x1) {
  ({
    bx:
      &&bx;
  });
  while (x1 == 0) {
  }
}


x86 assembly (clang, -O0):
<ch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x7(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1121 <ch+0x21>
jmp    1112 <ch+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch>:
test   %edi,%edi
je     1110 <ch+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <ch+0x10>

LLVM IR (-O0):
define void @ch(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
br label %4
4: ; preds = %11, %1
store i8* blockaddress(@ch, %4), i8** %3
%5 = load i8*, i8** %3
br label %6
6: ; preds = %9, %4
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
ret void
11: ; No predecessors!
indirectbr i8* undef, [label %4]
}

LLVM IR (-O2):
define void @ch(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, void *, void *);
int device_release(void *inode, void *file) {
  printk("device_release(%p,%p)\n", inode, file);
  return 0;
}


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

x86 assembly (clang, -O2):
<device_release>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"device_release(%p,%p)\0A\00"
define i32 @device_release(i8* %0, i8* %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 @printk(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"device_release(%p,%p)\0A\00"
define i32 @device_release(i8* %0, i8* %1) {
%3 = tail call i32 @printk(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 0
}
void good1(int *p, char buf[*p]) {
  (void)buf;
  (void)p;
}


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

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

LLVM IR (-O0):
define void @good1(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 = load i32, i32* %5
%7 = zext i32 %6 to i64
%8 = load i8*, i8** %4
%9 = load i32*, i32** %3
ret void
}

LLVM IR (-O2):
define void @good1(i32* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
double Ts_mu_fix(double, double);
double Ts_(double s, double alpha __attribute__((unused))) {
  return Ts_mu_fix(s, alpha);
}


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

x86 assembly (clang, -O2):
<Ts_>:
jmp    1030 <Ts_mu_fix@plt>

LLVM IR (-O0):
define double @Ts_(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @Ts_mu_fix(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Ts_(double %0, double %1) {
%3 = tail call double @Ts_mu_fix(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ubitmap_get_octets_len(size_t);
void ubitmap_clear_all(void *b, size_t len) {
  memset(b, 0, ubitmap_get_octets_len(len));
}


x86 assembly (clang, -O0):
<ubitmap_clear_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ubitmap_get_octets_len@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ubitmap_clear_all>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <ubitmap_get_octets_len@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @ubitmap_clear_all(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @ubitmap_get_octets_len(i64 %6)
%8 = call i32 @memset(i8* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @ubitmap_clear_all(i8* %0, i64 %1) {
%3 = tail call i32 @ubitmap_get_octets_len(i64 %1)
%4 = tail call i32 @memset(i8* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_byte(int, int);
__attribute__((always_)) void patch_CAS_3_2_0_1219_extra(void) {
  put_byte(0x10084A63, 0xEA);
}


x86 assembly (clang, -O0):
<patch_CAS_3_2_0_1219_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10084a63,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_CAS_3_2_0_1219_extra>:
mov    $0x10084a63,%edi
mov    $0xea,%esi
jmp    1030 <put_byte@plt>

LLVM IR (-O0):
define void @patch_CAS_3_2_0_1219_extra() {
%1 = call i32 @put_byte(i32 268978787, i32 234)
ret void
}

LLVM IR (-O2):
define void @patch_CAS_3_2_0_1219_extra() {
%1 = tail call i32 @put_byte(i32 268978787, i32 234)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("Celsius to Fahrenheit:\n");
  printf("%3.1f -> %3.1f \n", 36.6, (9.0 / 5.0) * 36.6 + 32.0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Celsius to Fahrenheit:\0A\00"
@.str.1 = [17 x i8] c"%3.1f -> %3.1f \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double 3.660000e+01, double 0x40587851EB851EB9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"%3.1f -> %3.1f \0A\00"
@str = [23 x i8] c"Celsius to Fahrenheit:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double 3.660000e+01, double 0x40587851EB851EB9)
ret i32 0
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int a = 2, i;
  for (i = 0; i < 3; i++) {
    printf("%d ", f(a));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1164 <main+0x44>
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
call   1030 <f@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <f@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <f@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @main() {
%1 = tail call i32 @f(i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @f(i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @f(i32 2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
int is_posix_like() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @is_posix_like() {
ret i32 1
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
float dds_lookupx(scalar_t__);
float dds_offsetf(uint32_t phase_acc, int32_t phase_offset) {
  return dds_lookupx(phase_acc + phase_offset);
}


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

x86 assembly (clang, -O2):
<dds_offsetf>:
add    %rsi,%rdi
jmp    1030 <dds_lookupx@plt>

LLVM IR (-O0):
define float @dds_offsetf(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = call float @dds_lookupx(i64 %7)
ret float %8
}

LLVM IR (-O2):
define float @dds_offsetf(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call float @dds_lookupx(i64 %3)
ret float %4
}
/* Variables and functions */
scalar_t__ pathnameToCacheSlot(char const *);
int pathnameInCache(const char *pathname) {
  return pathnameToCacheSlot(pathname) >= 0;
}


x86 assembly (clang, -O0):
<pathnameInCache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pathnameToCacheSlot@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathnameInCache>:
push   %rax
call   1030 <pathnameToCacheSlot@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pathnameInCache(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @pathnameToCacheSlot(i8* %3)
%5 = icmp sge i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @pathnameInCache(i8* %0) {
%2 = tail call i64 @pathnameToCacheSlot(i8* %0)
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
%5 = xor i32 %4, 1
ret i32 %5
}
/* Type definitions */
struct sysinfo {
  size_t sharedram;
};

/* Variables and functions */
int /*<<< orphan*/ sysinfo(struct sysinfo *);
size_t totalShared() {
  struct sysinfo info;
  sysinfo(&info);
  return info.sharedram;
}


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

x86 assembly (clang, -O2):
<totalShared>:
push   %rax
mov    %rsp,%rdi
call   1030 <sysinfo@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i64 }
define i64 @totalShared() {
%1 = alloca %struct.sysinfo
%2 = call i32 @sysinfo(%struct.sysinfo* %1)
%3 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i32 0, i32 0
%4 = load i64, i64* %3
ret i64 %4
}

LLVM IR (-O2):
%struct.sysinfo = type { i64 }
define i64 @totalShared() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
%4 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i64 0, i32 0
%5 = load i64, i64* %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void exatest_subtitle(const char *title, const char *subtible) {
  printf("\n");
  printf("**** %s %s ****\n", title, subtible);
}


x86 assembly (clang, -O0):
<exatest_subtitle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exatest_subtitle>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [17 x i8] c"**** %s %s ****\0A\00"
define void @exatest_subtitle(i8* %0, i8* %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int func(int, int *);
int main() {
  int asdf = 3;
  return asdf + func(4, &asdf) + asdf;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x4,%edi
lea    -0x8(%rbp),%rsi
call   1030 <func@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edi
call   1030 <func@plt>
mov    0x4(%rsp),%ecx
add    %ecx,%eax
add    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @func(i32 4, i32* %2)
%5 = add nsw i32 %3, %4
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%3 = call i32 @func(i32 4, i32* %1)
%4 = add nsw i32 %3, 3
%5 = load i32, i32* %1
%6 = add nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("Usage: peek [-h] [-e file] [file]\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: peek [-h] [-e file] [file]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Usage: peek [-h] [-e file] [file]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int a_fun();
int b_fun();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int life = a_fun() + b_fun();
  printf("%d\n", life);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <a_fun@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <b_fun@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <a_fun@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <b_fun@plt>
add    %eax,%ebx
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @a_fun()
%4 = tail call i32 (...) @b_fun()
%5 = add nsw i32 %4, %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}