xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_move_current_multprec_to_next(int *cursor) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(458, cursor, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_move_current_multprec_to_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ca,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_move_current_multprec_to_next>:
mov    %rdi,%rsi
mov    $0x1ca,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_move_current_multprec_to_next(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 458, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_move_current_multprec_to_next(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 458, i32* %0, i32* undef, double* undef)
ret i32 %2
}
int over_state_resume(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @over_state_resume() {
ret i32 0
}
void foo025() {}


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

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

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

LLVM IR (-O2):
define void @foo025() {
ret void
}
/* Variables and functions */
int strcasecmp(char *, char *);
int compString(const void *p1, const void *p2) {
  return strcasecmp(*(char **)p1, *(char **)p2);
}


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

x86 assembly (clang, -O2):
<compString>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @compString(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcasecmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @compString(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ coin();
int *dynCastToInt(void *);
void testBranchReversed(void *p) {
  int *casted;
  if (coin()) {
    if (p)
      return;
    casted = (int *)p;
  } else {
    casted = dynCastToInt(p);
  }
  *casted = 1;
}


x86 assembly (clang, -O0):
<testBranchReversed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <coin@plt>
cmp    $0x0,%rax
je     115a <testBranchReversed+0x3a>
cmpq   $0x0,-0x8(%rbp)
je     114d <testBranchReversed+0x2d>
jmp    1171 <testBranchReversed+0x51>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1167 <testBranchReversed+0x47>
mov    -0x8(%rbp),%rdi
call   1040 <dynCastToInt@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBranchReversed>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <coin@plt>
test   %rax,%rax
je     1132 <testBranchReversed+0x12>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <dynCastToInt@plt>
movl   $0x1,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @testBranchReversed(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i64 (...) @coin()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %6
br label %18
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %3
br label %16
13: ; preds = %1
%14 = load i8*, i8** %2
%15 = call i32* @dynCastToInt(i8* %14)
store i32* %15, i32** %3
br label %16
16: ; preds = %13, %10
%17 = load i32*, i32** %3
store i32 1, i32* %17
br label %18
18: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @testBranchReversed(i8* %0) {
%2 = tail call i64 (...) @coin()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = icmp ne i8* %0, null
tail call void @llvm.assume(i1 %5)
br label %8
6: ; preds = %1
%7 = tail call i32* @dynCastToInt(i8* %0)
store i32 1, i32* %7
br label %8
8: ; preds = %4, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ switch_off_bits(unsigned char *, int);
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSC_BITSET_R2g_T1p5g(unsigned char *data) {
  switch_on_bits(data, (0x02 | 0x01));
  switch_off_bits(data, (0x10));
}


x86 assembly (clang, -O0):
<CTRL_REGSC_BITSET_R2g_T1p5g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <switch_on_bits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
call   1040 <switch_off_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CTRL_REGSC_BITSET_R2g_T1p5g>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%esi
call   1030 <switch_on_bits@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
pop    %rbx
jmp    1040 <switch_off_bits@plt>

LLVM IR (-O0):
define void @CTRL_REGSC_BITSET_R2g_T1p5g(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @switch_on_bits(i8* %3, i32 3)
%5 = load i8*, i8** %2
%6 = call i32 @switch_off_bits(i8* %5, i32 16)
ret void
}

LLVM IR (-O2):
define void @CTRL_REGSC_BITSET_R2g_T1p5g(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 3)
%3 = tail call i32 @switch_off_bits(i8* %0, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clear(int);
int /*<<< orphan*/ gpio_direction(int, int);
int /*<<< orphan*/ gpio_set(int);
void RES(unsigned int status) {
  gpio_direction(45, 251);
  if (status)
    gpio_set(45);
  else
    gpio_clear(45);
}


x86 assembly (clang, -O0):
<RES>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2d,%edi
mov    $0xfb,%esi
call   1040 <gpio_direction@plt>
cmpl   $0x0,-0x4(%rbp)
je     1163 <RES+0x33>
mov    $0x2d,%edi
call   1050 <gpio_set@plt>
jmp    116d <RES+0x3d>
mov    $0x2d,%edi
call   1030 <gpio_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RES>:
push   %rbx
mov    %edi,%ebx
mov    $0x2d,%edi
mov    $0xfb,%esi
call   1040 <gpio_direction@plt>
mov    $0x2d,%edi
test   %ebx,%ebx
je     1151 <RES+0x21>
pop    %rbx
jmp    1050 <gpio_set@plt>
pop    %rbx
jmp    1030 <gpio_clear@plt>

LLVM IR (-O0):
define void @RES(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gpio_direction(i32 45, i32 251)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @gpio_set(i32 45)
br label %10
8: ; preds = %1
%9 = call i32 @gpio_clear(i32 45)
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
define void @RES(i32 %0) {
%2 = tail call i32 @gpio_direction(i32 45, i32 251)
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @gpio_set(i32 45)
br label %8
6: ; preds = %1
%7 = tail call i32 @gpio_clear(i32 45)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ largest_prime_factor(long const);
int /*<<< orphan*/ printf(char *, long const, int /*<<< orphan*/);
int main() {
  const long int n = 600851475143;
  printf("The largest prime factor of %ld is %ld.\n", n,
         largest_prime_factor(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movabs $0x8be589eac7,%rax
mov    %rax,-0x8(%rbp)
movabs $0x8be589eac7,%rdi
call   1040 <largest_prime_factor@plt>
mov    %eax,%edx
lea    0xeb2(%rip),%rdi
movabs $0x8be589eac7,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movabs $0x8be589eac7,%rbx
mov    %rbx,%rdi
call   1040 <largest_prime_factor@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"The largest prime factor of %ld is %ld.\0A\00"
define i32 @main() {
%1 = alloca i64
store i64 600851475143, i64* %1
%2 = call i32 @largest_prime_factor(i64 600851475143)
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 600851475143, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"The largest prime factor of %ld is %ld.\0A\00"
define i32 @main() {
%1 = tail call i32 @largest_prime_factor(i64 600851475143)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 600851475143, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ api_putstr0(char *);
void HariMain(void) {
  api_putstr0("hello, world\n");
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <api_putstr0@plt>
mov    $0x0,%al
call   1030 <api_end@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <api_putstr0@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <api_end@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"hello, world\0A\00"
define void @HariMain() {
%1 = call i32 @api_putstr0(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello, world\0A\00"
define void @HariMain() {
%1 = tail call i32 @api_putstr0(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @api_end()
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t concat(int x, int y) {
  int temp = y;
  while (y != 0) {
    x *= 10;
    y /= 10;
  }
  return x + temp;
}


x86 assembly (clang, -O0):
<concat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1134 <concat+0x34>
imul   $0xa,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1110 <concat+0x10>
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat>:
mov    %edi,%eax
test   %esi,%esi
je     1134 <concat+0x34>
mov    %esi,%ecx
nopl   0x0(%rax,%rax,1)
add    %eax,%eax
lea    (%rax,%rax,4),%eax
movslq %ecx,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rcx
add    %edi,%ecx
add    $0x9,%edx
cmp    $0x12,%edx
ja     1110 <concat+0x10>
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @concat(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %8, %4 ], [ %1, %2 ]
%7 = mul nsw i32 %5, 10
%8 = sdiv i32 %6, 10
%9 = add i32 %6, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ %0, %2 ], [ %7, %4 ]
%13 = add nsw i32 %12, %1
ret i32 %13
}
char *remove_crlf(char *s) {
  char ch;
  char *begin = s;
  while ((ch = *s)) {
    if ((ch == 0x0D) || (ch == 0x0A)) {
      *s = 0;
      break;
    }
    s++;
  }
  return begin;
}


x86 assembly (clang, -O0):
<remove_crlf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1158 <remove_crlf+0x58>
movsbl -0x9(%rbp),%eax
cmp    $0xd,%eax
je     113b <remove_crlf+0x3b>
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    1147 <remove_crlf+0x47>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1158 <remove_crlf+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <remove_crlf+0x10>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_crlf>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rcx),%edx
test   %dl,%dl
je     112a <remove_crlf+0x2a>
cmp    $0xd,%dl
je     1127 <remove_crlf+0x27>
cmp    $0xa,%dl
je     1127 <remove_crlf+0x27>
add    $0x1,%rcx
jmp    1110 <remove_crlf+0x10>
movb   $0x0,(%rcx)
ret

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

LLVM IR (-O2):
define i8* @remove_crlf(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 13, label %5
i8 10, label %5
]
5: ; preds = %2, %2
store i8 0, i8* %3
br label %8
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2, %5
ret i8* %0
}
int foobar() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foobar() {
ret i32 0
}
/* Variables and functions */
bool ConditionFalse(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @ConditionFalse() {
ret i32 0
}
main() {
  printf("%d %d\n", _Alignof(int), __alignof__(int));
  printf("%d %d\n", _Alignof(short), __alignof__(short));
  _Alignas(__alignof__(int)) short x = 2;
  _Alignas(4) char c;
  _Static_assert(_Alignof(x) == 4, "");
  _Static_assert(_Alignof(c) == 4, "");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x4,%edx
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x2,%edx
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x2,-0x4(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 4, i64 4)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 2, i64 2)
ret i32 0
}
void init_comm() {}


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

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

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

LLVM IR (-O2):
define void @init_comm() {
ret void
}
int f() { return 918; }


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 918
}

LLVM IR (-O2):
define i32 @f() {
ret i32 918
}
long sub6(long i, long j, float f) { return !f ? i : j; }


x86 assembly (clang, -O0):
<sub6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1135 <sub6+0x35>
jp     1135 <sub6+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    113d <sub6+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub6>:
mov    %rdi,%rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
cmovne %rsi,%rax
cmovp  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @sub6(i64 %0, i64 %1, float %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca float
store i64 %0, i64* %4
store i64 %1, i64* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = fcmp une float %7, 0.000000e+00
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = load i64, i64* %4
br label %13
11: ; preds = %3
%12 = load i64, i64* %5
br label %13
13: ; preds = %11, %9
%14 = phi i64 [ %10, %9 ], [ %12, %11 ]
ret i64 %14
}

LLVM IR (-O2):
define i64 @sub6(i64 %0, i64 %1, float %2) {
%4 = fcmp une float %2, 0.000000e+00
%5 = select i1 %4, i64 %1, i64 %0
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void C(void) { putchar('C'); }


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

x86 assembly (clang, -O2):
<C>:
mov    $0x43,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @C() {
%1 = call i32 @putchar(i8 signext 67)
ret void
}

LLVM IR (-O2):
define void @C() {
%1 = tail call i32 @putchar(i8 signext 67)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tlbtrace_refmem_pwc(unsigned int, void *);
scalar_t__ tlbtrace_refmem_sl(unsigned int, unsigned int, int);
void tlbtrace_refmem(unsigned int addr, unsigned int asid, int ins, void *arg) {
  addr = addr & 0xFFFFF000;
  if (tlbtrace_refmem_sl(addr, asid, ins) != 0)
    return;
  tlbtrace_refmem_pwc(addr, arg);
}


x86 assembly (clang, -O0):
<tlbtrace_refmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffff000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <tlbtrace_refmem_sl@plt>
cmp    $0x0,%rax
je     115d <tlbtrace_refmem+0x3d>
jmp    1169 <tlbtrace_refmem+0x49>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <tlbtrace_refmem_pwc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlbtrace_refmem>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edi,%ebp
and    $0xfffff000,%ebp
mov    %ebp,%edi
call   1030 <tlbtrace_refmem_sl@plt>
test   %rax,%rax
je     1141 <tlbtrace_refmem+0x21>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <tlbtrace_refmem_pwc@plt>

LLVM IR (-O0):
define void @tlbtrace_refmem(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = and i32 %9, -4096
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i64 @tlbtrace_refmem_sl(i32 %11, i32 %12, i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %4
br label %21
17: ; preds = %4
%18 = load i32, i32* %5
%19 = load i8*, i8** %8
%20 = call i32 @tlbtrace_refmem_pwc(i32 %18, i8* %19)
br label %21
21: ; preds = %17, %16
ret void
}

LLVM IR (-O2):
define void @tlbtrace_refmem(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = and i32 %0, -4096
%6 = tail call i64 @tlbtrace_refmem_sl(i32 %5, i32 %1, i32 %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @tlbtrace_refmem_pwc(i32 %5, i8* %3)
br label %10
10: ; preds = %4, %8
ret void
}
void bng_init(void) {}


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

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

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

LLVM IR (-O2):
define void @bng_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *name) {
  printf("Usage: %s pgmfiles\n\n", name);
  printf("    This program converts pgm images to sfi format.\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s pgmfiles\0A\0A\00"
@.str.1 = [53 x i8] c" This program converts pgm images to sfi format.\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 ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s pgmfiles\0A\0A\00"
@str = [52 x i8] c" This program converts pgm images to sfi format.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int virt_readlink(char const *, char *, size_t, int /*<<< orphan*/);
int readlink(const char *path, char *buf, size_t bufsiz) {
  return virt_readlink(path, buf, bufsiz, 0);
}


x86 assembly (clang, -O0):
<readlink>:
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
xor    %ecx,%ecx
call   1030 <virt_readlink@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readlink>:
xor    %ecx,%ecx
jmp    1030 <virt_readlink@plt>

LLVM IR (-O0):
define i32 @readlink(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 i32 @virt_readlink(i8* %7, i8* %8, i64 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @readlink(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @virt_readlink(i8* %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
int numspace(s)
char s[];
{
  int i;
  int ret = 0;
  for (i = 0; s[i] != '\0'; ++i)
    if (s[i] == ' ')
      ++ret;
  return ret;
}


x86 assembly (clang, -O0):
<numspace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <numspace+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1149 <numspace+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114e <numspace+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <numspace+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @numspace(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %11, %9 ], [ 0, %1 ]
%4 = phi i32 [ %10, %9 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
switch i8 %6, label %9 [
i8 0, label %12
i8 32, label %7
]
7: ; preds = %2
%8 = add nsw i32 %4, 1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ %4, %2 ]
%11 = add nuw i64 %3, 1
br label %2
12: ; preds = %2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int set_SO_REUSEADDR(int s) {
  int value = 1;
  return setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value));
}


x86 assembly (clang, -O0):
<set_SO_REUSEADDR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_SO_REUSEADDR>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @set_SO_REUSEADDR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_REUSEADDR
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret i32 %7
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @set_SO_REUSEADDR(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_REUSEADDR
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret i32 %6
}
int test1u(unsigned char x) { return x / 100 == 3; }


x86 assembly (clang, -O0):
<test1u>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test1u(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sdiv i32 %4, 100
%6 = icmp eq i32 %5, 3
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @test1u(i8 zeroext %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isPalindrome(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[100];
  scanf("%s", str);
  isPalindrome(str);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @isPalindrome(i8* %2)
ret i32 0
}
void gtk_window_get_type_hint() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_type_hint() {
ret void
}
/* Variables and functions */
int yas_adxl345_write_reg(unsigned char, unsigned char *, int);
int yas_adxl345_write_reg_byte(unsigned char adr, unsigned char val) {
  return yas_adxl345_write_reg(adr, &val, 1);
}


x86 assembly (clang, -O0):
<yas_adxl345_write_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x1(%rbp),%edi
call   1030 <yas_adxl345_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_adxl345_write_reg_byte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_adxl345_write_reg@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_adxl345_write_reg_byte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call i32 @yas_adxl345_write_reg(i8 zeroext %5, i8* %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @yas_adxl345_write_reg_byte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @yas_adxl345_write_reg(i8 zeroext %0, i8* %3, i32 1)
ret i32 %4
}
__attribute__((no)) void nope3(char opt) {
  volatile int volatile *x = ialsohaveareffunc(opt);
  x += 0x7FFFFFFFFFFFFEEE;
  x += (int)ialsohaveareffunc(x);
  return;
}


x86 assembly (clang, -O0):
<nope3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <ialsohaveareffunc@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffbb8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <ialsohaveareffunc@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nope3>:
push   %rax
xor    %eax,%eax
call   1030 <ialsohaveareffunc@plt>
movslq %eax,%rdi
add    $0xfffffffffffffbb8,%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <ialsohaveareffunc@plt>

LLVM IR (-O0):
define void @nope3(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32*
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @ialsohaveareffunc to i32 (i32, ...)*)(i32 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %3
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 9223372036854775534
store i32* %10, i32** %3
%11 = load i32*, i32** %3
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @ialsohaveareffunc to i32 (i32*, ...)*)(i32* %11)
%13 = load i32*, i32** %3
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i32, i32* %13, i64 %14
store i32* %15, i32** %3
ret void
}

LLVM IR (-O2):
define void @nope3(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @ialsohaveareffunc to i32 (i32, ...)*)(i32 %2)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = getelementptr inbounds i32, i32* %5, i64 9223372036854775534
%7 = tail call i32 (i32*, ...) bitcast (i32 (...)* @ialsohaveareffunc to i32 (i32*, ...)*)(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("hello\n");
  printf("%d %f\n", 42, 3.14);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x2a,%esi
movsd  0xeb8(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"hello\0A\00"
@.str.1 = [7 x i8] c"%d %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42, double 3.140000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d %f\0A\00"
@str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42, double 3.140000e+00)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nrerror(char *);
unsigned char *nr_cvector(long nl, long nh) {
  unsigned char *v;
  v = (unsigned char *)malloc(
      (size_t)((nh - nl + 1 + 1) * sizeof(unsigned char)));
  if (!v)
    nrerror("allocation failure in cvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<nr_cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <nr_cvector+0x44>
lea    0xea1(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr_cvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x2(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <nr_cvector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <nrerror@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @nr_cvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load i8*, i8** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = getelementptr inbounds i8, i8* %22, i64 1
ret i8* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @nr_cvector(i64 %0, i64 %1) {
%3 = sub i64 2, %0
%4 = add i64 %3, %1
%5 = tail call i64 @malloc(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = sub i64 0, %0
%11 = inttoptr i64 %5 to i8*
%12 = getelementptr inbounds i8, i8* %11, i64 %10
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}
extern int onigenc_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @onigenc_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char *);
int bamUnpackCigarElement(unsigned int packed, char *retOp) {
  errAbort("%s: in order to use this functionality you must "
           "install the samtools library (<A "
           "HREF=\"http://samtools.sourceforge.net\" "
           "TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile "
           "kent/src with "
           "USE_BAM=1 in your environment "
           "(see <A "
           "HREF=\"http://genomewiki.ucsc.edu/index.php/"
           "Build_Environment_Variables\" "
           "TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/"
           "Build_Environment_Variables</A>).",
           "bamUnpackCigarElement");
  return 0;
}


x86 assembly (clang, -O0):
<bamUnpackCigarElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
lea    0x105d(%rip),%rsi
call   1030 <errAbort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [394 x i8] c"%s: in order to use this functionality you must install the samtools library (<A HREF=\22http://samtools.sourceforge.net\22 TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile kent/src with USE_BAM=1 in your environment (see <A HREF=\22http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables\22 TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables</A>).\00"
@.str.1 = [22 x i8] c"bamUnpackCigarElement\00"
define i32 @bamUnpackCigarElement(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 @errAbort(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [394 x i8] c"%s: in order to use this functionality you must install the samtools library (<A HREF=\22http://samtools.sourceforge.net\22 TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile kent/src with USE_BAM=1 in your environment (see <A HREF=\22http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables\22 TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables</A>).\00"
@.str.1 = [22 x i8] c"bamUnpackCigarElement\00"
define i32 @bamUnpackCigarElement(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @errAbort(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
const char *WavpackGetLibraryVersionString(void) { return "5.4.0"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"5.4.0\00"
define i8* @WavpackGetLibraryVersionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int countSolutions(int *, int, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int C[] = {4, 3, 1};
  printf("eqn: 4 * x_0 + 3 * x_1 + 1 * x_2 = 7 has %d non-negative integer "
         "solutions\n",
         countSolutions(C, 3, 7));
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1040 <countSolutions@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xece(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xebb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1040 <countSolutions@plt>
lea    0xea7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.C = [3 x i32] [i32 4, i32 3, i32 1]
@.str = [76 x i8] c"eqn: 4 * x_0 + 3 * x_1 + 1 * x_2 = 7 has %d non-negative integer solutions\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @countSolutions(i32* %3, i32 3, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.C = [3 x i32] [i32 4, i32 3, i32 1]
@.str = [76 x i8] c"eqn: 4 * x_0 + 3 * x_1 + 1 * x_2 = 7 has %d non-negative integer solutions\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @countSolutions(i32* %3, i32 3, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @getchar()
ret i32 0
}
int range_ptrinbuf2(const void *Min, const void *Max, const void *ptr) {
  return (Min && ptr >= Min && ptr < Max);
}


x86 assembly (clang, -O0):
<range_ptrinbuf2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     1141 <range_ptrinbuf2+0x41>
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
jb     1141 <range_ptrinbuf2+0x41>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_ptrinbuf2>:
test   %rdi,%rdi
setne  %al
cmp    %rdi,%rdx
setae  %cl
cmp    %rsi,%rdx
setb   %dl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @range_ptrinbuf2(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i8*, i8** %6
%11 = load i8*, i8** %4
%12 = icmp uge i8* %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8*, i8** %6
%15 = load i8*, i8** %5
%16 = icmp ult i8* %14, %15
br label %17
17: ; preds = %13, %9, %3
%18 = phi i1 [ false, %9 ], [ false, %3 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @range_ptrinbuf2(i8* readnone %0, i8* readnone %1, i8* readnone %2) {
%4 = icmp ne i8* %0, null
%5 = icmp uge i8* %2, %0
%6 = icmp ult i8* %2, %1
%7 = and i1 %4, %5
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
int test_imm_B6int8_reg(signed char val) {
  return ((val) & (-0xB6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B6int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff4a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B6int8_reg>:
test   $0xffffff4a,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B6int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -182
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ drop_nomem();
int /*<<< orphan*/ pathexec_env(char *, char *);
void env(char *s, char *t) {
  if (!pathexec_env(s, t))
    drop_nomem();
}


x86 assembly (clang, -O0):
<env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pathexec_env@plt>
cmp    $0x0,%eax
jne    114d <env+0x2d>
mov    $0x0,%al
call   1040 <drop_nomem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<env>:
push   %rax
call   1030 <pathexec_env@plt>
test   %eax,%eax
je     112c <env+0xc>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <drop_nomem@plt>

LLVM IR (-O0):
define void @env(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 @pathexec_env(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 (...) @drop_nomem()
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @env(i8* %0, i8* %1) {
%3 = tail call i32 @pathexec_env(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @drop_nomem()
br label %7
7: ; preds = %5, %2
ret void
}