xunge/DecIR huggingface dataset:
void RTPathAbsEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathAbsEx() {
ret void
}
void __attribute__((
    __warning__("curl_easy_setopt expects a CURLSH* argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_CURLSH(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_CURLSH() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ showDanish();
int /*<<< orphan*/ testDanish();
int main(int argc, char *argv[]) {
  testDanish();
  showDanish();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <testDanish@plt>
mov    $0x0,%al
call   1030 <showDanish@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <testDanish@plt>
xor    %eax,%eax
call   1030 <showDanish@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @testDanish()
%7 = call i32 (...) @showDanish()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testDanish()
%4 = tail call i32 (...) @showDanish()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_initialize_dobldobl_solution(int idx, int verbose) {
  int fail;
  int pars[2];
  double *c;
  pars[0] = 1;
  pars[1] = idx;
  fail = _ada_use_c2phc4c(861, pars, &verbose, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_initialize_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x14(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    $0x35d,%edi
lea    -0x8(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_initialize_dobldobl_solution>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
movl   $0x1,0x10(%rsp)
mov    %edi,0x14(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x35d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @padcon_initialize_dobldobl_solution(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [2 x i32]
%7 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 1, i32* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %9, i32* %10
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%12 = load double*, double** %7
%13 = call i32 @_ada_use_c2phc4c(i32 861, i32* %11, i32* %4, double* %12, i32 0)
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @padcon_initialize_dobldobl_solution(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca [2 x i32]
store i32 %1, i32* %3
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 1, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %0, i32* %7
%8 = call i32 @_ada_use_c2phc4c(i32 861, i32* %6, i32* %3, double* undef, i32 0)
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int error_code;
};
typedef TYPE_1__ XErrorEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int handle_xerror(Display *display, XErrorEvent *e) {
  fprintf(stderr, "%d  XError caught\n", e->error_code);
  return 0;
}


x86 assembly (clang, -O0):
<handle_xerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_xerror>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%edx
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@stderr = global i32 0
@.str = [19 x i8] c"%d XError caught\0A\00"
define i32 @handle_xerror(i32* %0, %struct.TYPE_3__* %1) {
%3 = alloca i32*
%4 = alloca %struct.TYPE_3__*
store i32* %0, i32** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%5 = load i32, i32* @stderr
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@stderr = global i32 0
@.str = [19 x i8] c"%d XError caught\0A\00"
define i32 @handle_xerror(i32* nocapture readnone %0, %struct.TYPE_3__* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void report_Socket_Connect_Resp(void) {}


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

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

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

LLVM IR (-O2):
define void @report_Socket_Connect_Resp() {
ret void
}
/* Variables and functions */
int strlen(char *);
char *filename(char *n) {
  int l = strlen(n);
  while ((n[l] != '/') && (l != 0))
    l--;
  return &n[l + 1];
}


x86 assembly (clang, -O0):
<filename>:
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
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x2f,%ecx
mov    %al,-0xd(%rbp)
je     114c <filename+0x3c>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <filename+0x4c>
jmp    116a <filename+0x5a>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <filename+0x18>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filename>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
mov    %rcx,%rdx
shl    $0x20,%rdx
movabs $0x200000000,%rax
add    %rdx,%rax
movabs $0xffffffff00000000,%rsi
ff ff ff
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rdi
add    $0xffffffffffffffff,%rcx
setb   %dl
add    %rsi,%rax
cmpb   $0x2f,(%rbx,%rdi,1)
je     1157 <filename+0x47>
test   %dl,%dl
jne    1140 <filename+0x30>
sar    $0x20,%rax
add    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @filename(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ %11, %4 ], [ %3, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 47
%9 = icmp ne i64 %5, 0
%10 = select i1 %8, i1 %9, i1 false
%11 = add nsw i64 %5, -1
br i1 %10, label %4, label %12
12: ; preds = %4
%13 = shl i64 %5, 32
%14 = add i64 %13, 4294967296
%15 = ashr exact i64 %14, 32
%16 = getelementptr inbounds i8, i8* %0, i64 %15
ret i8* %16
}
/* Variables and functions */
double pow(double, double);
double sRGBConvert(double c) {
  double cd = c / 255.0;
  if (cd <= 0.04045)
    return cd / 12.92;
  else
    return pow((cd + 0.055) / 1.055, 2.4);
}


x86 assembly (clang, -O0):
<sRGBConvert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec5(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1161 <sRGBConvert+0x51>
movsd  -0x18(%rbp),%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118c <sRGBConvert+0x7c>
movsd  0xeb7(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe8e(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sRGBConvert>:
divsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1143 <sRGBConvert+0x33>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @sRGBConvert(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fdiv double %5, 2.550000e+02
store double %6, double* %4
%7 = load double, double* %4
%8 = fcmp ole double %7, 4.045000e-02
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %4
%11 = fdiv double %10, 1.292000e+01
store double %11, double* %2
br label %17
12: ; preds = %1
%13 = load double, double* %4
%14 = fadd double %13, 5.500000e-02
%15 = fdiv double %14, 1.055000e+00
%16 = call double @pow(double %15, double 2.400000e+00)
store double %16, double* %2
br label %17
17: ; preds = %12, %9
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @sRGBConvert(double %0) {
%2 = fdiv double %0, 2.550000e+02
%3 = fcmp ugt double %2, 4.045000e-02
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = fdiv double %2, 1.292000e+01
br label %10
6: ; preds = %1
%7 = fadd double %2, 5.500000e-02
%8 = fdiv double %7, 1.055000e+00
%9 = tail call double @pow(double %8, double 2.400000e+00)
br label %10
10: ; preds = %6, %4
%11 = phi double [ %5, %4 ], [ %9, %6 ]
ret double %11
}
/* Variables and functions */
int strnlen(const char *s, int maxlen) {
  int i;
  for (i = 0; i < maxlen; i++) {
    if (s[i] == '\0')
      return i;
  }
  return maxlen;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1151 <strnlen+0x51>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113e <strnlen+0x3e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <strnlen+0x57>
jmp    1143 <strnlen+0x43>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <strnlen+0x12>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
mov    %esi,%eax
test   %esi,%esi
jle    111f <strnlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rcx,1)
je     1120 <strnlen+0x20>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <strnlen+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strnlen(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %11
%7 = phi i64 [ 0, %4 ], [ %12, %11 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %16, label %6
14: ; preds = %6
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %11, %14, %2
%17 = phi i32 [ %1, %2 ], [ %15, %14 ], [ %1, %11 ]
ret i32 %17
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int lre_get_capture_count(const uint8_t *bc_buf) { return bc_buf[1]; }


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

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

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

LLVM IR (-O2):
define i32 @lre_get_capture_count(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
long jas_iccpadtomult(long x, long y) { return ((x + y - 1) / y) * y; }


x86 assembly (clang, -O0):
<jas_iccpadtomult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
cqto
idivq  -0x10(%rbp)
imul   -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jas_iccpadtomult>:
lea    (%rdi,%rsi,1),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111e <jas_iccpadtomult+0x1e>
mov    %rcx,%rax
cqto
idiv   %rsi
jmp    1124 <jas_iccpadtomult+0x24>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @jas_iccpadtomult(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = sub nsw i64 %7, 1
%9 = load i64, i64* %4
%10 = sdiv i64 %8, %9
%11 = load i64, i64* %4
%12 = mul nsw i64 %10, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @jas_iccpadtomult(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = srem i64 %4, %1
%6 = sub i64 %4, %5
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_proxy {
  int dummy;
};
struct wl_data_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_data_device_get_version(struct wl_data_device *wl_data_device) {
  return wl_proxy_get_version((struct wl_proxy *)wl_data_device);
}


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

x86 assembly (clang, -O2):
<wl_data_device_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_data_device = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_data_device_get_version(%struct.wl_data_device* %0) {
%2 = alloca %struct.wl_data_device*
store %struct.wl_data_device* %0, %struct.wl_data_device** %2
%3 = load %struct.wl_data_device*, %struct.wl_data_device** %2
%4 = bitcast %struct.wl_data_device* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_data_device = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_data_device_get_version(%struct.wl_data_device* %0) {
%2 = bitcast %struct.wl_data_device* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
/* Variables and functions */
int swap_fs_free();
int swap_validate_size(int);
unsigned swap_automatic_size(void) {
  return swap_validate_size(swap_fs_free() >> 1);
}


x86 assembly (clang, -O0):
<swap_automatic_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <swap_fs_free@plt>
mov    %eax,%edi
sar    $0x1,%edi
call   1030 <swap_validate_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_automatic_size>:
push   %rax
xor    %eax,%eax
call   1040 <swap_fs_free@plt>
sar    %eax
mov    %eax,%edi
pop    %rax
jmp    1030 <swap_validate_size@plt>

LLVM IR (-O0):
define i32 @swap_automatic_size() {
%1 = call i32 (...) @swap_fs_free()
%2 = ashr i32 %1, 1
%3 = call i32 @swap_validate_size(i32 %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @swap_automatic_size() {
%1 = tail call i32 (...) @swap_fs_free()
%2 = ashr i32 %1, 1
%3 = tail call i32 @swap_validate_size(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ joystick_update_buttons();
int /*<<< orphan*/ paddle_fixup_joystick_type();
void paddle_update_buttons() {
  paddle_fixup_joystick_type();
  joystick_update_buttons();
}


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

x86 assembly (clang, -O2):
<paddle_update_buttons>:
push   %rax
xor    %eax,%eax
call   1040 <paddle_fixup_joystick_type@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <joystick_update_buttons@plt>

LLVM IR (-O0):
define void @paddle_update_buttons() {
%1 = call i32 (...) @paddle_fixup_joystick_type()
%2 = call i32 (...) @joystick_update_buttons()
ret void
}

LLVM IR (-O2):
define void @paddle_update_buttons() {
%1 = tail call i32 (...) @paddle_fixup_joystick_type()
%2 = tail call i32 (...) @joystick_update_buttons()
ret void
}
int jep_socket_quit() {
  int result = 0;
  return result;
}


x86 assembly (clang, -O0):
<jep_socket_quit>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @jep_socket_quit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keyboard(unsigned char key, int x, int y) {
  if (key == 27 || key == 'Q' || key == 'q') {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
je     114b <keyboard+0x3b>
movzbl -0x1(%rbp),%eax
cmp    $0x51,%eax
je     114b <keyboard+0x3b>
movzbl -0x1(%rbp),%eax
cmp    $0x71,%eax
jne    1152 <keyboard+0x42>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
cmp    $0x1b,%dil
je     1123 <keyboard+0x13>
cmp    $0x71,%dil
je     1123 <keyboard+0x13>
cmp    $0x51,%dil
je     1123 <keyboard+0x13>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
switch i8 %0, label %6 [
i8 113, label %4
i8 81, label %4
i8 27, label %4
]
4: ; preds = %3, %3, %3
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %3
ret void
}
long round_int(double value) {
  long intpart;
  intpart = value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<round_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     114a <round_int+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_int>:
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xeea(%rip),%xmm0
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @round_int(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i64
store i64 %5, i64* %3
%6 = load double, double* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to double
%9 = fsub double %6, %8
store double %9, double* %2
%10 = load double, double* %2
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @round_int(double %0) {
%2 = fptosi double %0 to i64
%3 = sitofp i64 %2 to double
%4 = fsub double %0, %3
%5 = fcmp oge double %4, 5.000000e-01
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
/* Variables and functions */
extern void *ReturnNullPointer() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @ReturnNullPointer() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @ReturnNullPointer() {
ret i8* null
}
void ntv() {
  asm volatile("movq $0x5, %%rdi\n\t"
               "movq %%rsp, %%r13\n\t"
               "movq %%r15, %%rsp\n\t"
               "callq *%%r12\n\t"
               "movq %%r13, %%rsp\n\t"
               "addq $0x08, %%rsp\n\t"
               "movq (%%r15), %%r14\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<ntv>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%rdi
mov    %rsp,%r13
mov    %r15,%rsp
call   *%r12
mov    %r13,%rsp
add    $0x8,%rsp
mov    (%r15),%r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntv>:
mov    $0x5,%rdi
mov    %rsp,%r13
mov    %r15,%rsp
call   *%r12
mov    %r13,%rsp
add    $0x8,%rsp
mov    (%r15),%r14
ret

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

LLVM IR (-O2):
define void @ntv() {
tail call void asm sideeffect "movq $$0x5, %rdi\0A\09movq %rsp, %r13\0A\09movq %r15, %rsp\0A\09callq *%r12\0A\09movq %r13, %rsp\0A\09addq $$0x08, %rsp\0A\09movq (%r15), %r14\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void testtointd_(double *z, double *x) { *z = (long)*x; }


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

x86 assembly (clang, -O2):
<testtointd_>:
cvttsd2si (%rsi),%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @testtointd_(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double, double* %5
%7 = fptosi double %6 to i64
%8 = sitofp i64 %7 to double
%9 = load double*, double** %3
store double %8, double* %9
ret void
}

LLVM IR (-O2):
define void @testtointd_(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fptosi double %3 to i64
%5 = sitofp i64 %4 to double
store double %5, double* %0
ret void
}
/* Type definitions */
struct hostent {
  int dummy;
};
typedef int /*<<< orphan*/ socket_host;

/* Variables and functions */
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ gethostname(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  struct hostent *hostinfo;
  char socket_host[255];
  gethostname(socket_host, sizeof(socket_host));
  hostinfo = gethostbyname(socket_host);
  if (hostinfo == NULL)
    return 1;
  printf("%s\n", socket_host);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0xff,%esi
call   1050 <gethostname@plt>
lea    -0x110(%rbp),%rdi
call   1040 <gethostbyname@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117a <main+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    118d <main+0x5d>
lea    -0x110(%rbp),%rsi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1050 <gethostname@plt>
mov    %rbx,%rdi
call   1040 <gethostbyname@plt>
test   %rax,%rax
je     1168 <main+0x38>
lea    0xea4(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
jmp    116d <main+0x3d>
mov    $0x1,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.hostent*
%3 = alloca [255 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @gethostname(i8* %4, i32 255)
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%7 = call %struct.hostent* @gethostbyname(i8* %6)
store %struct.hostent* %7, %struct.hostent** %2
%8 = load %struct.hostent*, %struct.hostent** %2
%9 = icmp eq %struct.hostent* %8, null
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %1
br label %14
11: ; preds = %0
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @gethostname(i8* %2, i32 255)
%4 = call %struct.hostent* @gethostbyname(i8* %2)
%5 = icmp eq %struct.hostent* %4, null
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %0, %6
%9 = phi i32 [ 0, %6 ], [ 1, %0 ]
ret i32 %9
}
unsigned int U4(unsigned char *p) {
  unsigned int value;
  unsigned char *q = (unsigned char *)&value + 3;
  int i;
  for (i = 0; i < 4; i++)
    *q-- = *p++;
  return value;
}


x86 assembly (clang, -O0):
<U4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1155 <U4+0x55>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111b <U4+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @U4(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = load i8, i8* %2
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %4
%8 = load i8, i8* %6
%9 = zext i8 %3 to i32
%10 = shl nuw i32 %9, 24
%11 = zext i8 %5 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %10, %12
%14 = zext i8 %7 to i32
%15 = shl nuw nsw i32 %14, 8
%16 = or i32 %13, %15
%17 = zext i8 %8 to i32
%18 = or i32 %16, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ setprogname(char *);
int /*<<< orphan*/ sync();
int main(int argc, char *argv[]) {
  setprogname(argv[0]);
  sync();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <setprogname@plt>
mov    $0x0,%al
call   1030 <sync@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1050 <setprogname@plt>
xor    %eax,%eax
call   1030 <sync@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @setprogname(i8* %8)
%10 = call i32 (...) @sync()
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @setprogname(i8* %3)
%5 = tail call i32 (...) @sync()
%6 = tail call i32 @exit(i32 0)
unreachable
}
int IntervalsOverlap(int astart, int asize, int bstart, int bsize) {
  int aend = astart + asize;
  int bend = bstart + bsize;
  if (astart >= bend || bstart >= aend) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IntervalsOverlap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    113a <IntervalsOverlap+0x3a>
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     1146 <IntervalsOverlap+0x46>
movl   $0x0,-0x4(%rbp)
jmp    114d <IntervalsOverlap+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntervalsOverlap>:
add    %edx,%ecx
cmp    %edi,%ecx
setg   %al
add    %edi,%esi
cmp    %edx,%esi
setg   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @IntervalsOverlap(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %3, %2
%6 = icmp sgt i32 %5, %0
%7 = add nsw i32 %1, %0
%8 = icmp sgt i32 %7, %2
%9 = select i1 %6, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct uio_info_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ uio_single_munmap(struct uio_info_t *, int);
void uio_munmap(struct uio_info_t *info) {
  int i;
  for (i = 0; i < 5; i++)
    uio_single_munmap(info, i);
}


x86 assembly (clang, -O0):
<uio_munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1147 <uio_munmap+0x37>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <uio_single_munmap@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <uio_munmap+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uio_munmap>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <uio_single_munmap@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <uio_single_munmap@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <uio_single_munmap@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <uio_single_munmap@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <uio_single_munmap@plt>

LLVM IR (-O0):
%struct.uio_info_t = type { i32 }
define void @uio_munmap(%struct.uio_info_t* %0) {
%2 = alloca %struct.uio_info_t*
%3 = alloca i32
store %struct.uio_info_t* %0, %struct.uio_info_t** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load %struct.uio_info_t*, %struct.uio_info_t** %2
%9 = load i32, i32* %3
%10 = call i32 @uio_single_munmap(%struct.uio_info_t* %8, i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.uio_info_t = type { i32 }
define void @uio_munmap(%struct.uio_info_t* %0) {
%2 = tail call i32 @uio_single_munmap(%struct.uio_info_t* %0, i32 0)
%3 = tail call i32 @uio_single_munmap(%struct.uio_info_t* %0, i32 1)
%4 = tail call i32 @uio_single_munmap(%struct.uio_info_t* %0, i32 2)
%5 = tail call i32 @uio_single_munmap(%struct.uio_info_t* %0, i32 3)
%6 = tail call i32 @uio_single_munmap(%struct.uio_info_t* %0, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t si470x_volumeup() {}


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

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

LLVM IR (-O0):
define i32 @si470x_volumeup() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @si470x_volumeup() {
ret i32 undef
}
void strlwr(s) char *s;
{
  int i = 0;
  while (s[i]) {
    if (isupper(s[i]))
      s[i] += 32;
    i++;
  }
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116f <strlwr+0x5f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isupper@plt>
cmp    $0x0,%eax
je     1161 <strlwr+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
add    $0x20,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <strlwr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%bpl
test   %bpl,%bpl
je     1153 <strlwr+0x43>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    113c <strlwr+0x2c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%ebp
add    $0x1,%rbx
test   %bpl,%bpl
je     1153 <strlwr+0x43>
movsbl %bpl,%edi
call   1030 <isupper@plt>
test   %eax,%eax
je     1130 <strlwr+0x20>
add    $0x20,%bpl
mov    %bpl,-0x1(%rbx)
jmp    1130 <strlwr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @strlwr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %13
%5 = phi i64 [ %14, %13 ], [ 0, %1 ]
%6 = phi i8 [ %16, %13 ], [ %2, %1 ]
%7 = phi i8* [ %15, %13 ], [ %0, %1 ]
%8 = sext i8 %6 to i32
%9 = tail call i32 @isupper(i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %4
%12 = add i8 %6, 32
store i8 %12, i8* %7
br label %13
13: ; preds = %11, %4
%14 = add nuw i64 %5, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %13, %1
ret void
}
int cvmx_wqe_get_grp(struct cvmx_wqe *work) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cvmx_wqe = type opaque
define i32 @cvmx_wqe_get_grp(%struct.cvmx_wqe* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ configureIRQ();
int /*<<< orphan*/ configureLed();
int /*<<< orphan*/ configureTimer();
int main(void) {
  configureIRQ();
  configureTimer();
  configureLed();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <configureIRQ@plt>
mov    $0x0,%al
call   1040 <configureTimer@plt>
mov    $0x0,%al
call   1050 <configureLed@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @configureIRQ()
%2 = call i32 (...) @configureTimer()
%3 = call i32 (...) @configureLed()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @configureIRQ()
%2 = tail call i32 (...) @configureTimer()
%3 = tail call i32 (...) @configureLed()
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(size_t, int);
unsigned char *tgCreate(void) {
  return (unsigned char *)calloc((size_t)(256 * 256), sizeof(unsigned char));
}


x86 assembly (clang, -O0):
<tgCreate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgCreate>:
mov    $0x10000,%edi
mov    $0x1,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @tgCreate() {
%1 = call i64 @calloc(i64 65536, i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @tgCreate() {
%1 = tail call i64 @calloc(i64 65536, i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
int MPI_Comm_free(int *comm) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @MPI_Comm_free(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("start\n");
  volatile unsigned long long i;
  for (i = 0; i < 1000000000ULL; ++i)
    ;
  printf("stop\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    $0x3b9aca00,%rax
jae    1159 <main+0x49>
jmp    1148 <main+0x38>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <main+0x23>
lea    0xea7(%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>
movq   $0x0,(%rsp)
mov    (%rsp),%rax
cmp    $0x3b9ac9ff,%rax
ja     1151 <main+0x41>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addq   $0x1,(%rsp)
mov    (%rsp),%rax
cmp    $0x3b9aca00,%rax
jb     1140 <main+0x30>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"start\0A\00"
@.str.1 = [6 x i8] c"stop\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store volatile i64 0, i64* %2
br label %4
4: ; preds = %8, %0
%5 = load volatile i64, i64* %2
%6 = icmp ult i64 %5, 1000000000
br i1 %6, label %7, label %11
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load volatile i64, i64* %2
%10 = add i64 %9, 1
store volatile i64 %10, i64* %2
br label %4
11: ; preds = %4
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"start\00"
@str.2 = [5 x i8] c"stop\00"
define i32 @main() {
%1 = alloca i64
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%3 = bitcast i64* %1 to i8*
store volatile i64 0, i64* %1
%4 = load volatile i64, i64* %1
%5 = icmp ult i64 %4, 1000000000
br i1 %5, label %6, label %11
6: ; preds = %0, %6
%7 = load volatile i64, i64* %1
%8 = add i64 %7, 1
store volatile i64 %8, i64* %1
%9 = load volatile i64, i64* %1
%10 = icmp ult i64 %9, 1000000000
br i1 %10, label %6, label %11
11: ; preds = %6, %0
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void arrFree(char **arr, int n) {
  if (!arr) {
    return;
  }
  for (n--; n >= 0; n--) {
    free(arr[n]);
  }
  free(arr);
}


x86 assembly (clang, -O0):
<arrFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <arrFree+0x1f>
jmp    116a <arrFree+0x5a>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1161 <arrFree+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <arrFree+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrFree>:
test   %rdi,%rdi
je     1155 <arrFree+0x45>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
jle    1146 <arrFree+0x36>
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
mov    (%r14,%rax,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <arrFree+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @arrFree(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 = icmp ne i8** %5, null
br i1 %6, label %8, label %7
7: ; preds = %2
br label %26
8: ; preds = %2
%9 = load i32, i32* %4
%10 = add nsw i32 %9, -1
store i32 %10, i32* %4
br label %11
11: ; preds = %20, %8
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = load i8**, i8*** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
br label %20
20: ; preds = %14
%21 = load i32, i32* %4
%22 = add nsw i32 %21, -1
store i32 %22, i32* %4
br label %11
23: ; preds = %11
%24 = load i8**, i8*** %3
%25 = bitcast i8** %24 to i8*
br label %26
26: ; preds = %23, %7
ret void
}

LLVM IR (-O2):
define void @arrFree(i8** %0, i32 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ %7, %6 ], [ %10, %8 ]
%10 = add nsw i64 %9, -1
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i8*, i8** %0, i64 %11
%13 = load i8*, i8** %12
tail call void @free(i8* %13)
%14 = icmp ugt i64 %9, 1
br i1 %14, label %8, label %15
15: ; preds = %8, %4
%16 = bitcast i8** %0 to i8*
tail call void @free(i8* %16)
br label %17
17: ; preds = %2, %15
ret void
}