xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help_max() {
  fprintf(stderr, "max parameters:\n");
  fprintf(stderr, "    get          get the current set maximum frequency (in "
                  "%%, [0;100])\n");
  fprintf(stderr, "    VALUE        set the current maximum frequency to a "
                  "value in [0;100]\n\n");
}


x86 assembly (clang, -O0):
<help_max>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf0c(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_max>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee2(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1d(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"max parameters:\0A\00"
@.str.1 = [73 x i8] c" get get the current set maximum frequency (in %%, [0;100])\0A\00"
@.str.2 = [75 x i8] c" VALUE set the current maximum frequency to a value in [0;100]\0A\0A\00"
define void @help_max() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"max parameters:\0A\00"
@.str.1 = [73 x i8] c" get get the current set maximum frequency (in %%, [0;100])\0A\00"
@.str.2 = [75 x i8] c" VALUE set the current maximum frequency to a value in [0;100]\0A\0A\00"
define void @help_max() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ helloworld;

/* Variables and functions */
int /*<<< orphan*/ nolibc_exit(int);
int write_all(int, char const *, int);
void _start(void) {
  int ret;
  const char helloworld[] = "Hello, world!\n";
  ret = write_all(1, helloworld, sizeof(helloworld) - 1);
  nolibc_exit(ret ? 0 : 1);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec9(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xec1(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x13(%rbp),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
call   1030 <write_all@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%edi
xor    %eax,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
call   1040 <nolibc_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
sub    $0x18,%rsp
movabs $0xa21646c726f77,%rax
mov    %rax,0xf(%rsp)
movabs $0x77202c6f6c6c6548,%rax
2c 20 77
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
call   1030 <write_all@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <nolibc_exit@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const._start.helloworld = [15 x i8] c"Hello, world!\0A\00"
define void @_start() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = bitcast [15 x i8]* %2 to i8*
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = call i32 @write_all(i32 1, i8* %4, i32 14)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 1
%10 = call i32 @nolibc_exit(i32 %9)
ret void
}

LLVM IR (-O2):
@__const._start.helloworld = [15 x i8] c"Hello, world!\0A\00"
define void @_start() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @write_all(i32 1, i8* %2, i32 14)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @nolibc_exit(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pthread_exit(void *);
void *thread(void *vargp) {
  printf("Hello World da thread criada pela thread principal!\n");
  pthread_exit((void *)NULL);
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [53 x i8] c"Hello World da thread criada pela thread principal!\0A\00"
define i8* @thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @pthread_exit(i8* null)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@str = [52 x i8] c"Hello World da thread criada pela thread principal!\00"
define noalias i8* @thread(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @pthread_exit(i8* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Could not compile drmtest\n");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [27 x i8] c"Could not compile drmtest\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Could not compile drmtest\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int strcmp(char *, char *);
int zstrcmp(const void *a_pp, const void *b_pp) {
  assert(a_pp != NULL);
  assert(b_pp != NULL);
  char *a = *(void **)a_pp;
  char *b = *(void **)b_pp;
  return strcmp(a, b);
}


x86 assembly (clang, -O0):
<zstrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zstrcmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rdi
mov    (%r14),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @zstrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
%16 = bitcast i8* %15 to i8**
%17 = load i8*, i8** %16
store i8* %17, i8** %5
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i8**
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8*, i8** %5
%22 = load i8*, i8** %6
%23 = call i32 @strcmp(i8* %21, i8* %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @zstrcmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast i8* %0 to i8**
%10 = load i8*, i8** %9
%11 = bitcast i8* %1 to i8**
%12 = load i8*, i8** %11
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(1) %12)
ret i32 %13
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ h264avcc_spsh_get_length(scalar_t__ const *);
uint8_t *h264avcc_get_spsh(const uint8_t *p, uint8_t n) {
  p += 6;
  while (n) {
    uint16_t length = h264avcc_spsh_get_length(p);
    p += 2 + length;
    n--;
  }
  return (uint8_t *)p;
}


x86 assembly (clang, -O0):
<h264avcc_get_spsh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1169 <h264avcc_get_spsh+0x59>
mov    -0x8(%rbp),%rdi
call   1030 <h264avcc_spsh_get_length@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
shl    $0x3,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <h264avcc_get_spsh+0x1c>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264avcc_get_spsh>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x30,%rbx
test   %rsi,%rsi
je     1146 <h264avcc_get_spsh+0x36>
mov    %rsi,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <h264avcc_spsh_get_length@plt>
lea    (%rbx,%rax,8),%rbx
add    $0x10,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <h264avcc_get_spsh+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64* @h264avcc_get_spsh(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 6
store i64* %7, i64** %3
br label %8
8: ; preds = %11, %2
%9 = load i64, i64* %4
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i64*, i64** %3
%13 = call i64 @h264avcc_spsh_get_length(i64* %12)
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = add nsw i64 2, %14
%16 = load i64*, i64** %3
%17 = getelementptr inbounds i64, i64* %16, i64 %15
store i64* %17, i64** %3
%18 = load i64, i64* %4
%19 = add nsw i64 %18, -1
store i64 %19, i64* %4
br label %8
20: ; preds = %8
%21 = load i64*, i64** %3
ret i64* %21
}

LLVM IR (-O2):
define i64* @h264avcc_get_spsh(i64* %0, i64 %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 6
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64* [ %10, %5 ], [ %3, %2 ]
%7 = phi i64 [ %11, %5 ], [ %1, %2 ]
%8 = tail call i64 @h264avcc_spsh_get_length(i64* %6)
%9 = add nsw i64 %8, 2
%10 = getelementptr inbounds i64, i64* %6, i64 %9
%11 = add nsw i64 %7, -1
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i64* [ %3, %2 ], [ %10, %5 ]
ret i64* %14
}
double degreesToRadians(double degrees) {
  return degrees * 3.14159265358979323846 / 180;
}


x86 assembly (clang, -O0):
<degreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @degreesToRadians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB54442D18
%5 = fdiv double %4, 1.800000e+02
ret double %5
}

LLVM IR (-O2):
define double @degreesToRadians(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = fdiv double %2, 1.800000e+02
ret double %3
}
double dist2(double x1, double y1, double z1, double x2, double y2, double z2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2);
}


x86 assembly (clang, -O0):
<dist2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm3
subsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist2>:
subsd  %xmm3,%xmm0
subsd  %xmm4,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
subsd  %xmm5,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @dist2(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %10
%15 = fsub double %13, %14
%16 = load double, double* %7
%17 = load double, double* %10
%18 = fsub double %16, %17
%19 = load double, double* %8
%20 = load double, double* %11
%21 = fsub double %19, %20
%22 = load double, double* %8
%23 = load double, double* %11
%24 = fsub double %22, %23
%25 = fmul double %21, %24
%26 = call double @llvm.fmuladd.f64(double %15, double %18, double %25)
%27 = load double, double* %9
%28 = load double, double* %12
%29 = fsub double %27, %28
%30 = load double, double* %9
%31 = load double, double* %12
%32 = fsub double %30, %31
%33 = call double @llvm.fmuladd.f64(double %29, double %32, double %26)
ret double %33
}

LLVM IR (-O2):
define double @dist2(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fsub double %0, %3
%8 = fsub double %1, %4
%9 = fmul double %8, %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %7, double %9)
%11 = fsub double %2, %5
%12 = tail call double @llvm.fmuladd.f64(double %11, double %11, double %10)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ _nvram_close();
void nvram_close(void) { _nvram_close(); }


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

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

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

LLVM IR (-O2):
define void @nvram_close() {
%1 = tail call i32 (...) @_nvram_close()
ret void
}
void nvhost_vii2c_close(void) {}


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

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

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

LLVM IR (-O2):
define void @nvhost_vii2c_close() {
ret void
}
/* Type definitions */
typedef int layer;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void DisplyLayer(unsigned char layer) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xA2) & 0xFF);
  SendChar((layer)&0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<DisplyLayer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xa2,%edi
call   1030 <SendChar@plt>
movzbl -0x1(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisplyLayer>:
push   %rbx
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xa2,%edi
call   1030 <SendChar@plt>
mov    %ebx,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rbx
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @DisplyLayer(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @SendChar(i32 238)
%4 = call i32 @SendChar(i32 162)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = call i32 @SendChar(i32 %7)
%9 = call i32 @SendChar(i32 255)
%10 = call i32 @SendChar(i32 252)
%11 = call i32 @SendChar(i32 255)
%12 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @DisplyLayer(i8 zeroext %0) {
%2 = tail call i32 @SendChar(i32 238)
%3 = tail call i32 @SendChar(i32 162)
%4 = zext i8 %0 to i32
%5 = tail call i32 @SendChar(i32 %4)
%6 = tail call i32 @SendChar(i32 255)
%7 = tail call i32 @SendChar(i32 252)
%8 = tail call i32 @SendChar(i32 255)
%9 = tail call i32 @SendChar(i32 255)
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
void delEoLine(char *buf) {
  int ln;
  ln = (int)strlen(buf);
  if (buf[ln - 1] == '\n')
    buf[ln - 1] = '\0';
}


x86 assembly (clang, -O0):
<delEoLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <delEoLine+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delEoLine>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0xffffffff,%eax
cltq
cmpb   $0xa,(%rbx,%rax,1)
jne    1128 <delEoLine+0x18>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @delEoLine(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 32
%4 = add i64 %3, -4294967296
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %1
store i8 0, i8* %6
br label %10
10: ; preds = %9, %1
ret void
}
void mt_trace_tasklet_start(void *func) {}


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

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

LLVM IR (-O0):
define void @mt_trace_tasklet_start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @mt_trace_tasklet_start(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ rename(char const *, char const *);
int /*<<< orphan*/ sys_die(char *, char const *, char const *);
extern void sys_move(const char *dest, const char *src) {
  if (rename(src, dest) < 0)
    sys_die("sys: cannot move %s -> %s\n", src, dest);
}


x86 assembly (clang, -O0):
<sys_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <rename@plt>
cmp    $0x0,%rax
jge    115b <sys_move+0x3b>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xeaa(%rip),%rdi
call   1030 <sys_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1040 <rename@plt>
test   %rax,%rax
js     1142 <sys_move+0x22>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeb7(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sys_die@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"sys: cannot move %s -> %s\0A\00"
define void @sys_move(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @rename(i8* %5, i8* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @sys_die(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"sys: cannot move %s -> %s\0A\00"
define void @sys_move(i8* %0, i8* %1) {
%3 = tail call i64 @rename(i8* %1, i8* %0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @sys_die(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
struct minix_fs_dat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ domkdir(struct minix_fs_dat *, char *);
void cmd_mkdir(struct minix_fs_dat *fs, int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    domkdir(fs, argv[i]);
  }
}


x86 assembly (clang, -O0):
<cmd_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <cmd_mkdir+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <domkdir@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <cmd_mkdir+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mkdir>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1145 <cmd_mkdir+0x35>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <domkdir@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <cmd_mkdir+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.minix_fs_dat = type { i32 }
define void @cmd_mkdir(%struct.minix_fs_dat* %0, i32 %1, i8** %2) {
%4 = alloca %struct.minix_fs_dat*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store %struct.minix_fs_dat* %0, %struct.minix_fs_dat** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
store i32 1, i32* %7
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load %struct.minix_fs_dat*, %struct.minix_fs_dat** %4
%14 = load i8**, i8*** %6
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @domkdir(%struct.minix_fs_dat* %13, i8* %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.minix_fs_dat = type { i32 }
define void @cmd_mkdir(%struct.minix_fs_dat* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 1, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %2, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @domkdir(%struct.minix_fs_dat* %0, i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: suid-cvs server\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: suid-cvs server\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: suid-cvs server\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int fn4(int arr[][10][7][4]) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fn4([10 x [7 x [4 x i32]]]* %0) {
%2 = alloca [10 x [7 x [4 x i32]]]*
store [10 x [7 x [4 x i32]]]* %0, [10 x [7 x [4 x i32]]]** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fn4([10 x [7 x [4 x i32]]]* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eval_A_times_u(int, double const *, double *);
int /*<<< orphan*/ eval_At_times_u(int, double *, double *);
void eval_AtA_times_u(int N, const double u[], double AtAu[]) {
  double v[N];
  eval_A_times_u(N, u, v);
  eval_At_times_u(N, v, AtAu);
}


x86 assembly (clang, -O0):
<eval_AtA_times_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <eval_A_times_u@plt>
mov    -0x30(%rbp),%rsi
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
call   1030 <eval_At_times_u@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_AtA_times_u>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %edi,%r15d
mov    %edi,%eax
mov    %rsp,%rbx
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdx
call   1040 <eval_A_times_u@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <eval_At_times_u@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @eval_AtA_times_u(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca double, i64 %10
store i64 %10, i64* %8
%13 = load i32, i32* %4
%14 = load double*, double** %5
%15 = call i32 @eval_A_times_u(i32 %13, double* %14, double* %12)
%16 = load i32, i32* %4
%17 = load double*, double** %6
%18 = call i32 @eval_At_times_u(i32 %16, double* %12, double* %17)
%19 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @eval_AtA_times_u(i32 %0, double* %1, double* %2) {
%4 = zext i32 %0 to i64
%5 = alloca double, i64 %4
%6 = call i32 @eval_A_times_u(i32 %0, double* %1, double* %5)
%7 = call i32 @eval_At_times_u(i32 %0, double* %5, double* %2)
ret void
}
/* Variables and functions */
int computeArea(int, int, int, int, int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
void test(int x1, int y1, int x2, int y2, int X1, int Y1, int X2, int Y2) {
  printf("area is = %d\n", computeArea(x1, y1, x2, y2, X1, Y1, X2, Y2));
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <computeArea@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    0x10(%rsp),%r10d
mov    0x18(%rsp),%eax
push   %rax
push   %r10
call   1040 <computeArea@plt>
add    $0x10,%rsp
lea    0xec3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"area is = %d\0A\00"
define void @test(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load i32, i32* %13
%22 = load i32, i32* %14
%23 = load i32, i32* %15
%24 = load i32, i32* %16
%25 = call i32 @computeArea(i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"area is = %d\0A\00"
define void @test(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @computeArea(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ D_FMT;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_d_fmt() { return nl_langinfo(D_FMT); }


x86 assembly (clang, -O0):
<langinfo_d_fmt>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_d_fmt>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@D_FMT = global i32 0
define i8* @langinfo_d_fmt() {
%1 = load i32, i32* @D_FMT
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@D_FMT = global i32 0
define i8* @langinfo_d_fmt() {
%1 = load i32, i32* @D_FMT
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void three() {
  int x = 4;
  int *p = &x;
  printf("The value of p is: %d\n", *p);
}


x86 assembly (clang, -O0):
<three>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<three>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"The value of p is: %d\0A\00"
define void @three() {
%1 = alloca i32
%2 = alloca i32*
store i32 4, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"The value of p is: %d\0A\00"
define void @three() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
char *strchr(char const *, int);
char *strrchr(const char *s, int c) { return strchr(s, c); }


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

x86 assembly (clang, -O2):
<strrchr>:
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @strrchr(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 = load i32, i32* %4
%7 = call i8* @strchr(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
int get_usb_epnum(int index) { return index >> 1; }


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

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

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

LLVM IR (-O2):
define i32 @get_usb_epnum(i32 %0) {
%2 = ashr i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t u64_b5(uint64_t value) {
  return (uint8_t)((value & 0x0000FF0000000000) >> 40);
}


x86 assembly (clang, -O0):
<u64_b5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff0000000000,%rcx
and    %rcx,%rax
sar    $0x28,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u64_b5>:
movslq %edi,%rax
shr    $0x28,%rax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @u64_b5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 280375465082880
%6 = ashr i64 %5, 40
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @u64_b5(i32 %0) {
%2 = sext i32 %0 to i64
%3 = lshr i64 %2, 40
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 255
ret i32 %5
}
int pathcon_nm5_f0(const double **arg, double **res, int *iw, double *w,
                   int mem) {
  return 0;
}


x86 assembly (clang, -O0):
<pathcon_nm5_f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathcon_nm5_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathcon_nm5_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint16_t;

/* Variables and functions */
int UINT64_C(int);
int issignaling_ld(long double x) {
  union {
    long double ld;
    struct {
      uint64_t sig;
      uint16_t sign_exp;
    } s;
  } u = {.ld = x};
  return ((u.s.sign_exp & 0x7fff) == 0x7fff && (u.s.sig >> 63) != 0 &&
          (u.s.sig & UINT64_C(0x4000000000000000)) == 0);
}


x86 assembly (clang, -O0):
<issignaling_ld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpt  -0x20(%rbp)
mov    -0x1c(%rbp),%ecx
and    $0x7fff,%ecx
xor    %eax,%eax
cmp    $0x7fff,%ecx
mov    %al,-0x21(%rbp)
jne    1175 <issignaling_ld+0x65>
mov    -0x20(%rbp),%eax
mov    $0x3f,%ecx
sar    %cl,%eax
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
je     1175 <issignaling_ld+0x65>
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
xor    %edi,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { x86_fp80 }
%struct.anon = type { i32, i32 }
define i32 @issignaling_ld(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca %union.anon
store x86_fp80 %0, x86_fp80* %2
%4 = bitcast %union.anon* %3 to x86_fp80*
%5 = load x86_fp80, x86_fp80* %2
store x86_fp80 %5, x86_fp80* %4
%6 = bitcast %union.anon* %3 to %struct.anon*
%7 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 1
%8 = load i32, i32* %7
%9 = and i32 %8, 32767
%10 = icmp eq i32 %9, 32767
br i1 %10, label %11, label %24
11: ; preds = %1
%12 = bitcast %union.anon* %3 to %struct.anon*
%13 = getelementptr inbounds %struct.anon, %struct.anon* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = ashr i32 %14, 63
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %11
%18 = bitcast %union.anon* %3 to %struct.anon*
%19 = getelementptr inbounds %struct.anon, %struct.anon* %18, i32 0, i32 0
%20 = load i32, i32* %19
%21 = call i32 @UINT64_C(i32 0)
%22 = and i32 %20, %21
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %17, %11, %1
%25 = phi i1 [ false, %11 ], [ false, %1 ], [ %23, %17 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @issignaling_ld(x86_fp80 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ data(int, int, int);
int main() {
  data(17, 11, 2016);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x11,%edi
mov    $0xb,%esi
mov    $0x7e0,%edx
call   1030 <data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x11,%edi
mov    $0xb,%esi
mov    $0x7e0,%edx
call   1030 <data@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @data(i32 17, i32 11, i32 2016)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((no)) double floor(double a) { abort(); }


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<floor>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ perror(char *);
void disconnect_server(int sockfd) {
  if (close(sockfd) != 0)
    perror("ERROR. Failed to close connection");
}


x86 assembly (clang, -O0):
<disconnect_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
je     1149 <disconnect_server+0x29>
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disconnect_server>:
push   %rax
call   1030 <close@plt>
test   %rax,%rax
jne    112d <disconnect_server+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ERROR. Failed to close connection\00"
define void @disconnect_server(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @close(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ERROR. Failed to close connection\00"
define void @disconnect_server(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void music_wait_stopped(void) {}


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

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

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

LLVM IR (-O2):
define void @music_wait_stopped() {
ret void
}
int right(int *Arr, int i) { return Arr[2 * i + 1]; }


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
lea    (%rsi,%rsi,1),%eax
add    $0x1,%eax
cltq
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @right(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 = mul nsw i32 2, %6
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %5, i64 %9
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @right(i32* nocapture %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = or i32 %3, 1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned int, unsigned int,
                           unsigned int, unsigned int);
void ipv4_to_str(char *addr, unsigned int ipv4_addr) {
  sprintf(addr, "%d.%d.%d.%d", (ipv4_addr >> 24) & 0xff,
          (ipv4_addr >> 16) & 0xff, (ipv4_addr >> 8) & 0xff,
          (ipv4_addr & 0xff));
}


x86 assembly (clang, -O0):
<ipv4_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
shr    $0x18,%edx
and    $0xff,%edx
mov    -0xc(%rbp),%ecx
shr    $0x10,%ecx
and    $0xff,%ecx
mov    -0xc(%rbp),%r8d
shr    $0x8,%r8d
and    $0xff,%r8d
mov    -0xc(%rbp),%r9d
and    $0xff,%r9d
lea    0xea4(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_to_str>:
push   %rbx
mov    %esi,%edx
mov    %esi,%eax
movzbl %dh,%ebx
movzbl %dl,%r9d
shr    $0x18,%edx
shr    $0x10,%eax
movzbl %al,%ecx
lea    0xed4(%rip),%rsi
mov    %ebx,%r8d
pop    %rbx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ipv4_to_str(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 = load i32, i32* %4
%7 = lshr i32 %6, 24
%8 = and i32 %7, 255
%9 = load i32, i32* %4
%10 = lshr i32 %9, 16
%11 = and i32 %10, 255
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = load i32, i32* %4
%16 = and i32 %15, 255
%17 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11, i32 %14, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ipv4_to_str(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = and i32 %1, 255
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _zlog_buffer_unlock();
void zlog_finish_buffer() { _zlog_buffer_unlock(); }


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

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

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

LLVM IR (-O2):
define void @zlog_finish_buffer() {
%1 = tail call i32 (...) @_zlog_buffer_unlock()
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
const char *make_nam(int id, int size) {
  const char *buf = malloc(30);
  sprintf((char *)buf, "pl:%d/%d", id, size);
  return buf;
}


x86 assembly (clang, -O0):
<make_nam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1e,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_nam>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x1e,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec3(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"pl:%d/%d\00"
define i8* @make_nam(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i8* @malloc(i32 30)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"pl:%d/%d\00"
define noalias i8* @make_nam(i32 %0, i32 %1) {
%3 = tail call dereferenceable_or_null(30) i8* @malloc(i32 30)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i8* %3
}
int options() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @options() {
ret i32 0
}