xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *malloc_or_die(size_t bytes) {
  void *result = malloc(bytes);
  if (!result) {
    do {
      fprintf(stderr,
              "Failed to malloc() %zu bytes of memory: %m"
              "\n",
              bytes);
      exit(EXIT_FAILURE);
    } while (0);
  }
  return result;
}


x86 assembly (clang, -O0):
<malloc_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <malloc_or_die+0x50>
jmp    1159 <malloc_or_die+0x29>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_or_die>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <malloc_or_die+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Failed to malloc() %zu bytes of memory: %m\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @malloc_or_die(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %16, label %8
8: ; preds = %1
br label %9
9: ; preds = %8
%10 = load i32, i32* @stderr
%11 = load i64, i64* %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; No predecessors!
br label %16
16: ; preds = %15, %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Failed to malloc() %zu bytes of memory: %m\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @malloc_or_die(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
char *jsonZcb(char *, int);
char *jsonZcbStartRsp(int ret) { return (jsonZcb("startrsp", ret)); }


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

x86 assembly (clang, -O2):
<jsonZcbStartRsp>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <jsonZcb@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"startrsp\00"
define i8* @jsonZcbStartRsp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @jsonZcb(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"startrsp\00"
define i8* @jsonZcbStartRsp(i32 %0) {
%2 = tail call i8* @jsonZcb(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
/* Variables and functions */
int strlen(char *);
char *str_append_c(char *str, char c) {
  int l;
  l = strlen(str);
  *(str + l) = c;
  *(str + l + 1) = '\0';
  return str;
}


x86 assembly (clang, -O0):
<str_append_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,0x1(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_append_c>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
mov    %bpl,(%rbx,%rax,1)
movb   $0x0,0x1(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @str_append_c(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8, i8* %4
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 %8, i8* %12
%13 = load i8*, i8** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 0, i8* %17
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @str_append_c(i8* returned %0, i8 signext %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %1, i8* %5
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 0, i8* %6
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("I am the Happy Penguin!\n");
  exit(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    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"I am the Happy Penguin!\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 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [24 x i8] c"I am the Happy Penguin!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct multiply_fcb_block {
  int dummy;
};

/* Variables and functions */
int multiply_fcb_block_insert_with_configure_raw(struct multiply_fcb_block *,
                                                 int /*<<< orphan*/,
                                                 int /*<<< orphan*/,
                                                 int /*<<< orphan*/, int);
int multiply_fcb_block_insert_with_configure_type(
    struct multiply_fcb_block *icg_fcb_block, uint32_t instrument_number,
    uint32_t opcode, uint32_t operand, int type) {
  return multiply_fcb_block_insert_with_configure_raw(
      icg_fcb_block, instrument_number, opcode, operand, type);
}


x86 assembly (clang, -O0):
<multiply_fcb_block_insert_with_configure_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1030 <multiply_fcb_block_insert_with_configure_raw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply_fcb_block_insert_with_configure_type>:
jmp    1030 <multiply_fcb_block_insert_with_configure_raw@plt>

LLVM IR (-O0):
%struct.multiply_fcb_block = type { i32 }
define i32 @multiply_fcb_block_insert_with_configure_type(%struct.multiply_fcb_block* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.multiply_fcb_block*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.multiply_fcb_block* %0, %struct.multiply_fcb_block** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.multiply_fcb_block*, %struct.multiply_fcb_block** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @multiply_fcb_block_insert_with_configure_raw(%struct.multiply_fcb_block* %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.multiply_fcb_block = type { i32 }
define i32 @multiply_fcb_block_insert_with_configure_type(%struct.multiply_fcb_block* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @multiply_fcb_block_insert_with_configure_raw(%struct.multiply_fcb_block* %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
char *gnu_get_libc_version();
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("glibc version: %s\n", gnu_get_libc_version());
  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)
mov    $0x0,%al
call   1040 <gnu_get_libc_version@plt>
mov    %rax,%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"glibc version: %s\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 i8* (...) @gnu_get_libc_version()
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"glibc version: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @gnu_get_libc_version()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void RTLdrOpenkLdr(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLdrOpenkLdr() {
ret void
}
int is_ws(char c) { return (c == '\n' || c == '\t' || c == ' ') ? 1 : 0; }


x86 assembly (clang, -O0):
<is_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_ws+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_ws+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ws>:
lea    -0x9(%rdi),%eax
cmp    $0x2,%al
setb   %al
cmp    $0x20,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_ws(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 10
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 1, i32 0
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_ws(i8 signext %0) {
%2 = add i8 %0, -9
%3 = icmp ult i8 %2, 2
%4 = icmp eq i8 %0, 32
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
double exp(double);
double e_dbo(double dbo) {
  if (dbo > 30)
    return 2.0;
  else {
    double a = 102.6 * exp(-0.1101 * dbo);
    return a;
  }
}


x86 assembly (clang, -O0):
<e_dbo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1146 <e_dbo+0x36>
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <e_dbo+0x66>
movsd  0xec2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_dbo>:
push   %rax
ucomisd 0xeef(%rip),%xmm0
jbe    1125 <e_dbo+0x15>
movsd  0xedd(%rip),%xmm0
pop    %rax
ret
mulsd  0xee3(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @e_dbo(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp ogt double %5, 3.000000e+01
br i1 %6, label %7, label %8
7: ; preds = %1
store double 2.000000e+00, double* %2
br label %14
8: ; preds = %1
%9 = load double, double* %3
%10 = fmul double -1.101000e-01, %9
%11 = call double @exp(double %10)
%12 = fmul double 1.026000e+02, %11
store double %12, double* %4
%13 = load double, double* %4
store double %13, double* %2
br label %14
14: ; preds = %8, %7
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @e_dbo(double %0) {
%2 = fcmp ogt double %0, 3.000000e+01
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fmul double %0, -1.101000e-01
%5 = tail call double @exp(double %4)
%6 = fmul double %5, 1.026000e+02
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 2.000000e+00, %1 ]
ret double %8
}
int test_oneandll(unsigned long long f) { return __builtin_popcountll(1 & f); }


x86 assembly (clang, -O0):
<test_oneandll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_oneandll>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_oneandll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 1, %3
%5 = call i64 @llvm.ctpop.i64(i64 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_oneandll(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
void raise_longjmp(jmp_buf jbuf, int i, int n) {
  while (i < n)
    raise_longjmp(jbuf, i + 1, n);
  longjmp(jbuf, n);
}


x86 assembly (clang, -O0):
<raise_longjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1153 <raise_longjmp+0x33>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
call   1040 <raise_longjmp@plt>
jmp    1131 <raise_longjmp+0x11>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <longjmp@plt>

x86 assembly (clang, -O2):
<raise_longjmp>:
push   %rax
cmp    %edx,%esi
jge    112d <raise_longjmp+0xd>
add    $0x1,%esi
call   1040 <raise_longjmp@plt>
mov    %edx,%esi
call   1030 <longjmp@plt>

LLVM IR (-O0):
define void @raise_longjmp(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %11, %3
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %6
br label %7
16: ; preds = %7
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = call i32 @longjmp(i32 %17, i32 %18)
unreachable
}

LLVM IR (-O2):
define void @raise_longjmp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = add nsw i32 %1, 1
tail call void @raise_longjmp(i32 %0, i32 %6, i32 %2)
unreachable
7: ; preds = %3
%8 = tail call i32 @longjmp(i32 %0, i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ INSSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void INSSettingsRequestUpdate() { UAVObjRequestUpdate(INSSettingsHandle()); }


x86 assembly (clang, -O0):
<INSSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <INSSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INSSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <INSSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @INSSettingsRequestUpdate() {
%1 = call i32 (...) @INSSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @INSSettingsRequestUpdate() {
%1 = tail call i32 (...) @INSSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
char *_HEn(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("path: %s\n", _HEn("/root/dupa"));
  exit(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    0xebd(%rip),%rdi
call   1030 <_HEn@plt>
mov    %rax,%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <_HEn@plt>
lea    0xebc(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"path: %s\0A\00"
@.str.1 = [11 x i8] c"/root/dupa\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 i8* @_HEn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"path: %s\0A\00"
@.str.1 = [11 x i8] c"/root/dupa\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @_HEn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
void test(void *dst, void *src) {
  __builtin_memcpy(dst, src, sizeof(char *) / 2);
}


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

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

LLVM IR (-O0):
define void @test(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
ret void
}

LLVM IR (-O2):
define void @test(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %3
store i32 %5, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint32(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint32_t format_address_short_lba(uint8_t *data) { return get_uint32(data, 0); }


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

x86 assembly (clang, -O2):
<format_address_short_lba>:
xor    %esi,%esi
jmp    1030 <get_uint32@plt>

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

LLVM IR (-O2):
define i32 @format_address_short_lba(i32* %0) {
%2 = tail call i32 @get_uint32(i32* %0, i32 0)
ret i32 %2
}
void not_prune_multiple2(int *m) {
  int a[5];
  if (m[0] < 5) {
    a[m[1]] = 0;
  }
}


x86 assembly (clang, -O0):
<not_prune_multiple2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x5,(%rax)
jge    1125 <not_prune_multiple2+0x25>
mov    -0x8(%rbp),%rax
movslq 0x4(%rax),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @not_prune_multiple2(i32* nocapture %0) {
ret void
}
int rc_subcomp(unsigned int b0, unsigned int r0, unsigned int b1,
               unsigned int r1) {
  if (b0 < b1)
    return -1;
  if (b0 > b1)
    return 1;
  if (r0 > r1)
    return -1;
  if (r0 < r1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<rc_subcomp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1128 <rc_subcomp+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <rc_subcomp+0x77>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jbe    1140 <rc_subcomp+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1177 <rc_subcomp+0x77>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jbe    1158 <rc_subcomp+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <rc_subcomp+0x77>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1170 <rc_subcomp+0x70>
movl   $0x1,-0x4(%rbp)
jmp    1177 <rc_subcomp+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_subcomp>:
mov    $0xffffffff,%eax
cmp    %edx,%edi
jb     111f <rc_subcomp+0x1f>
mov    $0x1,%eax
ja     111f <rc_subcomp+0x1f>
mov    $0xffffffff,%eax
cmp    %ecx,%esi
ja     111f <rc_subcomp+0x1f>
setb   %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @rc_subcomp(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i32, i32* %8
%12 = icmp ult i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %4
store i32 -1, i32* %5
br label %30
14: ; preds = %4
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = icmp ugt i32 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 1, i32* %5
br label %30
19: ; preds = %14
%20 = load i32, i32* %7
%21 = load i32, i32* %9
%22 = icmp ugt i32 %20, %21
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 -1, i32* %5
br label %30
24: ; preds = %19
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = icmp ult i32 %25, %26
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 1, i32* %5
br label %30
29: ; preds = %24
store i32 0, i32* %5
br label %30
30: ; preds = %29, %28, %23, %18, %13
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
define i32 @rc_subcomp(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %0, %2
br i1 %5, label %13, label %6
6: ; preds = %4
%7 = icmp ugt i32 %0, %2
br i1 %7, label %13, label %8
8: ; preds = %6
%9 = icmp ugt i32 %1, %3
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = icmp ult i32 %1, %3
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %8, %6, %4
%14 = phi i32 [ -1, %4 ], [ 1, %6 ], [ -1, %8 ], [ %12, %10 ]
ret i32 %14
}
void do_get(int argc, char *argv[], int start) {
  (void)argc;
  (void)argv;
  (void)start;
}


x86 assembly (clang, -O0):
<do_get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @do_get(i32 %0, i8** nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
struct rlimit {
  int rlim_cur;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_NOFILE;
scalar_t__ getrlimit(int /*<<< orphan*/, struct rlimit *);
int getdtablesize(void) {
  struct rlimit ru;
  return getrlimit(RLIMIT_NOFILE, &ru) < 0 ? 256 : ru.rlim_cur;
}


x86 assembly (clang, -O0):
<getdtablesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <getrlimit@plt>
cmp    $0x0,%rax
jge    1141 <getdtablesize+0x31>
mov    $0x100,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <getdtablesize+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdtablesize>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <getrlimit@plt>
mov    %rax,%rcx
mov    $0x100,%eax
test   %rcx,%rcx
js     1132 <getdtablesize+0x22>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@RLIMIT_NOFILE = global i32 0
define i32 @getdtablesize() {
%1 = alloca %struct.rlimit
%2 = load i32, i32* @RLIMIT_NOFILE
%3 = call i64 @getrlimit(i32 %2, %struct.rlimit* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %9
6: ; preds = %0
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 0
%8 = load i32, i32* %7
br label %9
9: ; preds = %6, %5
%10 = phi i32 [ 256, %5 ], [ %8, %6 ]
ret i32 %10
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@RLIMIT_NOFILE = global i32 0
define i32 @getdtablesize() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = load i32, i32* @RLIMIT_NOFILE
%4 = call i64 @getrlimit(i32 %3, %struct.rlimit* %1)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 256, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str1[50000], ch;
  int kk;
  scanf("%s", str1);
  reverse(str1);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [50000 x i8]
%2 = getelementptr inbounds [50000 x i8], [50000 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 @reverse(i8* %2)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int gca_cmp_int8(const void *aa, const void *bb) {
  const int8_t a = *(const int8_t *)aa;
  const int8_t b = *(const int8_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp_int8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp_int8>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp_int8(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @gca_cmp_int8(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
int test_imm_69uint8_reg(unsigned char val) {
  return ((val) & (0x69 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_69uint8_reg>:
test   $0x69,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_69uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 105
%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_69uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 105
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ mode;
};
typedef TYPE_1__ XFocusChangeEvent;

/* Variables and functions */
int get_XFocusChangeEvent_mode(void *_p) {
  return (int)((XFocusChangeEvent *)_p)->mode;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XFocusChangeEvent_mode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XFocusChangeEvent_mode(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void finalize_cache_transform_response(
    struct cache_transform_response *transform_response) {
  (void)0;
  (void)0;
}


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

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

LLVM IR (-O0):
%struct.cache_transform_response = type opaque
define void @finalize_cache_transform_response(%struct.cache_transform_response* %0) {
%2 = alloca %struct.cache_transform_response*
store %struct.cache_transform_response* %0, %struct.cache_transform_response** %2
ret void
}

LLVM IR (-O2):
%struct.cache_transform_response = type opaque
define void @finalize_cache_transform_response(%struct.cache_transform_response* nocapture %0) {
ret void
}
/* Variables and functions */
float tanf(float);
void nsvg__xformSetSkewY(float *t, float a) {
  t[0] = 1.0f;
  t[1] = tanf(a);
  t[2] = 0.0f;
  t[3] = 1.0f;
  t[4] = 0.0f;
  t[5] = 0.0f;
}


x86 assembly (clang, -O0):
<nsvg__xformSetSkewY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0xed3(%rip),%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm0
call   1030 <tanf@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xea4(%rip),%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__xformSetSkewY>:
push   %rbx
mov    %rdi,%rbx
movl   $0x3f800000,(%rdi)
call   1030 <tanf@plt>
movss  %xmm0,0x4(%rbx)
movaps 0xed5(%rip),%xmm0
movups %xmm0,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @nsvg__xformSetSkewY(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
store float 1.000000e+00, float* %6
%7 = load float, float* %4
%8 = call float @tanf(float %7)
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i64 1
store float %8, float* %10
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 2
store float 0.000000e+00, float* %12
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 3
store float 1.000000e+00, float* %14
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 4
store float 0.000000e+00, float* %16
%17 = load float*, float** %3
%18 = getelementptr inbounds float, float* %17, i64 5
store float 0.000000e+00, float* %18
ret void
}

LLVM IR (-O2):
define void @nsvg__xformSetSkewY(float* nocapture writeonly %0, float %1) {
store float 1.000000e+00, float* %0
%3 = tail call float @tanf(float %1)
%4 = getelementptr inbounds float, float* %0, i64 1
store float %3, float* %4
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = bitcast float* %5 to <4 x float>*
store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %6
ret void
}
void testLHSProblem(int *p) {
  int x = !p ? *p : 1;
  (void)x;
}


x86 assembly (clang, -O0):
<testLHSProblem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1121 <testLHSProblem+0x21>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    112e <testLHSProblem+0x2e>
mov    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <testLHSProblem+0x2e>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @testLHSProblem(i32* nocapture %0) {
ret void
}
void RTPathRealDup(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathRealDup() {
ret void
}
void g_value_get_pointer() {}


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

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

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

LLVM IR (-O2):
define void @g_value_get_pointer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wig_temp_free();
void fwig_temp_free_() { wig_temp_free(); }


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

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

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

LLVM IR (-O2):
define void @fwig_temp_free_() {
%1 = tail call i32 (...) @wig_temp_free()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void die(char *why) {
  fprintf(stderr, "%s\n", why);
  exit(1);
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @commit() {
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ ser(struct TreeNode *, char **, int *);
char *serialize(struct TreeNode *root) {
  int len = 0;
  char *str = malloc(40000);
  memset(str, '\0', 40000);
  ser(root, &str, &len);
  return str;
}


x86 assembly (clang, -O0):
<serialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x9c40,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c40,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <ser@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0x4(%rsp)
mov    $0x9c40,%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x9c40,%edx
call   1030 <memset@plt>
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
call   1050 <ser@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i8* @serialize(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32
%4 = alloca i8*
store %struct.TreeNode* %0, %struct.TreeNode** %2
store i32 0, i32* %3
%5 = call i8* @malloc(i32 40000)
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @memset(i8* %6, i8 signext 0, i32 40000)
%8 = load %struct.TreeNode*, %struct.TreeNode** %2
%9 = call i32 @ser(%struct.TreeNode* %8, i8** %4, i32* %3)
%10 = load i8*, i8** %4
ret i8* %10
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i8* @serialize(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = bitcast i8** %3 to i8*
%6 = tail call dereferenceable_or_null(40000) i8* @malloc(i32 40000)
store i8* %6, i8** %3
%7 = tail call i32 @memset(i8* %6, i8 signext 0, i32 40000)
%8 = call i32 @ser(%struct.TreeNode* %0, i8** %3, i32* %2)
%9 = load i8*, i8** %3
ret i8* %9
}
int LZ4_sizeofState(void) { return 16416; }


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

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

LLVM IR (-O0):
define i32 @LZ4_sizeofState() {
ret i32 16416
}

LLVM IR (-O2):
define i32 @LZ4_sizeofState() {
ret i32 16416
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *, char *,
                         int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  execl("/bin/ls", "ls", "-l", "-a", "-h", NULL);
  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    0xed3(%rip),%rdi
lea    0xed1(%rip),%rsi
lea    0xecd(%rip),%rdx
lea    0xec9(%rip),%rcx
lea    0xec5(%rip),%r8
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <execl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
lea    0xee2(%rip),%rdx
lea    0xede(%rip),%rcx
lea    0xeda(%rip),%r8
xor    %r9d,%r9d
call   1030 <execl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-a\00"
@.str.4 = [3 x i8] c"-h\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 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"-a\00"
@.str.4 = [3 x i8] c"-h\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* null)
ret i32 0
}
/* Variables and functions */
char *strstr(char *, char *);
int strpos(char *str, char *rch) {
  char *start = strstr(str, rch);
  if (start) {
    return (int)((start - str) / sizeof(*str));
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<strpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1153 <strpos+0x43>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
shr    $0x0,%rax
mov    %eax,-0x4(%rbp)
jmp    115a <strpos+0x4a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpos>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @strpos(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %20
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i8*, i8** %4
%15 = ptrtoint i8* %13 to i64
%16 = ptrtoint i8* %14 to i64
%17 = sub i64 %15, %16
%18 = udiv i64 %17, 1
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
br label %21
20: ; preds = %2
store i32 -1, i32* %3
br label %21
21: ; preds = %20, %12
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @strpos(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = select i1 %4, i32 -1, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ print_target_indices(char *, int const *);
void print_cooler_target_indices(const int *pData) {
  print_target_indices("COOLER", pData);
}


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

x86 assembly (clang, -O2):
<print_cooler_target_indices>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <print_target_indices@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"COOLER\00"
define void @print_cooler_target_indices(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @print_target_indices(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"COOLER\00"
define void @print_cooler_target_indices(i32* %0) {
%2 = tail call i32 @print_target_indices(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %0)
ret void
}