xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  if ("Hello" == "Hello")
    printf("Yes");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    112e <main+0x1e>
jmp    113a <main+0x2a>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br i1 true, label %2, label %4
2: ; preds = %0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %2, %0
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int dpu_go() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dpu_go() {
ret i32 0
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  for (len = 0; *str; len++, str++)
    ;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <strlen+0x47>
jmp    112a <strlen+0x2a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <strlen+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add i64 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %7, %4 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ Si1132_I2C_write8(int, unsigned char);
void Si1132_I2C_writeParam(unsigned char param, unsigned char val) {
  Si1132_I2C_write8(0x17, val);
  Si1132_I2C_write8(0x18, param | 0xA0);
}


x86 assembly (clang, -O0):
<Si1132_I2C_writeParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x17,%edi
movzbl -0x2(%rbp),%esi
call   1030 <Si1132_I2C_write8@plt>
movzbl -0x1(%rbp),%eax
or     $0xa0,%eax
mov    $0x18,%edi
movzbl %al,%esi
call   1030 <Si1132_I2C_write8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Si1132_I2C_writeParam>:
push   %rbx
mov    %edi,%ebx
mov    $0x17,%edi
call   1030 <Si1132_I2C_write8@plt>
or     $0xa0,%bl
movzbl %bl,%esi
mov    $0x18,%edi
pop    %rbx
jmp    1030 <Si1132_I2C_write8@plt>

LLVM IR (-O0):
define void @Si1132_I2C_writeParam(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = call i32 @Si1132_I2C_write8(i32 23, i8 zeroext %5)
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = or i32 %8, 160
%10 = trunc i32 %9 to i8
%11 = call i32 @Si1132_I2C_write8(i32 24, i8 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @Si1132_I2C_writeParam(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @Si1132_I2C_write8(i32 23, i8 zeroext %1)
%4 = or i8 %0, -96
%5 = tail call i32 @Si1132_I2C_write8(i32 24, i8 zeroext %4)
ret void
}
void worldInit(void) {}


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

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

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

LLVM IR (-O2):
define void @worldInit() {
ret void
}
int Cyc_Port_cmp_seg_t(unsigned loc1, unsigned loc2) {
  unsigned _T0;
  int _T1;
  _T0 = loc1 - loc2;
  _T1 = (int)_T0;
  return _T1;
}


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

x86 assembly (clang, -O2):
<Cyc_Port_cmp_seg_t>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @Cyc_Port_cmp_seg_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sub i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
define i32 @Cyc_Port_cmp_seg_t(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
ret i32 %3
}
void RTEnvUnset(void) {}


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

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

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

LLVM IR (-O2):
define void @RTEnvUnset() {
ret void
}
int sumodds(unsigned long long int number) {
  int sum = 0;
  int val;
  while (number > 0) {
    val = number % 10;
    sum += val;
    number /= 100;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumodds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    114d <sumodds+0x4d>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <sumodds+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumodds>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     114c <sumodds+0x4c>
movabs $0xcccccccccccccccd,%r8
cc cc cc
movabs $0x28f5c28f5c28f5c3,%rsi
c2 f5 28
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %r8
shr    $0x3,%rdx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
mov    %edi,%edx
sub    %eax,%edx
add    %edx,%ecx
mov    %rdi,%rax
shr    $0x2,%rax
mul    %rsi
shr    $0x2,%rdx
cmp    $0x63,%rdi
mov    %rdx,%rdi
ja     1120 <sumodds+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sumodds(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %5
5: ; preds = %8, %1
%6 = load i64, i64* %2
%7 = icmp ugt i64 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i64, i64* %2
%10 = urem i64 %9, 10
%11 = trunc i64 %10 to i32
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
%15 = load i64, i64* %2
%16 = udiv i64 %15, 100
store i64 %16, i64* %2
br label %5
17: ; preds = %5
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @sumodds(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %9, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = urem i64 %4, 10
%7 = trunc i64 %6 to i32
%8 = add nuw nsw i32 %5, %7
%9 = udiv i64 %4, 100
%10 = icmp ult i64 %4, 100
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
__attribute__((weak)) int _unlink(char *name) {
  do {
    (void)(name);
  } while (0);
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<_unlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_unlink>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define weak i32 @_unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
br label %5
5: ; preds = %3
%6 = load i32, i32* @ENOENT
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define weak i32 @_unlink(i8* %0) {
%2 = load i32, i32* @ENOENT
store i32 %2, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct tlv_iterator {
  int dummy;
};
typedef enum tlv_reply_error_code {
  ____Placeholder_tlv_reply_error_code
} tlv_reply_error_code;

/* Variables and functions */
int tlv_iter_decode_u16(struct tlv_iterator *, int /*<<< orphan*/ *);
int tlv_iter_decode_reply_error_code(
    struct tlv_iterator *tlv_iter,
    enum tlv_reply_error_code *reply_error_code) {
  return (tlv_iter_decode_u16(tlv_iter, (uint16_t *)reply_error_code));
}


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

x86 assembly (clang, -O2):
<tlv_iter_decode_reply_error_code>:
jmp    1030 <tlv_iter_decode_u16@plt>

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

LLVM IR (-O2):
%struct.tlv_iterator = type { i32 }
define i32 @tlv_iter_decode_reply_error_code(%struct.tlv_iterator* %0, i32* %1) {
%3 = tail call i32 @tlv_iter_decode_u16(%struct.tlv_iterator* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _llnull();
int init_arch(void) {
  _llnull();
  return 0;
}


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

x86 assembly (clang, -O2):
<init_arch>:
push   %rax
xor    %eax,%eax
call   1030 <_llnull@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @init_arch() {
%1 = call i32 (...) @_llnull()
ret i32 0
}

LLVM IR (-O2):
define i32 @init_arch() {
%1 = tail call i32 (...) @_llnull()
ret i32 0
}
int lower(int c) {
  c = (c >= 65 && c < +90) ? c + (97 - 65) : c;
  return c;
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1129 <lower+0x29>
cmpl   $0x5a,-0x4(%rbp)
jge    1129 <lower+0x29>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <lower+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x19,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @lower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
store i32 %14, i32* %2
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 25
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage(void) {
  printf("msidb -e filename [tables]\n");
  printf("    Export the tables from an msi database.\n\n");
  printf("msidb -p filename [property]\n");
  printf("    Dump the property table, or a single property if specified, from "
         "the database.\n\n");
  return 5;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"msidb -e filename [tables]\0A\00"
@.str.1 = [46 x i8] c" Export the tables from an msi database.\0A\0A\00"
@.str.2 = [30 x i8] c"msidb -p filename [property]\0A\00"
@.str.3 = [85 x i8] c" Dump the property table, or a single property if specified, from the database.\0A\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.3, i64 0, i64 0))
ret i32 5
}

LLVM IR (-O2):
@str = [27 x i8] c"msidb -e filename [tables]\00"
@str.4 = [45 x i8] c" Export the tables from an msi database.\0A\00"
@str.5 = [29 x i8] c"msidb -p filename [property]\00"
@str.6 = [84 x i8] c" Dump the property table, or a single property if specified, from the database.\0A\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.6, i64 0, i64 0))
ret i32 5
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int get_current_time(struct timeval *current_time) {
  if (gettimeofday(current_time, NULL)) {
    perror("gettimeofday() error");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     1169 <get_current_time+0x39>
lea    0xea6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rax
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    1141 <get_current_time+0x11>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [21 x i8] c"gettimeofday() error\00"
define i32 @get_current_time(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [21 x i8] c"gettimeofday() error\00"
define i32 @get_current_time(%struct.timeval* nocapture %0) {
%2 = tail call i64 @gettimeofday(%struct.timeval* %0, i32* null)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32 0
}
FLeapYr(yr) int yr;
{ return (((yr & 0x0003) == 0 && yr % 100 != 0) || yr % 400 == 0); }


x86 assembly (clang, -O0):
<FLeapYr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
jne    112f <FLeapYr+0x2f>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1143 <FLeapYr+0x43>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLeapYr>:
test   $0x3,%dil
jne    112c <FLeapYr+0x2c>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
mov    $0x1,%eax
sub    %ecx,%edx
je     112c <FLeapYr+0x2c>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @FLeapYr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @FLeapYr(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int setregid(int /*<<< orphan*/, int /*<<< orphan*/);
int setrgid(gid_t rgid) { return (setregid(rgid, (gid_t)-1)); }


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

x86 assembly (clang, -O2):
<setrgid>:
mov    $0xffffffff,%esi
jmp    1030 <setregid@plt>

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

LLVM IR (-O2):
define i32 @setrgid(i32 %0) {
%2 = tail call i32 @setregid(i32 %0, i32 -1)
ret i32 %2
}
unsigned short
snfd_calc_block_number_from_physical_addr(unsigned int physical_addr) {
  return physical_addr / 4096;
}


x86 assembly (clang, -O0):
<snfd_calc_block_number_from_physical_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xc,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<snfd_calc_block_number_from_physical_addr>:
mov    %edi,%eax
shr    $0xc,%eax
ret

LLVM IR (-O0):
define zeroext i16 @snfd_calc_block_number_from_physical_addr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = udiv i32 %3, 4096
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @snfd_calc_block_number_from_physical_addr(i32 %0) {
%2 = lshr i32 %0, 12
%3 = trunc i32 %2 to i16
ret i16 %3
}
void AuxiliaryData() {}


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

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

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

LLVM IR (-O2):
define void @AuxiliaryData() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\nHello World\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"\0AHello World\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"\0AHello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int EOF;
int getchar();
uint32_t lf_getchar(void) {
  int ch = getchar();
  if (ch == EOF)
    return ~0;
  return (uint32_t)ch;
}


x86 assembly (clang, -O0):
<lf_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%eax
jne    1140 <lf_getchar+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <lf_getchar+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lf_getchar>:
push   %rax
xor    %eax,%eax
call   1030 <getchar@plt>
mov    0x2ec9(%rip),%rcx
cmp    (%rcx),%eax
mov    $0xffffffff,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @lf_getchar() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 -1, i32* %1
br label %10
8: ; preds = %0
%9 = load i32, i32* %2
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %7
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @lf_getchar() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
%4 = select i1 %3, i32 -1, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(size_t);
void uninitvar_malloc(void) {
  size_t size;
  int *p = (int *)malloc(size);
  free(p);
}


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

x86 assembly (clang, -O2):
<uninitvar_malloc>:
push   %rax
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @uninitvar_malloc() {
%1 = alloca i64
%2 = alloca i32*
%3 = load i64, i64* %1
%4 = call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @free(i32* %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_malloc() {
%1 = tail call i64 @malloc(i64 undef)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
void venc_uninit_platform_driver(void) {}


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

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

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

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

/* Variables and functions */
size_t fwrite(size_t *, size_t, int, int /*<<< orphan*/ *);
size_t Mem_FwriteSize_t(size_t siz, FILE *fp) {
  size_t nbytes;
  nbytes = fwrite(&siz, (size_t)1, sizeof(siz), fp);
  return nbytes;
}


x86 assembly (clang, -O0):
<Mem_FwriteSize_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1030 <fwrite@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mem_FwriteSize_t>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x8,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @Mem_FwriteSize_t(i64 %0, i32* nocapture %1) {
%3 = alloca i64
store i64 %0, i64* %3
%4 = call i64 @fwrite(i64* %3, i64 1, i32 8, i32* %1)
ret i64 %4
}
/* Variables and functions */
char isfinite(double);
signed char IsFinite(double d) { return (isfinite(d)); }


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

x86 assembly (clang, -O2):
<IsFinite>:
jmp    1030 <isfinite@plt>

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

LLVM IR (-O2):
define signext i8 @IsFinite(double %0) {
%2 = tail call signext i8 @isfinite(double %0)
ret i8 %2
}
/* Variables and functions */
int close(int);
int destroy_server_sock(int sockfd) { return close(sockfd); }


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

x86 assembly (clang, -O2):
<destroy_server_sock>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @destroy_server_sock(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int main() {
  int i;
  for (i = 0; i < 10; i++)
    print("Library function call!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Library function call!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Library function call!\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printRed(int, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printRed(1, 10);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0xa,%esi
call   1040 <printRed@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printRed(i32 1, i32 10)
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printRed(i32 1, i32 10)
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void displayResult(short value, const char *testType) {
  printf("%s: ", testType);
  if (value == 1)
    printf("\33[32mpass!\33[0m\n");
  else
    printf("\33[31mfail!\33[0m\n");
}


x86 assembly (clang, -O0):
<displayResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    1155 <displayResult+0x45>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1163 <displayResult+0x53>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayResult>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%bx
lea    0xed8(%rip),%rax
lea    0xec2(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s: \00"
@.str.1 = [16 x i8] c"\1B[32mpass!\1B[0m\0A\00"
@.str.2 = [16 x i8] c"\1B[31mfail!\1B[0m\0A\00"
define void @displayResult(i16 signext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
store i16 %0, i16* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i16, i16* %3
%8 = sext i16 %7 to i32
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s: \00"
@str = [15 x i8] c"\1B[31mfail!\1B[0m\00"
@str.3 = [15 x i8] c"\1B[32mpass!\1B[0m\00"
define void @displayResult(i16 signext %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = icmp eq i16 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ nrf_802154_csma_ca_start(int /*<<< orphan*/ const *);
void nrf_802154_transmit_csma_ca_raw(const uint8_t *p_data) {
  (void)(0x0008UL);
  nrf_802154_csma_ca_start(p_data);
  (void)(0x0008UL);
}


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

x86 assembly (clang, -O2):
<nrf_802154_transmit_csma_ca_raw>:
jmp    1030 <nrf_802154_csma_ca_start@plt>

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

LLVM IR (-O2):
define void @nrf_802154_transmit_csma_ca_raw(i32* %0) {
%2 = tail call i32 @nrf_802154_csma_ca_start(i32* %0)
ret void
}
/* Variables and functions */
float log(float);
float _log(float s) { return log(s); }


x86 assembly (clang, -O0):
<_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_log>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define float @_log(float %0) {
%2 = tail call float @log(float %0)
ret float %2
}
void xxx(int argc) {
  int x;
#pragma omp distribute parallel for simd
  for (int i = 0; i < 10; ++i)
    argc = x;
}


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    112c <xxx+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <xxx+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @xxx(i32 %0) {
ret void
}
/* Variables and functions */
int strtol(char const *, int /*<<< orphan*/ *, int);
int atoi(const char *str) { return strtol(str, NULL, 10); }


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i32 @strtol(i8* nocapture %0, i32* null, i32 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ munlockall();
void xunlockme(void) { munlockall(); }


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

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

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

LLVM IR (-O2):
define void @xunlockme() {
%1 = tail call i32 (...) @munlockall()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ res_lsw(unsigned int, unsigned int, int, unsigned int);
void SWV(unsigned vt, unsigned element, signed offset, unsigned base) {
  res_lsw(vt, element, offset, base);
  return;
}


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

x86 assembly (clang, -O2):
<SWV>:
jmp    1030 <res_lsw@plt>

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

LLVM IR (-O2):
define void @SWV(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @res_lsw(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_get() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_get"
         "\n");
}


x86 assembly (clang, -O0):
<pa_hashmap_get>:
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):
<pa_hashmap_get>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_hashmap_get\00"
define i32 @pa_hashmap_get() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double log(double);
double runif();
double rexp(double lambda) {
  double u = runif();
  return (-log(u) / lambda);
}


x86 assembly (clang, -O0):
<rexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <runif@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rexp>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <runif@plt>
call   1040 <log@plt>
xorpd  0xec6(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rexp(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call double (...) @runif()
store double %4, double* %3
%5 = load double, double* %3
%6 = call double @log(double %5)
%7 = fneg double %6
%8 = load double, double* %2
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @rexp(double %0) {
%2 = tail call double (...) @runif()
%3 = tail call double @log(double %2)
%4 = fneg double %3
%5 = fdiv double %4, %0
ret double %5
}
int addDigits(int num) {
  while (num >= 10) {
    int sum = 0;
    while (num > 0) {
      sum += num % 10;
      num /= 10;
    }
    num = sum;
  }
  return num;
}


x86 assembly (clang, -O0):
<addDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1151 <addDigits+0x51>
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1146 <addDigits+0x46>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1118 <addDigits+0x18>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <addDigits+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addDigits>:
cmp    $0xa,%edi
jl     113e <addDigits+0x3e>
xor    %edx,%edx
mov    $0xcccccccd,%r8d
nopl   (%rax)
mov    %edi,%esi
imul   %r8,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,1),%eax
lea    (%rax,%rax,4),%eax
mov    %edi,%ecx
sub    %eax,%ecx
mov    %edx,%eax
add    %ecx,%eax
mov    %eax,%edx
cmp    $0xa,%edi
mov    %esi,%edi
jae    1110 <addDigits+0x10>
mov    $0x0,%edx
mov    %eax,%edi
cmp    $0xa,%eax
jae    1110 <addDigits+0x10>
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @addDigits(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %5, label %15
3: ; preds = %5
%4 = icmp ugt i32 %9, 9
br i1 %4, label %12, label %15
5: ; preds = %1, %12
%6 = phi i32 [ %13, %12 ], [ 0, %1 ]
%7 = phi i32 [ %14, %12 ], [ %0, %1 ]
%8 = urem i32 %7, 10
%9 = add nuw nsw i32 %6, %8
%10 = udiv i32 %7, 10
%11 = icmp ult i32 %7, 10
br i1 %11, label %3, label %12
12: ; preds = %5, %3
%13 = phi i32 [ %9, %5 ], [ 0, %3 ]
%14 = phi i32 [ %10, %5 ], [ %9, %3 ]
br label %5
15: ; preds = %3, %1
%16 = phi i32 [ %0, %1 ], [ %9, %3 ]
ret i32 %16
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t detexPixel32GetG8(uint32_t pixel) {
  return (pixel & 0xFF00) >> 8;
}


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

x86 assembly (clang, -O2):
<detexPixel32GetG8>:
mov    %edi,%eax
movzbl %ah,%eax
ret

LLVM IR (-O0):
define i32 @detexPixel32GetG8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @detexPixel32GetG8(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void water_break(void) {
  gpio_set(20, 1);
  gpio_set(21, 1);
}


x86 assembly (clang, -O0):
<water_break>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x15,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<water_break>:
push   %rax
mov    $0x14,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x15,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @water_break() {
%1 = call i32 @gpio_set(i32 20, i32 1)
%2 = call i32 @gpio_set(i32 21, i32 1)
ret void
}

LLVM IR (-O2):
define void @water_break() {
%1 = tail call i32 @gpio_set(i32 20, i32 1)
%2 = tail call i32 @gpio_set(i32 21, i32 1)
ret void
}
void gdk_window_new() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_new() {
ret void
}
void mlx5_vhca_state_cap_handle(struct mlx5_core_dev *dev, void *set_hca_cap) {}


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

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

LLVM IR (-O0):
%struct.mlx5_core_dev = type opaque
define void @mlx5_vhca_state_cap_handle(%struct.mlx5_core_dev* %0, i8* %1) {
%3 = alloca %struct.mlx5_core_dev*
%4 = alloca i8*
store %struct.mlx5_core_dev* %0, %struct.mlx5_core_dev** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.mlx5_core_dev = type opaque
define void @mlx5_vhca_state_cap_handle(%struct.mlx5_core_dev* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct ibv_qp {
  int dummy;
};

/* Variables and functions */
int _destroy_qp(struct ibv_qp *);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_destroy_qp(struct ibv_qp *qp) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _destroy_qp(qp);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_destroy_qp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_destroy_qp@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_destroy_qp>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbx,%rdi
call   1030 <_destroy_qp@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ibv_qp = type { i32 }
define i32 @ibv_destroy_qp(%struct.ibv_qp* %0) {
%2 = alloca %struct.ibv_qp*
%3 = alloca i32
store %struct.ibv_qp* %0, %struct.ibv_qp** %2
%4 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%5 = load %struct.ibv_qp*, %struct.ibv_qp** %2
%6 = call i32 @_destroy_qp(%struct.ibv_qp* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.ibv_qp = type { i32 }
define i32 @ibv_destroy_qp(%struct.ibv_qp* %0) {
%2 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%3 = tail call i32 @_destroy_qp(%struct.ibv_qp* %0)
%4 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void t2(int a) {
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c",
          11, 79, a);
  ;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xedb(%rip),%rdi
mov    $0xb,%esi
mov    $0x4f,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdi
mov    $0xb,%esi
mov    $0x4f,%edx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c\00"
define void @t2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @fexpect(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 11, i32 79, i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/function.c\00"
define void @t2(i32 %0) {
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 11, i32 79, i32 %0)
ret void
}