xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __coverity_tainted_string_sanitize_content__(char const *);
const char *g_path_skip_root(const char *file_name) {
  int is_ok;
  if (is_ok) {
    __coverity_tainted_string_sanitize_content__(file_name);
    return file_name;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<g_path_skip_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     113c <g_path_skip_root+0x2c>
mov    -0x10(%rbp),%rdi
call   1030 <__coverity_tainted_string_sanitize_content__@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1144 <g_path_skip_root+0x34>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @g_path_skip_root(i8* nocapture readnone %0) {
ret i8* null
}
void init_sse_data() {}


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

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

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

LLVM IR (-O2):
define void @init_sse_data() {
ret void
}
int flat3_validmagic(unsigned int m) {
  return ((m == 0xcafe4567) || (m == 0xcafe4568));
}


x86 assembly (clang, -O0):
<flat3_validmagic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xcafe4567,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1126 <flat3_validmagic+0x26>
cmpl   $0xcafe4568,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flat3_validmagic>:
add    $0x3501ba99,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @flat3_validmagic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -889305753
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, -889305752
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @flat3_validmagic(i32 %0) {
%2 = add i32 %0, 889305753
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ inlinedFunctionImplementation();
void libraryfunction() { inlinedFunctionImplementation(); }


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

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

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

LLVM IR (-O2):
define void @libraryfunction() {
%1 = tail call i32 (...) @inlinedFunctionImplementation()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 0, n, sum = 0;
  for (n >= 0; i <= n; i++) {
    scanf("%d", &n);
    sum = sum + i;
  }
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1170 <main+0x50>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
mov    -0x10(%rbp),%esi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    $0xffffffff,%r12d
lea    0xec5(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x1(%r12),%ebp
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
add    %r12d,%ebx
add    $0x1,%ebx
mov    %ebp,%r12d
cmp    0xc(%rsp),%ebp
jl     1140 <main+0x20>
lea    0xe9a(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ 0, %0 ]
%5 = phi i32 [ %8, %3 ], [ 0, %0 ]
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = add nuw nsw i32 %4, %5
%8 = add nuw nsw i32 %5, 1
%9 = load i32, i32* %1
%10 = icmp slt i32 %5, %9
br i1 %10, label %3, label %11
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void PWMIntEnable(uint32_t ui32Base, uint32_t ui32GenFault) {
  ASSERT((ui32Base == 0x40028000) || (ui32Base == 0x40029000));
  ASSERT((ui32GenFault &
          ~(0x00000001 | 0x00000002 | 0x00000004 | 0x00000008 | 0x00010000 |
            0x00020000 | 0x00040000 | 0x00080000)) == 0);
  (*((volatile uint32_t *)(ui32Base + 0x00000014))) |= ui32GenFault;
}


x86 assembly (clang, -O0):
<PWMIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40028000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <PWMIntEnable+0x2d>
cmpl   $0x40029000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
and    $0xfff0fff0,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x14,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40028000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   $0xfff0fff0,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
or     %ebx,0x14(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @PWMIntEnable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1073905664
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073909760
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = and i32 %14, -983056
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @ASSERT(i32 %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 20
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
%24 = load volatile i32, i32* %23
%25 = or i32 %24, %19
store volatile i32 %25, i32* %23
ret void
}

LLVM IR (-O2):
define void @PWMIntEnable(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073905664
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = and i32 %1, -983056
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @ASSERT(i32 %9)
%11 = add nsw i32 %0, 20
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = or i32 %14, %1
store volatile i32 %15, i32* %13
ret void
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONCovLogProb(const struct feature_pair *pair,
                         const struct CovariateAnalysis *covan, FILE *fp) {}


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

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

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

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONCovLogProb(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t clamp_u32(uint32_t val, uint32_t max) {
  return (val <= max ? val : max);
}


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

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

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

LLVM IR (-O2):
define i64 @clamp_u32(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, y;
  scanf("%i", &x);
  y = 0;
  while (x > 0) {
    x = x - 1;
    y = y + 1;
  }
  printf("%d", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1167 <main+0x47>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
test   %esi,%esi
jle    1144 <main+0x24>
movl   $0x0,0x4(%rsp)
jmp    1146 <main+0x26>
xor    %esi,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %5
13: ; preds = %5
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %0
%8 = phi i32 [ %4, %6 ], [ 0, %0 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
void do_umath(unsigned int *x) {
  printf("%s: X before: %d\n", __func__, *x);
  *x += 5;
  printf("%s: X after: %d\n", __func__, *x);
}


x86 assembly (clang, -O0):
<do_umath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x5,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_umath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%edx
lea    0xee0(%rip),%rdi
lea    0xeeb(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%edx
add    $0x5,%edx
mov    %edx,(%rbx)
lea    0xedc(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%s: X before: %d\0A\00"
@__func__.do_umath = [9 x i8] c"do_umath\00"
@.str.1 = [17 x i8] c"%s: X after: %d\0A\00"
define void @do_umath(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.do_umath, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = add i32 %7, 5
store i32 %8, i32* %6
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.do_umath, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s: X before: %d\0A\00"
@__func__.do_umath = [9 x i8] c"do_umath\00"
@.str.1 = [17 x i8] c"%s: X after: %d\0A\00"
define void @do_umath(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.do_umath, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %0
%5 = add i32 %4, 5
store i32 %5, i32* %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.do_umath, i64 0, i64 0), i32 %5)
ret void
}
void foo421() {}


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

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

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

LLVM IR (-O2):
define void @foo421() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ event;
};
typedef TYPE_1__ XMapEvent;

/* Variables and functions */
unsigned long get_XMapEvent_event(void *_p) {
  return (unsigned long)((XMapEvent *)_p)->event;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XMapEvent_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char, char, char, char);
void get_ip_string(unsigned int hexip, char *ip) {
  char *org;
  org = &hexip;
  snprintf(ip, 32, "%u.%u.%u.%u", org[3], org[2], org[1], org[0]);
}


x86 assembly (clang, -O0):
<get_ip_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%r8b
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%r9b
mov    -0x18(%rbp),%rax
mov    $0x20,%esi
lea    0xeae(%rip),%rdx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl (%rax),%eax
mov    %eax,(%rsp)
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ip_string>:
push   %rax
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x8,%eax
mov    %edi,%edx
shr    $0x10,%edx
movsbl %cl,%edi
mov    %edi,(%rsp)
sar    $0x18,%ecx
movsbl %dl,%r8d
movsbl %al,%r9d
lea    0xecb(%rip),%rdx
mov    %rsi,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%u.%u.%u.%u\00"
define void @get_ip_string(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = bitcast i32* %3 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 3
%10 = load i8, i8* %9
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %15
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = call i32 @snprintf(i8* %7, i32 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %10, i8 signext %13, i8 signext %16, i8 signext %19)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%u.%u.%u.%u\00"
define void @get_ip_string(i32 %0, i8* %1) {
%3 = trunc i32 %0 to i8
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = lshr i32 %0, 16
%7 = trunc i32 %6 to i8
%8 = lshr i32 %0, 24
%9 = trunc i32 %8 to i8
%10 = tail call i32 @snprintf(i8* %1, i32 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %9, i8 signext %7, i8 signext %5, i8 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
void Zero(void *p, int size) {
  int i;
  for (i = 0; i < size; i++)
    printf("   %i  %u\n", i, p++);
}


x86 assembly (clang, -O0):
<Zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <Zero+0x50>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    %eax,%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Zero+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Zero>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <Zero+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed7(%rip),%r15
nopl   0x0(%rax)
lea    (%r14,%rbx,1),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1130 <Zero+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c" %i %u\0A\00"
define void @Zero(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i8* [ %7, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = ptrtoint i8* %6 to i64
%9 = trunc i64 %8 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %9)
%11 = add nuw nsw i32 %5, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void stamac_usage(char *name) {
  printf("\nUsage: %s <get | set <mac address>>\n"
         "\tget - display the MAC address of the first Wi-Fi STA that connects "
         "to\n"
         "\t\tthe router after it came out from the factory to 'stdout'.\n"
         "\tset xx:xx:xx:xx:xx:xx - record specified MAC address to POT "
         "partition,\n"
         "\t\tif thers is a MAC address existed yet, just display\n"
         "\t\tit without any write action.\n",
         name);
  exit(0);
}


x86 assembly (clang, -O0):
<stamac_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<stamac_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [327 x i8] c"\0AUsage: %s <get | set <mac address>>\0A\09get - display the MAC address of the first Wi-Fi STA that connects to\0A\09\09the router after it came out from the factory to 'stdout'.\0A\09set xx:xx:xx:xx:xx:xx - record specified MAC address to POT partition,\0A\09\09if thers is a MAC address existed yet, just display\0A\09\09it without any write action.\0A\00"
define void @stamac_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [327 x i8] c"\0AUsage: %s <get | set <mac address>>\0A\09get - display the MAC address of the first Wi-Fi STA that connects to\0A\09\09the router after it came out from the factory to 'stdout'.\0A\09set xx:xx:xx:xx:xx:xx - record specified MAC address to POT partition,\0A\09\09if thers is a MAC address existed yet, just display\0A\09\09it without any write action.\0A\00"
define void @stamac_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct wl_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
void *wl_proxy_get_user_data(struct wl_proxy *);
void *wl_surface_get_user_data(struct wl_surface *wl_surface) {
  return wl_proxy_get_user_data((struct wl_proxy *)wl_surface);
}


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

x86 assembly (clang, -O2):
<wl_surface_get_user_data>:
jmp    1030 <wl_proxy_get_user_data@plt>

LLVM IR (-O0):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_surface_get_user_data(%struct.wl_surface* %0) {
%2 = alloca %struct.wl_surface*
store %struct.wl_surface* %0, %struct.wl_surface** %2
%3 = load %struct.wl_surface*, %struct.wl_surface** %2
%4 = bitcast %struct.wl_surface* %3 to %struct.wl_proxy*
%5 = call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_surface_get_user_data(%struct.wl_surface* %0) {
%2 = bitcast %struct.wl_surface* %0 to %struct.wl_proxy*
%3 = tail call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %2)
ret i8* %3
}
/* Variables and functions */
char *__strpadr(char *, char, size_t, size_t);
size_t strlen(char *);
char *strpadr(char *str, char pad, size_t len) {
  size_t cur_len;
  char *dest;
  cur_len = strlen(str);
  if (cur_len >= len)
    return str;
  dest = __strpadr(str, pad, len, cur_len);
  *dest = '\0';
  return str;
}


x86 assembly (clang, -O0):
<strpadr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     115e <strpadr+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <strpadr+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
movsbl %al,%esi
call   1040 <__strpadr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpadr>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %r14,%rax
jae    114b <strpadr+0x2b>
movsbl %bpl,%esi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
call   1040 <__strpadr@plt>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strpadr(i8* %0, i8 signext %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
store i8* %0, i8** %5
store i8 %1, i8* %6
store i64 %2, i64* %7
%10 = load i8*, i8** %5
%11 = call i64 @strlen(i8* %10)
store i64 %11, i64* %8
%12 = load i64, i64* %8
%13 = load i64, i64* %7
%14 = icmp uge i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i8*, i8** %5
store i8* %16, i8** %4
br label %25
17: ; preds = %3
%18 = load i8*, i8** %5
%19 = load i8, i8* %6
%20 = load i64, i64* %7
%21 = load i64, i64* %8
%22 = call i8* @__strpadr(i8* %18, i8 signext %19, i64 %20, i64 %21)
store i8* %22, i8** %9
%23 = load i8*, i8** %9
store i8 0, i8* %23
%24 = load i8*, i8** %5
store i8* %24, i8** %4
br label %25
25: ; preds = %17, %15
%26 = load i8*, i8** %4
ret i8* %26
}

LLVM IR (-O2):
define i8* @strpadr(i8* returned %0, i8 signext %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = icmp ult i64 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* @__strpadr(i8* %0, i8 signext %1, i64 %2, i64 %4)
store i8 0, i8* %7
br label %8
8: ; preds = %3, %6
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ non_det;

/* Variables and functions */
int /*<<< orphan*/ klee_make_symbolic(long *, int, char *);
long map2check_non_det_long() {
  long non_det;
  klee_make_symbolic(&non_det, sizeof(non_det), "non_det_#type");
  return non_det;
}


x86 assembly (clang, -O0):
<map2check_non_det_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
lea    0xed8(%rip),%rdx
call   1030 <klee_make_symbolic@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map2check_non_det_long>:
push   %rax
lea    0xee8(%rip),%rdx
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <klee_make_symbolic@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"non_det_#type\00"
define i64 @map2check_non_det_long() {
%1 = alloca i64
%2 = call i32 @klee_make_symbolic(i64* %1, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"non_det_#type\00"
define i64 @map2check_non_det_long() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @klee_make_symbolic(i64* %1, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i64, i64* %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
uint32_t add_array(int32_t *array, uint8_t *buffer, uint32_t *data_offset,
                   size_t length) {
  uint32_t result = *data_offset;
  memcpy(buffer + result, array, length * sizeof(int32_t));
  *data_offset += length * sizeof(int32_t);
  return result;
}


x86 assembly (clang, -O0):
<add_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rdx
shl    $0x2,%rdx
mov    -0x18(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_array>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rdi,%rax
movslq (%rdx),%r15
lea    (%rsi,%r15,4),%rdi
shl    $0x2,%rbx
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
add    %ebx,(%r14)
mov    %r15d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @add_array(i32* %0, i32* %1, i32* nocapture %2, i64 %3) {
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = shl i64 %3, 2
%9 = tail call i32 @memcpy(i32* %7, i32* %0, i64 %8)
%10 = load i32, i32* %2
%11 = trunc i64 %8 to i32
%12 = add i32 %10, %11
store i32 %12, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ffc2s(char const *, char *, int *);
int removequotes(char *dest, const char *src) {
  int status = 0;
  ffc2s(src, dest, &status);
  return status;
}


x86 assembly (clang, -O0):
<removequotes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <ffc2s@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removequotes>:
push   %rax
mov    %rdi,%rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <ffc2s@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @removequotes(i8* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @ffc2s(i8* %1, i8* %0, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}
/* Type definitions */
struct hdr_log_reader {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scan_log_format(struct hdr_log_reader *, char const *);
int /*<<< orphan*/ scan_start_time(struct hdr_log_reader *, char const *);
void scan_header_line(struct hdr_log_reader *reader, const char *line) {
  scan_log_format(reader, line);
  scan_start_time(reader, line);
}


x86 assembly (clang, -O0):
<scan_header_line>:
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   1040 <scan_log_format@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <scan_start_time@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_header_line>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <scan_log_format@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <scan_start_time@plt>

LLVM IR (-O0):
%struct.hdr_log_reader = type { i32 }
define void @scan_header_line(%struct.hdr_log_reader* %0, i8* %1) {
%3 = alloca %struct.hdr_log_reader*
%4 = alloca i8*
store %struct.hdr_log_reader* %0, %struct.hdr_log_reader** %3
store i8* %1, i8** %4
%5 = load %struct.hdr_log_reader*, %struct.hdr_log_reader** %3
%6 = load i8*, i8** %4
%7 = call i32 @scan_log_format(%struct.hdr_log_reader* %5, i8* %6)
%8 = load %struct.hdr_log_reader*, %struct.hdr_log_reader** %3
%9 = load i8*, i8** %4
%10 = call i32 @scan_start_time(%struct.hdr_log_reader* %8, i8* %9)
ret void
}

LLVM IR (-O2):
%struct.hdr_log_reader = type { i32 }
define void @scan_header_line(%struct.hdr_log_reader* %0, i8* %1) {
%3 = tail call i32 @scan_log_format(%struct.hdr_log_reader* %0, i8* %1)
%4 = tail call i32 @scan_start_time(%struct.hdr_log_reader* %0, i8* %1)
ret void
}
/* Variables and functions */
#define TPACKET_V1 130
#define TPACKET_V2 129
#define TPACKET_V3 128
int /*<<< orphan*/ __v1_tx_user_ready(void *);
int /*<<< orphan*/ __v2_tx_user_ready(void *);
int /*<<< orphan*/ __v3_tx_user_ready(void *);
void __tx_user_ready(void *base, int version) {
  switch (version) {
  case TPACKET_V1:
    __v1_tx_user_ready(base);
    break;
  case TPACKET_V2:
    __v2_tx_user_ready(base);
    break;
  case TPACKET_V3:
    __v3_tx_user_ready(base);
    break;
  }
}


x86 assembly (clang, -O0):
<__tx_user_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80,%eax
je     1197 <__tx_user_ready+0x67>
jmp    1155 <__tx_user_ready+0x25>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
je     1189 <__tx_user_ready+0x59>
jmp    1168 <__tx_user_ready+0x38>
mov    -0x10(%rbp),%eax
sub    $0x82,%eax
jne    11a0 <__tx_user_ready+0x70>
jmp    117b <__tx_user_ready+0x4b>
mov    -0x8(%rbp),%rdi
call   1040 <__v1_tx_user_ready@plt>
jmp    11a0 <__tx_user_ready+0x70>
mov    -0x8(%rbp),%rdi
call   1050 <__v2_tx_user_ready@plt>
jmp    11a0 <__tx_user_ready+0x70>
mov    -0x8(%rbp),%rdi
call   1030 <__v3_tx_user_ready@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__tx_user_ready>:
cmp    $0x80,%esi
je     114d <__tx_user_ready+0x1d>
cmp    $0x81,%esi
je     1152 <__tx_user_ready+0x22>
cmp    $0x82,%esi
jne    1157 <__tx_user_ready+0x27>
jmp    1040 <__v1_tx_user_ready@plt>
jmp    1030 <__v3_tx_user_ready@plt>
jmp    1050 <__v2_tx_user_ready@plt>
ret

LLVM IR (-O0):
define void @__tx_user_ready(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %15 [
i32 130, label %6
i32 129, label %9
i32 128, label %12
]
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = call i32 @__v1_tx_user_ready(i8* %7)
br label %15
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @__v2_tx_user_ready(i8* %10)
br label %15
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i32 @__v3_tx_user_ready(i8* %13)
br label %15
15: ; preds = %2, %12, %9, %6
ret void
}

LLVM IR (-O2):
define void @__tx_user_ready(i8* %0, i32 %1) {
switch i32 %1, label %9 [
i32 130, label %3
i32 129, label %5
i32 128, label %7
]
3: ; preds = %2
%4 = tail call i32 @__v1_tx_user_ready(i8* %0)
br label %9
5: ; preds = %2
%6 = tail call i32 @__v2_tx_user_ready(i8* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @__v3_tx_user_ready(i8* %0)
br label %9
9: ; preds = %2, %7, %5, %3
ret void
}
/* Variables and functions */
int check_for_mmx();
int deinterlace_yuv_supported(int method) {
  switch (method) {
  case 0:
    return 1;
  case 1:
  case 2:
  case 3:
  case 4:
    return check_for_mmx();
  case 5:
    do {
    } while (0);
    return 0;
  case 6:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<deinterlace_yuv_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x6,%rax
ja     117d <deinterlace_yuv_supported+0x6d>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1184 <deinterlace_yuv_supported+0x74>
mov    $0x0,%al
call   1030 <check_for_mmx@plt>
mov    %eax,-0x4(%rbp)
jmp    1184 <deinterlace_yuv_supported+0x74>
jmp    1160 <deinterlace_yuv_supported+0x50>
jmp    1165 <deinterlace_yuv_supported+0x55>
movl   $0x0,-0x4(%rbp)
jmp    1184 <deinterlace_yuv_supported+0x74>
movl   $0x1,-0x4(%rbp)
jmp    1184 <deinterlace_yuv_supported+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deinterlace_yuv_supported>:
cmp    $0x6,%edi
ja     1133 <deinterlace_yuv_supported+0x23>
mov    $0x1,%eax
mov    %edi,%ecx
lea    0xedd(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
xor    %eax,%eax
jmp    1030 <check_for_mmx@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @deinterlace_yuv_supported(i32 %0) {
switch i32 %0, label %5 [
i32 0, label %6
i32 1, label %2
i32 2, label %2
i32 3, label %2
i32 4, label %2
i32 5, label %4
i32 6, label %6
]
2: ; preds = %1, %1, %1, %1
%3 = tail call i32 (...) @check_for_mmx()
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5, %4, %2
%7 = phi i32 [ 0, %5 ], [ 0, %4 ], [ %3, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}
/* Type definitions */
struct config {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_del(struct config *);
int /*<<< orphan*/ free(struct config *);
void config_free(struct config *conf) {
  config_del(conf);
  free(conf);
}


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

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

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

LLVM IR (-O2):
%struct.config = type { i32 }
define void @config_free(%struct.config* %0) {
%2 = tail call i32 @config_del(%struct.config* %0)
%3 = tail call i32 @free(%struct.config* %0)
ret void
}
int Tcl_DumpActiveMemory(fileName)
char *fileName;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Tcl_DumpActiveMemory(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHello() {
  printf("Hello, this is printed when the static library is called\n");
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"Hello, this is printed when the static library is called\0A\00"
define void @printHello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [57 x i8] c"Hello, this is printed when the static library is called\00"
define void @printHello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
struct hostent *gethostbyname(char *);
void test_gethostbyname() {
  struct hostent *unused = gethostbyname("www.google.com");
}


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

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

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [15 x i8] c"www.google.com\00"
define void @test_gethostbyname() {
%1 = alloca %struct.hostent*
%2 = call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store %struct.hostent* %2, %struct.hostent** %1
ret void
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [15 x i8] c"www.google.com\00"
define void @test_gethostbyname() {
%1 = tail call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
void *_Locale_ctype_create(const char *__DUMMY_PAR) { return 0; }


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

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

LLVM IR (-O0):
define i8* @_Locale_ctype_create(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @_Locale_ctype_create(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int usage(void) {
  fprintf(stdout, "frager <-f file> <-o log> <-l filesize> "
                  "<-k chunksize> <-v>\n");
  fprintf(stdout, "Example:\n"
                  "       ./verify_file -f /storage/testfile -o "
                  "logs/logfile -l 104857600 -k 32768\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xef4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefe(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [61 x i8] c"frager <-f file> <-o log> <-l filesize> <-k chunksize> <-v>\0A\00"
@.str.1 = [90 x i8] c"Example:\0A ./verify_file -f /storage/testfile -o logs/logfile -l 104857600 -k 32768\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [61 x i8] c"frager <-f file> <-o log> <-l filesize> <-k chunksize> <-v>\0A\00"
@.str.1 = [90 x i8] c"Example:\0A ./verify_file -f /storage/testfile -o logs/logfile -l 104857600 -k 32768\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ mailand();
void commonfun() { mailand(); }


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

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

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

LLVM IR (-O2):
define void @commonfun() {
%1 = tail call i32 (...) @mailand()
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
unsigned long timerusec(const struct timeval *tv) {
  return tv->tv_sec * 1000000 + tv->tv_usec;
}


x86 assembly (clang, -O0):
<timerusec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0xf4240,(%rax),%eax
cltq
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerusec>:
movslq (%rdi),%rax
imul   $0xf4240,%rax,%rax
add    0x8(%rdi),%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @timerusec(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = add i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @timerusec(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000000
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = add i64 %7, %5
ret i64 %8
}