xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DumpNum(char *, int /*<<< orphan*/);
int /*<<< orphan*/ GetCodeCellDump();
int /*<<< orphan*/ StrDump(char *);
void DumpConstant() {
  StrDump("_DOCONST");
  DumpNum("\t%ld", GetCodeCellDump());
}


x86 assembly (clang, -O0):
<DumpConstant>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <StrDump@plt>
mov    $0x0,%al
call   1050 <GetCodeCellDump@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <DumpNum@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DumpConstant>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <StrDump@plt>
xor    %eax,%eax
call   1050 <GetCodeCellDump@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <DumpNum@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"_DOCONST\00"
@.str.1 = [5 x i8] c"\09%ld\00"
define void @DumpConstant() {
%1 = call i32 @StrDump(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @GetCodeCellDump()
%3 = call i32 @DumpNum(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"_DOCONST\00"
@.str.1 = [5 x i8] c"\09%ld\00"
define void @DumpConstant() {
%1 = tail call i32 @StrDump(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @GetCodeCellDump()
%3 = tail call i32 @DumpNum(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int printf(char *, unsigned long);
int print_ulong(unsigned long v) { return printf("%lu", v); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i32 @print_ulong(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 %2
}
int thermal_iio_sensor_unregister(struct thermal_zone_device *tz) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.thermal_zone_device = type opaque
define i32 @thermal_iio_sensor_unregister(%struct.thermal_zone_device* nocapture readnone %0) {
ret i32 0
}
int MyTestFunction(int x) {
  int y = x * 2;
  return y;
}


x86 assembly (clang, -O0):
<MyTestFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyTestFunction>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @MyTestFunction(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 2
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @MyTestFunction(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
void gtk_tree_view_widget_to_tree_coords() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_widget_to_tree_coords() {
ret void
}
void nfunc() {}


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

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

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

LLVM IR (-O2):
define void @nfunc() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint32_t read_uint32_t(void **data, uint16_t *size) {
  assert(*size >= sizeof(uint32_t));
  *size -= sizeof(uint32_t);
  return *(*(uint32_t **)data)++;
}


x86 assembly (clang, -O0):
<read_uint32_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
cmp    $0x4,%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
movslq (%rax),%rcx
sub    $0x4,%rcx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,(%rcx)
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_uint32_t>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmpl   $0x4,(%rsi)
setae  %dil
call   1030 <assert@plt>
addl   $0xfffffffc,(%rbx)
mov    (%r14),%rax
lea    0x4(%rax),%rcx
mov    %rcx,(%r14)
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @read_uint32_t(i8** nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp ugt i32 %3, 3
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = load i32, i32* %1
%8 = add i32 %7, -4
store i32 %8, i32* %1
%9 = bitcast i8** %0 to i32**
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32* %11, i32** %9
%12 = load i32, i32* %10
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Line156(long, long, long, long);
void line(long x, long y, long w, long h) { Line156(x, y, w, h); }


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

x86 assembly (clang, -O2):
<line>:
jmp    1030 <Line156@plt>

LLVM IR (-O0):
define void @line(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @Line156(i64 %9, i64 %10, i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @line(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @Line156(i64 %0, i64 %1, i64 %2, i64 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nlink_t;

/* Variables and functions */
int /*<<< orphan*/ _PC_LINK_MAX;
long pathconf(char const *, int /*<<< orphan*/);
nlink_t lmsc_get_max_hlink(const char *path) {
  long l = pathconf(path, _PC_LINK_MAX);
  if (l == -1) {
    l = 1;
  }
  return (nlink_t)l;
}


x86 assembly (clang, -O0):
<lmsc_get_max_hlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <pathconf@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1145 <lmsc_get_max_hlink+0x35>
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmsc_get_max_hlink>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <pathconf@plt>
cmp    $0xffffffffffffffff,%rax
mov    $0x1,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_PC_LINK_MAX = global i32 0
define i32 @lmsc_get_max_hlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @_PC_LINK_MAX
%6 = call i64 @pathconf(i8* %4, i32 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
store i64 1, i64* %3
br label %10
10: ; preds = %9, %1
%11 = load i64, i64* %3
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@_PC_LINK_MAX = global i32 0
define i32 @lmsc_get_max_hlink(i8* %0) {
%2 = load i32, i32* @_PC_LINK_MAX
%3 = tail call i64 @pathconf(i8* %0, i32 %2)
%4 = icmp eq i64 %3, -1
%5 = trunc i64 %3 to i32
%6 = select i1 %4, i32 1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, b, u, s;
  a = 150;
  b = 300;
  u = a - b;
  s = a - b;
  printf("Unsigned variable  = %u\n", u);
  printf("Signed variable = %d\n", s);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x96,-0x8(%rbp)
movl   $0x12c,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"Unsigned variable = %u\0A\00"
@.str.1 = [22 x i8] c"Signed variable = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 150, i32* %2
store i32 300, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Unsigned variable = %u\0A\00"
@.str.1 = [22 x i8] c"Signed variable = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 -150)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 -150)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void my_handler(int sig) {
  printf("Caught SIGINT(%d)\n", sig);
  exit(0);
}


x86 assembly (clang, -O0):
<my_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<my_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Caught SIGINT(%d)\0A\00"
define void @my_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Caught SIGINT(%d)\0A\00"
define void @my_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void g_key_file_set_list_separator() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ write_bit(char const, int /*<<< orphan*/ *);
void a5_huffman_encode(unsigned int c, FILE *out, const char **map) {
  const char *s = map[c];
  while (*s) {
    write_bit(*s - '0', out);
    s++;
  }
}


x86 assembly (clang, -O0):
<a5_huffman_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1166 <a5_huffman_encode+0x56>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <write_bit@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1132 <a5_huffman_encode+0x22>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a5_huffman_encode>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
mov    (%rdx,%rax,8),%rbx
mov    (%rbx),%al
test   %al,%al
je     1148 <a5_huffman_encode+0x38>
mov    %rsi,%r14
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
add    $0xd0,%al
movsbl %al,%edi
mov    %r14,%rsi
call   1030 <write_bit@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <a5_huffman_encode+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @a5_huffman_encode(i32 %0, i32* %1, i8** nocapture %2) {
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds i8*, i8** %2, i64 %4
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %3, %9
%10 = phi i8 [ %15, %9 ], [ %7, %3 ]
%11 = phi i8* [ %14, %9 ], [ %6, %3 ]
%12 = add i8 %10, -48
%13 = tail call i32 @write_bit(i8 signext %12, i32* %1)
%14 = getelementptr inbounds i8, i8* %11, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ procfs_generic_close(int *);
void procfs_mem_close(int *pmemfdp) { procfs_generic_close(pmemfdp); }


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

x86 assembly (clang, -O2):
<procfs_mem_close>:
jmp    1030 <procfs_generic_close@plt>

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

LLVM IR (-O2):
define void @procfs_mem_close(i32* %0) {
%2 = tail call i32 @procfs_generic_close(i32* %0)
ret void
}
short fun_si16(short a, short b) { return a; }


x86 assembly (clang, -O0):
<fun_si16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @fun_si16(i16 returned signext %0, i16 signext %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
unsigned int CAM_CALDeviceName(char *DevName) {
  char *str = "CAM_CAL_DRV";
  strcat(DevName, str);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"CAM_CAL_DRV\00"
define i32 @CAM_CALDeviceName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 @strcat(i8* %4, i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"CAM_CAL_DRV\00"
define i32 @CAM_CALDeviceName(i8* %0) {
%2 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void mudarvalor(float *a, float *b) {
  float aux;
  aux = *a;
  *a = *b;
  *b = aux;
}


x86 assembly (clang, -O0):
<mudarvalor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mudarvalor>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  %xmm1,(%rdi)
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @mudarvalor(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float, float* %6
store float %7, float* %5
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = load float*, float** %3
store float %9, float* %10
%11 = load float, float* %5
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @mudarvalor(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
store float %4, float* %0
store float %3, float* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
void putcntl(char c, FILE *stream) {
  putc('^', stream);
  putc((c & 31) | '@', stream);
}


x86 assembly (clang, -O0):
<putcntl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x5e,%edi
call   1030 <putc@plt>
movsbl -0x1(%rbp),%eax
and    $0x1f,%eax
or     $0x40,%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcntl>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x5e,%edi
call   1030 <putc@plt>
and    $0x1f,%bpl
or     $0x40,%bpl
movzbl %bpl,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @putcntl(i8 signext %0, i32* %1) {
%3 = alloca i8
%4 = alloca i32*
store i8 %0, i8* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = call i32 @putc(i8 signext 94, i32* %5)
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = and i32 %8, 31
%10 = or i32 %9, 64
%11 = trunc i32 %10 to i8
%12 = load i32*, i32** %4
%13 = call i32 @putc(i8 signext %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @putcntl(i8 signext %0, i32* nocapture %1) {
%3 = tail call i32 @putc(i8 signext 94, i32* %1)
%4 = and i8 %0, 31
%5 = or i8 %4, 64
%6 = tail call i32 @putc(i8 signext %5, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mxml_release_string(char const *);
void cfg_processor_release_string(const char *str) { mxml_release_string(str); }


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

x86 assembly (clang, -O2):
<cfg_processor_release_string>:
jmp    1030 <mxml_release_string@plt>

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

LLVM IR (-O2):
define void @cfg_processor_release_string(i8* %0) {
%2 = tail call i32 @mxml_release_string(i8* %0)
ret void
}
void _atomic_add_64(void) {}


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

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

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

LLVM IR (-O2):
define void @_atomic_add_64() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tx();
int main() {
  tx();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @tx()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @tx()
ret i32 0
}
void _gfortran_caf_sync_images(int count __attribute__((unused)),
                               int images[] __attribute__((unused)), int *stat,
                               char *errmsg __attribute__((unused)),
                               int errmsg_len __attribute__((unused))) {
  if (stat)
    *stat = 0;
}


x86 assembly (clang, -O0):
<_gfortran_caf_sync_images>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     112c <_gfortran_caf_sync_images+0x2c>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gfortran_caf_sync_images>:
test   %rdx,%rdx
je     110b <_gfortran_caf_sync_images+0xb>
movl   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define void @_gfortran_caf_sync_images(i32 %0, i32* nocapture readnone %1, i32* writeonly %2, i8* nocapture readnone %3, i32 %4) {
%6 = icmp eq i32* %2, null
br i1 %6, label %8, label %7
7: ; preds = %5
store i32 0, i32* %2
br label %8
8: ; preds = %7, %5
ret void
}
void ScaleARGBRowDown2_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDown2_NEON() {
ret void
}
void INT_Excep_RIIC1_TEI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC1_TEI1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, char const *);
void badconv(const char *ch) { errx(1, "%%%s: bad conversion character", ch); }


x86 assembly (clang, -O0):
<badconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xed4(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badconv>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"%%%s: bad conversion character\00"
define void @badconv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @errx(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"%%%s: bad conversion character\00"
define void @badconv(i8* %0) {
%2 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int read_raw_byte(char *tag, void *_buffer, int offset) {
  *tag = *((char *)_buffer + offset);
  return ++offset;
}


x86 assembly (clang, -O0):
<read_raw_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_raw_byte>:
movslq %edx,%rax
mov    (%rsi,%rax,1),%cl
mov    %cl,(%rdi)
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @read_raw_byte(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
store i8 %11, i8* %12
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
store i32 %14, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @read_raw_byte(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
store i8 %6, i8* %0
%7 = add nsw i32 %2, 1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness14(int a) {
  unsigned max = ((~0U) & ((~0U) >> 1));
  clang_analyzer_eval(a <= max);
  clang_analyzer_eval((a + 2) <= max);
  clang_analyzer_eval((a + 2U) <= max);
}


x86 assembly (clang, -O0):
<mixedSignedness14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness14>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0xfffffffe,%ebx
setge  %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness14(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2147483647, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ule i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ule i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ule i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness14(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = icmp sgt i32 %0, -3
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
/* Variables and functions */
int lcd_put_str(char *);
int lcd_reset_pos();
int lcd_clear() {
  int ret;
  ret = lcd_put_str("                                ");
  if (ret)
    return ret;
  return lcd_reset_pos();
}


x86 assembly (clang, -O0):
<lcd_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <lcd_put_str@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <lcd_clear+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <lcd_clear+0x36>
mov    $0x0,%al
call   1030 <lcd_reset_pos@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_clear>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <lcd_put_str@plt>
test   %eax,%eax
je     1133 <lcd_clear+0x13>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <lcd_reset_pos@plt>

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

LLVM IR (-O2):
@.str = [33 x i8] c" \00"
define i32 @lcd_clear() {
%1 = tail call i32 @lcd_put_str(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @lcd_reset_pos()
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void StringPrint(long *s) { printf("match at thread: %ld\n", *s); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"match at thread: %ld\0A\00"
define void @StringPrint(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"match at thread: %ld\0A\00"
define void @StringPrint(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t psector_ReadIeee802_15_4_MacId1(void) {
  uint64_t (*p_psector_ReadIeee802_15_4_MacId1)(void);
  p_psector_ReadIeee802_15_4_MacId1 = (uint64_t(*)(void))0x030053b1U;
  return p_psector_ReadIeee802_15_4_MacId1();
}


x86 assembly (clang, -O0):
<psector_ReadIeee802_15_4_MacId1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x30053b1,%eax
mov    %rax,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psector_ReadIeee802_15_4_MacId1>:
mov    $0x30053b1,%eax
jmp    *%rax

LLVM IR (-O0):
define i32 @psector_ReadIeee802_15_4_MacId1() {
%1 = alloca i32 ()*
store i32 ()* inttoptr (i64 50353073 to i32 ()*), i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret i32 %3
}

LLVM IR (-O2):
define i32 @psector_ReadIeee802_15_4_MacId1() {
%1 = tail call i32 inttoptr (i64 50353073 to i32 ()*)()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ big();
int q(void) {
  big();
  big();
  big();
  big();
  big();
  big();
  big();
  big();
  big();
  big();
}


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

x86 assembly (clang, -O2):
<q>:
push   %rax
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
call   1030 <big@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <big@plt>

LLVM IR (-O0):
define i32 @q() {
%1 = alloca i32
%2 = call i32 (...) @big()
%3 = call i32 (...) @big()
%4 = call i32 (...) @big()
%5 = call i32 (...) @big()
%6 = call i32 (...) @big()
%7 = call i32 (...) @big()
%8 = call i32 (...) @big()
%9 = call i32 (...) @big()
%10 = call i32 (...) @big()
%11 = call i32 (...) @big()
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @q() {
%1 = tail call i32 (...) @big()
%2 = tail call i32 (...) @big()
%3 = tail call i32 (...) @big()
%4 = tail call i32 (...) @big()
%5 = tail call i32 (...) @big()
%6 = tail call i32 (...) @big()
%7 = tail call i32 (...) @big()
%8 = tail call i32 (...) @big()
%9 = tail call i32 (...) @big()
%10 = tail call i32 (...) @big()
ret i32 undef
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strnlen(char const *, size_t);
char *strndup(const char *str, size_t size) {
  size_t length = strnlen(str, size);
  char *result = malloc(length + 1);
  if (!result)
    return NULL;
  memcpy(result, str, length);
  result[length] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strnlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117a <strndup+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    119f <strndup+0x6f>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strnlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1164 <strndup+0x34>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = tail call i64 @strnlen(i8* %0, i64 %1)
%4 = add i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %3)
%9 = getelementptr inbounds i8, i8* %5, i64 %3
store i8 0, i8* %9
br label %10
10: ; preds = %2, %7
ret i8* %5
}
int CIRC_SPACE_TO_END(int head, int tail, int size) {
  int end = (size)-1 - (head);
  int n = (end + (tail)) & ((size)-1);
  return n <= end ? n : end + 1;
}


x86 assembly (clang, -O0):
<CIRC_SPACE_TO_END>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1141 <CIRC_SPACE_TO_END+0x41>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114a <CIRC_SPACE_TO_END+0x4a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CIRC_SPACE_TO_END>:
lea    -0x1(%rdx),%eax
mov    %eax,%ecx
sub    %edi,%ecx
lea    (%rsi,%rcx,1),%edx
and    %eax,%edx
lea    0x1(%rcx),%eax
cmp    %ecx,%edx
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @CIRC_SPACE_TO_END(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 1
%18 = and i32 %15, %17
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %7
%21 = icmp sle i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %3
%23 = load i32, i32* %8
br label %27
24: ; preds = %3
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
br label %27
27: ; preds = %24, %22
%28 = phi i32 [ %23, %22 ], [ %26, %24 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @CIRC_SPACE_TO_END(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = sub nsw i32 %4, %0
%6 = add nsw i32 %5, %1
%7 = and i32 %6, %4
%8 = icmp sgt i32 %7, %5
%9 = add nsw i32 %5, 1
%10 = select i1 %8, i32 %9, i32 %7
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int catchint(int signo) {
  printf("SIGINT Received\n");
  signal(SIGINT, SIG_DFL);
}


x86 assembly (clang, -O0):
<catchint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catchint>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1040 <signal@plt>

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

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_DFL = global i32 0
@str = [16 x i8] c"SIGINT Received\00"
define i32 @catchint(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @SIGINT
%4 = load i32, i32* @SIG_DFL
%5 = tail call i32 @signal(i32 %3, i32 %4)
ret i32 undef
}
int exec_gitflow_command(const char *cmd, const char **argv) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @exec_gitflow_command(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 0
}
void gtk_combo_box_entry_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_entry_get_type() {
ret void
}
void addon_collect_data() {}


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

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

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

LLVM IR (-O2):
define void @addon_collect_data() {
ret void
}
regx0adr1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[x0]) = (*((float *)(11111111 & ~(__alignof__(float) - 1)))); }


x86 assembly (clang, -O0):
<regx0adr1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    $0xa98ac4,%eax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adr1_set>:
movss  0xa98ac4,%xmm0
movslq %edi,%rax
movss  %xmm0,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define i32 @regx0adr1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float, float* inttoptr (i64 11111108 to float*)
%17 = load float*, float** %12
%18 = load i32, i32* %10
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds float, float* %17, i64 %19
store float %16, float* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @regx0adr1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = load float, float* inttoptr (i64 11111108 to float*)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds float, float* %4, i64 %8
store float %7, float* %9
ret i32 undef
}
/* Variables and functions */
double slrgb(double);
double s8lrgb(double s8) { return slrgb(s8 * (1. / 255.)); }


x86 assembly (clang, -O0):
<s8lrgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <slrgb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s8lrgb>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <slrgb@plt>

LLVM IR (-O0):
define double @s8lrgb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3F70101010101010
%5 = call double @slrgb(double %4)
ret double %5
}

LLVM IR (-O2):
define double @s8lrgb(double %0) {
%2 = fmul double %0, 0x3F70101010101010
%3 = tail call double @slrgb(double %2)
ret double %3
}
void simtec_clock_gen_setup_defaults() {}


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

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

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

LLVM IR (-O2):
define void @simtec_clock_gen_setup_defaults() {
ret void
}
void *forever_task(void *arg) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<forever_task>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
jmp    1108 <forever_task+0x8>

x86 assembly (clang, -O2):
<forever_task>:
jmp    1100 <forever_task>

LLVM IR (-O0):
define i8* @forever_task(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %3, %1
br label %3
}

LLVM IR (-O2):
define noalias i8* @forever_task(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
unsigned int test_26(unsigned int a, unsigned int b) {
  return (b << 3) | (a >> 31);
}


x86 assembly (clang, -O0):
<test_26>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_26>:
shr    $0x1f,%edi
lea    (%rdi,%rsi,8),%eax
ret

LLVM IR (-O0):
define i32 @test_26(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 3
%7 = load i32, i32* %3
%8 = lshr i32 %7, 31
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_26(i32 %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = lshr i32 %0, 31
%5 = or i32 %3, %4
ret i32 %5
}