xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
struct tm *time___new_Tm_gmtime_from_timet___impl(time_t t) {
  struct tm *tm;
  tm = gmtime(&t);
  return tm;
}


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

x86 assembly (clang, -O2):
<time___new_Tm_gmtime_from_timet___impl>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <gmtime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @time___new_Tm_gmtime_from_timet___impl(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @gmtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
ret %struct.tm* %5
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @time___new_Tm_gmtime_from_timet___impl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @gmtime(i32* %2)
ret %struct.tm* %3
}
void __attribute__((__warning__("curl_easy_setopt expects a struct "
                                "curl_httppost* argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_curl_httpost(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_curl_httpost() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
const unsigned char *skip_whitespace(const unsigned char *in) {
  while (in && *in && (*in <= 32)) {
    in++;
  }
  return in;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113d <skip_whitespace+0x3d>
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     113d <skip_whitespace+0x3d>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    114d <skip_whitespace+0x4d>
jmp    115e <skip_whitespace+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_whitespace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
test   %rdi,%rdi
je     1121 <skip_whitespace+0x21>
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
add    $0xff,%cl
cmp    $0x20,%cl
jb     1110 <skip_whitespace+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @skip_whitespace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = add i8 %5, -1
%7 = icmp ult i8 %6, 32
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %3, label %9
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
int g(int, int, int, int);
scalar_t__ h();
int f() {
  int some_value = 20;
  if (h()) {
    some_value += g(1, 2, 3, 4);
  }
  some_value += 10;
  return g(some_value, some_value, some_value, some_value);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x14,-0x4(%rbp)
mov    $0x0,%al
call   1030 <h@plt>
cmp    $0x0,%rax
je     115f <f+0x3f>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1040 <g@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
call   1040 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %eax,%eax
call   1030 <h@plt>
test   %rax,%rax
je     114d <f+0x2d>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1040 <g@plt>
mov    %eax,%ecx
add    $0x1e,%ecx
jmp    1152 <f+0x32>
mov    $0x1e,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
pop    %rax
jmp    1040 <g@plt>

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

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i64 (...) @h()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @g(i32 1, i32 2, i32 3, i32 4)
%5 = add i32 %4, 30
br label %6
6: ; preds = %3, %0
%7 = phi i32 [ %5, %3 ], [ 30, %0 ]
%8 = tail call i32 @g(i32 %7, i32 %7, i32 %7, i32 %7)
ret i32 %8
}
double fx(double x) { return 3 * x; }


x86 assembly (clang, -O0):
<fx>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fx>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @fx(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 3.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @fx(double %0) {
%2 = fmul double %0, 3.000000e+00
ret double %2
}
/* Variables and functions */
char *iupStrGetSmallMem();
int /*<<< orphan*/ sprintf(char *, char *, int, char, int);
char *iupStrReturnIntInt(int i1, int i2, char sep) {
  char *str = iupStrGetSmallMem();
  sprintf(str, "%d%c%d", i1, sep, i2);
  return str;
}


x86 assembly (clang, -O0):
<iupStrReturnIntInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0x0,%al
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%r8d
lea    0xead(%rip),%rsi
movsbl %al,%ecx
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupStrReturnIntInt>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,%rbp
lea    0xec0(%rip),%rsi
mov    %rax,%rdi
mov    %ebx,%edx
mov    %r14d,%ecx
mov    %r15d,%r8d
call   1040 <sprintf@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d%c%d\00"
define i8* @iupStrReturnIntInt(i32 %0, i32 %1, i8 signext %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 = call i8* (...) @iupStrGetSmallMem()
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = load i32, i32* %4
%11 = load i8, i8* %6
%12 = load i32, i32* %5
%13 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %10, i8 signext %11, i32 %12)
%14 = load i8*, i8** %7
ret i8* %14
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%c%d\00"
define i8* @iupStrReturnIntInt(i32 %0, i32 %1, i8 signext %2) {
%4 = tail call i8* (...) @iupStrGetSmallMem()
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i8 signext %2, i32 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popinteger16array(long long int *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 16));
}


x86 assembly (clang, -O0):
<popinteger16array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popinteger16array>:
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popinteger16array(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = bitcast i64* %5 to i8*
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 16
%9 = call i32 @popNarray(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popinteger16array(i64* %0, i32 %1) {
%3 = bitcast i64* %0 to i8*
%4 = shl nsw i32 %1, 4
%5 = tail call i32 @popNarray(i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_signed();
int /*<<< orphan*/ test_unsigned();
int main() {
  test_unsigned();
  test_signed();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_unsigned()
%2 = tail call i32 (...) @test_signed()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Test2();
int main() {
  Test2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Test2()
ret i32 0
}
/* Variables and functions */
void *debugmalloc_malloc_full(size_t, char *, char *, char *,
                              int /*<<< orphan*/, int);
void *debugmalloc_calloc(size_t nmemb, size_t meret) {
  return debugmalloc_malloc_full(meret, "calloc", "ismeretlen", "(ismeretlen)",
                                 0, 1);
}


x86 assembly (clang, -O0):
<debugmalloc_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
lea    0xed5(%rip),%rdx
lea    0xed9(%rip),%rcx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1030 <debugmalloc_malloc_full@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugmalloc_calloc>:
mov    %rsi,%rdi
lea    0xee6(%rip),%rsi
lea    0xee6(%rip),%rdx
lea    0xeea(%rip),%rcx
xor    %r8d,%r8d
mov    $0x1,%r9d
jmp    1030 <debugmalloc_malloc_full@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"calloc\00"
@.str.1 = [11 x i8] c"ismeretlen\00"
@.str.2 = [13 x i8] c"(ismeretlen)\00"
define i8* @debugmalloc_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @debugmalloc_malloc_full(i64 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1)
ret i8* %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
@.str.1 = [11 x i8] c"ismeretlen\00"
@.str.2 = [13 x i8] c"(ismeretlen)\00"
define i8* @debugmalloc_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @debugmalloc_malloc_full(i64 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("The key is MCA-98DA37CC\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"The key is MCA-98DA37CC\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"The key is MCA-98DA37CC\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void BN_dup(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_dup() {
ret void
}
/* Type definitions */
struct stat {
  long st_size;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
long get_file_size(const char *filename) {
  struct stat statbuf;
  return stat(filename, &statbuf) < 0 ? -1 : statbuf.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    1143 <get_file_size+0x33>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    114b <get_file_size+0x3b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffffffffffff,%rax
test   %rcx,%rcx
js     112c <get_file_size+0x1c>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%10 = load i64, i64* %9
br label %11
11: ; preds = %8, %7
%12 = phi i64 [ -1, %7 ], [ %10, %8 ]
ret i64 %12
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, -1
%8 = select i1 %7, i64 %6, i64 -1
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fz_trace_end_tile(void *user) { printf("</tile>\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"</tile>\0A\00"
define void @fz_trace_end_tile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"</tile>\00"
define void @fz_trace_end_tile(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ expected_pk_fault(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ pkey_write_deny(int /*<<< orphan*/);
int /*<<< orphan*/ sigsafe_printf(char *, int /*<<< orphan*/);
void test_write_of_write_disabled_region(int *ptr, uint16_t pkey) {
  do {
    if (1 <= 0)
      sigsafe_printf("disabling write access to PKEY[%02d], doing write\n",
                     pkey);
    fflush(NULL);
  } while (0);
  pkey_write_deny(pkey);
  *ptr = 1012;
  expected_pk_fault(pkey);
}


x86 assembly (clang, -O0):
<test_write_of_write_disabled_region>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
mov    -0xc(%rbp),%edi
call   1030 <pkey_write_deny@plt>
mov    -0x8(%rbp),%rax
movl   $0x3f4,(%rax)
mov    -0xc(%rbp),%edi
call   1050 <expected_pk_fault@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_write_of_write_disabled_region>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <fflush@plt>
mov    %ebx,%edi
call   1030 <pkey_write_deny@plt>
movl   $0x3f4,(%r14)
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <expected_pk_fault@plt>

LLVM IR (-O0):
define void @test_write_of_write_disabled_region(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = call i32 @fflush(i32* null)
br label %7
7: ; preds = %5
%8 = load i32, i32* %4
%9 = call i32 @pkey_write_deny(i32 %8)
%10 = load i32*, i32** %3
store i32 1012, i32* %10
%11 = load i32, i32* %4
%12 = call i32 @expected_pk_fault(i32 %11)
ret void
}

LLVM IR (-O2):
define void @test_write_of_write_disabled_region(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @fflush(i32* null)
%4 = tail call i32 @pkey_write_deny(i32 %1)
store i32 1012, i32* %0
%5 = tail call i32 @expected_pk_fault(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int, int, int);
int main() {
  if (foo(1, 2, 3) != 3)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <foo@plt>
cmp    $0x3,%eax
je     1153 <main+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <foo@plt>
cmp    $0x3,%eax
jne    113e <main+0x1e>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 1, i32 2, i32 3)
%3 = icmp ne i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2, i32 3)
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _delay_us(int);
int /*<<< orphan*/ clear_SDA();
int /*<<< orphan*/ send_SCL_pulse();
int /*<<< orphan*/ set_SDA_output();
void send_ACK(void) {
  clear_SDA();
  set_SDA_output();
  _delay_us(1);
  send_SCL_pulse();
}


x86 assembly (clang, -O0):
<send_ACK>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <clear_SDA@plt>
mov    $0x0,%al
call   1040 <set_SDA_output@plt>
mov    $0x1,%edi
call   1030 <_delay_us@plt>
mov    $0x0,%al
call   1050 <send_SCL_pulse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_ACK>:
push   %rax
xor    %eax,%eax
call   1060 <clear_SDA@plt>
xor    %eax,%eax
call   1040 <set_SDA_output@plt>
mov    $0x1,%edi
call   1030 <_delay_us@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <send_SCL_pulse@plt>

LLVM IR (-O0):
define void @send_ACK() {
%1 = call i32 (...) @clear_SDA()
%2 = call i32 (...) @set_SDA_output()
%3 = call i32 @_delay_us(i32 1)
%4 = call i32 (...) @send_SCL_pulse()
ret void
}

LLVM IR (-O2):
define void @send_ACK() {
%1 = tail call i32 (...) @clear_SDA()
%2 = tail call i32 (...) @set_SDA_output()
%3 = tail call i32 @_delay_us(i32 1)
%4 = tail call i32 (...) @send_SCL_pulse()
ret void
}
void *overwrite(void *user, void *data) { return user; }


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

x86 assembly (clang, -O2):
<overwrite>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @overwrite(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
ret i8* %5
}

LLVM IR (-O2):
define i8* @overwrite(i8* readnone returned %0, i8* nocapture readnone %1) {
ret i8* %0
}
int check(double r, long long int n) { return r == (double)2 * n; }


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm2
movsd  0xee0(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
cvtsi2sd %rdi,%xmm1
addsd  %xmm1,%xmm1
cmpeqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @check(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
%5 = load double, double* %3
%6 = load i64, i64* %4
%7 = sitofp i64 %6 to double
%8 = fmul double 2.000000e+00, %7
%9 = fcmp oeq double %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @check(double %0, i64 %1) {
%3 = sitofp i64 %1 to double
%4 = fmul double %3, 2.000000e+00
%5 = fcmp oeq double %4, %0
%6 = zext i1 %5 to i32
ret i32 %6
}
int divpwr2(int x, int n) {
  int sign = x >> 31;
  int mask = (1 << n) + (~0);
  int bias = sign & mask;
  return (x + bias) >> n;
}


x86 assembly (clang, -O0):
<divpwr2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divpwr2>:
mov    %esi,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
mov    %edi,%eax
sar    $0x1f,%eax
and    %edx,%eax
add    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @divpwr2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = ashr i32 %8, 31
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = add nsw i32 %11, -1
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = and i32 %13, %14
store i32 %15, i32* %7
%16 = load i32, i32* %3
%17 = load i32, i32* %7
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %4
%20 = ashr i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @divpwr2(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 %4, i32 0
%7 = add nsw i32 %6, %0
%8 = ashr i32 %7, %1
ret i32 %8
}
int fun238() { return 238; }


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

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

LLVM IR (-O0):
define i32 @fun238() {
ret i32 238
}

LLVM IR (-O2):
define i32 @fun238() {
ret i32 238
}
void gtk_text_iter_get_visible_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_visible_text() {
ret void
}
/* Type definitions */
struct INT_SHO {
  int x;
  short y;
};

/* Variables and functions */
int /*<<< orphan*/ g(int *, int *);
int main() {
  union INT_SHO {
    int x;
    short y;
  } u;
  u.y = 314;
  g(&u.x, &u.y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x13a,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <g@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x13a,(%rsp)
mov    %rsp,%rdi
mov    %rdi,%rsi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.INT_SHO = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.INT_SHO
store i32 0, i32* %1
%3 = bitcast %union.INT_SHO* %2 to i16*
store i16 314, i16* %3
%4 = bitcast %union.INT_SHO* %2 to i32*
%5 = bitcast %union.INT_SHO* %2 to i16*
%6 = bitcast i16* %5 to i32*
%7 = call i32 @g(i32* %4, i32* %6)
ret i32 0
}

LLVM IR (-O2):
%union.INT_SHO = type { i32 }
define i32 @main() {
%1 = alloca %union.INT_SHO
%2 = bitcast %union.INT_SHO* %1 to i8*
%3 = bitcast %union.INT_SHO* %1 to i16*
store i16 314, i16* %3
%4 = getelementptr inbounds %union.INT_SHO, %union.INT_SHO* %1, i64 0, i32 0
%5 = call i32 @g(i32* %4, i32* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void set_wifi_5g() {
  system("echo '{\"method\":\"pref-set\",\"arguments\":{\"confs\":{\"wl_"
         "band\":\"5GHz\"}}}' | /web/rpc.cgi >/dev/null 2>&1");
  system("echo '{\"method\":\"revalidate\",\"arguments\":{\"wl\":{\"act"
         "ion\":\"restart\"}}}' | /web/rpc.cgi >/dev/null 2>&1");
}


x86 assembly (clang, -O0):
<set_wifi_5g>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xf3e(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_wifi_5g>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xf41(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [101 x i8] c"echo '{\22method\22:\22pref-set\22,\22arguments\22:{\22confs\22:{\22wl_band\22:\225GHz\22}}}' | /web/rpc.cgi >/dev/null 2>&1\00"
@.str.1 = [102 x i8] c"echo '{\22method\22:\22revalidate\22,\22arguments\22:{\22wl\22:{\22action\22:\22restart\22}}}' | /web/rpc.cgi >/dev/null 2>&1\00"
define void @set_wifi_5g() {
%1 = call i32 @system(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [101 x i8] c"echo '{\22method\22:\22pref-set\22,\22arguments\22:{\22confs\22:{\22wl_band\22:\225GHz\22}}}' | /web/rpc.cgi >/dev/null 2>&1\00"
@.str.1 = [102 x i8] c"echo '{\22method\22:\22revalidate\22,\22arguments\22:{\22wl\22:{\22action\22:\22restart\22}}}' | /web/rpc.cgi >/dev/null 2>&1\00"
define void @set_wifi_5g() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_A0int8_mem(signed char *val) {
  return ((*val) & (-0xA0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A0int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff60,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A0int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %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_A0int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -160
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
void f() {
  long x = 0;
  char *y = (char *)&x;
  char c = y[0] + y[1] + y[2];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    %al,-0x11(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i64
%2 = alloca i8*
%3 = alloca i8
store i64 0, i64* %1
%4 = bitcast i64* %1 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = add nsw i32 %8, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = add nsw i32 %13, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %3
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("dodo - scriptable in place file editor\n"
       "In non-interactive mode, dodo takes a single argument of <filename>\n"
       "and will read commands from stdin\n"
       "\n"
       "example:\n"
       "  dodo [-i|--interactive] <filename> <<EOF\n"
       "  b6        # goto byte 6\n"
       "  e/world/  # check for string 'world'\n"
       "  w/hello/  # write string 'hello'\n"
       "  q         #quit\n"
       "  EOF\n"
       "\n"
       "supported commands:\n"
       "  bn        # goto byte <n> of file\n"
       "  ln        # goto line <n> of file\n"
       "  p         # print 100 bytes\n"
       "  pn        # print n bytes\n"
       "  e/str/    # compare <str> to current position, exit if not equal\n"
       "  w/str/    # write <str> to current position\n"
       "  q         # quit editing\n"
       "  # used for commenting out rest of line\n");
}


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

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

LLVM IR (-O0):
@.str = [651 x i8] c"dodo - scriptable in place file editor\0AIn non-interactive mode, dodo takes a single argument of <filename>\0Aand will read commands from stdin\0A\0Aexample:\0A dodo [-i|--interactive] <filename> <<EOF\0A b6 # goto byte 6\0A e/world/ # check for string 'world'\0A w/hello/ # write string 'hello'\0A q #quit\0A EOF\0A\0Asupported commands:\0A bn # goto byte <n> of file\0A ln # goto line <n> of file\0A p # print 100 bytes\0A pn # print n bytes\0A e/str/ # compare <str> to current position, exit if not equal\0A w/str/ # write <str> to current position\0A q # quit editing\0A # used for commenting out rest of line\0A\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([651 x i8], [651 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [651 x i8] c"dodo - scriptable in place file editor\0AIn non-interactive mode, dodo takes a single argument of <filename>\0Aand will read commands from stdin\0A\0Aexample:\0A dodo [-i|--interactive] <filename> <<EOF\0A b6 # goto byte 6\0A e/world/ # check for string 'world'\0A w/hello/ # write string 'hello'\0A q #quit\0A EOF\0A\0Asupported commands:\0A bn # goto byte <n> of file\0A ln # goto line <n> of file\0A p # print 100 bytes\0A pn # print n bytes\0A e/str/ # compare <str> to current position, exit if not equal\0A w/str/ # write <str> to current position\0A q # quit editing\0A # used for commenting out rest of line\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([651 x i8], [651 x i8]* @.str, i64 0, i64 0))
ret void
}
struct sharem_proto *get_shm_pro(struct P4 *p4) {
  return (struct sharem_proto *)p4;
}


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

x86 assembly (clang, -O2):
<get_shm_pro>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.sharem_proto = type opaque
%struct.P4 = type opaque
define %struct.sharem_proto* @get_shm_pro(%struct.P4* %0) {
%2 = alloca %struct.P4*
store %struct.P4* %0, %struct.P4** %2
%3 = load %struct.P4*, %struct.P4** %2
%4 = bitcast %struct.P4* %3 to %struct.sharem_proto*
ret %struct.sharem_proto* %4
}

LLVM IR (-O2):
%struct.sharem_proto = type opaque
%struct.P4 = type opaque
define %struct.sharem_proto* @get_shm_pro(%struct.P4* readnone %0) {
%2 = bitcast %struct.P4* %0 to %struct.sharem_proto*
ret %struct.sharem_proto* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void version(void) {
  printf("D-Bus Message Bus Launcher %s\n"
         "Copyright (C) 2003 Red Hat, Inc.\n"
         "This is free software; see the source for copying conditions.\n"
         "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
         "PARTICULAR PURPOSE.\n",
         "1.0.16");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xfa4(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [214 x i8] c"D-Bus Message Bus Launcher %s\0ACopyright (C) 2003 Red Hat, Inc.\0AThis is free software; see the source for copying conditions.\0AThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
@.str.1 = [7 x i8] c"1.0.16\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [214 x i8] c"D-Bus Message Bus Launcher %s\0ACopyright (C) 2003 Red Hat, Inc.\0AThis is free software; see the source for copying conditions.\0AThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
@.str.1 = [7 x i8] c"1.0.16\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int ti_ultosc_start(double const *options) { return (int)options[2]; }


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

x86 assembly (clang, -O2):
<ti_ultosc_start>:
cvttsd2si 0x10(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ti_ultosc_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 2
%5 = load double, double* %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ti_ultosc_start(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ arm_lsl(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_rdn3_op();
void t16_lsl_rdn3() { arm_lsl(t16_data_rdn3_op()); }


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

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

LLVM IR (-O0):
define void @t16_lsl_rdn3() {
%1 = call i32 (...) @t16_data_rdn3_op()
%2 = call i32 @arm_lsl(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_lsl_rdn3() {
%1 = tail call i32 (...) @t16_data_rdn3_op()
%2 = tail call i32 @arm_lsl(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ UI;

/* Variables and functions */
int /*<<< orphan*/ UIT_INFO;
int general_allocate_string(int /*<<< orphan*/ *, char const *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/ *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/ *);
int UI_add_info_string(UI *ui, const char *text) {
  return general_allocate_string(ui, text, 0, UIT_INFO, 0, NULL, 0, 0, NULL);
}


x86 assembly (clang, -O0):
<UI_add_info_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
mov    %r8d,%edx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <general_allocate_string@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_add_info_string>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%ecx
sub    $0x8,%rsp
xor    %edx,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <general_allocate_string@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@UIT_INFO = global i32 0
define i32 @UI_add_info_string(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @UIT_INFO
%8 = call i32 @general_allocate_string(i32* %5, i8* %6, i32 0, i32 %7, i32 0, i32* null, i32 0, i32 0, i32* null)
ret i32 %8
}

LLVM IR (-O2):
@UIT_INFO = global i32 0
define i32 @UI_add_info_string(i32* %0, i8* %1) {
%3 = load i32, i32* @UIT_INFO
%4 = tail call i32 @general_allocate_string(i32* %0, i8* %1, i32 0, i32 %3, i32 0, i32* null, i32 0, i32 0, i32* null)
ret i32 %4
}
/* Variables and functions */
scalar_t__ rint(double);
long lrint(double x) { return (long)rint(x); }


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

x86 assembly (clang, -O2):
<lrint>:
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @rint(double %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = tail call i64 @rint(double %0)
ret i64 %2
}
/* Variables and functions */
long random();
long arch_random() { return random(); }


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

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

LLVM IR (-O0):
define i64 @arch_random() {
%1 = call i64 (...) @random()
ret i64 %1
}

LLVM IR (-O2):
define i64 @arch_random() {
%1 = tail call i64 (...) @random()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ __ISB();
int __get_SCTLR();
int /*<<< orphan*/ __set_SCTLR(int);
void MMU_Disable(void) {
  __set_SCTLR(__get_SCTLR() & ~1);
  __ISB();
}


x86 assembly (clang, -O0):
<MMU_Disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__get_SCTLR@plt>
mov    %eax,%edi
and    $0xfffffffe,%edi
call   1050 <__set_SCTLR@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMU_Disable>:
push   %rax
xor    %eax,%eax
call   1040 <__get_SCTLR@plt>
and    $0xfffffffe,%eax
mov    %eax,%edi
call   1050 <__set_SCTLR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @MMU_Disable() {
%1 = call i32 (...) @__get_SCTLR()
%2 = and i32 %1, -2
%3 = call i32 @__set_SCTLR(i32 %2)
%4 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @MMU_Disable() {
%1 = tail call i32 (...) @__get_SCTLR()
%2 = and i32 %1, -2
%3 = tail call i32 @__set_SCTLR(i32 %2)
%4 = tail call i32 (...) @__ISB()
ret void
}
void mark_tech_preview(const char *msg, struct module *mod) { return; }


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

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

LLVM IR (-O0):
%struct.module = type opaque
define void @mark_tech_preview(i8* %0, %struct.module* %1) {
%3 = alloca i8*
%4 = alloca %struct.module*
store i8* %0, i8** %3
store %struct.module* %1, %struct.module** %4
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
define void @mark_tech_preview(i8* nocapture %0, %struct.module* nocapture %1) {
ret void
}
void ui_clients(const int num) { (void)num; }


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

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

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

LLVM IR (-O2):
define void @ui_clients(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int written = 0;
  printf("foo%n\n", &written);
  assert(written != 0);
  printf("%d\n", written);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
cmpl   $0x0,0x4(%rsp)
setne  %dil
call   1040 <assert@plt>
mov    0x4(%rsp),%esi
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"foo%n\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __cpu_to_be32(int /*<<< orphan*/);
void set32_be(uint32_t *p, uint32_t n) { *p = __cpu_to_be32(n); }


x86 assembly (clang, -O0):
<set32_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <__cpu_to_be32@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set32_be>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <__cpu_to_be32@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @set32_be(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 = call i32 @__cpu_to_be32(i32 %5)
%7 = load i32*, i32** %3
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @set32_be(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @__cpu_to_be32(i32 %1)
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ converttofixed(int);
int fmultiply(int, int /*<<< orphan*/);
int fmultiplym(int x, int n) { return fmultiply(x, converttofixed(n)); }


x86 assembly (clang, -O0):
<fmultiplym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <converttofixed@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <fmultiply@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmultiplym>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <converttofixed@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <fmultiply@plt>

LLVM IR (-O0):
define i32 @fmultiplym(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 @converttofixed(i32 %6)
%8 = call i32 @fmultiply(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @fmultiplym(i32 %0, i32 %1) {
%3 = tail call i32 @converttofixed(i32 %1)
%4 = tail call i32 @fmultiply(i32 %0, i32 %3)
ret i32 %4
}