xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
int /*<<< orphan*/ flags_v0();
int /*<<< orphan*/ ret_timing(int);
int /*<<< orphan*/ selftest(int);
int /*<<< orphan*/ usereg();
void i_extwl(void) {
  usereg();
  emit("movsx ecx,word[__dreg+ebx*4]\n");
  emit("mov [__dreg+ebx*4],ecx\n");
  selftest(4);
  flags_v0();
  ret_timing(4);
}


x86 assembly (clang, -O0):
<i_extwl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <usereg@plt>
lea    0xe9e(%rip),%rdi
call   1060 <emit@plt>
lea    0xeb0(%rip),%rdi
call   1060 <emit@plt>
mov    $0x4,%edi
call   1030 <selftest@plt>
mov    $0x0,%al
call   1040 <flags_v0@plt>
mov    $0x4,%edi
call   1070 <ret_timing@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_extwl>:
push   %rax
xor    %eax,%eax
call   1050 <usereg@plt>
lea    0xea1(%rip),%rdi
call   1060 <emit@plt>
lea    0xeb3(%rip),%rdi
call   1060 <emit@plt>
mov    $0x4,%edi
call   1030 <selftest@plt>
xor    %eax,%eax
call   1040 <flags_v0@plt>
mov    $0x4,%edi
pop    %rax
jmp    1070 <ret_timing@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"movsx ecx,word[__dreg+ebx*4]\0A\00"
@.str.1 = [24 x i8] c"mov [__dreg+ebx*4],ecx\0A\00"
define void @i_extwl() {
%1 = call i32 (...) @usereg()
%2 = call i32 @emit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @selftest(i32 4)
%5 = call i32 (...) @flags_v0()
%6 = call i32 @ret_timing(i32 4)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"movsx ecx,word[__dreg+ebx*4]\0A\00"
@.str.1 = [24 x i8] c"mov [__dreg+ebx*4],ecx\0A\00"
define void @i_extwl() {
%1 = tail call i32 (...) @usereg()
%2 = tail call i32 @emit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @selftest(i32 4)
%5 = tail call i32 (...) @flags_v0()
%6 = tail call i32 @ret_timing(i32 4)
ret void
}
void ft_strclr(char *s) {
  int i;
  i = 0;
  if (!s)
    return;
  while (s[i])
    s[i++] = '\0';
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111f <ft_strclr+0x1f>
jmp    1151 <ft_strclr+0x51>
jmp    1124 <ft_strclr+0x24>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1151 <ft_strclr+0x51>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1124 <ft_strclr+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
test   %rdi,%rdi
je     111d <ft_strclr+0x1d>
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
xchg   %ax,%ax
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i64 %7, 1
store i8 0, i8* %8
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
void minipack_pack_array32(void *ptr, uint32_t count, size_t *sz) {
  *sz = 5;
  *((uint8_t *)ptr) = 0xDD;
  *((uint32_t *)(ptr + 1)) = htonl(count);
}


x86 assembly (clang, -O0):
<minipack_pack_array32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x5,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xdd,(%rax)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_array32>:
push   %rbx
mov    %rdi,%rbx
movq   $0x5,(%rdx)
movl   $0xdd,(%rdi)
mov    %esi,%edi
call   1030 <htonl@plt>
mov    %eax,0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @minipack_pack_array32(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i64*, i64** %6
store i64 5, i64* %7
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 221, i32* %9
%10 = load i32, i32* %5
%11 = call i32 @htonl(i32 %10)
%12 = load i8*, i8** %4
%13 = getelementptr i8, i8* %12, i64 1
%14 = bitcast i8* %13 to i32*
store i32 %11, i32* %14
ret void
}

LLVM IR (-O2):
define void @minipack_pack_array32(i8* nocapture writeonly %0, i32 %1, i64* nocapture writeonly %2) {
store i64 5, i64* %2
%4 = bitcast i8* %0 to i32*
store i32 221, i32* %4
%5 = tail call i32 @htonl(i32 %1)
%6 = getelementptr i8, i8* %0, i64 1
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}
void foo() {
  register int zmm_var asm("zmm9") __attribute__((unused));
  __asm__ __volatile__("vxorpd %%zmm0, %%zmm0, %%zmm7\n" : : : "zmm7");
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
vxorpd %zmm0,%zmm0,%zmm7
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
vxorpd %zmm0,%zmm0,%zmm7
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @foo() {
tail call void asm sideeffect "vxorpd %zmm0, %zmm0, %zmm7\0A", "~{zmm7},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int countWord(char *);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *s = (char *)malloc(10240 * sizeof(char));
  if (!s)
    return 0;
  scanf("%s", s);
  int j = countWord(s);
  printf("\n%d", j);
  free(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2800,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1184 <main+0x34>
movl   $0x0,-0x4(%rbp)
jmp    11bf <main+0x6f>
mov    -0x10(%rbp),%rsi
lea    0xe71(%rip),%rdi
call   1070 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <countWord@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe59(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2800,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1190 <main+0x40>
mov    %rax,%rbx
lea    0xe96(%rip),%rdi
mov    %rax,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1050 <countWord@plt>
lea    0xe82(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 10240)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %0
store i32 0, i32* %1
br label %18
9: ; preds = %0
%10 = load i8*, i8** %2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %2
%13 = call i32 @countWord(i8* %12)
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i8*, i8** %2
%17 = call i32 @free(i8* %16)
store i32 0, i32* %1
br label %18
18: ; preds = %9, %8
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 10240)
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = tail call i32 @countWord(i8* %2)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = tail call i32 @free(i8* %2)
br label %9
9: ; preds = %0, %4
ret i32 0
}
/* Variables and functions */
int round(double);
int maxBall(int v0) { return round(((double)v0 / 3.6 / 0.981)); }


x86 assembly (clang, -O0):
<maxBall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <round@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxBall>:
cvtsi2sd %edi,%xmm0
divsd  0xee4(%rip),%xmm0
divsd  0xee4(%rip),%xmm0
jmp    1030 <round@plt>

LLVM IR (-O0):
define i32 @maxBall(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 3.600000e+00
%6 = fdiv double %5, 0x3FEF645A1CAC0831
%7 = call i32 @round(double %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @maxBall(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 3.600000e+00
%4 = fdiv double %3, 0x3FEF645A1CAC0831
%5 = tail call i32 @round(double %4)
ret i32 %5
}
void g_type_interface_get_plugin() {}


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

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

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

LLVM IR (-O2):
define void @g_type_interface_get_plugin() {
ret void
}
__attribute__((always_)) void module_put(struct module *module) {}


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

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

LLVM IR (-O0):
%struct.module = type opaque
define void @module_put(%struct.module* %0) {
%2 = alloca %struct.module*
store %struct.module* %0, %struct.module** %2
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
define void @module_put(%struct.module* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_uint(int);
int /*<<< orphan*/ putchar(char);
void print_int(int i) {
  if (i < 0) {
    putchar('-');
    print_uint(-i);
  } else
    print_uint(i);
}


x86 assembly (clang, -O0):
<print_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114e <print_int+0x2e>
mov    $0x2d,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1040 <print_uint@plt>
jmp    1156 <print_int+0x36>
mov    -0x4(%rbp),%edi
call   1040 <print_uint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1133 <print_int+0x13>
mov    $0x2d,%edi
call   1030 <putchar@plt>
neg    %ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <print_uint@plt>

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

LLVM IR (-O2):
define void @print_int(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @putchar(i8 signext 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @print_uint(i32 %7)
ret void
}
unsigned char IsIdxValid(int i, int j) {
  return ((i >= 1) && (i <= 100) && (j >= 1) && (j <= 100));
}


x86 assembly (clang, -O0):
<IsIdxValid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <IsIdxValid+0x41>
xor    %eax,%eax
cmpl   $0x64,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jg     1141 <IsIdxValid+0x41>
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <IsIdxValid+0x41>
cmpl   $0x64,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsIdxValid>:
add    $0xffffffff,%edi
cmp    $0x64,%edi
setb   %cl
add    $0xffffffff,%esi
cmp    $0x64,%esi
setb   %al
and    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @IsIdxValid(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 sge i32 %5, 1
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 100
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 100
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ false, %10 ], [ false, %7 ], [ false, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @IsIdxValid(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 100
%5 = add i32 %1, -1
%6 = icmp ult i32 %5, 100
%7 = and i1 %4, %6
%8 = zext i1 %7 to i8
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x28() {
  Assert_real((isxdigit(40) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              205, ("isxdigit should be 0 for ("));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x28>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xcd,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x28>:
push   %rax
mov    $0x28,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xcd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for (\00"
define void @t_isxdigit_0x28() {
%1 = call i64 @isxdigit(i32 40)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for (\00"
define void @t_isxdigit_0x28() {
%1 = tail call i64 @isxdigit(i32 40)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prgname) {
  fprintf(stderr,
          "USAGE: %s [options] recordfile\n"
          "  Available options:\n"
          "   --records val         -n val\n"
          "   --record-interval-ms  -r val\n"
          "   --monitor-interval-ms -m val\n",
          prgname);
  exit(20);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [149 x i8] c"USAGE: %s [options] recordfile\0A Available options:\0A --records val -n val\0A --record-interval-ms -r val\0A --monitor-interval-ms -m val\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 20)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [149 x i8] c"USAGE: %s [options] recordfile\0A Available options:\0A --records val -n val\0A --record-interval-ms -r val\0A --monitor-interval-ms -m val\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 20)
unreachable
}
int main() {
  char buffer[1024];
  float buffer2[256];
  printf("buffer  %d\nsizeof buffer  %d\nsizeof(buffer)  %d\n", buffer,
         sizeof buffer, sizeof(buffer));
  printf("buffer2 %d\nsizeof buffer2 %d\nsizeof(buffer2) %d\n", buffer2,
         sizeof buffer2, sizeof(buffer2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x400,%ecx
mov    %rcx,%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x810(%rbp),%rsi
lea    0xee4(%rip),%rdi
mov    $0x400,%ecx
mov    %rcx,%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x808,%rsp
lea    0xee2(%rip),%rdi
lea    0x400(%rsp),%rsi
mov    $0x400,%edx
mov    $0x400,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    %rsp,%rsi
mov    $0x400,%edx
mov    $0x400,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x808,%rsp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"buffer %d\0Asizeof buffer %d\0Asizeof(buffer) %d\0A\00"
@.str.1 = [49 x i8] c"buffer2 %d\0Asizeof buffer2 %d\0Asizeof(buffer2) %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca [256 x float]
store i32 0, i32* %1
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %4, i64 1024, i64 1024)
%6 = getelementptr inbounds [256 x float], [256 x float]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), float* %6, i64 1024, i64 1024)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"buffer %d\0Asizeof buffer %d\0Asizeof(buffer) %d\0A\00"
@.str.1 = [49 x i8] c"buffer2 %d\0Asizeof buffer2 %d\0Asizeof(buffer2) %d\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [256 x float]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = bitcast [256 x float]* %2 to i8*
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %3, i64 1024, i64 1024)
%6 = getelementptr inbounds [256 x float], [256 x float]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), float* %6, i64 1024, i64 1024)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ w;
struct winsize {
  int dummy;
};

/* Variables and functions */
int main(void) {
  struct winsize w;
  (void)w;
  return sizeof(w);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.winsize = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.winsize
store i32 0, i32* %1
ret i32 4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int execv(char *, char **);
int main(const int argc, const char *argv[]) {
  char *eargv[] = {"/bin/echo",
                   "/bin/rm"
                   "-rf",
                   "/home/*", NULL};
  int rc = execv(eargv[0], eargv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <execv@plt>
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xece(%rip),%rdi
mov    %rsp,%rsi
call   1030 <execv@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/echo\00"
@.str.1 = [11 x i8] c"/bin/rm-rf\00"
@.str.2 = [8 x i8] c"/home/*\00"
@__const.main.eargv = [4 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [4 x i8*]
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [4 x i8*]* %5 to i8*
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
%9 = load i8*, i8** %8
%10 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
%11 = call i32 @execv(i8* %9, i8** %10)
store i32 %11, i32* %6
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/echo\00"
@.str.1 = [11 x i8] c"/bin/rm-rf\00"
@.str.2 = [8 x i8] c"/home/*\00"
@__const.main.eargv = [4 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%6 = call i32 @execv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %5)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int n = __VERIFIER_nondet_int();
  int m = __VERIFIER_nondet_int();
  int i;
  if (m > 0 && n > m) {
    i = n;
    while (i > 0) {
      if (i < m)
        i--;
      else
        i -= m;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1188 <main+0x78>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1188 <main+0x78>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1183 <main+0x73>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1173 <main+0x63>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <main+0x6e>
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    114f <main+0x3f>
jmp    1188 <main+0x78>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %31
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %31
13: ; preds = %9
%14 = load i32, i32* %2
store i32 %14, i32* %4
br label %15
15: ; preds = %29, %13
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %30
18: ; preds = %15
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i32, i32* %4
%24 = add nsw i32 %23, -1
store i32 %24, i32* %4
br label %29
25: ; preds = %18
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, %26
store i32 %28, i32* %4
br label %29
29: ; preds = %25, %22
br label %15
30: ; preds = %15
br label %31
31: ; preds = %30, %9, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int xunlink(filename)
char *filename;
{
  int r = unlink(filename);
  return r;
}


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

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

LLVM IR (-O0):
define i32 @xunlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @xunlink(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
void g_strdup_value_contents() {}


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

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

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

LLVM IR (-O2):
define void @g_strdup_value_contents() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void panel_utils_transpose_to_str(char *tempstr, int trans) {
  if (trans < 0) {
    sprintf(tempstr, "%-2d", trans);
  } else {
    sprintf(tempstr, "+%-2d", trans);
  }
}


x86 assembly (clang, -O0):
<panel_utils_transpose_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1141 <panel_utils_transpose_to_str+0x31>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xeca(%rip),%rsi
call   1030 <sprintf@plt>
jmp    1154 <panel_utils_transpose_to_str+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panel_utils_transpose_to_str>:
mov    %esi,%edx
test   %esi,%esi
lea    0xee6(%rip),%rax
lea    0xede(%rip),%rsi
cmovs  %rax,%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%-2d\00"
@.str.1 = [6 x i8] c"+%-2d\00"
define void @panel_utils_transpose_to_str(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
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %15
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%-2d\00"
@.str.1 = [6 x i8] c"+%-2d\00"
define void @panel_utils_transpose_to_str(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp slt i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) %4, i32 %1)
ret void
}
/* Type definitions */
struct pollfd {
  int dummy;
};
typedef int /*<<< orphan*/ nfds_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int poll(struct pollfd pfd[], nfds_t nfds, int timeout) { assert(!"NYI"); }


x86 assembly (clang, -O0):
<poll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poll>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32 }
@.str = [4 x i8] c"NYI\00"
define i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.pollfd*
%6 = alloca i32
%7 = alloca i32
store %struct.pollfd* %0, %struct.pollfd** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = call i32 @assert(i32 0)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
define i32 @poll(%struct.pollfd* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @assert(i32 0)
ret i32 undef
}
int strng(char *str) {
  int i = 0;
  char ch = 13;
  while (str[i] != '\0') {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<strng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movb   $0xd,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strng+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <strng+0x13>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strng>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strng+0x10>
ret

LLVM IR (-O0):
define i32 @strng(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
store i8* %0, i8** %2
store i32 0, i32* %3
store i8 13, i8* %4
br label %5
5: ; preds = %13, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%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 %16
13: ; preds = %5
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @strng(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void av_format_set_audio_codec() {}


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

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

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

LLVM IR (-O2):
define void @av_format_set_audio_codec() {
ret void
}
void versiontext(void) { ; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @initEnumeration() {
ret void
}
long DiffMsTimes(struct MillisecTime *t1, struct MillisecTime *t2) {}


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

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

LLVM IR (-O0):
%struct.MillisecTime = type opaque
define i64 @DiffMsTimes(%struct.MillisecTime* %0, %struct.MillisecTime* %1) {
%3 = alloca i64
%4 = alloca %struct.MillisecTime*
%5 = alloca %struct.MillisecTime*
store %struct.MillisecTime* %0, %struct.MillisecTime** %4
store %struct.MillisecTime* %1, %struct.MillisecTime** %5
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
%struct.MillisecTime = type opaque
define i64 @DiffMsTimes(%struct.MillisecTime* nocapture readnone %0, %struct.MillisecTime* nocapture readnone %1) {
ret i64 undef
}
signed int vsnprintf(char *restrict __s, unsigned long int __n,
                     const char *restrict __fmt, void **__ap) {
  signed int return_value___builtin___vsnprintf_chk$1;
  return_value___builtin___vsnprintf_chk$1 = __builtin___vsnprintf_chk(
      __s, __n, 2 - 1, 18446744073709551615ul, __fmt, __ap);
  return return_value___builtin___vsnprintf_chk$1;
}


x86 assembly (clang, -O0):
<vsnprintf>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x1,%edx
mov    $0xffffffffffffffff,%rcx
call   1030 <__vsnprintf_chk@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsnprintf>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    $0x1,%edx
mov    $0xffffffffffffffff,%rcx
jmp    1030 <__vsnprintf_chk@plt>

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @vsnprintf(i8* noalias %0, i64 %1, i8* noalias %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8** %3, i8*** %8
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i8*, i8** %7
%13 = load i8**, i8*** %8
%14 = bitcast i8** %13 to %struct.__va_list_tag*
%15 = call i32 @__vsnprintf_chk(i8* %10, i64 %11, i32 1, i64 -1, i8* %12, %struct.__va_list_tag* %14)
store i32 %15, i32* %9
%16 = load i32, i32* %9
ret i32 %16
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @vsnprintf(i8* noalias %0, i64 %1, i8* noalias %2, i8** %3) {
%5 = bitcast i8** %3 to %struct.__va_list_tag*
%6 = tail call i32 @__vsnprintf_chk(i8* %0, i64 %1, i32 1, i64 -1, i8* %2, %struct.__va_list_tag* %5)
ret i32 %6
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_del(struct list_head *);
void fimg2d_dequeue(struct list_head *node) { list_del(node); }


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

x86 assembly (clang, -O2):
<fimg2d_dequeue>:
jmp    1030 <list_del@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @fimg2d_dequeue(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @list_del(%struct.list_head* %3)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @fimg2d_dequeue(%struct.list_head* %0) {
%2 = tail call i32 @list_del(%struct.list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void syntax(const char *av0) {
  fprintf(stderr,
          "Syntax: %s {options} tapfile dskfile\n\n"
          "Options are:\n"
          "  -720: Write a 720k image (default)\n"
          "  -180: Write a 180k image\n"
          "  -cpmonly: Write a disc only usable by +3DOS\n"
          "  -dosonly: Write a disc only usable by PCDOS\n"
          "  -type type: Output file type (default=dsk)\n"
          "  -compress cmp: Output compression (default=none)\n"
          "  -label lbl: Set disk label (default=tapfile name)\n"
          "  -nostamps: Do not include file date stamps\n",
          av0);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [401 x i8] c"Syntax: %s {options} tapfile dskfile\0A\0AOptions are:\0A -720: Write a 720k image (default)\0A -180: Write a 180k image\0A -cpmonly: Write a disc only usable by +3DOS\0A -dosonly: Write a disc only usable by PCDOS\0A -type type: Output file type (default=dsk)\0A -compress cmp: Output compression (default=none)\0A -label lbl: Set disk label (default=tapfile name)\0A -nostamps: Do not include file date stamps\0A\00"
define void @syntax(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [401 x i8] c"Syntax: %s {options} tapfile dskfile\0A\0AOptions are:\0A -720: Write a 720k image (default)\0A -180: Write a 180k image\0A -cpmonly: Write a disc only usable by +3DOS\0A -dosonly: Write a disc only usable by PCDOS\0A -type type: Output file type (default=dsk)\0A -compress cmp: Output compression (default=none)\0A -label lbl: Set disk label (default=tapfile name)\0A -nostamps: Do not include file date stamps\0A\00"
define void @syntax(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void lire_commentaire_binaire(FILE *fichier, char *comment) {}


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

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

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

LLVM IR (-O2):
define void @lire_commentaire_binaire(i32* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ padd(int, int, int, int, int *, int *);
void main() {
  int startd, finishd;
  padd(4, 1, 3, 2, &startd, &finishd);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
lea    -0x4(%rbp),%r8
lea    -0x8(%rbp),%r9
call   1030 <padd@plt>
mov    $0x0,%al
call   1040 <getch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%r8
mov    %rsp,%r9
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <padd@plt>
xor    %eax,%eax
call   1040 <getch@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @padd(i32 4, i32 1, i32 3, i32 2, i32* %1, i32* %2)
%4 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @padd(i32 4, i32 1, i32 3, i32 2, i32* %1, i32* %2)
%6 = call i32 (...) @getch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned int);
void mov_preg64pimm8_reg64(int reg1, unsigned int imm8, int reg2) {
  put8(0x48);
  put8(0x89);
  put8(0x40 | (reg2 << 3) | reg1);
  put8(imm8);
}


x86 assembly (clang, -O0):
<mov_preg64pimm8_reg64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x40,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg64pimm8_reg64>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x40,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @mov_preg64pimm8_reg64(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @put8(i32 72)
%8 = call i32 @put8(i32 137)
%9 = load i32, i32* %6
%10 = shl i32 %9, 3
%11 = or i32 64, %10
%12 = load i32, i32* %4
%13 = or i32 %11, %12
%14 = call i32 @put8(i32 %13)
%15 = load i32, i32* %5
%16 = call i32 @put8(i32 %15)
ret void
}

LLVM IR (-O2):
define void @mov_preg64pimm8_reg64(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 72)
%5 = tail call i32 @put8(i32 137)
%6 = shl i32 %2, 3
%7 = or i32 %6, %0
%8 = or i32 %7, 64
%9 = tail call i32 @put8(i32 %8)
%10 = tail call i32 @put8(i32 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xgravity;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xgravity_type(void *_p, int _v) {
  ((XEvent *)_p)->xgravity.type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xgravity_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xgravity_type(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
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xgravity_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
float factorial(int n) {
  float val = 1;
  while (n > 1) {
    val *= n--;
  }
  return val;
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  0xef1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    113c <factorial+0x3c>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cvtsi2ss %eax,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1114 <factorial+0x14>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
movss  0xef8(%rip),%xmm0
cmp    $0x2,%edi
jl     1125 <factorial+0x25>
nopl   (%rax)
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
lea    -0x1(%rdi),%eax
mulss  %xmm1,%xmm0
cmp    $0x2,%edi
mov    %eax,%edi
ja     1110 <factorial+0x10>
ret

LLVM IR (-O0):
define float @factorial(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
store float 1.000000e+00, float* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
%10 = sitofp i32 %8 to float
%11 = load float, float* %3
%12 = fmul float %11, %10
store float %12, float* %3
br label %4
13: ; preds = %4
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @factorial(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi float [ %8, %3 ], [ 1.000000e+00, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = sitofp i32 %5 to float
%8 = fmul float %4, %7
%9 = icmp ugt i32 %5, 2
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi float [ 1.000000e+00, %1 ], [ %8, %3 ]
ret float %11
}
int test_imm_E2uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xE2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E2uint64_midword_reg>:
test   $0xe20000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E2uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 14811136
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}