xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned char *enc64WithLines(unsigned char const *, unsigned int,
                              int /*<<< orphan*/, unsigned int *);
unsigned char *enc64(const unsigned char *inbuf, unsigned inlen,
                     unsigned *outlen) {
  return enc64WithLines(inbuf, inlen, 0, outlen);
}


x86 assembly (clang, -O0):
<enc64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
xor    %edx,%edx
call   1030 <enc64WithLines@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enc64>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <enc64WithLines@plt>

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

LLVM IR (-O2):
define i8* @enc64(i8* %0, i32 %1, i32* %2) {
%4 = tail call i8* @enc64WithLines(i8* %0, i32 %1, i32 0, i32* %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *programName) {
  printf("\n Usage: %s [Integer: 0 < # of Child Processes # < 20] [Integer: 0 "
         "< Sleep Time < 50] \n\n",
         programName);
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [89 x i8] c"\0A Usage: %s [Integer: 0 < # of Child Processes # < 20] [Integer: 0 < Sleep Time < 50] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [89 x i8] c"\0A Usage: %s [Integer: 0 < # of Child Processes # < 20] [Integer: 0 < Sleep Time < 50] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void case_utils_max() {
  assert(((1) > (3) ? (1) : (3)) == 3);
  assert(((1) > (-3) ? (1) : (-3)) == 1);
}


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

x86 assembly (clang, -O2):
<case_utils_max>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @case_utils_max() {
%1 = call i32 @assert(i32 1)
%2 = call i32 @assert(i32 1)
ret void
}

LLVM IR (-O2):
define void @case_utils_max() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_message();
int main() {
  int count;
  count = 0;
  while (count < 10) {
    show_message();
    count = count + 1;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <show_message@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
call   1030 <show_message@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @show_message()
%2 = tail call i32 (...) @show_message()
%3 = tail call i32 (...) @show_message()
%4 = tail call i32 (...) @show_message()
%5 = tail call i32 (...) @show_message()
%6 = tail call i32 (...) @show_message()
%7 = tail call i32 (...) @show_message()
%8 = tail call i32 (...) @show_message()
%9 = tail call i32 (...) @show_message()
%10 = tail call i32 (...) @show_message()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tmul_ok_32(int, int);
int largest_factorial_32(void) {
  int result = 1;
  int n = 1, overflow;
  for (;;) {
    n++;
    overflow = !tmul_ok_32(result, n);
    if (overflow)
      break;
    result *= n;
  }
  return n - 1;
}


x86 assembly (clang, -O0):
<largest_factorial_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <tmul_ok_32@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1159 <largest_factorial_32+0x49>
jmp    1168 <largest_factorial_32+0x58>
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <largest_factorial_32+0x16>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<largest_factorial_32>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <tmul_ok_32@plt>
test   %eax,%eax
je     1156 <largest_factorial_32+0x46>
mov    $0x1,%esi
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rsi),%ebx
imul   %ebx,%ebp
add    $0x2,%esi
mov    %ebp,%edi
call   1030 <tmul_ok_32@plt>
mov    %ebx,%esi
test   %eax,%eax
jne    1140 <largest_factorial_32+0x30>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @largest_factorial_32() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @tmul_ok_32(i32 %7, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %4
br label %20
16: ; preds = %4
%17 = load i32, i32* %2
%18 = load i32, i32* %1
%19 = mul nsw i32 %18, %17
store i32 %19, i32* %1
br label %4
20: ; preds = %15
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, 1
ret i32 %22
}

LLVM IR (-O2):
define i32 @largest_factorial_32() {
%1 = tail call i32 @tmul_ok_32(i32 1, i32 2)
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ 2, %0 ]
%5 = phi i32 [ %6, %3 ], [ 1, %0 ]
%6 = mul nuw nsw i32 %5, %4
%7 = add nuw nsw i32 %4, 1
%8 = tail call i32 @tmul_ok_32(i32 %6, i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %0
%11 = phi i32 [ 1, %0 ], [ %4, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handler(int signo) {
  printf("writer: get signal\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"writer: get signal\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"writer: get signal\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
_Bool a_b2(unsigned A, unsigned B) {
  return (__extension__({
           __typeof(A + B) R;
           if (__builtin_add_overflow(A, B, &R))
             __builtin_unreachable();
           R;
         })) >= B;
}


x86 assembly (clang, -O0):
<a_b2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
setb   %al
mov    %ecx,-0xc(%rbp)
test   $0x1,%al
jne    1123 <a_b2+0x23>
jmp    1123 <a_b2+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_b2>:
add    %esi,%edi
cmp    %esi,%edi
setae  %al
ret

LLVM IR (-O0):
define zeroext i1 @a_b2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %7, i32 %8)
%10 = extractvalue { i32, i1 } %9, 1
%11 = extractvalue { i32, i1 } %9, 0
store i32 %11, i32* %5
br i1 %10, label %12, label %13
12: ; preds = %2
unreachable
13: ; preds = %2
%14 = load i32, i32* %5
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp uge i32 %15, %16
ret i1 %17
}

LLVM IR (-O2):
define zeroext i1 @a_b2(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 1
%5 = extractvalue { i32, i1 } %3, 0
%6 = xor i1 %4, true
tail call void @llvm.assume(i1 %6)
%7 = icmp uge i32 %5, %1
ret i1 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a, b;
  a = 1;
  b = 2;
  if (a > b) {
    printf("%d > %d\n", a, b);
  } else {
    printf("%d > %d\n", b, a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1150 <main+0x40>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <main+0x52>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea3(%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
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d > %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 2, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *program) {
  printf("%s [M|D|S] [blkno] [generation]\n", program);
  printf("encodes a lockres name\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"%s [M|D|S] [blkno] [generation]\0A\00"
@.str.1 = [24 x i8] c"encodes a lockres name\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s [M|D|S] [blkno] [generation]\0A\00"
@str = [23 x i8] c"encodes a lockres name\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
char const *IcsGetLibVersion(void) { return "1.5.2"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.5.2\00"
define i8* @IcsGetLibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.5.2\00"
define i8* @IcsGetLibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int errno;
unsigned long long lseek64(int, unsigned long long, int /*<<< orphan*/);
int os_seek_file(int fd, unsigned long long offset) {
  unsigned long long actual;
  actual = lseek64(fd, offset, SEEK_SET);
  if (actual != offset)
    return -errno;
  return 0;
}


x86 assembly (clang, -O0):
<os_seek_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek64@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1159 <os_seek_file+0x49>
xor    %eax,%eax
mov    0x2e91(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <os_seek_file+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_seek_file>:
push   %rbx
mov    %rsi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek64@plt>
mov    0x2eb7(%rip),%rdx
xor    %ecx,%ecx
sub    (%rdx),%ecx
xor    %edx,%edx
cmp    %rbx,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
@errno = global i32 0
define i32 @os_seek_file(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
store i32 %0, i32* %4
store i64 %1, i64* %5
%7 = load i32, i32* %4
%8 = load i64, i64* %5
%9 = load i32, i32* @SEEK_SET
%10 = call i64 @lseek64(i32 %7, i64 %8, i32 %9)
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = load i64, i64* %5
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i32, i32* @errno
%16 = sub nsw i32 0, %15
store i32 %16, i32* %3
br label %18
17: ; preds = %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %14
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@errno = global i32 0
define i32 @os_seek_file(i32 %0, i64 %1) {
%3 = load i32, i32* @SEEK_SET
%4 = tail call i64 @lseek64(i32 %0, i64 %1, i32 %3)
%5 = icmp eq i64 %4, %1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _synctex_free(void *ptr) {
  if (ptr) {
    free(ptr);
  }
}


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

x86 assembly (clang, -O2):
<_synctex_free>:
test   %rdi,%rdi
je     111a <_synctex_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @_synctex_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
double asin(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.asin = [5 x i8] c"asin\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @asin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.asin, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.asin = [5 x i8] c"asin\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @asin(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.asin, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ ENOENT;
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
scalar_t__ errno;
int /*<<< orphan*/ *opendir(char const *);
int dir_exists(const char *path) {
  DIR *dir = opendir(path);
  if (dir) {
    closedir(dir);
    return 0;
  } else if (ENOENT == errno) {
    return 1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<dir_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <dir_exists+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x0,-0x4(%rbp)
jmp    1186 <dir_exists+0x66>
mov    0x2e70(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    117f <dir_exists+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1186 <dir_exists+0x66>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_exists>:
push   %rax
call   1030 <opendir@plt>
test   %rax,%rax
je     1137 <dir_exists+0x17>
mov    %rax,%rdi
call   1040 <closedir@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    0x2e98(%rip),%rcx
xor    %edx,%edx
cmp    (%rcx),%rax
sete   %dl
lea    (%rdx,%rdx,1),%eax
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOENT = global i64 0
@errno = global i64 0
define i32 @dir_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @opendir(i8* %5)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @closedir(i32* %10)
store i32 0, i32* %2
br label %18
12: ; preds = %1
%13 = load i64, i64* @ENOENT
%14 = load i64, i64* @errno
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %18
17: ; preds = %12
store i32 -1, i32* %2
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@ENOENT = global i64 0
@errno = global i64 0
define i32 @dir_exists(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %11
6: ; preds = %1
%7 = load i64, i64* @ENOENT
%8 = load i64, i64* @errno
%9 = icmp eq i64 %7, %8
%10 = select i1 %9, i32 1, i32 -1
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ 0, %4 ], [ %10, %6 ]
ret i32 %12
}
void SXNET_add_id_ulong(void) {}


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

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

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

LLVM IR (-O2):
define void @SXNET_add_id_ulong() {
ret void
}
/* Variables and functions */
int bar();
int foo();
int foobar() { return foo() + bar(); }


x86 assembly (clang, -O0):
<foobar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foobar>:
push   %rbx
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <bar@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foobar() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @bar()
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @foobar() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @bar()
%3 = add nsw i32 %2, %1
ret i32 %3
}
int _get_father(int pos) {
  if (pos)
    return (pos - 1) / 2;
  return -1;
}


x86 assembly (clang, -O0):
<_get_father>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1127 <_get_father+0x27>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    112e <_get_father+0x2e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_father>:
test   %edi,%edi
je     1114 <_get_father+0x14>
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @_get_father(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = sdiv i32 %4, 2
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ -1, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int intern_printf(char *, int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vsprintf(char *buf, const char *fmt, va_list ap) {
  return intern_printf(buf, 0, fmt, ap);
}


x86 assembly (clang, -O0):
<vsprintf>:
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),%rdx
mov    -0x14(%rbp),%ecx
xor    %esi,%esi
call   1030 <intern_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <intern_printf@plt>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @intern_printf(i8* %0, i32 0, i8* %1, i32 %2)
ret i32 %4
}
void stopMonitoringLeds(void) {}


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

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

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

LLVM IR (-O2):
define void @stopMonitoringLeds() {
ret void
}
int h3(int x) { return x; }


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

x86 assembly (clang, -O2):
<h3>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @h3(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sum = 0;
  for (int i = 1; i <= 100; i++) {
    sum += i;
  }
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jg     114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea8(%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
mov    $0x13ba,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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


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

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

LLVM IR (-O0):
define i32 @fun1041() {
ret i32 1041
}

LLVM IR (-O2):
define i32 @fun1041() {
ret i32 1041
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *pname) {
  fprintf(stderr, "Usage: ");
  fprintf(stderr,
          "to_erl [-h|-F] %s\n"
          "\t-h\tThis help text.\n"
          "\t-f\tForce connection even though pipe is locked by other to_erl "
          "process.",
          pname);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecf(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"Usage: \00"
@.str.1 = [111 x i8] c"to_erl [-h|-F] %s\0A\09-h\09This help text.\0A\09-f\09Force connection even though pipe is locked by other to_erl process.\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"Usage: \00"
@.str.1 = [111 x i8] c"to_erl [-h|-F] %s\0A\09-h\09This help text.\0A\09-f\09Force connection even though pipe is locked by other to_erl process.\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int msgu_int_cmp(const void *a, const void *b) {
  const int *ia = a;
  const int *ib = b;
  return (*ia < *ib) ? -1 : (*ia > *ib);
}


x86 assembly (clang, -O0):
<msgu_int_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    113b <msgu_int_cmp+0x3b>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1152 <msgu_int_cmp+0x52>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgu_int_cmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @msgu_int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %24
17: ; preds = %2
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = load i32*, i32** %6
%21 = load i32, i32* %20
%22 = icmp sgt i32 %19, %21
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %17, %16
%25 = phi i32 [ -1, %16 ], [ %23, %17 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @msgu_int_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp sgt i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void pcre_delim2SLASH() {}


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

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

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

LLVM IR (-O2):
define void @pcre_delim2SLASH() {
ret void
}
int test_imm_77int16_mem(short *val) {
  return ((*val) & (-0x77 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_77int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff89,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_77int16_mem>:
movzwl (%rdi),%eax
test   $0xff89,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_77int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -119
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_77int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -119
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_t1ha64s_finalise(int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_t1ha64s_fmix1(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_t1ha64s_init(int, uintptr_t, int /*<<< orphan*/ *);
uint64_t rgph_u64_t1ha64s_u8(uint8_t value, uintptr_t seed) {
  uint64_t h[4];
  rgph_t1ha64s_init(sizeof(value), seed, h);
  rgph_t1ha64s_fmix1(value, h);
  return rgph_t1ha64s_finalise(h);
}


x86 assembly (clang, -O0):
<rgph_u64_t1ha64s_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x4,%edi
call   1030 <rgph_t1ha64s_init@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1050 <rgph_t1ha64s_fmix1@plt>
lea    -0x20(%rbp),%rdi
call   1040 <rgph_t1ha64s_finalise@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u64_t1ha64s_u8>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
mov    $0x4,%edi
mov    %r14,%rdx
call   1030 <rgph_t1ha64s_init@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <rgph_t1ha64s_fmix1@plt>
mov    %r14,%rdi
call   1040 <rgph_t1ha64s_finalise@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @rgph_u64_t1ha64s_u8(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [4 x i32]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%8 = call i32 @rgph_t1ha64s_init(i32 4, i64 %6, i32* %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%11 = call i32 @rgph_t1ha64s_fmix1(i32 %9, i32* %10)
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%13 = call i32 @rgph_t1ha64s_finalise(i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @rgph_u64_t1ha64s_u8(i32 %0, i64 %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @rgph_t1ha64s_init(i32 4, i64 %1, i32* %5)
%7 = call i32 @rgph_t1ha64s_fmix1(i32 %0, i32* %5)
%8 = call i32 @rgph_t1ha64s_finalise(i32* %5)
ret i32 %8
}
__attribute__((visibility("default"))) const char *utf8proc_version(void) {
  return "2"
         "."
         "4"
         "."
         "0"
         "";
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"2.4.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"2.4.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x, y, i, j, t, r;
  i = 10;
  j = 20;
  t = -100;
  r = 30;
  x = ((i > j) ? (i) : (j));
  y = ((t < r) ? (t) : (r));
  printf("min:%d max:%d\n", y, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0xffffff9c,-0x18(%rbp)
movl   $0x1e,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1152 <main+0x42>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1158 <main+0x48>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1175 <main+0x65>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    117b <main+0x6b>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"min:%d max:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %4
store i32 20, i32* %5
store i32 -100, i32* %6
store i32 30, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = load i32, i32* %4
br label %15
13: ; preds = %0
%14 = load i32, i32* %5
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
store i32 %16, i32* %2
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = load i32, i32* %6
br label %24
22: ; preds = %15
%23 = load i32, i32* %7
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
store i32 %25, i32* %3
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %26, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"min:%d max:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 -100, i32 20)
ret i32 0
}
/* Type definitions */
struct teredo_packet {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ MSG_DONTWAIT;
int teredo_recv_inner(int, struct teredo_packet *, int /*<<< orphan*/);
int teredo_recv(int fd, struct teredo_packet *p) {
  return teredo_recv_inner(fd, p, MSG_DONTWAIT);
}


x86 assembly (clang, -O0):
<teredo_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
call   1030 <teredo_recv_inner@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<teredo_recv>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <teredo_recv_inner@plt>

LLVM IR (-O0):
%struct.teredo_packet = type { i32 }
@MSG_DONTWAIT = global i32 0
define i32 @teredo_recv(i32 %0, %struct.teredo_packet* %1) {
%3 = alloca i32
%4 = alloca %struct.teredo_packet*
store i32 %0, i32* %3
store %struct.teredo_packet* %1, %struct.teredo_packet** %4
%5 = load i32, i32* %3
%6 = load %struct.teredo_packet*, %struct.teredo_packet** %4
%7 = load i32, i32* @MSG_DONTWAIT
%8 = call i32 @teredo_recv_inner(i32 %5, %struct.teredo_packet* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.teredo_packet = type { i32 }
@MSG_DONTWAIT = global i32 0
define i32 @teredo_recv(i32 %0, %struct.teredo_packet* %1) {
%3 = load i32, i32* @MSG_DONTWAIT
%4 = tail call i32 @teredo_recv_inner(i32 %0, %struct.teredo_packet* %1, i32 %3)
ret i32 %4
}
double speci(R, gx)
double R, gx;
{
  double y = 0.0;
  double b;
  b = gx * gx;
  y = 1.0 + gx + .5 * b;
  y = y + b * R;
  return (y);
}


x86 assembly (clang, -O0):
<speci>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xedb(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xec1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<speci>:
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xef0(%rip),%xmm1
movsd  0xef0(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @speci(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
store double %9, double* %6
%10 = load double, double* %4
%11 = fadd double 1.000000e+00, %10
%12 = load double, double* %6
%13 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %12, double %11)
store double %13, double* %5
%14 = load double, double* %5
%15 = load double, double* %6
%16 = load double, double* %3
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double %14)
store double %17, double* %5
%18 = load double, double* %5
ret double %18
}

LLVM IR (-O2):
define double @speci(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fadd double %1, 1.000000e+00
%5 = tail call double @llvm.fmuladd.f64(double %3, double 5.000000e-01, double %4)
%6 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %5)
ret double %6
}
volatile char *build_pop_reg(int reg_index, int x86_64f,
                             volatile char *tgt_addr) {
  if (x86_64f) {
    (*(char *)tgt_addr) = (0x40 | 0x1);
    tgt_addr += 0x1;
  }
  (*(char *)tgt_addr) = 0x58 + reg_index;
  ;
  tgt_addr += 0x1;
  return (tgt_addr);
}


x86 assembly (clang, -O0):
<build_pop_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112b <build_pop_reg+0x2b>
mov    -0x10(%rbp),%rax
movb   $0x41,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x58,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_pop_reg>:
mov    %rdx,%rax
test   %esi,%esi
je     110e <build_pop_reg+0xe>
movb   $0x41,(%rax)
add    $0x1,%rax
add    $0x58,%dil
mov    %dil,(%rax)
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i8* @build_pop_reg(i32 %0, i32 %1, i8* writeonly %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
store i8 65, i8* %2
%6 = getelementptr inbounds i8, i8* %2, i64 1
br label %7
7: ; preds = %5, %3
%8 = phi i8* [ %6, %5 ], [ %2, %3 ]
%9 = trunc i32 %0 to i8
%10 = add i8 %9, 88
store i8 %10, i8* %8
%11 = getelementptr inbounds i8, i8* %8, i64 1
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a;
  int b;
  printf("%d %d %d\n", b = 6, a = 5, a + b);
  printf("%d %d %d", a + b, b = 6, a = 5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x6,%esi
mov    $0x5,%edx
mov    $0xb,%ecx
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xb,%esi
mov    $0x6,%edx
mov    $0x5,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 6, i32 5, i32 11)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 6, i32 5)
ret i32 0
}
/* Type definitions */
typedef int time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gmtime_r(int *, struct tm *);
void get_tm(time_t t, int utc_offset, struct tm *tm) {
  t += utc_offset;
  gmtime_r(&t, tm);
}


x86 assembly (clang, -O0):
<get_tm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x4(%rbp),%rdi
call   1030 <gmtime_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tm>:
push   %rax
add    %esi,%edi
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    %rdx,%rsi
call   1030 <gmtime_r@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @get_tm(i32 %0, i32 %1, %struct.tm* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.tm*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.tm* %2, %struct.tm** %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = add nsw i32 %8, %7
store i32 %9, i32* %4
%10 = load %struct.tm*, %struct.tm** %6
%11 = call i32 @gmtime_r(i32* %4, %struct.tm* %10)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @get_tm(i32 %0, i32 %1, %struct.tm* %2) {
%4 = alloca i32
%5 = add nsw i32 %1, %0
store i32 %5, i32* %4
%6 = call i32 @gmtime_r(i32* %4, %struct.tm* %2)
ret void
}