xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void int8Copy(int8_t *dst, const int8_t *src) {
  assert(dst != NULL);
  assert(src != NULL);
  *dst = *src;
}


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

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

LLVM IR (-O0):
define void @int8Copy(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 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32*, i32** %4
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %3
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @int8Copy(i32* writeonly %0, i32* %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = load i32, i32* %1
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t count;
  if (!s)
    return 0;
  for (count = 0; s[count]; count++)
    ;
  return count;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <strlen+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1158 <strlen+0x58>
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1150 <strlen+0x50>
jmp    113f <strlen+0x3f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strlen+0x28>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111f <strlen+0x1f>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %4, %3 ]
ret i64 %10
}
/* Variables and functions */
scalar_t__ exists(char *);
const char *scan_pm_gps() {
  if (exists("/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.7/"
             "neo1973-pm-gps.0"))
    return "/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.7/"
           "neo1973-pm-gps.0";
  return NULL;
}


x86 assembly (clang, -O0):
<scan_pm_gps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     113e <scan_pm_gps+0x2e>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <scan_pm_gps+0x36>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_pm_gps>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <exists@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [71 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.7/neo1973-pm-gps.0\00"
define i8* @scan_pm_gps() {
%1 = alloca i8*
%2 = call i64 @exists(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8** %1
br label %6
5: ; preds = %0
store i8* null, i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [71 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.7/neo1973-pm-gps.0\00"
define i8* @scan_pm_gps() {
%1 = tail call i64 @exists(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
char *utf8_backskip_char(const char *start, const char *s) {
  for (s--; s > start && (((*s) & 0xc0) == 0x80); s--)
    ;
  return (char *)s;
}


x86 assembly (clang, -O0):
<utf8_backskip_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x11(%rbp)
jbe    1142 <utf8_backskip_char+0x42>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <utf8_backskip_char+0x52>
jmp    1168 <utf8_backskip_char+0x68>
jmp    1157 <utf8_backskip_char+0x57>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <utf8_backskip_char+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_backskip_char>:
add    $0xffffffffffffffff,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rsi,%rax
cmp    %rdi,%rsi
jbe    1127 <utf8_backskip_char+0x27>
movzbl (%rax),%ecx
and    $0xc0,%cl
lea    -0x1(%rax),%rsi
cmp    $0x80,%cl
je     1110 <utf8_backskip_char+0x10>
ret

LLVM IR (-O0):
define i8* @utf8_backskip_char(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 = getelementptr inbounds i8, i8* %5, i32 -1
store i8* %6, i8** %4
br label %7
7: ; preds = %20, %2
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = icmp ugt i8* %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = and i32 %14, 192
%16 = icmp eq i32 %15, 128
br label %17
17: ; preds = %11, %7
%18 = phi i1 [ false, %7 ], [ %16, %11 ]
br i1 %18, label %19, label %23
19: ; preds = %17
br label %20
20: ; preds = %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 -1
store i8* %22, i8** %4
br label %7
23: ; preds = %17
%24 = load i8*, i8** %4
ret i8* %24
}

LLVM IR (-O2):
define i8* @utf8_backskip_char(i8* readnone %0, i8* %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %5, %7 ]
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = icmp ugt i8* %5, %0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i8, i8* %5
%9 = and i8 %8, -64
%10 = icmp eq i8 %9, -128
br i1 %10, label %3, label %11
11: ; preds = %3, %7
ret i8* %5
}
int mulhi(int a, int b) {
  asm("mul %%edx   # %%1 was %1" : "+d"(a), "+a"(b));
  return a;
}


x86 assembly (clang, -O0):
<mulhi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%eax
mul    %edx
mov    %edx,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulhi>:
mov    %esi,%eax
mov    %edi,%edx
mul    %edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mulhi(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call { i32, i32 } asm "mul %edx # %1 was $1", "={dx},={ax},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
%8 = extractvalue { i32, i32 } %7, 0
%9 = extractvalue { i32, i32 } %7, 1
store i32 %8, i32* %3
store i32 %9, i32* %4
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @mulhi(i32 %0, i32 %1) {
%3 = tail call { i32, i32 } asm "mul %edx # %1 was $1", "={dx},={ax},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
%4 = extractvalue { i32, i32 } %3, 0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned long);
extern void bfrt_write(unsigned long v) { putchar(v); }


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

x86 assembly (clang, -O2):
<bfrt_write>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @bfrt_write(i64 %0) {
%2 = tail call i32 @putchar(i64 %0)
ret void
}
int ls_costN_nm2_n_in(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @ls_costN_nm2_n_in() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ls_costN_nm2_n_in() {
ret i32 1
}
unsigned int inl(int port) {
  unsigned int value;
  __asm__ __volatile__("in"
                       "l"
                       " %w1, %"
                       ""
                       "0"
                       : "=a"(value)
                       : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl(i32 %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i32 %2
}
void foo289(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo289(i32 %0) {
ret void
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
struct timespec get_timeout() {
  struct timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
  t.tv_sec++;
  return t;
}


x86 assembly (clang, -O0):
<get_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timeout>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    (%rsp),%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @get_timeout() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @get_timeout() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
ret i32 %6
}
void genbltz() {}


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

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

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

LLVM IR (-O2):
define void @genbltz() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age;
  int height = 72;
  printf("My age is %d \n", age);
  printf("I am %d inches tall \n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x48,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xed0(%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 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x48,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"My age is %d \0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"My age is %d \0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *mallocNCopyMcfio(char *, int);
int mcfioC_OpenReadMapped(char *);
int mcfio_openreadmapped_(char *filename, int length) {
  char *aString;
  int iret;
  aString = mallocNCopyMcfio(filename, length);
  iret = mcfioC_OpenReadMapped(aString);
  if (aString != NULL)
    free(aString);
  return iret;
}


x86 assembly (clang, -O0):
<mcfio_openreadmapped_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <mcfioC_OpenReadMapped@plt>
mov    %eax,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116f <mcfio_openreadmapped_+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcfio_openreadmapped_>:
push   %rbp
push   %rbx
push   %rax
call   1050 <mallocNCopyMcfio@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <mcfioC_OpenReadMapped@plt>
mov    %eax,%ebp
test   %rbx,%rbx
je     1152 <mcfio_openreadmapped_+0x22>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mcfio_openreadmapped_(i8* %0, i32 %1) {
%3 = tail call i8* @mallocNCopyMcfio(i8* %0, i32 %1)
%4 = tail call i32 @mcfioC_OpenReadMapped(i8* %3)
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %6, %2
ret i32 %4
}
void gtk_drag_source_add_text_targets() {}


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

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

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

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

/* Variables and functions */
int mlt_audio_calculate_frame_samples(float, int, int /*<<< orphan*/);
int mlt_sample_calculator(float fps, int frequency, int64_t position) {
  return mlt_audio_calculate_frame_samples(fps, frequency, position);
}


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

x86 assembly (clang, -O2):
<mlt_sample_calculator>:
jmp    1030 <mlt_audio_calculate_frame_samples@plt>

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

LLVM IR (-O2):
define i32 @mlt_sample_calculator(float %0, i32 %1, i32 %2) {
%4 = tail call i32 @mlt_audio_calculate_frame_samples(float %0, i32 %1, i32 %2)
ret i32 %4
}
void EVP_MD_type(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void sigint_callback_handler(int signum) { exit(signum); }


x86 assembly (clang, -O0):
<sigint_callback_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigint_callback_handler>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @sigint_callback_handler(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
int UAX_Asm_RegIsXmmP(int reg) {
  if ((reg & 0xF0) == 0x40)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<UAX_Asm_RegIsXmmP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0,%eax
cmp    $0x40,%eax
jne    1124 <UAX_Asm_RegIsXmmP+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112b <UAX_Asm_RegIsXmmP+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UAX_Asm_RegIsXmmP>:
and    $0xf0,%edi
xor    %eax,%eax
cmp    $0x40,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @UAX_Asm_RegIsXmmP(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 240
%6 = icmp eq i32 %5, 64
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @UAX_Asm_RegIsXmmP(i32 %0) {
%2 = and i32 %0, 240
%3 = icmp eq i32 %2, 64
%4 = zext i1 %3 to i32
ret i32 %4
}
int Isolate_rightmost0(int reg) { return (~reg) & (reg + 1); }


x86 assembly (clang, -O0):
<Isolate_rightmost0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Isolate_rightmost0>:
lea    0x1(%rdi),%eax
mov    %edi,%ecx
not    %ecx
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Isolate_rightmost0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = and i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @Isolate_rightmost0(i32 %0) {
%2 = xor i32 %0, -1
%3 = add nsw i32 %0, 1
%4 = and i32 %3, %2
ret i32 %4
}
const char *Hash_Brief(void) { return "Hashable"; }


x86 assembly (clang, -O0):
<Hash_Brief>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Hashable\00"
define i8* @Hash_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Hashable\00"
define i8* @Hash_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
void arithmetic_init_add(void) { int x = 1 + 1; }


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

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

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

LLVM IR (-O2):
define void @arithmetic_init_add() {
ret void
}
const char *bar1_short() { return "abcdef"; }


x86 assembly (clang, -O0):
<bar1_short>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar1_short>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"abcdef\00"
define i8* @bar1_short() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"abcdef\00"
define i8* @bar1_short() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char net_recv_msg_timed(int, int);
extern char net_recv_msg(int fd) { return net_recv_msg_timed(fd, 4000); }


x86 assembly (clang, -O0):
<net_recv_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xfa0,%esi
call   1030 <net_recv_msg_timed@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_recv_msg>:
mov    $0xfa0,%esi
jmp    1030 <net_recv_msg_timed@plt>

LLVM IR (-O0):
define signext i8 @net_recv_msg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call signext i8 @net_recv_msg_timed(i32 %3, i32 4000)
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @net_recv_msg(i32 %0) {
%2 = tail call signext i8 @net_recv_msg_timed(i32 %0, i32 4000)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errorc() { error("System: Pointer to bigint is NULL.\n"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"System: Pointer to bigint is NULL.\0A\00"
define void @errorc() {
%1 = call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"System: Pointer to bigint is NULL.\0A\00"
define void @errorc() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
scalar_t__ INT16_MAX;
scalar_t__ INT16_MIN;
int16_t __hsail_sat_mul_s16(int16_t a, int16_t b) {
  int32_t c = (int32_t)a * (int32_t)b;
  if (c > INT16_MAX)
    return INT16_MAX;
  else if (c < INT16_MIN)
    return INT16_MIN;
  else
    return c;
}


x86 assembly (clang, -O0):
<__hsail_sat_mul_s16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%rax
jle    1140 <__hsail_sat_mul_s16+0x40>
mov    0x2eac(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <__hsail_sat_mul_s16+0x6f>
mov    -0x20(%rbp),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jge    1167 <__hsail_sat_mul_s16+0x67>
mov    0x2e7d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <__hsail_sat_mul_s16+0x6f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_sat_mul_s16>:
imul   %rsi,%rdi
mov    0x2ed5(%rip),%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%rax
cmp    %rax,%rdi
cmovge %rdi,%rax
mov    (%rcx),%rcx
cmp    %rcx,%rdi
cmovg  %rcx,%rax
ret

LLVM IR (-O0):
@INT16_MAX = global i64 0
@INT16_MIN = global i64 0
define i64 @__hsail_sat_mul_s16(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = mul nsw i64 %7, %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = load i64, i64* @INT16_MAX
%12 = icmp sgt i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i64, i64* @INT16_MAX
store i64 %14, i64* %3
br label %23
15: ; preds = %2
%16 = load i64, i64* %6
%17 = load i64, i64* @INT16_MIN
%18 = icmp slt i64 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i64, i64* @INT16_MIN
store i64 %20, i64* %3
br label %23
21: ; preds = %15
%22 = load i64, i64* %6
store i64 %22, i64* %3
br label %23
23: ; preds = %21, %19, %13
%24 = load i64, i64* %3
ret i64 %24
}

LLVM IR (-O2):
@INT16_MAX = global i64 0
@INT16_MIN = global i64 0
define i64 @__hsail_sat_mul_s16(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
%4 = load i64, i64* @INT16_MAX
%5 = icmp sgt i64 %3, %4
%6 = load i64, i64* @INT16_MIN
%7 = icmp slt i64 %3, %6
%8 = select i1 %7, i64 %6, i64 %3
%9 = select i1 %5, i64 %4, i64 %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ irq_enable(int);
int /*<<< orphan*/ print_string(int, int, int, int, char *);
int /*<<< orphan*/ vdc_wait_vsync();
void main() {
  print_string(8, 10, 32, 20, "Hello world!");
  irq_enable((1 << 1));
  for (;;) {
    vdc_wait_vsync();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0xa,%esi
mov    $0x20,%edx
mov    $0x14,%ecx
lea    0xeb1(%rip),%r8
call   1040 <print_string@plt>
mov    $0x2,%edi
call   1030 <irq_enable@plt>
mov    $0x0,%al
call   1050 <vdc_wait_vsync@plt>
jmp    115e <main+0x2e>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%r8
mov    $0x8,%edi
mov    $0xa,%esi
mov    $0x20,%edx
mov    $0x14,%ecx
call   1040 <print_string@plt>
mov    $0x2,%edi
call   1030 <irq_enable@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <vdc_wait_vsync@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world!\00"
define void @main() {
%1 = call i32 @print_string(i32 8, i32 10, i32 32, i32 20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @irq_enable(i32 2)
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @vdc_wait_vsync()
br label %3
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define void @main() {
%1 = tail call i32 @print_string(i32 8, i32 10, i32 32, i32 20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @irq_enable(i32 2)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @vdc_wait_vsync()
br label %3
}
void border_nw_ext_diagonal_special_sand_long_vert(unsigned char *pic,
                                                   unsigned char *mirr) {
  *pic = 0x2F;
  *mirr = 0x01 | 0x02;
}


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

x86 assembly (clang, -O2):
<border_nw_ext_diagonal_special_sand_long_vert>:
movb   $0x2f,(%rdi)
movb   $0x3,(%rsi)
ret

LLVM IR (-O0):
define void @border_nw_ext_diagonal_special_sand_long_vert(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 47, i8* %5
%6 = load i8*, i8** %4
store i8 3, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_nw_ext_diagonal_special_sand_long_vert(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 47, i8* %0
store i8 3, i8* %1
ret void
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
size_t filesize(const char *file) {
  struct stat st;
  if (stat(file, &st) >= 0)
    return st.st_size;
  return 0;
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jl     1140 <filesize+0x30>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1148 <filesize+0x38>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     1124 <filesize+0x14>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @filesize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, 0
%8 = select i1 %7, i64 0, i64 %6
ret i64 %8
}
unsigned long unsignedlong_ignoring_unsignedchar(unsigned long x,
                                                 unsigned char y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_unsignedchar(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_unsignedchar(i64 returned %0, i8 zeroext %1) {
ret i64 %0
}
/* Variables and functions */
double _tan(double);
double tan(double angle) { return _tan(angle); }


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

x86 assembly (clang, -O2):
<tan>:
jmp    1030 <_tan@plt>

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

LLVM IR (-O2):
define double @tan(double %0) {
%2 = tail call double @_tan(double %0)
ret double %2
}
int test_imm_E4uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xE4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E4uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 228
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void __zero__(dp, len) register double *dp;
register int len;
{ memset(((char *)dp), '\0', (len * sizeof(double))); }


x86 assembly (clang, -O0):
<__zero__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__zero__>:
movslq %esi,%rdx
shl    $0x3,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @__zero__(double* nocapture writeonly %0, i32 %1) {
%3 = bitcast double* %0 to i8*
%4 = sext i32 %1 to i64
%5 = shl nsw i64 %4, 3
tail call void @llvm.memset.p0i8.i64(i8* align 1 %3, i8 0, i64 %5, i1 false)
ret void
}
/* Variables and functions */
char *replaceInString(char const *, char *, char *);
char *removeWhitespace(const char *string) {
  return replaceInString(string, " ", "");
}


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

x86 assembly (clang, -O2):
<removeWhitespace>:
lea    0xee9(%rip),%rsi
lea    0xee3(%rip),%rdx
jmp    1030 <replaceInString@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @removeWhitespace(i8* %0) {
%2 = tail call i8* @replaceInString(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ nchars;
};
typedef TYPE_1__ XwcTextItem;

/* Variables and functions */
int get_XwcTextItem_nchars(void *_p) {
  return (int)((XwcTextItem *)_p)->nchars;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XwcTextItem_nchars(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XwcTextItem_nchars(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned char SumCalculate(unsigned char *);
unsigned char SumCheckIsErr(unsigned char *data) {
  unsigned char temp = SumCalculate(data);
  unsigned char len = data[1] - 1;
  if (temp == data[len])
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<SumCheckIsErr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <SumCalculate@plt>
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
sub    $0x1,%eax
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl -0x12(%rbp),%edx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1157 <SumCheckIsErr+0x47>
movb   $0x0,-0x1(%rbp)
jmp    115b <SumCheckIsErr+0x4b>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SumCheckIsErr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <SumCalculate@plt>
mov    0x1(%rbx),%cl
add    $0xff,%cl
movzbl %cl,%ecx
cmp    (%rbx,%rcx,1),%al
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define zeroext i8 @SumCheckIsErr(i8* %0) {
%2 = tail call zeroext i8 @SumCalculate(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = add i8 %4, -1
%6 = zext i8 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %2, %8
%10 = zext i1 %9 to i8
ret i8 %10
}
unsigned int EasyLifeElfUp(char *text) {
  unsigned int h = 0, g;
  while (*text) {
    h = (h << 4) + *text;
    if (g = h & 0xF0000000)
      h ^= g >> 24;
    h &= ~g;
    text++;
  }
  return h;
}


x86 assembly (clang, -O0):
<EasyLifeElfUp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <EasyLifeElfUp+0x6b>
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf0000000,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     114e <EasyLifeElfUp+0x4e>
mov    -0x10(%rbp),%eax
shr    $0x18,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <EasyLifeElfUp+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EasyLifeElfUp>:
mov    (%rdi),%cl
test   %cl,%cl
je     1136 <EasyLifeElfUp+0x36>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%eax
movsbl %cl,%ecx
add    %eax,%ecx
mov    %ecx,%eax
and    $0xf0000000,%eax
mov    %eax,%edx
shr    $0x18,%edx
xor    %ecx,%edx
not    %eax
and    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <EasyLifeElfUp+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @EasyLifeElfUp(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %17, %4 ], [ %2, %1 ]
%6 = phi i8* [ %16, %4 ], [ %0, %1 ]
%7 = phi i32 [ %15, %4 ], [ 0, %1 ]
%8 = shl i32 %7, 4
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = and i32 %10, -268435456
%12 = lshr exact i32 %11, 24
%13 = xor i32 %12, %10
%14 = xor i32 %11, -1
%15 = and i32 %13, %14
%16 = getelementptr inbounds i8, i8* %6, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %4
19: ; preds = %4, %1
%20 = phi i32 [ 0, %1 ], [ %15, %4 ]
ret i32 %20
}
/* Variables and functions */
int atoi(char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ proxyLog(char *, char const *);
int parseBufferSize(const char *optarg) {
  const int bufferSize = atoi(optarg);
  if (bufferSize <= 0) {
    proxyLog("invalid buffer size %s", optarg);
    exit(1);
  }
  return bufferSize;
}


x86 assembly (clang, -O0):
<parseBufferSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     116c <parseBufferSize+0x3c>
mov    -0x8(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <proxyLog@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseBufferSize>:
push   %rbx
mov    %rdi,%rbx
call   1040 <atoi@plt>
test   %eax,%eax
jle    113f <parseBufferSize+0xf>
pop    %rbx
ret
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1030 <proxyLog@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"invalid buffer size %s\00"
define i32 @parseBufferSize(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @proxyLog(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [23 x i8] c"invalid buffer size %s\00"
define i32 @parseBufferSize(i8* %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @proxyLog(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32 %2
}
int ls_cost_nm6_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 1;
  return 0;
}


x86 assembly (clang, -O0):
<ls_cost_nm6_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <ls_cost_nm6_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <ls_cost_nm6_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <ls_cost_nm6_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <ls_cost_nm6_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm6_work>:
test   %rdi,%rdi
je     110b <ls_cost_nm6_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <ls_cost_nm6_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <ls_cost_nm6_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <ls_cost_nm6_work+0x2c>
movl   $0x1,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ls_cost_nm6_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 1, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}