xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ read(int /*<<< orphan*/, unsigned char *, int);
int /*<<< orphan*/ write(int, char *, int);
void _start() {
  unsigned char cmd;
  read(0, &cmd, 1);
  if (cmd > 0x7f) {
    write(1, "Message: It is greater than 0x7f\n", 33);
  } else {
    write(1, "Message: It is smaller or equal than 0x7f\n", 42);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
movzbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
jle    1170 <_start+0x40>
mov    $0x1,%edi
lea    0xe9f(%rip),%rsi
mov    $0x21,%edx
call   1030 <write@plt>
jmp    1186 <_start+0x56>
mov    $0x1,%edi
lea    0xea6(%rip),%rsi
mov    $0x2a,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
xor    %eax,%eax
cmpb   $0x0,0x7(%rsp)
setns  %al
lea    0x21(%rax,%rax,8),%edx
lea    0xea9(%rip),%rax
lea    0xec4(%rip),%rsi
cmovs  %rax,%rsi
mov    $0x1,%edi
call   1030 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Message: It is greater than 0x7f\0A\00"
@.str.1 = [43 x i8] c"Message: It is smaller or equal than 0x7f\0A\00"
define void @_start() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 127
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @write(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 33)
br label %10
8: ; preds = %0
%9 = call i32 @write(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 42)
br label %10
10: ; preds = %8, %6
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Message: It is greater than 0x7f\0A\00"
@.str.1 = [43 x i8] c"Message: It is smaller or equal than 0x7f\0A\00"
define void @_start() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = load i8, i8* %1
%4 = icmp slt i8 %3, 0
%5 = select i1 %4, i32 33, i32 42
%6 = select i1 %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 @write(i32 1, i8* %6, i32 %5)
%8 = tail call i32 @exit(i32 0)
unreachable
}
void g_thread_pool_get_max_threads() {}


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

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

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

LLVM IR (-O2):
define void @g_thread_pool_get_max_threads() {
ret void
}
void sys_get_midi_params(int *pnmidiindev, int *pmidiindev, int *pnmidioutdev,
                         int *pmidioutdev) {}


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

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

LLVM IR (-O0):
define void @sys_get_midi_params(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
ret void
}

LLVM IR (-O2):
define void @sys_get_midi_params(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
ret void
}
void dummy_void() {}


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

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

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

LLVM IR (-O2):
define void @dummy_void() {
ret void
}
void Asm_Stop(void) {}


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

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

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

LLVM IR (-O2):
define void @Asm_Stop() {
ret void
}
int set_digital_output_value(int port, int value) {}


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

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

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

LLVM IR (-O2):
define i32 @set_digital_output_value(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Test Unsupported, _POSIX_MEMORY_PROTECTION not defined\n");
  return 4;
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"Test Unsupported, _POSIX_MEMORY_PROTECTION not defined\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 4
}

LLVM IR (-O2):
@str = [55 x i8] c"Test Unsupported, _POSIX_MEMORY_PROTECTION not defined\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret i32 4
}
int is_space(int c) {
  switch (c) {
  case 0x20:
  case 0xD:
  case 0xA:
  case 0x9:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1140 <is_space+0x40>
jmp    111e <is_space+0x1e>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     1140 <is_space+0x40>
jmp    112f <is_space+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    114c <is_space+0x4c>
jmp    1140 <is_space+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1153 <is_space+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%edi
ja     111d <is_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <is_space+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_space(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 32, label %5
i32 13, label %5
i32 10, label %5
i32 9, label %5
]
5: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_space(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ llib_sysconf(char *, long *);
__attribute__((unused)) long sysconf(int name) {
  char *lname = (char *)(void *)0;
  long v;
  if (name == 4)
    lname = "open_max";
  if (!llib_sysconf(lname, &v))
    return -1;
  return v;
}


x86 assembly (clang, -O0):
<sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
cmpl   $0x4,-0xc(%rbp)
jne    1138 <sysconf+0x28>
lea    0xecc(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <llib_sysconf@plt>
cmp    $0x0,%eax
jne    115b <sysconf+0x4b>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1163 <sysconf+0x53>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysconf>:
push   %rax
xor    %eax,%eax
cmp    $0x4,%edi
lea    0xee3(%rip),%rcx
cmove  %rcx,%rax
mov    %rsp,%rsi
mov    %rax,%rdi
call   1030 <llib_sysconf@plt>
cmp    $0x1,%eax
sbb    %rax,%rax
or     (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"open_max\00"
define i64 @sysconf(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = icmp eq i32 %0, 4
%5 = select i1 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* null
%6 = call i32 @llib_sysconf(i8* %5, i64* %2)
%7 = icmp eq i32 %6, 0
%8 = load i64, i64* %2
%9 = select i1 %7, i64 -1, i64 %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void errorOut(const char *msg) {
  fprintf(stderr, "%s \n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<errorOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errorOut>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s \0A\00"
define void @errorOut(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s \0A\00"
define void @errorOut(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
char *encriptar(char *cadena, int *ret) { return (cadena); }


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

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

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

LLVM IR (-O2):
define i8* @encriptar(i8* readnone returned %0, i32* nocapture readnone %1) {
ret i8* %0
}
float quedaLibre(unsigned int hi) {}


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

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

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

LLVM IR (-O2):
define float @quedaLibre(i32 %0) {
ret float undef
}
/* Variables and functions */
void *malloc(size_t);
void *mal_malloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  return ptr;
}


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

x86 assembly (clang, -O2):
<mal_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @mal_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @mal_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
char *strcat(char *d, const char *s) {
  char *tmp = d;
  while (*d)
    d++;
  while ((*d++ = *s++) != 0)
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     116a <strcat+0x6a>
jmp    1137 <strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void repeatFn(void (*f)(void), unsigned int n) {
  while (n-- > 0)
    (*f)();
}


x86 assembly (clang, -O0):
<repeatFn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jbe    112b <repeatFn+0x2b>
call   *-0x8(%rbp)
jmp    110f <repeatFn+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<repeatFn>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     1118 <repeatFn+0x18>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
call   *%r14
add    $0xffffffff,%ebx
jne    1110 <repeatFn+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @repeatFn(void ()* %0, i32 %1) {
%3 = alloca void ()*
%4 = alloca i32
store void ()* %0, void ()** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add i32 %6, -1
store i32 %7, i32* %4
%8 = icmp ugt i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = load void ()*, void ()** %3
br label %5
11: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @repeatFn(void ()* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add i32 %5, -1
tail call void %0()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_str(char *);
int /*<<< orphan*/ milli_delay(int);
void test_a() {
  int i = 0;
  while (1) {
    disp_str("A.");
    milli_delay(10);
  }
}


x86 assembly (clang, -O0):
<test_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <disp_str@plt>
mov    $0xa,%edi
call   1040 <milli_delay@plt>
jmp    112f <test_a+0xf>

x86 assembly (clang, -O2):
<test_a>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <disp_str@plt>
mov    $0xa,%edi
call   1040 <milli_delay@plt>
jmp    1130 <test_a+0x10>

LLVM IR (-O0):
@.str = [3 x i8] c"A.\00"
define void @test_a() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @milli_delay(i32 10)
br label %2
}

LLVM IR (-O2):
@.str = [3 x i8] c"A.\00"
define void @test_a() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @milli_delay(i32 10)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_tainted_data_sanitize__(int);
int ymd_to_ord(int year, int month, int day) {
  int ord = 0;
  __coverity_tainted_data_sanitize__(year);
  __coverity_tainted_data_sanitize__(month);
  __coverity_tainted_data_sanitize__(day);
  return ord;
}


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

x86 assembly (clang, -O2):
<ymd_to_ord>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    %ebp,%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    %ebx,%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ymd_to_ord(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = call i32 @__coverity_tainted_data_sanitize__(i32 %8)
%10 = load i32, i32* %5
%11 = call i32 @__coverity_tainted_data_sanitize__(i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @__coverity_tainted_data_sanitize__(i32 %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @ymd_to_ord(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %0)
%5 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %1)
%6 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %2)
ret i32 0
}
/* Type definitions */
typedef long time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(long *);
long mktime(struct tm *);
void add_seconds(struct tm *tm, long numsec) {
  time_t timeval;
  timeval = mktime(tm);
  timeval += numsec;
  *tm = *localtime(&timeval);
}


x86 assembly (clang, -O0):
<add_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mktime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    (%rcx),%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_seconds>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <mktime@plt>
add    %r14,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @add_seconds(%struct.tm* %0, i64 %1) {
%3 = alloca %struct.tm*
%4 = alloca i64
%5 = alloca i64
store %struct.tm* %0, %struct.tm** %3
store i64 %1, i64* %4
%6 = load %struct.tm*, %struct.tm** %3
%7 = call i64 @mktime(%struct.tm* %6)
store i64 %7, i64* %5
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = add nsw i64 %9, %8
store i64 %10, i64* %5
%11 = load %struct.tm*, %struct.tm** %3
%12 = call %struct.tm* @localtime(i64* %5)
%13 = bitcast %struct.tm* %11 to i8*
%14 = bitcast %struct.tm* %12 to i8*
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @add_seconds(%struct.tm* nocapture %0, i64 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i64 @mktime(%struct.tm* %0)
%6 = add nsw i64 %5, %1
store i64 %6, i64* %3
%7 = call %struct.tm* @localtime(i64* %3)
%8 = getelementptr %struct.tm, %struct.tm* %7, i64 0, i32 0
%9 = getelementptr %struct.tm, %struct.tm* %0, i64 0, i32 0
%10 = load i32, i32* %8
store i32 %10, i32* %9
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  {
    state[0UL] = input[0UL] + 4284877637U;
    local1 = 0UL;
    while (local1 < 0U) {
      state[local1] += state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 809088178UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xff660b45,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jae    114c <RandomFunc+0x4c>
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp,%rax,4),%ecx
mov    -0x18(%rbp),%eax
add    -0x14(%rbp,%rax,4),%ecx
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%eax
add    $0x3039b4b2,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x2f9fbff7,%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = add i32 %9, -10089659
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %10, i32* %11
store i32 0, i32* %6
br label %12
12: ; preds = %15, %2
%13 = load i32, i32* %6
%14 = icmp ult i32 %13, 0
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = load i32, i32* %6
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = load i32, i32* %6
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = add i32 %23, %19
store i32 %24, i32* %22
%25 = load i32, i32* %6
%26 = zext i32 %25 to i64
%27 = add i64 %26, 2
%28 = trunc i64 %27 to i32
store i32 %28, i32* %6
br label %12
29: ; preds = %12
%30 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%31 = load i32, i32* %30
%32 = zext i32 %31 to i64
%33 = add i64 %32, 809088178
%34 = trunc i64 %33 to i32
%35 = load i32*, i32** %4
%36 = getelementptr inbounds i32, i32* %35, i64 0
store i32 %34, i32* %36
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, 798998519
store i32 %4, i32* %1
ret void
}
void SysCtlPWMClockSet(unsigned long ulConfig) {

  ;
  ;
  (*((volatile unsigned long *)(0x400FE060))) =
      (((*((volatile unsigned long *)(0x400FE060))) &
        ~(0x00100000 | 0x000E0000)) |
       ulConfig);
}


x86 assembly (clang, -O0):
<SysCtlPWMClockSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fe060,%eax
mov    (%rax),%rcx
and    $0xffffffffffe1ffff,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe060,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPWMClockSet>:
mov    $0xffffffffffe1ffff,%rax
and    0x400fe060,%rax
40
or     %rdi,%rax
mov    %rax,0x400fe060
40
ret

LLVM IR (-O0):
define void @SysCtlPWMClockSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%4 = and i64 %3, -1966081
%5 = load i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 1074782304 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlPWMClockSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%3 = and i64 %2, -1966081
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 1074782304 to i64*)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned short attributes;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_bounds_attributes(void *_p, unsigned short _v) {
  ((XFontStruct *)_p)->min_bounds.attributes = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_bounds_attributes>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_bounds_attributes>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontStruct_min_bounds_attributes(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_min_bounds_attributes(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ streamtoforward(int, int, void *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
int32_t tcptoforward(int srcsock, int dstsock, void *buff, uint32_t leng,
                     uint32_t rcvd, uint32_t sent, uint32_t msecto) {
  return streamtoforward(srcsock, dstsock, buff, leng, rcvd, sent, msecto);
}


x86 assembly (clang, -O0):
<tcptoforward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <streamtoforward@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcptoforward>:
jmp    1030 <streamtoforward@plt>

LLVM IR (-O0):
define i32 @tcptoforward(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @streamtoforward(i32 %15, i32 %16, i8* %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @tcptoforward(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @streamtoforward(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %8
}
/* Variables and functions */
unsigned char _BitScanReverse(unsigned int *, unsigned int);
unsigned char test_BitScanReverse(unsigned int *Index, unsigned int Mask) {
  return _BitScanReverse(Index, Mask);
}


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

x86 assembly (clang, -O2):
<test_BitScanReverse>:
jmp    1030 <_BitScanReverse@plt>

LLVM IR (-O0):
define zeroext i8 @test_BitScanReverse(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 zeroext i8 @_BitScanReverse(i32* %5, i32 %6)
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @test_BitScanReverse(i32* %0, i32 %1) {
%3 = tail call zeroext i8 @_BitScanReverse(i32* %0, i32 %1)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void otfinfo_assert_impl(const char *file, int line, const char *expr) {
  fprintf(stderr, "FATAL: %s:%d: Assertion `%s' failed\n", file, line, expr);
  exit(1);
}


x86 assembly (clang, -O0):
<otfinfo_assert_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<otfinfo_assert_impl>:
push   %rax
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"FATAL: %s:%d: Assertion `%s' failed\0A\00"
define void @otfinfo_assert_impl(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"FATAL: %s:%d: Assertion `%s' failed\0A\00"
define void @otfinfo_assert_impl(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int dobldobl_Newton_Laurent_step(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(327, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_Newton_Laurent_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x147,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_Newton_Laurent_step>:
mov    $0x147,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @dobldobl_Newton_Laurent_step() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 327, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @dobldobl_Newton_Laurent_step() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 327, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct Intrusive_List {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_IL(struct Intrusive_List *);
int /*<<< orphan*/ free(struct Intrusive_List *);
void destructor_IL(struct Intrusive_List *lst) {
  clear_IL(lst);
  free(lst);
}


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

x86 assembly (clang, -O2):
<destructor_IL>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_IL@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Intrusive_List = type { i32 }
define void @destructor_IL(%struct.Intrusive_List* %0) {
%2 = alloca %struct.Intrusive_List*
store %struct.Intrusive_List* %0, %struct.Intrusive_List** %2
%3 = load %struct.Intrusive_List*, %struct.Intrusive_List** %2
%4 = call i32 @clear_IL(%struct.Intrusive_List* %3)
%5 = load %struct.Intrusive_List*, %struct.Intrusive_List** %2
%6 = call i32 @free(%struct.Intrusive_List* %5)
ret void
}

LLVM IR (-O2):
%struct.Intrusive_List = type { i32 }
define void @destructor_IL(%struct.Intrusive_List* %0) {
%2 = tail call i32 @clear_IL(%struct.Intrusive_List* %0)
%3 = tail call i32 @free(%struct.Intrusive_List* %0)
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
int __ocl_islessequal_float(float src1, float src2) {
  return (isnan(src1) || isnan(src2)) ? 0 : src1 <= src2;
}


x86 assembly (clang, -O0):
<__ocl_islessequal_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    114a <__ocl_islessequal_float+0x3a>
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1154 <__ocl_islessequal_float+0x44>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <__ocl_islessequal_float+0x5c>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_islessequal_float>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    114d <__ocl_islessequal_float+0x3d>
movss  0x8(%rsp),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
jne    114d <__ocl_islessequal_float+0x3d>
xor    %ebx,%ebx
movss  0x8(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
setae  %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__ocl_islessequal_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load float, float* %4
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8, %2
br label %18
13: ; preds = %8
%14 = load float, float* %3
%15 = load float, float* %4
%16 = fcmp ole float %14, %15
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %13, %12
%19 = phi i32 [ 0, %12 ], [ %17, %13 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @__ocl_islessequal_float(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp ole float %0, %1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %5, %8
%12 = phi i32 [ %10, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double ldexpl(long double x, int exp) {
  return __infer_nondet_long_double();
}


x86 assembly (clang, -O0):
<ldexpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %3
store i32 %1, i32* %4
%5 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *cmdname) {
  printf("Warning : This program will work only on Valleyview\n");
  printf("Usage: %s addr value\n", cmdname);
  printf("\t addr : in 0xXXXX format\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"Warning : This program will work only on Valleyview\0A\00"
@.str.1 = [22 x i8] c"Usage: %s addr value\0A\00"
@.str.2 = [27 x i8] c"\09 addr : in 0xXXXX format\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"Usage: %s addr value\0A\00"
@str = [52 x i8] c"Warning : This program will work only on Valleyview\00"
@str.3 = [26 x i8] c"\09 addr : in 0xXXXX format\00"
define void @usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.3, i64 0, i64 0))
ret void
}
float reduction_sum_sse(float *v, int n) { return 0.0; }


x86 assembly (clang, -O0):
<reduction_sum_sse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduction_sum_sse>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @reduction_sum_sse(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @reduction_sum_sse(float* nocapture readnone %0, i32 %1) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ cta_svd(unsigned char const *, unsigned int,
                           int /*<<< orphan*/);
void cta_video_block(const unsigned char *x, unsigned int length) {
  cta_svd(x, length, 0);
}


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

x86 assembly (clang, -O2):
<cta_video_block>:
xor    %edx,%edx
jmp    1030 <cta_svd@plt>

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

LLVM IR (-O2):
define void @cta_video_block(i8* %0, i32 %1) {
%3 = tail call i32 @cta_svd(i8* %0, i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_file(char *);
int main(int argc, char **argv) {
  if (argc > 1) {
    read_file(argv[1]);
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jle    113d <main+0x2d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <read_file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1123 <main+0x13>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <read_file@plt>
add    $0x8,%rsp
xor    %eax,%eax
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 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @read_file(i8* %11)
br label %13
13: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @read_file(i8* %6)
br label %8
8: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
bool prime(unsigned a, unsigned *p) {
  while (*p * *p <= a) {
    if (a % *p == 0)
      return false;
    p++;
  }
  return true;
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
cmp    -0x8(%rbp),%eax
ja     1152 <prime+0x52>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
divl   (%rcx)
cmp    $0x0,%edx
jne    1141 <prime+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1159 <prime+0x59>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <prime+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
mov    %edi,%r8d
mov    (%rsi),%edi
mov    %edi,%eax
imul   %edi,%eax
cmp    %r8d,%eax
jbe    1115 <prime+0x15>
mov    $0x1,%eax
ret
add    $0x4,%rsi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %r8d,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
je     1141 <prime+0x41>
mov    (%rsi),%edi
mov    %edi,%eax
imul   %edi,%eax
add    $0x4,%rsi
cmp    %r8d,%eax
jbe    1120 <prime+0x20>
mov    $0x1,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prime(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = mul i32 %3, %3
%5 = icmp ugt i32 %4, %0
br i1 %5, label %16, label %10
6: ; preds = %10
%7 = load i32, i32* %15
%8 = mul i32 %7, %7
%9 = icmp ugt i32 %8, %0
br i1 %9, label %16, label %10
10: ; preds = %2, %6
%11 = phi i32 [ %7, %6 ], [ %3, %2 ]
%12 = phi i32* [ %15, %6 ], [ %1, %2 ]
%13 = urem i32 %0, %11
%14 = icmp eq i32 %13, 0
%15 = getelementptr inbounds i32, i32* %12, i64 1
br i1 %14, label %16, label %6
16: ; preds = %10, %6, %2
%17 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %10 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int f_proj4_ll2ij(int mode, unsigned char **sec, float *data,
                  unsigned int ndata, char *inv_out, void **local,
                  const char *arg1, const char *arg2) {
  if (mode == -1) {
    fprintf(stderr, "Proj4 package not installed\n");
    return 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<f_proj4_ll2ij>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1161 <f_proj4_ll2ij+0x51>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1168 <f_proj4_ll2ij+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_proj4_ll2ij>:
cmp    $0xffffffff,%edi
je     111b <f_proj4_ll2ij+0xb>
mov    $0x1,%eax
ret
push   %rax
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x8,%rsp
mov    $0x1,%eax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4_ll2ij(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6, i8* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8**
%12 = alloca float*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8**
%16 = alloca i8*
%17 = alloca i8*
store i32 %0, i32* %10
store i8** %1, i8*** %11
store float* %2, float** %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i8** %5, i8*** %15
store i8* %6, i8** %16
store i8* %7, i8** %17
%18 = load i32, i32* %10
%19 = icmp eq i32 %18, -1
br i1 %19, label %20, label %23
20: ; preds = %8
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %9
br label %24
23: ; preds = %8
store i32 1, i32* %9
br label %24
24: ; preds = %23, %20
%25 = load i32, i32* %9
ret i32 %25
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4_ll2ij(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7) {
%9 = icmp eq i32 %0, -1
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %8, %10
ret i32 1
}
void Host_UnlockGraphicsBuffer(void) {}


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

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

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

LLVM IR (-O2):
define void @Host_UnlockGraphicsBuffer() {
ret void
}