xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ memcmp(void const *, void const *, int);
int /*<<< orphan*/ printf(char *, char const *);
int isSha1of(const void *chksum1, const void *chksum2, const char *name) {
  if (memcmp(chksum1, chksum2, 20) == 0) {
    printf("Valid %s SHA1!\n", name);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isSha1of>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x14,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
jne    116c <isSha1of+0x4c>
mov    -0x20(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1173 <isSha1of+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSha1of>:
push   %rbx
mov    %rdx,%rbx
mov    $0x14,%edx
call   1040 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     113a <isSha1of+0x1a>
pop    %rbx
ret
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Valid %s SHA1!\0A\00"
define i32 @isSha1of(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i64 @memcmp(i8* %8, i8* %9, i32 20)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 1, i32* %4
br label %16
15: ; preds = %3
store i32 0, i32* %4
br label %16
16: ; preds = %15, %12
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@.str = [16 x i8] c"Valid %s SHA1!\0A\00"
define i32 @isSha1of(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @memcmp(i8* %0, i8* %1, i32 20)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %9
}
void task_tick_idle(struct rq *rq, struct task_struct *curr, int queued) {}


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

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

LLVM IR (-O0):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @task_tick_idle(%struct.rq* %0, %struct.task_struct* %1, i32 %2) {
%4 = alloca %struct.rq*
%5 = alloca %struct.task_struct*
%6 = alloca i32
store %struct.rq* %0, %struct.rq** %4
store %struct.task_struct* %1, %struct.task_struct** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @task_tick_idle(%struct.rq* nocapture %0, %struct.task_struct* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pdump(int);
int /*<<< orphan*/ printf(char *);
extern void User_ID_Packet(int len) {
  printf("\tUser ID - ");
  pdump(len);
  printf("\n");
}


x86 assembly (clang, -O0):
<User_ID_Packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <pdump@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<User_ID_Packet>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <pdump@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\09User ID - \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @User_ID_Packet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @pdump(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09User ID - \00"
define void @User_ID_Packet(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @pdump(i32 %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
char *BOTS_util_formatNumber(int num) {
  if (num > 9)
    return "%i";
  return " %i";
}


x86 assembly (clang, -O0):
<BOTS_util_formatNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jle    1121 <BOTS_util_formatNumber+0x21>
lea    0xee9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <BOTS_util_formatNumber+0x2c>
lea    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOTS_util_formatNumber>:
cmp    $0xa,%edi
lea    0xef7(%rip),%rcx
lea    0xeef(%rip),%rax
cmovge %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c" %i\00"
define i8* @BOTS_util_formatNumber(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 9
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c" %i\00"
define i8* @BOTS_util_formatNumber(i32 %0) {
%2 = icmp sgt i32 %0, 9
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void Time(int argc, char *argv[]) {
  time_t sec = time(NULL);
  struct tm t = *localtime(&sec);
  printf("%02d:%02d:%02d:  \n", t.tm_hour, t.tm_min, t.tm_sec);
}


x86 assembly (clang, -O0):
<Time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%rcx
mov    %rcx,-0x20(%rbp)
mov    0x8(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Time>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%esi
mov    0x4(%rax),%edx
mov    0x8(%rax),%ecx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [19 x i8] c"%02d:%02d:%02d: \0A\00"
define void @Time(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca %struct.tm
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = call i32 @time(i32* null)
store i32 %7, i32* %5
%8 = call %struct.tm* @localtime(i32* %5)
%9 = bitcast %struct.tm* %6 to i8*
%10 = bitcast %struct.tm* %8 to i8*
%11 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 0
%12 = load i32, i32* %11
%13 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 2
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [19 x i8] c"%02d:%02d:%02d: \0A\00"
define void @Time(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 2
%12 = load i32, i32* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10, i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lcd_Out(unsigned char, int, char *);
void Lcd_Clr_Line(unsigned char line) { Lcd_Out(line, 1, "                "); }


x86 assembly (clang, -O0):
<Lcd_Clr_Line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%esi
lea    0xed6(%rip),%rdx
movzbl -0x1(%rbp),%edi
call   1030 <Lcd_Out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lcd_Clr_Line>:
lea    0xee9(%rip),%rdx
mov    $0x1,%esi
jmp    1030 <Lcd_Out@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c" \00"
define void @Lcd_Clr_Line(i8 zeroext %0) {
%2 = tail call i32 @Lcd_Out(i8 zeroext %0, i32 1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ isin(int);
int32_t icos(int a) { return isin(a + 1024); }


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

x86 assembly (clang, -O2):
<icos>:
add    $0x400,%edi
jmp    1030 <isin@plt>

LLVM IR (-O0):
define i32 @icos(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1024
%5 = call i32 @isin(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @icos(i32 %0) {
%2 = add nsw i32 %0, 1024
%3 = tail call i32 @isin(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(int /*<<< orphan*/, int, int /*<<< orphan*/, int,
                           int /*<<< orphan*/, int);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void myReshape(int w, int h) {
  glViewport(0, 0, w, h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0, w, 0, h, 0, 1);
}


x86 assembly (clang, -O0):
<myReshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
mov    %r8d,%edi
mov    %r8d,%edx
call   1040 <glOrtho@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myReshape>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1060 <glViewport@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
xor    %edi,%edi
mov    %ebp,%esi
xor    %edx,%edx
mov    %ebx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glOrtho@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @myReshape(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 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @glOrtho(i32 0, i32 %11, i32 0, i32 %12, i32 0, i32 1)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @myReshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @glOrtho(i32 0, i32 %0, i32 0, i32 %1, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, unsigned short const);
bool cutils_cdar_DynamicArray_unsigned_short_format(const unsigned short *i,
                                                    char **b, size_t *s) {
  snprintf(*b, *s, "%hu", *i);
  return true;
}


x86 assembly (clang, -O0):
<cutils_cdar_DynamicArray_unsigned_short_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
lea    0xec3(%rip),%rdx
movzwl (%rax),%ecx
call   1030 <snprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cdar_DynamicArray_unsigned_short_format>:
push   %rax
mov    (%rsi),%rax
mov    (%rdx),%rsi
movzwl (%rdi),%ecx
lea    0xedf(%rip),%rdx
mov    %rax,%rdi
call   1030 <snprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%hu\00"
define i32 @cutils_cdar_DynamicArray_unsigned_short_format(i16* %0, i8** %1, i64* %2) {
%4 = alloca i16*
%5 = alloca i8**
%6 = alloca i64*
store i16* %0, i16** %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = load i16*, i16** %4
%12 = load i16, i16* %11
%13 = call i32 @snprintf(i8* %8, i64 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %12)
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"%hu\00"
define i32 @cutils_cdar_DynamicArray_unsigned_short_format(i16* nocapture %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i8*, i8** %1
%5 = load i64, i64* %2
%6 = load i16, i16* %0
%7 = tail call i32 @snprintf(i8* %4, i64 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %6)
ret i32 1
}
void ff_hevc_put_hevc_bi_w_epel_h64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_h64_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int v[], int N) {
  int i = 0;
  for (i = 0; i < N; i++) {
    printf("%d ", v[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <print+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <print+0x1d>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
OP(fd, dc) {
  illegal_1();
  op_dc();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_dc()
ret i32 undef
}
void imswap2(string, nbytes) char *string;
int nbytes;
{
  char *sbyte, temp, *slast;
  slast = string + nbytes;
  sbyte = string;
  while (sbyte < slast) {
    temp = sbyte[0];
    sbyte[0] = sbyte[1];
    sbyte[1] = temp;
    sbyte = sbyte + 2;
  }
  return;
}


x86 assembly (clang, -O0):
<imswap2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1161 <imswap2+0x61>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
jmp    1122 <imswap2+0x22>
pop    %rbp
ret

x86 assembly (clang, -O2):
<imswap2>:
test   %esi,%esi
jle    111d <imswap2+0x1d>
movslq %esi,%rax
add    %rdi,%rax
nopw   0x0(%rax,%rax,1)
rolw   $0x8,(%rdi)
add    $0x2,%rdi
cmp    %rax,%rdi
jb     1110 <imswap2+0x10>
ret

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

LLVM IR (-O2):
define void @imswap2(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i8* [ %11, %6 ], [ %0, %2 ]
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %7
store i8 %8, i8* %9
%11 = getelementptr inbounds i8, i8* %7, i64 2
%12 = icmp ult i8* %11, %4
br i1 %12, label %6, label %13
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int isprint(char);
int httplex__is_literal(char c) {
  switch (c) {
  case '/':
  case '\r':
  case '\n':
  case ' ':
  case '\t':
  case '?':
  case '&':
  case '=':
    return 0;
  }
  return isprint(c);
}


x86 assembly (clang, -O0):
<httplex__is_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     119c <httplex__is_literal+0x8c>
jmp    1136 <httplex__is_literal+0x26>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     119c <httplex__is_literal+0x8c>
jmp    1147 <httplex__is_literal+0x37>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     119c <httplex__is_literal+0x8c>
jmp    1158 <httplex__is_literal+0x48>
mov    -0xc(%rbp),%eax
sub    $0x26,%eax
je     119c <httplex__is_literal+0x8c>
jmp    1169 <httplex__is_literal+0x59>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     119c <httplex__is_literal+0x8c>
jmp    117a <httplex__is_literal+0x6a>
mov    -0xc(%rbp),%eax
sub    $0x3d,%eax
je     119c <httplex__is_literal+0x8c>
jmp    118b <httplex__is_literal+0x7b>
mov    -0xc(%rbp),%eax
sub    $0x3f,%eax
jne    11a8 <httplex__is_literal+0x98>
jmp    119c <httplex__is_literal+0x8c>
movl   $0x0,-0x4(%rbp)
jmp    11b4 <httplex__is_literal+0xa4>
movsbl -0x5(%rbp),%edi
call   1030 <isprint@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<httplex__is_literal>:
cmp    $0x3f,%edi
ja     112a <httplex__is_literal+0x1a>
mov    %edi,%eax
movabs $0xa000804100002600,%rcx
bt     %rax,%rcx
jae    112a <httplex__is_literal+0x1a>
xor    %eax,%eax
ret
movsbl %dil,%edi
jmp    1030 <isprint@plt>

LLVM IR (-O0):
define i32 @httplex__is_literal(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 47, label %6
i32 13, label %6
i32 10, label %6
i32 32, label %6
i32 9, label %6
i32 63, label %6
i32 38, label %6
i32 61, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call i32 @isprint(i8 signext %8)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @httplex__is_literal(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 47, label %5
i32 13, label %5
i32 10, label %5
i32 32, label %5
i32 9, label %5
i32 63, label %5
i32 38, label %5
i32 61, label %5
]
3: ; preds = %1
%4 = tail call i32 @isprint(i8 signext %0)
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %6
}
OP(dd, b0) { op_b0(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_b0()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ draw_char(int, int, char);
void draw_zombie(int x, int y, bool zombie_alive) {
  draw_char(x, y, (zombie_alive ? 'Z' : 'X'));
}


x86 assembly (clang, -O0):
<draw_zombie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x58,%eax
mov    $0x5a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
movsbl %al,%edx
call   1030 <draw_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_zombie>:
xor    %eax,%eax
test   %edx,%edx
setne  %al
lea    (%rax,%rax,1),%edx
add    $0x58,%edx
jmp    1030 <draw_char@plt>

LLVM IR (-O0):
define void @draw_zombie(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 90, i32 88
%13 = trunc i32 %12 to i8
%14 = call i32 @draw_char(i32 %7, i32 %8, i8 signext %13)
ret void
}

LLVM IR (-O2):
define void @draw_zombie(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i8 88, i8 90
%6 = tail call i32 @draw_char(i32 %0, i32 %1, i8 signext %5)
ret void
}
void TimerOC4PolarityConfigure(unsigned long ulBase, unsigned long ulPolarity) {
  unsigned long ulTempccer = 0;

  ;

  ;
  ulTempccer = (*((volatile unsigned long *)(ulBase + 0x00000020)));
  ulTempccer &= ~0x00002000;
  ulTempccer |= (ulPolarity << 12);
  (*((volatile unsigned long *)(ulBase + 0x00000020))) = ulTempccer;
}


x86 assembly (clang, -O0):
<TimerOC4PolarityConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xffffffffffffdfff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0xc,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC4PolarityConfigure>:
mov    $0xffffffffffffdfff,%rax
and    0x20(%rdi),%rax
shl    $0xc,%rsi
or     %rax,%rsi
mov    %rsi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC4PolarityConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %3
%7 = add i64 %6, 32
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -8193
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = shl i64 %12, 12
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %3
%18 = add i64 %17, 32
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
ret void
}

LLVM IR (-O2):
define void @TimerOC4PolarityConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 32
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -8193
%7 = shl i64 %1, 12
%8 = or i64 %6, %7
store volatile i64 %8, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void display(int n, int mask, char c) {
  if (mask) {
    printf("--%c", c);
  } else {
    printf("%02d%c", n, c);
  }
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1144 <display+0x34>
movsbl -0x9(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1159 <display+0x49>
mov    -0x4(%rbp),%esi
movsbl -0x9(%rbp),%edx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
test   %esi,%esi
je     1124 <display+0x14>
lea    0xee5(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
mov    %edi,%eax
lea    0xed8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"--%c\00"
@.str.1 = [7 x i8] c"%02d%c\00"
define void @display(i32 %0, i32 %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8, i8* %6
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %18
13: ; preds = %3
%14 = load i32, i32* %4
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %16)
br label %18
18: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"--%c\00"
@.str.1 = [7 x i8] c"%02d%c\00"
define void @display(i32 %0, i32 %1, i8 signext %2) {
%4 = icmp eq i32 %1, 0
%5 = sext i8 %2 to i32
br i1 %4, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
8: ; preds = %3
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %5)
br label %10
10: ; preds = %8, %6
ret void
}
int execute_setfsgid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setfsgid() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ios_delay();
int ipc_read(int);
void ipc_wait_ack(void) {
  while (!(ipc_read(1) & 0x2)) {
  }
  ios_delay();
}


x86 assembly (clang, -O0):
<ipc_wait_ack>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <ipc_wait_ack+0x9>
mov    $0x1,%edi
call   1040 <ipc_read@plt>
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114b <ipc_wait_ack+0x2b>
jmp    1150 <ipc_wait_ack+0x30>
jmp    1129 <ipc_wait_ack+0x9>
mov    $0x0,%al
call   1030 <ios_delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_wait_ack>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <ipc_read@plt>
test   $0x2,%al
je     1130 <ipc_wait_ack+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ios_delay@plt>

LLVM IR (-O0):
define void @ipc_wait_ack() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @ipc_read(i32 1)
%3 = and i32 %2, 2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
%8 = call i32 (...) @ios_delay()
ret void
}

LLVM IR (-O2):
define void @ipc_wait_ack() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @ipc_read(i32 1)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 (...) @ios_delay()
ret void
}
void foo418() {}


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

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

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

LLVM IR (-O2):
define void @foo418() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
double round(double);
uint64_t duration_get(uint64_t on, uint64_t off) {
  uint64_t duration;
  double d;
  d = (float)(on - off);
  d *= (1 / 8.0);
  d = round(d);
  return ((uint64_t)d);
}


x86 assembly (clang, -O0):
<duration_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec2(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <round@plt>
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duration_get>:
push   %rax
sub    %rsi,%rdi
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xedb(%rip),%xmm0
call   1030 <round@plt>
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @duration_get(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca double
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = sub nsw i64 %7, %8
%10 = sitofp i64 %9 to float
%11 = fpext float %10 to double
store double %11, double* %6
%12 = load double, double* %6
%13 = fmul double %12, 1.250000e-01
store double %13, double* %6
%14 = load double, double* %6
%15 = call double @llvm.round.f64(double %14)
store double %15, double* %6
%16 = load double, double* %6
%17 = fptosi double %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @duration_get(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to float
%5 = fpext float %4 to double
%6 = fmul double %5, 1.250000e-01
%7 = tail call double @llvm.round.f64(double %6)
%8 = fptosi double %7 to i64
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ SPI_Transfer(short *, short *, int);
void LCD_Data(int data) {
  short dataBuffer = (0x100 | (0xFF & data));
  short unusedReturnBuffer[1];
  SPI_Transfer(&dataBuffer, unusedReturnBuffer, 1);
}


x86 assembly (clang, -O0):
<LCD_Data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
or     $0x100,%eax
mov    %ax,-0x6(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0x6(%rbp),%rdi
mov    $0x1,%edx
call   1030 <SPI_Transfer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Data>:
push   %rax
movzbl %dil,%eax
or     $0x100,%eax
mov    %ax,0x4(%rsp)
lea    0x4(%rsp),%rdi
lea    0x6(%rsp),%rsi
mov    $0x1,%edx
call   1030 <SPI_Transfer@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @LCD_Data(i32 %0) {
%2 = alloca i32
%3 = alloca i16
%4 = alloca [1 x i16]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 255, %5
%7 = or i32 256, %6
%8 = trunc i32 %7 to i16
store i16 %8, i16* %3
%9 = getelementptr inbounds [1 x i16], [1 x i16]* %4, i64 0, i64 0
%10 = call i32 @SPI_Transfer(i16* %3, i16* %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @LCD_Data(i32 %0) {
%2 = alloca i16
%3 = alloca [1 x i16]
%4 = bitcast i16* %2 to i8*
%5 = trunc i32 %0 to i16
%6 = and i16 %5, 255
%7 = or i16 %6, 256
store i16 %7, i16* %2
%8 = bitcast [1 x i16]* %3 to i8*
%9 = getelementptr inbounds [1 x i16], [1 x i16]* %3, i64 0, i64 0
%10 = call i32 @SPI_Transfer(i16* %2, i16* %9, i32 1)
ret void
}
float convl(float x, float min, float max, float cminx, float cmaxx) {
  float result, scale = (cmaxx - cminx) / (max - min);
  result = cminx + (x - min) * scale;
  if (result < cminx)
    result = cminx;
  if (result > cmaxx)
    result = cmaxx;
  return result;
}


x86 assembly (clang, -O0):
<convl>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1178 <convl+0x78>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1191 <convl+0x91>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convl>:
movaps %xmm4,%xmm5
subss  %xmm3,%xmm5
subss  %xmm1,%xmm2
divss  %xmm2,%xmm5
subss  %xmm1,%xmm0
mulss  %xmm5,%xmm0
addss  %xmm3,%xmm0
maxss  %xmm0,%xmm3
minss  %xmm3,%xmm4
movaps %xmm4,%xmm0
ret

LLVM IR (-O0):
define float @convl(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%13 = load float, float* %10
%14 = load float, float* %9
%15 = fsub float %13, %14
%16 = load float, float* %8
%17 = load float, float* %7
%18 = fsub float %16, %17
%19 = fdiv float %15, %18
store float %19, float* %12
%20 = load float, float* %9
%21 = load float, float* %6
%22 = load float, float* %7
%23 = fsub float %21, %22
%24 = load float, float* %12
%25 = call float @llvm.fmuladd.f32(float %23, float %24, float %20)
store float %25, float* %11
%26 = load float, float* %11
%27 = load float, float* %9
%28 = fcmp olt float %26, %27
br i1 %28, label %29, label %31
29: ; preds = %5
%30 = load float, float* %9
store float %30, float* %11
br label %31
31: ; preds = %29, %5
%32 = load float, float* %11
%33 = load float, float* %10
%34 = fcmp ogt float %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = load float, float* %10
store float %36, float* %11
br label %37
37: ; preds = %35, %31
%38 = load float, float* %11
ret float %38
}

LLVM IR (-O2):
define float @convl(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %4, %3
%7 = fsub float %2, %1
%8 = fdiv float %6, %7
%9 = fsub float %0, %1
%10 = tail call float @llvm.fmuladd.f32(float %9, float %8, float %3)
%11 = fcmp olt float %10, %3
%12 = select i1 %11, float %3, float %10
%13 = fcmp ogt float %12, %4
%14 = select i1 %13, float %4, float %12
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_inc(long *target, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_inc(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_inc(i64* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int fun558() { return 558; }


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

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

LLVM IR (-O0):
define i32 @fun558() {
ret i32 558
}

LLVM IR (-O2):
define i32 @fun558() {
ret i32 558
}
/* Variables and functions */
size_t min(size_t a, size_t b) {
  if (a < b)
    return a;
  else
    return b;
}


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

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

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double rnd1() { return ((float)rand()) / ((float)RAND_MAX); }


x86 assembly (clang, -O0):
<rnd1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd1>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @rnd1() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
%6 = fpext float %5 to double
ret double %6
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @rnd1() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
%6 = fpext float %5 to double
ret double %6
}
/* Variables and functions */
int pmp_master_read();
int /*<<< orphan*/ pmp_set_address(int);
int lcd_read(int addr) {
  pmp_set_address(addr);
  pmp_master_read();
  return pmp_master_read();
}


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

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

LLVM IR (-O0):
define i32 @lcd_read(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pmp_set_address(i32 %3)
%5 = call i32 (...) @pmp_master_read()
%6 = call i32 (...) @pmp_master_read()
ret i32 %6
}

LLVM IR (-O2):
define i32 @lcd_read(i32 %0) {
%2 = tail call i32 @pmp_set_address(i32 %0)
%3 = tail call i32 (...) @pmp_master_read()
%4 = tail call i32 (...) @pmp_master_read()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int zorglub() { printf("eviv bulgroz !\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"eviv bulgroz !\0A\00"
define i32 @zorglub() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [15 x i8] c"eviv bulgroz !\00"
define i32 @zorglub() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Rf_initialize_R(int, char **);
int /*<<< orphan*/ Rf_mainloop();
int main(int ac, char **av) {
  Rf_initialize_R(ac, av);
  Rf_mainloop();
  return 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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <Rf_initialize_R@plt>
mov    $0x0,%al
call   1040 <Rf_mainloop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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 i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @Rf_initialize_R(i32 %6, i8** %7)
%9 = call i32 (...) @Rf_mainloop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Rf_initialize_R(i32 %0, i8** %1)
%4 = tail call i32 (...) @Rf_mainloop()
ret i32 0
}
/* Variables and functions */
char *realpath(char const *, int /*<<< orphan*/ *);
char *file_fullpath(const char *path) { return realpath(path, NULL); }


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

x86 assembly (clang, -O2):
<file_fullpath>:
xor    %esi,%esi
jmp    1030 <realpath@plt>

LLVM IR (-O0):
define i8* @file_fullpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @realpath(i8* %3, i32* null)
ret i8* %4
}

LLVM IR (-O2):
define i8* @file_fullpath(i8* nocapture %0) {
%2 = tail call i8* @realpath(i8* %0, i32* null)
ret i8* %2
}
void fool_optimizer() {}


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

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

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

LLVM IR (-O2):
define void @fool_optimizer() {
ret void
}
/* Type definitions */
struct aqueue {
  int dummy;
};

/* Variables and functions */
scalar_t__ aqueue_avail(struct aqueue const *);
int aqueue_full(const struct aqueue *aqueue) {
  return aqueue_avail(aqueue) == 0;
}


x86 assembly (clang, -O0):
<aqueue_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <aqueue_avail@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aqueue_full>:
push   %rax
call   1030 <aqueue_avail@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.aqueue = type { i32 }
define i32 @aqueue_full(%struct.aqueue* %0) {
%2 = alloca %struct.aqueue*
store %struct.aqueue* %0, %struct.aqueue** %2
%3 = load %struct.aqueue*, %struct.aqueue** %2
%4 = call i64 @aqueue_avail(%struct.aqueue* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.aqueue = type { i32 }
define i32 @aqueue_full(%struct.aqueue* %0) {
%2 = tail call i64 @aqueue_avail(%struct.aqueue* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int *func_19(int *p_20, int *p_21, int *p_22, int *p_23) {
  signed char l_147 = 0x10L;
  int l_148 = (-2L);
  step_hash(71);
  l_148 = l_147;
  step_hash(72);
  return p_23;
}


x86 assembly (clang, -O0):
<func_19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movb   $0x10,-0x21(%rbp)
movl   $0xfffffffe,-0x28(%rbp)
mov    $0x47,%edi
call   1030 <step_hash@plt>
movsbl -0x21(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x48,%edi
call   1030 <step_hash@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_19>:
push   %rbx
mov    %rcx,%rbx
mov    $0x47,%edi
call   1030 <step_hash@plt>
mov    $0x48,%edi
call   1030 <step_hash@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @func_19(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8
%10 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i8 16, i8* %9
store i32 -2, i32* %10
%11 = call i32 @step_hash(i32 71)
%12 = load i8, i8* %9
%13 = sext i8 %12 to i32
store i32 %13, i32* %10
%14 = call i32 @step_hash(i32 72)
%15 = load i32*, i32** %8
ret i32* %15
}

LLVM IR (-O2):
define i32* @func_19(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* readnone returned %3) {
%5 = tail call i32 @step_hash(i32 71)
%6 = tail call i32 @step_hash(i32 72)
ret i32* %3
}