xunge/DecIR huggingface dataset:
int my_str_isupper(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    if (!(str[i] >= 'A' && str[i] <= 'Z'))
      return (0);
    i++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1168 <my_str_isupper+0x68>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x41,%eax
jl     114e <my_str_isupper+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jle    115a <my_str_isupper+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    116f <my_str_isupper+0x6f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_isupper+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isupper>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isupper+0x23>
add    $0x1,%rdi
nop
add    $0xbf,%cl
cmp    $0x1a,%cl
jae    1124 <my_str_isupper+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isupper+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_str_isupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -65
%12 = icmp ult i8 %11, 26
%13 = add nuw i64 %9, 1
br i1 %12, label %4, label %14
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
void test_libsym2_2(void) {}


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

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

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

LLVM IR (-O2):
define void @test_libsym2_2() {
ret void
}
void gtk_adjustment_set_value() {}


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

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

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

LLVM IR (-O2):
define void @gtk_adjustment_set_value() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cmd_ArgsFrom(int);
int /*<<< orphan*/ Q_strncpyz(char *, int /*<<< orphan*/, int);
void Cmd_ArgsBuffer(char *buffer, int bufferLength) {
  Q_strncpyz(buffer, Cmd_ArgsFrom(1), bufferLength);
}


x86 assembly (clang, -O0):
<Cmd_ArgsBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <Cmd_ArgsFrom@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0xc(%rbp),%edx
call   1040 <Q_strncpyz@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cmd_ArgsBuffer>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x1,%edi
call   1030 <Cmd_ArgsFrom@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Q_strncpyz@plt>

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

LLVM IR (-O2):
define void @Cmd_ArgsBuffer(i8* %0, i32 %1) {
%3 = tail call i32 @Cmd_ArgsFrom(i32 1)
%4 = tail call i32 @Q_strncpyz(i8* %0, i32 %3, i32 %1)
ret void
}
char *strlwr(str)
char *str;
{
  char *ptr = str;
  while (*ptr) {
    *ptr = tolower(*ptr);
    ptr++;
  }
  return str;
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <strlwr+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strlwr+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <strlwr+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strlwr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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


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

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

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

LLVM IR (-O2):
define void @XrmPutFileDatabase() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ fset_to_file_fill(int);
void fset_to_file_fill_test(void **state) {
  assert_int_equal(0x0101010101010101ul | 0x0404040404040404ul |
                       0x0808080808080808ul | 0x2020202020202020ul,
                   fset_to_file_fill(0x2D));
}


x86 assembly (clang, -O0):
<fset_to_file_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2d,%edi
call   1040 <fset_to_file_fill@plt>
mov    %eax,%esi
mov    $0x2d2d2d2d,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fset_to_file_fill_test>:
push   %rax
mov    $0x2d,%edi
call   1040 <fset_to_file_fill@plt>
mov    $0x2d2d2d2d,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @fset_to_file_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @fset_to_file_fill(i32 45)
%4 = call i32 @assert_int_equal(i32 757935405, i32 %3)
ret void
}

LLVM IR (-O2):
define void @fset_to_file_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @fset_to_file_fill(i32 45)
%3 = tail call i32 @assert_int_equal(i32 757935405, i32 %2)
ret void
}
/* Variables and functions */
int gzreplace(char *, char *, char *, int /*<<< orphan*/ *, char *);
int gzinsert(char *input_file, char *output_file, char *off_str,
             char *member_file) {
  return gzreplace(input_file, output_file, off_str, NULL, member_file);
}


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

x86 assembly (clang, -O2):
<gzinsert>:
mov    %rcx,%r8
xor    %ecx,%ecx
jmp    1030 <gzreplace@plt>

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

LLVM IR (-O2):
define i32 @gzinsert(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @gzreplace(i8* %0, i8* %1, i8* %2, i32* null, i8* %3)
ret i32 %5
}
/* Variables and functions */
long double tand(long double);
long double tand_neg(long double x) { return -tand(x); }


x86 assembly (clang, -O0):
<tand_neg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <tand@plt>
fchs
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tand_neg>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <tand@plt>
fchs
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @tand_neg(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @tand(x86_fp80 %3)
%5 = fneg x86_fp80 %4
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @tand_neg(x86_fp80 %0) {
%2 = tail call x86_fp80 @tand(x86_fp80 %0)
%3 = fneg x86_fp80 %2
ret x86_fp80 %3
}
/* Variables and functions */
scalar_t__ count(int *, int);
int test_zero_groups() {
  int array[] = {7, 1};
  return 0 == count(array, 2);
}


x86 assembly (clang, -O0):
<test_zero_groups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <count@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_zero_groups>:
push   %rax
movabs $0x100000007,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <count@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.test_zero_groups.array = [2 x i32] [i32 7, i32 1]
define i32 @test_zero_groups() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i64 @count(i32* %3, i32 2)
%5 = icmp eq i64 0, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_zero_groups() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 4294967303, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = call i64 @count(i32* %3, i32 2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ XPoint;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XPoint(void) {
  XPoint *_p = (XPoint *)malloc(sizeof(XPoint));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XPoint+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XPoint>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XPoint+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XPoint() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XPoint() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
int CompareChar(const void *elemA, const void *elemB) {
  return (*(char *)elemA - *(char *)elemB);
}


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

x86 assembly (clang, -O2):
<CompareChar>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @CompareChar(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
long Max(const long a, const long b) {
  if (a > b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<Max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <Max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <Max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @Max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
unsigned int INT_MAX;
int /*<<< orphan*/ die(char *);
void *malloc(unsigned int);
void *sysutil_malloc(unsigned int size) {
  void *p_ret;
  if (size == 0 || size > INT_MAX) {
  }
  p_ret = malloc(size);
  if (p_ret == NULL) {
    die("malloc");
  }
  return p_ret;
}


x86 assembly (clang, -O0):
<sysutil_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1147 <sysutil_malloc+0x27>
mov    -0x4(%rbp),%eax
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%eax
jbe    114c <sysutil_malloc+0x2c>
jmp    114c <sysutil_malloc+0x2c>
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <sysutil_malloc+0x4f>
lea    0xe96(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysutil_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <sysutil_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@INT_MAX = global i32 0
@.str = [7 x i8] c"malloc\00"
define i8* @sysutil_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @INT_MAX
%9 = icmp ugt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %6, %1
br label %11
11: ; preds = %10, %6
%12 = load i32, i32* %2
%13 = call i8* @malloc(i32 %12)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @die(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %11
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@INT_MAX = global i32 0
@.str = [7 x i8] c"malloc\00"
define noalias i8* @sysutil_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ regression_enomem(struct __test_metadata *);
void wrapper_regression_enomem(struct __test_metadata *_metadata,
                               struct __fixture_variant_metadata *variant) {
  regression_enomem(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_regression_enomem>:
jmp    1030 <regression_enomem@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_regression_enomem(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @regression_enomem(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_regression_enomem(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @regression_enomem(%struct.__test_metadata* %0)
ret void
}
int g(int m) {
  if (m <= 2)
    return m + 13;
  else
    return m + 1;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     111f <g+0x1f>
mov    -0x8(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x4(%rbp)
jmp    1128 <g+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    0x1(%rdi),%ecx
lea    0xd(%rdi),%eax
cmp    $0x3,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp slt i32 %0, 3
%3 = select i1 %2, i32 13, i32 1
%4 = add nsw i32 %3, %0
ret i32 %4
}
void swap(double *a, double *b) {
  double temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
void avformat_close_input() {}


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

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

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

LLVM IR (-O2):
define void @avformat_close_input() {
ret void
}
char *memchr(s, c, n)
register char *s;
register char c;
register unsigned n;
{
  while (n--) {
    if (*s++ == c)
      return s - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     1159 <memchr+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1154 <memchr+0x54>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1161 <memchr+0x61>
jmp    1111 <memchr+0x11>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
add    $0xffffffffffffffff,%rax
nopl   0x0(%rax,%rax,1)
sub    $0x1,%edx
jb     1122 <memchr+0x22>
movsbl 0x1(%rax),%esi
add    $0x1,%rax
cmp    %esi,%ecx
jne    1110 <memchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 24
%5 = ashr exact i32 %4, 24
br label %6
6: ; preds = %10, %3
%7 = phi i8* [ %0, %3 ], [ %12, %10 ]
%8 = phi i32 [ %2, %3 ], [ %11, %10 ]
%9 = icmp eq i32 %8, 0
br i1 %9, label %16, label %10
10: ; preds = %6
%11 = add i32 %8, -1
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %7
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %5, %14
br i1 %15, label %16, label %6
16: ; preds = %6, %10
%17 = phi i8* [ %7, %10 ], [ null, %6 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int max(int x, int y) {
  int z;
  if (x > y)
    z = x;
  else
    z = y;
  return z;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int test_imm_A0int16_mem(short *val) {
  return ((*val) & (0xA0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A0int16_mem>:
testb  $0xa0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_unpackhi_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_unpackhi_epi64(__m128i A, __m128i B) {
  return _mm_unpackhi_epi64(A, B);
}


x86 assembly (clang, -O0):
<test_mm_unpackhi_epi64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_unpackhi_epi64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_unpackhi_epi64>:
jmp    1030 <_mm_unpackhi_epi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_unpackhi_epi64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpackhi_epi64(i32 %0, i32 %1)
ret i32 %3
}
int execute_setfsuid32() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setfsuid32() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
char *_sprintf_va(char *, char const *, int /*<<< orphan*/);
char *sprintf_va(char *buffer, const char *fmt, va_list args) {
  return _sprintf_va(buffer, fmt, args);
}


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

x86 assembly (clang, -O2):
<sprintf_va>:
jmp    1030 <_sprintf_va@plt>

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

LLVM IR (-O2):
define i8* @sprintf_va(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @_sprintf_va(i8* %0, i8* %1, i32 %2)
ret i8* %4
}
void CursorUp(HowMuch) int HowMuch;
{
  char Str[10];
  if (HowMuch == 0)
    return;
  sprintf(Str, "\033[%dA", HowMuch);
  WRITETEST(Str);
}


x86 assembly (clang, -O0):
<CursorUp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <CursorUp+0x1a>
jmp    115a <CursorUp+0x3a>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0xe(%rbp),%rdi
mov    $0x0,%al
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CursorUp>:
test   %edi,%edi
je     1150 <CursorUp+0x30>
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
lea    0xece(%rip),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dA\00"
define void @CursorUp(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %11)
br label %13
13: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dA\00"
define void @CursorUp(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %3)
br label %8
8: ; preds = %1, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keys(unsigned char c, int x, int y) {
  if (c == 0x1b)
    exit(0);
}


x86 assembly (clang, -O0):
<keys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    1138 <keys+0x28>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keys>:
cmp    $0x1b,%dil
je     1117 <keys+0x7>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @keys(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 27
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @keys(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
void i2sStopRecord(void) {
  *((volatile unsigned int *)((0xB0009000 + 0x04))) =
      (*((volatile unsigned int *)((0xB0009000 + 0x04)))) & ~(1 << 6);
}


x86 assembly (clang, -O0):
<i2sStopRecord>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0009004,%eax
mov    (%rax),%ecx
and    $0xffffffbf,%ecx
mov    $0xb0009004,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2sStopRecord>:
mov    $0xb0009004,%eax
andl   $0xffffffbf,(%rax)
ret

LLVM IR (-O0):
define void @i2sStopRecord() {
%1 = load volatile i32, i32* inttoptr (i64 2952826884 to i32*)
%2 = and i32 %1, -65
store volatile i32 %2, i32* inttoptr (i64 2952826884 to i32*)
ret void
}

LLVM IR (-O2):
define void @i2sStopRecord() {
%1 = load volatile i32, i32* inttoptr (i64 2952826884 to i32*)
%2 = and i32 %1, -65
store volatile i32 %2, i32* inttoptr (i64 2952826884 to i32*)
ret void
}
int getnumsep(int digits) {
  int separators = (digits - ((digits % 3 == 0) ? 1 : 0)) / 3;
  return separators;
}


x86 assembly (clang, -O0):
<getnumsep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
mov    %edx,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmove  %edx,%ecx
sub    %ecx,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnumsep>:
imul   $0xaaaaaaab,%edi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555555,%eax
sbb    $0x0,%edi
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getnumsep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = srem i32 %5, 3
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
%10 = sub nsw i32 %4, %9
%11 = sdiv i32 %10, 3
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @getnumsep(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = sext i1 %3 to i32
%5 = add i32 %4, %0
%6 = sdiv i32 %5, 3
ret i32 %6
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glutSwapBuffers();
int /*<<< orphan*/ render();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  render();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1050 <render@plt>
mov    $0x0,%al
call   1040 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1050 <render@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 (...) @render()
%6 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 (...) @render()
%6 = tail call i32 (...) @glutSwapBuffers()
ret void
}
void seq_putc(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<seq_putc>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_putc>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.seq_putc = [9 x i8] c"seq_putc\00"
define void @seq_putc() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.seq_putc, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.seq_putc = [9 x i8] c"seq_putc\00"
define void @seq_putc() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.seq_putc, i64 0, i64 0))
ret void
}
void opencl_union_ndrange_run_partial(struct opencl_union_ndrange_t *ndrange,
                                      unsigned int *work_group_start,
                                      unsigned int *work_group_count) {
  m2s_opencl_fatal("%s: This function should never be called\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<opencl_union_ndrange_run_partial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
lea    0xef8(%rip),%rsi
mov    $0x0,%al
call   1030 <m2s_opencl_fatal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opencl_union_ndrange_run_partial>:
lea    0xee9(%rip),%rdi
lea    0xf0c(%rip),%rsi
xor    %eax,%eax
jmp    1030 <m2s_opencl_fatal@plt>

LLVM IR (-O0):
%struct.opencl_union_ndrange_t = type opaque
@.str = [42 x i8] c"%s: This function should never be called\0A\00"
@__FUNCTION__.opencl_union_ndrange_run_partial = [33 x i8] c"opencl_union_ndrange_run_partial\00"
define void @opencl_union_ndrange_run_partial(%struct.opencl_union_ndrange_t* %0, i32* %1, i32* %2) {
%4 = alloca %struct.opencl_union_ndrange_t*
%5 = alloca i32*
%6 = alloca i32*
store %struct.opencl_union_ndrange_t* %0, %struct.opencl_union_ndrange_t** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @m2s_opencl_fatal to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__FUNCTION__.opencl_union_ndrange_run_partial, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.opencl_union_ndrange_t = type opaque
@.str = [42 x i8] c"%s: This function should never be called\0A\00"
@__FUNCTION__.opencl_union_ndrange_run_partial = [33 x i8] c"opencl_union_ndrange_run_partial\00"
define void @opencl_union_ndrange_run_partial(%struct.opencl_union_ndrange_t* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @m2s_opencl_fatal to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__FUNCTION__.opencl_union_ndrange_run_partial, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ chunk_mr_unlock(int /*<<< orphan*/);
int /*<<< orphan*/ meta_version_inc();
uint8_t fs_mr_unlock(uint64_t chunkid) {
  meta_version_inc();
  return chunk_mr_unlock(chunkid);
}


x86 assembly (clang, -O0):
<fs_mr_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <meta_version_inc@plt>
mov    -0x4(%rbp),%edi
call   1030 <chunk_mr_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_mr_unlock>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <meta_version_inc@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <chunk_mr_unlock@plt>

LLVM IR (-O0):
define i32 @fs_mr_unlock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @meta_version_inc()
%4 = load i32, i32* %2
%5 = call i32 @chunk_mr_unlock(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fs_mr_unlock(i32 %0) {
%2 = tail call i32 (...) @meta_version_inc()
%3 = tail call i32 @chunk_mr_unlock(i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_add_pi16(__m64 a, __m64 b) { return _mm_add_pi16(a, b); }


x86 assembly (clang, -O0):
<test_mm_add_pi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_add_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_add_pi16>:
jmp    1030 <_mm_add_pi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_add_pi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ bsd_syscall_send(int, void *, size_t, int);
int host_thread_enter_tcpip_region(int);
int /*<<< orphan*/ host_thread_exit_tcpip_region(int);
ssize_t uptcp_send(int s, void *msg, size_t len, int flags) {
  int thread_id = host_thread_enter_tcpip_region(1);
  ssize_t res = bsd_syscall_send(s, msg, len, flags);
  host_thread_exit_tcpip_region(thread_id);
  return res;
}


x86 assembly (clang, -O0):
<uptcp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x1,%edi
call   1040 <host_thread_enter_tcpip_region@plt>
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <bsd_syscall_send@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%edi
call   1050 <host_thread_exit_tcpip_region@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptcp_send>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %edi,%ebx
mov    $0x1,%edi
call   1040 <host_thread_enter_tcpip_region@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1030 <bsd_syscall_send@plt>
mov    %eax,%ebx
mov    %r12d,%edi
call   1050 <host_thread_exit_tcpip_region@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @uptcp_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%11 = call i32 @host_thread_enter_tcpip_region(i32 1)
store i32 %11, i32* %9
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = load i64, i64* %7
%15 = load i32, i32* %8
%16 = call i32 @bsd_syscall_send(i32 %12, i8* %13, i64 %14, i32 %15)
store i32 %16, i32* %10
%17 = load i32, i32* %9
%18 = call i32 @host_thread_exit_tcpip_region(i32 %17)
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
define i32 @uptcp_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @host_thread_enter_tcpip_region(i32 1)
%6 = tail call i32 @bsd_syscall_send(i32 %0, i8* %1, i64 %2, i32 %3)
%7 = tail call i32 @host_thread_exit_tcpip_region(i32 %5)
ret i32 %6
}
void atomic_pause() {}


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

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

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

LLVM IR (-O2):
define void @atomic_pause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  int x;
  char ch;
  float flt;
  x = 10;
  printf("integer: %d\n", x);
  ch = 'a';
  printf("character: %c\n", ch);
  flt = 10.2;
  printf("floating point: %f\n", flt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
movb   $0x61,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"integer: %d\0A\00"
@.str.1 = [15 x i8] c"character: %c\0A\00"
@.str.2 = [20 x i8] c"floating point: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
store i32 0, i32* %1
store i32 10, i32* %2
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to float
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %6)
store i8 97, i8* %3
%8 = load i8, i8* %3
%9 = sitofp i8 %8 to float
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float %9)
store float 0x4024666660000000, float* %4
%11 = load float, float* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"integer: %d\0A\00"
@.str.1 = [15 x i8] c"character: %c\0A\00"
@.str.2 = [20 x i8] c"floating point: %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float 1.000000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float 9.700000e+01)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float 0x4024666660000000)
ret i32 0
}