xunge/DecIR huggingface dataset:
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int directory_type(char *);
int /*<<< orphan*/ free(char *);
char *strdup(int /*<<< orphan*/);
int select_sections(const struct dirent *entry) {
  char *name;
  int ret;
  name = strdup(entry->d_name);
  ret = directory_type(name) == 1;
  free(name);
  return (ret);
}


x86 assembly (clang, -O0):
<select_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <directory_type@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<select_sections>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%edi
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <directory_type@plt>
xor    %ebp,%ebp
cmp    $0x1,%eax
sete   %bpl
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @select_sections(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
%3 = alloca i8*
%4 = alloca i32
store %struct.dirent* %0, %struct.dirent** %2
%5 = load %struct.dirent*, %struct.dirent** %2
%6 = getelementptr inbounds %struct.dirent, %struct.dirent* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i8* @strdup(i32 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @directory_type(i8* %9)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
store i32 %12, i32* %4
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @select_sections(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i8* @strdup(i32 %3)
%5 = tail call i32 @directory_type(i8* %4)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @free(i8* %4)
ret i32 %7
}
void rec_print_indention(int indent) {
  if (indent <= 0)
    return;
  printf("%*s", indent, "");
}


x86 assembly (clang, -O0):
<rec_print_indention>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112a <rec_print_indention+0x1a>
jmp    1142 <rec_print_indention+0x32>
mov    -0x4(%rbp),%esi
lea    0xecc(%rip),%rdi
lea    0xec8(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec_print_indention>:
test   %edi,%edi
jle    112b <rec_print_indention+0x1b>
mov    %edi,%esi
lea    0xee3(%rip),%rdi
lea    0xedf(%rip),%rdx
xor    %eax,%eax
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
define void @rec_print_indention(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %1, %3
ret void
}
int test_imm_CFuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xCF << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CFuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 889058230272
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ sysapi_touch(char *);
int sysapi_truncate_file(char *, int);
int sysapi_new_truncate_file(char *filename, int filesize) {
  if (sysapi_touch(filename) == 0)
    return sysapi_truncate_file(filename, filesize);
  return -1;
}


x86 assembly (clang, -O0):
<sysapi_new_truncate_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sysapi_touch@plt>
cmp    $0x0,%rax
jne    1156 <sysapi_new_truncate_file+0x36>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <sysapi_truncate_file@plt>
mov    %eax,-0x4(%rbp)
jmp    115d <sysapi_new_truncate_file+0x3d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysapi_new_truncate_file>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <sysapi_touch@plt>
test   %rax,%rax
je     113e <sysapi_new_truncate_file+0x1e>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sysapi_truncate_file@plt>

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

LLVM IR (-O2):
define i32 @sysapi_new_truncate_file(i8* %0, i32 %1) {
%3 = tail call i64 @sysapi_touch(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @sysapi_truncate_file(i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
signed char f10(signed char a, unsigned char b) {
  unsigned short c;
  return __builtin_mul_overflow(a, b, &c);
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edx
movzbl -0x2(%rbp),%eax
imul   %eax,%edx
xor    %eax,%eax
mov    %dx,%cx
shr    $0x10,%edx
and    $0x1,%edx
or     %dl,%al
mov    %cx,-0x4(%rbp)
and    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f10>:
mov    %edi,%eax
imul   %esi,%eax
shr    $0x10,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define signext i8 @f10(i8 signext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = load i8, i8* %4
%8 = sext i8 %6 to i17
%9 = zext i8 %7 to i17
%10 = call { i17, i1 } @llvm.smul.with.overflow.i17(i17 %8, i17 %9)
%11 = extractvalue { i17, i1 } %10, 1
%12 = extractvalue { i17, i1 } %10, 0
%13 = trunc i17 %12 to i16
%14 = zext i16 %13 to i17
%15 = icmp ne i17 %12, %14
%16 = or i1 %11, %15
store i16 %13, i16* %5
%17 = zext i1 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @f10(i8 signext %0, i8 zeroext %1) {
%3 = sext i8 %0 to i17
%4 = zext i8 %1 to i17
%5 = mul nsw i17 %4, %3
%6 = lshr i17 %5, 16
%7 = trunc i17 %6 to i8
ret i8 %7
}
int h0$$1(struct _Data$$1 *this$1, int j) { return 20; }


x86 assembly (clang, -O0):
<h0$$1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x14,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h0$$1>:
mov    $0x14,%eax
ret

LLVM IR (-O0):
%"struct._Data$$1" = type opaque
define i32 @"h0$$1"(%"struct._Data$$1"* %0, i32 %1) {
%3 = alloca %"struct._Data$$1"*
%4 = alloca i32
store %"struct._Data$$1"* %0, %"struct._Data$$1"** %3
store i32 %1, i32* %4
ret i32 20
}

LLVM IR (-O2):
%"struct._Data$$1" = type opaque
define i32 @"h0$$1"(%"struct._Data$$1"* nocapture readnone %0, i32 %1) {
ret i32 20
}
void set_bit(int nr, volatile void *addr) {
  asm volatile("bts %1,%0"
               : "+m"(*(volatile long *)addr)
               : "Ir"(nr)
               : "memory");
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
bts    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
bts    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @set_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
tail call void asm sideeffect "bts $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0, i64* elementtype(i64) %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int ASN1_TIME_set_string_internal(int /*<<< orphan*/ *, char const *,
                                  int /*<<< orphan*/);
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) {
  return (ASN1_TIME_set_string_internal(s, str, 0));
}


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

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

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

LLVM IR (-O2):
define i32 @ASN1_TIME_set_string(i32* %0, i8* %1) {
%3 = tail call i32 @ASN1_TIME_set_string_internal(i32* %0, i8* %1, i32 0)
ret i32 %3
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
int trimLeft_execute(unsigned char *input, long int input_len) {
  long int i;
  for (i = 0; i < input_len; i++) {
    if (isspace(input[i]) == 0) {
      break;
    }
  }
  return i;
}


x86 assembly (clang, -O0):
<trimLeft_execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    116c <trimLeft_execute+0x5c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
jne    1156 <trimLeft_execute+0x46>
jmp    116c <trimLeft_execute+0x5c>
jmp    115b <trimLeft_execute+0x4b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <trimLeft_execute+0x18>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimLeft_execute>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
jle    114d <trimLeft_execute+0x3d>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r15,%rbx,1),%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     114f <trimLeft_execute+0x3f>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <trimLeft_execute+0x20>
mov    %r14,%rbx
jmp    114f <trimLeft_execute+0x3f>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @trimLeft_execute(i8* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %10
%5 = phi i64 [ %11, %10 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i64 @isspace(i8 zeroext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = add nuw nsw i64 %5, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %10, %4, %2
%14 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %10 ]
%15 = trunc i64 %14 to i32
ret i32 %15
}
void SSL_CTX_set_verify(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ getc(int /*<<< orphan*/ *);
int readable(const char *fname) {
  int err;
  FILE *f = fopen(fname, "r");
  if (f == NULL)
    return 0;
  getc(f);
  err = ferror(f);
  fclose(f);
  return (err == 0);
}


x86 assembly (clang, -O0):
<readable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1177 <readable+0x37>
movl   $0x0,-0x4(%rbp)
jmp    11a4 <readable+0x64>
mov    -0x20(%rbp),%rdi
call   1060 <getc@plt>
mov    -0x20(%rbp),%rdi
call   1030 <ferror@plt>
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readable>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     117a <readable+0x3a>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <getc@plt>
mov    %rbx,%rdi
call   1030 <ferror@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
jmp    117c <readable+0x3c>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @readable(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %21
11: ; preds = %1
%12 = load i32*, i32** %5
%13 = call i32 @getc(i32* %12)
%14 = load i32*, i32** %5
%15 = call i32 @ferror(i32* %14)
store i32 %15, i32* %4
%16 = load i32*, i32** %5
%17 = call i32 @fclose(i32* %16)
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
store i32 %20, i32* %2
br label %21
21: ; preds = %11, %10
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @readable(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i32 @getc(i32* %2)
%6 = tail call i32 @ferror(i32* %2)
%7 = tail call i32 @fclose(i32* %2)
%8 = icmp eq i32 %6, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}
int fxor(int a, int b) {
  int tmp;
  a = __builtin_bswap32(a);
  b = __builtin_bswap32(b);
  tmp = a == b;
  return tmp;
}


x86 assembly (clang, -O0):
<fxor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
bswap  %eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
bswap  %eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxor>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @fxor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @llvm.bswap.i32(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @llvm.bswap.i32(i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @fxor(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ca8-virtex820-m400-1 USING_OS_MEMORY=0 "
         "API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= "
         "BUILD_DATE=Seg Nov 24 02:42:44 BRST 2014 BUILD=RELEASE CPU= "
         "USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 "
         "USING_GP2=0 KDIR= "
         "MALI_PLATFORM_FILE=platform/mali400-pmu/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


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

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

LLVM IR (-O0):
@.str = [430 x i8] c"malidrv: CONFIG=ca8-virtex820-m400-1 USING_OS_MEMORY=0 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Seg Nov 24 02:42:44 BRST 2014 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/mali400-pmu/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [430 x i8] c"malidrv: CONFIG=ca8-virtex820-m400-1 USING_OS_MEMORY=0 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Seg Nov 24 02:42:44 BRST 2014 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/mali400-pmu/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
int empty(const char *s) {
  int i;
  i = 0;
  while (s[i] != 0) {
    if (!isspace(s[i]))
      return 0;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116c <empty+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    115e <empty+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <empty+0x63>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <empty+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <empty+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <empty+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <empty+0x20>
jmp    114b <empty+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = tail call i32 @isspace(i8 signext %10)
%12 = icmp eq i32 %11, 0
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
extern unsigned int __inb_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "b"
                       " %"
                       "w"
                       "1,%"
                       "b"
                       "0"
                       : "=a"(_v)
                       : "d"(port), "0"(0));
  __asm__ __volatile__("outb %al,$0x80");
  return _v;
}


x86 assembly (clang, -O0):
<__inb_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
xor    %eax,%eax
in     (%dx),%al
mov    %eax,-0x8(%rbp)
out    %al,$0x80
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inb_p>:
mov    %edi,%edx
xor    %eax,%eax
in     (%dx),%al
out    %al,$0x80
ret

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

LLVM IR (-O2):
define i32 @__inb_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inb ${1:w},${0:b}", "={ax},{dx},0,~{dirflag},~{fpsr},~{flags}"(i16 %0, i32 0)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DATA_xo();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_xo();
LIBRARY_xo() {
  LibraryHeader("xo", "Sat Feb  1 10:41:35 2014 ");
  DATA_xo();
  STARTUP_xo();
}


x86 assembly (clang, -O0):
<LIBRARY_xo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1050 <LibraryHeader@plt>
mov    $0x0,%al
call   1030 <DATA_xo@plt>
mov    $0x0,%al
call   1040 <STARTUP_xo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_xo>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <LibraryHeader@plt>
xor    %eax,%eax
call   1030 <DATA_xo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <STARTUP_xo@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"xo\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:35 2014 \00"
define i32 @LIBRARY_xo() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_xo()
%4 = call i32 (...) @STARTUP_xo()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"xo\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:35 2014 \00"
define i32 @LIBRARY_xo() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_xo()
%3 = tail call i32 (...) @STARTUP_xo()
ret i32 undef
}
int grabLSB(unsigned long encoding) { return encoding & 1; }


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

x86 assembly (clang, -O2):
<grabLSB>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @grabLSB(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @grabLSB(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void setOp(char *opAddr, const char *opValue) {
  memset(opAddr, 0, 3);
  strncpy(opAddr, opValue, 2);
}


x86 assembly (clang, -O0):
<setOp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setOp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @setOp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @memset(i8* %5, i32 0, i32 3)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @strncpy(i8* %7, i8* %8, i32 2)
ret void
}

LLVM IR (-O2):
define void @setOp(i8* %0, i8* %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 3)
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fC() { printf("Hey! What's up? I'm fC.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Hey! What's up? I'm fC.\0A\00"
define void @fC() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Hey! What's up? I'm fC.\00"
define void @fC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_dispersa(void *);
int /*<<< orphan*/ imprimir_matriz(void *);
void binaria(void *(*fun)(void *, void *), void *A, void *B) {
  void *Z;
  Z = fun(A, B);
  imprimir_matriz(Z);
  free_dispersa(Z);
  return;
}


x86 assembly (clang, -O0):
<binaria>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <imprimir_matriz@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free_dispersa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binaria>:
push   %rbx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   *%rax
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <imprimir_matriz@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free_dispersa@plt>

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

LLVM IR (-O2):
define void @binaria(i8* (i8*, i8*)* nocapture %0, i8* %1, i8* %2) {
%4 = tail call i8* %0(i8* %1, i8* %2)
%5 = tail call i32 @imprimir_matriz(i8* %4)
%6 = tail call i32 @free_dispersa(i8* %4)
ret void
}
/* Variables and functions */
int MV_VoicePlaying(int);
int FX_SoundActive(int handle) { return (MV_VoicePlaying(handle)); }


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

x86 assembly (clang, -O2):
<FX_SoundActive>:
jmp    1030 <MV_VoicePlaying@plt>

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

LLVM IR (-O2):
define i32 @FX_SoundActive(i32 %0) {
%2 = tail call i32 @MV_VoicePlaying(i32 %0)
ret i32 %2
}
/* Variables and functions */
int F_edgeBlendTriDrv(int *, double *, double *);
int E_blendOnFaceDrv(int index[], int etype, double *L, double bdrv[2]) {
  if (etype == 2)
    return F_edgeBlendTriDrv(index, L, bdrv);
  else
    return 0;
}


x86 assembly (clang, -O0):
<E_blendOnFaceDrv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpl   $0x2,-0x14(%rbp)
jne    114a <E_blendOnFaceDrv+0x3a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <F_edgeBlendTriDrv@plt>
mov    %eax,-0x4(%rbp)
jmp    1151 <E_blendOnFaceDrv+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_blendOnFaceDrv>:
cmp    $0x2,%esi
jne    1120 <E_blendOnFaceDrv+0x10>
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <F_edgeBlendTriDrv@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @E_blendOnFaceDrv(i32* %0, i32 %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
store i32* %0, i32** %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %17
12: ; preds = %4
%13 = load i32*, i32** %6
%14 = load double*, double** %8
%15 = load double*, double** %9
%16 = call i32 @F_edgeBlendTriDrv(i32* %13, double* %14, double* %15)
store i32 %16, i32* %5
br label %18
17: ; preds = %4
store i32 0, i32* %5
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @E_blendOnFaceDrv(i32* %0, i32 %1, double* %2, double* %3) {
%5 = icmp eq i32 %1, 2
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @F_edgeBlendTriDrv(i32* %0, double* %2, double* %3)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ 0, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_params_config_usage(void) {
  printf("\nUsage : wifidirect_params_config <CONFIG_FILE>\n");
  printf("\nIssue set or get request using parameters in the CONFIG_FILE.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidirect_params_config_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"\0AUsage : wifidirect_params_config <CONFIG_FILE>\0A\00"
@.str.1 = [64 x i8] c"\0AIssue set or get request using parameters in the CONFIG_FILE.\0A\00"
define void @print_wifidirect_params_config_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [48 x i8] c"\0AUsage : wifidirect_params_config <CONFIG_FILE>\00"
@str.2 = [63 x i8] c"\0AIssue set or get request using parameters in the CONFIG_FILE.\00"
define void @print_wifidirect_params_config_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned short VIM_HIF_GetReg16(int);
void VIM_IPP_GetWindowPos(unsigned short *wStart_X, unsigned short *wStart_Y) {
  *wStart_X = VIM_HIF_GetReg16((0x1c00 + 0x00A));
  *wStart_Y = VIM_HIF_GetReg16((0x1c00 + 0x00C));
}


x86 assembly (clang, -O0):
<VIM_IPP_GetWindowPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1c0a,%edi
call   1030 <VIM_HIF_GetReg16@plt>
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
mov    $0x1c0c,%edi
call   1030 <VIM_HIF_GetReg16@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_IPP_GetWindowPos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1c0a,%edi
call   1030 <VIM_HIF_GetReg16@plt>
mov    %ax,(%rbx)
mov    $0x1c0c,%edi
call   1030 <VIM_HIF_GetReg16@plt>
mov    %ax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @VIM_IPP_GetWindowPos(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = call zeroext i16 @VIM_HIF_GetReg16(i32 7178)
%6 = load i16*, i16** %3
store i16 %5, i16* %6
%7 = call zeroext i16 @VIM_HIF_GetReg16(i32 7180)
%8 = load i16*, i16** %4
store i16 %7, i16* %8
ret void
}

LLVM IR (-O2):
define void @VIM_IPP_GetWindowPos(i16* nocapture writeonly %0, i16* nocapture writeonly %1) {
%3 = tail call zeroext i16 @VIM_HIF_GetReg16(i32 7178)
store i16 %3, i16* %0
%4 = tail call zeroext i16 @VIM_HIF_GetReg16(i32 7180)
store i16 %4, i16* %1
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t CONV_32(uint8_t *buf) {
  uint32_t r = (uint32_t)buf[0] << 24;
  r |= (uint32_t)buf[1] << 16;
  r |= (uint32_t)buf[2] << 8;
  r |= (uint32_t)buf[3];
  return r;
}


x86 assembly (clang, -O0):
<CONV_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CONV_32>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @CONV_32(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 24
store i32 %8, i32* %3
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i64*, i64** %2
%17 = getelementptr inbounds i64, i64* %16, i64 2
%18 = load i64, i64* %17
%19 = trunc i64 %18 to i32
%20 = shl i32 %19, 8
%21 = load i32, i32* %3
%22 = or i32 %21, %20
store i32 %22, i32* %3
%23 = load i64*, i64** %2
%24 = getelementptr inbounds i64, i64* %23, i64 3
%25 = load i64, i64* %24
%26 = trunc i64 %25 to i32
%27 = load i32, i32* %3
%28 = or i32 %27, %26
store i32 %28, i32* %3
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @CONV_32(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %0, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ update_sysinfo();
void update_uptime() { update_sysinfo(); }


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

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

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

LLVM IR (-O2):
define void @update_uptime() {
%1 = tail call i32 (...) @update_sysinfo()
ret void
}
int mapCallback(int index) { return index + 1; }


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

x86 assembly (clang, -O2):
<mapCallback>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @mapCallback(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ destroy_thread_fast_rng();
void crypto_thread_cleanup(void) { destroy_thread_fast_rng(); }


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

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

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

LLVM IR (-O2):
define void @crypto_thread_cleanup() {
%1 = tail call i32 (...) @destroy_thread_fast_rng()
ret void
}
unsigned min(unsigned a, unsigned b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
ja     1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmova  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min(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* %4
%7 = load i32, i32* %5
%8 = icmp ule i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ICPrintSizeOf();
int main(int argc, const char *argv[]) {
  ICPrintSizeOf();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ICPrintSizeOf()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ICPrintSizeOf()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RogueObject_print(void *);
int /*<<< orphan*/ printf(char *);
void RogueObject_println(void *THIS) {
  RogueObject_print(THIS);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<RogueObject_println>:
push   %rax
call   1040 <RogueObject_print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @RogueObject_println(i8* %0) {
%2 = tail call i32 @RogueObject_print(i8* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
long xatoll_range_sfx(char const *, long, long, struct suffix_mult const *);
long xatol_range_sfx(const char *str, long l, long u,
                     const struct suffix_mult *sfx) {
  return xatoll_range_sfx(str, l, u, sfx);
}


x86 assembly (clang, -O0):
<xatol_range_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <xatoll_range_sfx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatol_range_sfx>:
jmp    1030 <xatoll_range_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i64 @xatol_range_sfx(i8* %0, i64 %1, i64 %2, %struct.suffix_mult* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca %struct.suffix_mult*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store %struct.suffix_mult* %3, %struct.suffix_mult** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load %struct.suffix_mult*, %struct.suffix_mult** %8
%13 = call i64 @xatoll_range_sfx(i8* %9, i64 %10, i64 %11, %struct.suffix_mult* %12)
ret i64 %13
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i64 @xatol_range_sfx(i8* %0, i64 %1, i64 %2, %struct.suffix_mult* %3) {
%5 = tail call i64 @xatoll_range_sfx(i8* %0, i64 %1, i64 %2, %struct.suffix_mult* %3)
ret i64 %5
}
void mem_blk_set_uint32_null(void *ext, unsigned long addr, unsigned long val) {
}


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

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

LLVM IR (-O0):
define void @mem_blk_set_uint32_null(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
define void @mem_blk_set_uint32_null(i8* nocapture %0, i64 %1, i64 %2) {
ret void
}
void free2d(int **arr, int rows, int cols) {
  int i;
  for (i = 0; i < rows; i++) {
    free(arr[i]);
  }
  free(arr);
}


x86 assembly (clang, -O0):
<free2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <free2d+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <free2d+0x19>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free2d>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free2d+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free2d+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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