xunge/DecIR huggingface dataset:
/* Variables and functions */
char *fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
char *getinput(char *buffer, size_t buflen) {
  printf("%% ");
  return fgets(buffer, buflen, stdin);
}


x86 assembly (clang, -O0):
<getinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getinput>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fgets@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%% \00"
@stdin = global i32 0
define i8* @getinput(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = load i32, i32* @stdin
%9 = call i8* @fgets(i8* %6, i64 %7, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"%% \00"
@stdin = global i32 0
define i8* @getinput(i8* %0, i64 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = tail call i8* @fgets(i8* %0, i64 %1, i32 %4)
ret i8* %5
}
printf2(s, a) {
  extern fout;
  flush();
  fout = 2;
  printf(s, a);
  flush();
  exit(2);
}


x86 assembly (clang, -O0):
<printf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <flush@plt>
mov    0x2e9c(%rip),%rax
movl   $0x2,(%rax)
movslq -0x4(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <flush@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<printf2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <flush@plt>
mov    0x2ea3(%rip),%rax
movl   $0x2,(%rax)
movslq %ebp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <flush@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@fout = external global i32
define i32 @printf2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @flush()
store i32 2, i32* @fout
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* %8, i32 %9)
%11 = call i32 (...) @flush()
unreachable
}

LLVM IR (-O2):
@fout = external global i32
define i32 @printf2(i32 %0, i32 %1) {
%3 = tail call i32 (...) @flush()
store i32 2, i32* @fout
%4 = sext i32 %0 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %5, i32 %1)
%7 = tail call i32 (...) @flush()
tail call void @exit(i32 2)
unreachable
}
int fun_02(char *x, char *y, int z) {
  return ((x[1] & x[2] & x[3] & x[4] & x[5] & x[6]) == 0) + z;
}


x86 assembly (clang, -O0):
<fun_02>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x4(%rcx),%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x5(%rcx),%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x6(%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_02>:
movd   0x1(%rdi),%xmm0
movdqa %xmm0,%xmm1
psrld  $0x10,%xmm1
pand   %xmm0,%xmm1
movdqa %xmm1,%xmm0
psrlw  $0x8,%xmm0
pand   %xmm1,%xmm0
movd   %xmm0,%ecx
and    0x5(%rdi),%cl
and    0x6(%rdi),%cl
mov    %edx,%eax
cmp    $0x1,%cl
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @fun_02(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = and i32 %10, %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = and i32 %15, %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 4
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = and i32 %20, %24
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 5
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = and i32 %25, %29
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 6
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = and i32 %30, %34
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = load i32, i32* %6
%39 = add nsw i32 %37, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @fun_02(i8* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = bitcast i8* %4 to <4 x i8>*
%6 = load <4 x i8>, <4 x i8>* %5
%7 = getelementptr inbounds i8, i8* %0, i64 5
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 6
%10 = load i8, i8* %9
%11 = call i8 @llvm.vector.reduce.and.v4i8(<4 x i8> %6)
%12 = and i8 %11, %8
%13 = and i8 %12, %10
%14 = icmp eq i8 %13, 0
%15 = zext i1 %14 to i32
%16 = add nsw i32 %15, %2
ret i32 %16
}
/* Variables and functions */
int strcmp(char *, char *);
int comp_str(void *lhs, void *rhs) { return strcmp((char *)lhs, (char *)rhs); }


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

x86 assembly (clang, -O2):
<comp_str>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @comp_str(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Timer_ConfigureInterrupt();
int /*<<< orphan*/ Timer_DisableInterrupt();
int /*<<< orphan*/ Timer_EnableInterrupt();
int /*<<< orphan*/ Timer_ResetSystemTime();
void Timer_ConfigureInterruptHandler(void) {
  Timer_DisableInterrupt();
  Timer_ResetSystemTime();
  Timer_ConfigureInterrupt();
  Timer_EnableInterrupt();
}


x86 assembly (clang, -O0):
<Timer_ConfigureInterruptHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Timer_DisableInterrupt@plt>
mov    $0x0,%al
call   1050 <Timer_ResetSystemTime@plt>
mov    $0x0,%al
call   1030 <Timer_ConfigureInterrupt@plt>
mov    $0x0,%al
call   1060 <Timer_EnableInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer_ConfigureInterruptHandler>:
push   %rax
xor    %eax,%eax
call   1040 <Timer_DisableInterrupt@plt>
xor    %eax,%eax
call   1050 <Timer_ResetSystemTime@plt>
xor    %eax,%eax
call   1030 <Timer_ConfigureInterrupt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Timer_EnableInterrupt@plt>

LLVM IR (-O0):
define void @Timer_ConfigureInterruptHandler() {
%1 = call i32 (...) @Timer_DisableInterrupt()
%2 = call i32 (...) @Timer_ResetSystemTime()
%3 = call i32 (...) @Timer_ConfigureInterrupt()
%4 = call i32 (...) @Timer_EnableInterrupt()
ret void
}

LLVM IR (-O2):
define void @Timer_ConfigureInterruptHandler() {
%1 = tail call i32 (...) @Timer_DisableInterrupt()
%2 = tail call i32 (...) @Timer_ResetSystemTime()
%3 = tail call i32 (...) @Timer_ConfigureInterrupt()
%4 = tail call i32 (...) @Timer_EnableInterrupt()
ret void
}
/* Variables and functions */
scalar_t__ bmemdup(char const *, size_t);
char *bstrdup_n(const char *str, size_t n) {
  char *dup;
  if (!str)
    return NULL;
  dup = (char *)bmemdup(str, n + 1);
  dup[n] = 0;
  return dup;
}


x86 assembly (clang, -O0):
<bstrdup_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <bstrdup_n+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1161 <bstrdup_n+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1030 <bmemdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bstrdup_n>:
test   %rdi,%rdi
je     1128 <bstrdup_n+0x18>
push   %rbx
mov    %rsi,%rbx
add    $0x1,%rsi
call   1030 <bmemdup@plt>
movb   $0x0,(%rax,%rbx,1)
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @bstrdup_n(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = add i64 %1, 1
%6 = tail call i64 @bmemdup(i8* %0, i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = getelementptr inbounds i8, i8* %7, i64 %1
store i8 0, i8* %8
br label %9
9: ; preds = %2, %4
%10 = phi i8* [ %7, %4 ], [ null, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xd0() {
  Assert_real((ispunct(208) == 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_ispunct.c",
              1045, ("ispunct should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd0\00"
define void @t_ispunct_0xd0() {
%1 = call i64 @ispunct(i32 208)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd0\00"
define void @t_ispunct_0xd0() {
%1 = tail call i64 @ispunct(i32 208)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lib_verify(unsigned char *, unsigned int, unsigned char *, unsigned int);
int sec_verify(unsigned char *data_buf, unsigned int data_len,
               unsigned char *sig_buf, unsigned int sig_len) {
  return lib_verify(data_buf, data_len, sig_buf, sig_len);
}


x86 assembly (clang, -O0):
<sec_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <lib_verify@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec_verify>:
jmp    1030 <lib_verify@plt>

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

LLVM IR (-O2):
define i32 @sec_verify(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @lib_verify(i8* %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
long fixnumValue(long);
long runtime_fixnumValue(long n) { return fixnumValue(n); }


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

x86 assembly (clang, -O2):
<runtime_fixnumValue>:
jmp    1030 <fixnumValue@plt>

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

LLVM IR (-O2):
define i64 @runtime_fixnumValue(i64 %0) {
%2 = tail call i64 @fixnumValue(i64 %0)
ret i64 %2
}
void mdump_mark_reboot_reason(int mode) {}


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

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

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

LLVM IR (-O2):
define void @mdump_mark_reboot_reason(i32 %0) {
ret void
}
void vnum_result6(int *data) {
  int j = data[1] * data[3];
  if (data[0])
    j = j + 3;
  else
    j = j - 3;
  j = data[2] + j;
  data[j] = 2;
  data[4] = 0;
}


x86 assembly (clang, -O0):
<vnum_result6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
imul   0xc(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1135 <vnum_result6+0x35>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <vnum_result6+0x3e>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movl   $0x0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnum_result6>:
mov    0x8(%rdi),%eax
mov    0xc(%rdi),%ecx
imul   0x4(%rdi),%ecx
cmpl   $0x0,(%rdi)
lea    -0x3(%rax,%rcx,1),%edx
lea    0x3(%rax,%rcx,1),%eax
cmove  %edx,%eax
cltq
movl   $0x2,(%rdi,%rax,4)
movl   $0x0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @vnum_result6(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 3
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, %3
%7 = load i32, i32* %0
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 -3, i32 3
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = load i32, i32* %10
%12 = add i32 %11, %6
%13 = add i32 %12, %9
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %0, i64 %14
store i32 2, i32* %15
%16 = getelementptr inbounds i32, i32* %0, i64 4
store i32 0, i32* %16
ret void
}
int do_564() { return 564; }


x86 assembly (clang, -O0):
<do_564>:
push   %rbp
mov    %rsp,%rbp
mov    $0x234,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_564() {
ret i32 564
}

LLVM IR (-O2):
define i32 @do_564() {
ret i32 564
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void _Usage(int err) {
  const char *str = "usage: barry [-hv] <file>";
  if (err)
    fprintf(stderr, "%s\n", str);
  else
    fprintf(stderr, "%s\n", str);
}


x86 assembly (clang, -O0):
<_Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114e <_Usage+0x3e>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1167 <_Usage+0x57>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xefa(%rip),%rsi
lea    0xed9(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"usage: barry [-hv] <file>\00"
@stderr = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define void @_Usage(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %14
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %3
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %10, %6
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"usage: barry [-hv] <file>\00"
@stderr = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define void @_Usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ i2poll();
void i2flush() {
  while (i2poll())
    ;
}


x86 assembly (clang, -O0):
<i2flush>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <i2flush+0x9>
mov    $0x0,%al
call   1030 <i2poll@plt>
cmp    $0x0,%rax
je     112f <i2flush+0x1f>
jmp    1119 <i2flush+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2flush>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <i2poll@plt>
test   %rax,%rax
jne    1120 <i2flush+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @i2flush() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @i2poll()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @i2flush() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @i2poll()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
int offset(int w, int x, int y) { return x + w * y; }


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

x86 assembly (clang, -O2):
<offset>:
imul   %edx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @offset(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 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = mul nsw i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @offset(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
void wx11rp() {}


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

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

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

LLVM IR (-O2):
define void @wx11rp() {
ret void
}
unsigned char clear_bitmask(void) { return 0b01101110; }


x86 assembly (clang, -O0):
<clear_bitmask>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bitmask>:
mov    $0x6e,%al
ret

LLVM IR (-O0):
define zeroext i8 @clear_bitmask() {
ret i8 110
}

LLVM IR (-O2):
define zeroext i8 @clear_bitmask() {
ret i8 110
}
int test_imm_FCuint8_mem(unsigned char *val) {
  return ((*val) & (-0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff04,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_FCuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 4
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int _DC_file_exists(char *fn) { return (access(fn, F_OK) == 0); }


x86 assembly (clang, -O0):
<_DC_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DC_file_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @_DC_file_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @_DC_file_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int toDecimal(int, int);
int main() {
  int n = 111;
  int b = 2;
  printf("%d at %d = %d\n", n, b, toDecimal(n, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6f,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <toDecimal@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6f,%edi
mov    $0x2,%esi
call   1040 <toDecimal@plt>
lea    0xec9(%rip),%rdi
mov    $0x6f,%esi
mov    $0x2,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d at %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 111, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @toDecimal(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d at %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @toDecimal(i32 111, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 111, i32 2, i32 %1)
ret i32 0
}
/* Variables and functions */
int fabs(double);
int Time_Equal(double a, double b) {
  if (fabs(a - b) < 1e-6)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<Time_Equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1153 <Time_Equal+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115a <Time_Equal+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Time_Equal>:
push   %rax
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Time_Equal(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fsub double %6, %7
%9 = call i32 @fabs(double %8)
%10 = sitofp i32 %9 to double
%11 = fcmp olt double %10, 0x3EB0C6F7A0B5ED8D
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @Time_Equal(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = icmp slt i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
double jd2hjd(dj, ra, dec, sys)
double dj;
double ra;
double dec;
int sys;
{
  double lt;
  lt = suntl(dj, ra, dec, sys);
  return (dj + lt);
}


x86 assembly (clang, -O0):
<jd2hjd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%edi
mov    $0x3,%al
call   1030 <suntl@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jd2hjd>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x3,%al
call   1030 <suntl@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @jd2hjd(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%10 = load double, double* %5
%11 = load double, double* %6
%12 = load double, double* %7
%13 = load i32, i32* %8
%14 = call i32 (double, double, double, i32, ...) bitcast (i32 (...)* @suntl to i32 (double, double, double, i32, ...)*)(double %10, double %11, double %12, i32 %13)
%15 = sitofp i32 %14 to double
store double %15, double* %9
%16 = load double, double* %5
%17 = load double, double* %9
%18 = fadd double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @jd2hjd(double %0, double %1, double %2, i32 %3) {
%5 = tail call i32 (double, double, double, i32, ...) bitcast (i32 (...)* @suntl to i32 (double, double, double, i32, ...)*)(double %0, double %1, double %2, i32 %3)
%6 = sitofp i32 %5 to double
%7 = fadd double %6, %0
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ len(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void print(char *str) { write(1, str, len(str)); }


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <len@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %rdi,%rbx
call   1030 <len@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <write@plt>

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

LLVM IR (-O2):
define void @print(i8* %0) {
%2 = tail call i32 @len(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
ret void
}
/* Type definitions */
struct xhda_node {
  int dummy;
};
struct xhda_codec {
  int dummy;
};

/* Variables and functions */
int set_verb_val(struct xhda_codec *, unsigned int, unsigned int,
                 int /*<<< orphan*/);
int set_cached_verb(struct xhda_codec *codec, struct xhda_node *node,
                    unsigned int cmd) {
  return set_verb_val(codec, (cmd >> 8) & 0x7ff, cmd, 0);
}


x86 assembly (clang, -O0):
<set_cached_verb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
shr    $0x8,%esi
and    $0x7ff,%esi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <set_verb_val@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cached_verb>:
mov    %edx,%esi
shr    $0x8,%esi
and    $0x7ff,%esi
xor    %ecx,%ecx
jmp    1030 <set_verb_val@plt>

LLVM IR (-O0):
%struct.xhda_codec = type { i32 }
%struct.xhda_node = type { i32 }
define i32 @set_cached_verb(%struct.xhda_codec* %0, %struct.xhda_node* %1, i32 %2) {
%4 = alloca %struct.xhda_codec*
%5 = alloca %struct.xhda_node*
%6 = alloca i32
store %struct.xhda_codec* %0, %struct.xhda_codec** %4
store %struct.xhda_node* %1, %struct.xhda_node** %5
store i32 %2, i32* %6
%7 = load %struct.xhda_codec*, %struct.xhda_codec** %4
%8 = load i32, i32* %6
%9 = lshr i32 %8, 8
%10 = and i32 %9, 2047
%11 = load i32, i32* %6
%12 = call i32 @set_verb_val(%struct.xhda_codec* %7, i32 %10, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.xhda_codec = type { i32 }
%struct.xhda_node = type { i32 }
define i32 @set_cached_verb(%struct.xhda_codec* %0, %struct.xhda_node* nocapture readnone %1, i32 %2) {
%4 = lshr i32 %2, 8
%5 = and i32 %4, 2047
%6 = tail call i32 @set_verb_val(%struct.xhda_codec* %0, i32 %5, i32 %2, i32 0)
ret i32 %6
}
int f2(enum {AA = 7, BB} E) {
  int arr1[(AA == 7) ? 1 : -1] = {};
  int arr2[(BB == 8) ? 1 : -1] = {};
  return AA;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0xc(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    $0x7,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f2(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
%4 = alloca [1 x i32]
store i32 %0, i32* %2
%5 = bitcast [1 x i32]* %3 to i8*
%6 = bitcast [1 x i32]* %4 to i8*
ret i32 7
}

LLVM IR (-O2):
define i32 @f2(i32 %0) {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ listGroups();
int /*<<< orphan*/ listUsers();
void listCandidates() {
  listUsers();
  listGroups();
}


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

x86 assembly (clang, -O2):
<listCandidates>:
push   %rax
xor    %eax,%eax
call   1040 <listUsers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <listGroups@plt>

LLVM IR (-O0):
define void @listCandidates() {
%1 = call i32 (...) @listUsers()
%2 = call i32 (...) @listGroups()
ret void
}

LLVM IR (-O2):
define void @listCandidates() {
%1 = tail call i32 (...) @listUsers()
%2 = tail call i32 (...) @listGroups()
ret void
}
int ft_isspace(int c) {
  if (c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == ' ')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
je     1139 <ft_isspace+0x39>
cmpl   $0xa,-0x8(%rbp)
je     1139 <ft_isspace+0x39>
cmpl   $0xc,-0x8(%rbp)
je     1139 <ft_isspace+0x39>
cmpl   $0xd,-0x8(%rbp)
je     1139 <ft_isspace+0x39>
cmpl   $0x20,-0x8(%rbp)
jne    1145 <ft_isspace+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <ft_isspace+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
double dbl_neg_mul_add(double a, double c) { return (-(a * a)) + c; }


x86 assembly (clang, -O0):
<dbl_neg_mul_add>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_neg_mul_add>:
mulsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dbl_neg_mul_add(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = fneg double %7
%9 = load double, double* %4
%10 = fadd double %8, %9
ret double %10
}

LLVM IR (-O2):
define double @dbl_neg_mul_add(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fsub double %1, %3
ret double %4
}
void dd_pbl_ios_tapjoy_request_points() {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_tapjoy_request_points() {
ret void
}
/* Variables and functions */
scalar_t__ nebu_rand();
float nebu_randf(void) { return (float)nebu_rand() / 2147483647; }


x86 assembly (clang, -O0):
<nebu_randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nebu_rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xed8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nebu_randf>:
push   %rax
xor    %eax,%eax
call   1030 <nebu_rand@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @nebu_randf() {
%1 = call i64 (...) @nebu_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 0x41E0000000000000
ret float %3
}

LLVM IR (-O2):
define float @nebu_randf() {
%1 = tail call i64 (...) @nebu_rand()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3E00000000000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int CED_TypeOf1401(int fh) { return ioctl(fh, _IO(0xce, 33)); }


x86 assembly (clang, -O0):
<CED_TypeOf1401>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xce,%edi
mov    $0x21,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CED_TypeOf1401>:
push   %rbx
mov    %edi,%ebx
mov    $0xce,%edi
mov    $0x21,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @CED_TypeOf1401(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 206, i32 33)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @CED_TypeOf1401(i32 %0) {
%2 = tail call i32 @_IO(i32 206, i32 33)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_routine() { printf("Caught a SIGFPE.\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Caught a SIGFPE.\0A\00"
define void @my_routine() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Caught a SIGFPE.\00"
define void @my_routine() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ positive_or_not(int);
int /*<<< orphan*/ print_char(char);
int main(void) {
  positive_or_not(98);
  positive_or_not(0);
  positive_or_not(402);
  positive_or_not(-459);
  print_char('\n');
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x62,%edi
call   1040 <positive_or_not@plt>
xor    %edi,%edi
call   1040 <positive_or_not@plt>
mov    $0x192,%edi
call   1040 <positive_or_not@plt>
mov    $0xfffffe35,%edi
call   1040 <positive_or_not@plt>
mov    $0xa,%edi
call   1030 <print_char@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x62,%edi
call   1040 <positive_or_not@plt>
xor    %edi,%edi
call   1040 <positive_or_not@plt>
mov    $0x192,%edi
call   1040 <positive_or_not@plt>
mov    $0xfffffe35,%edi
call   1040 <positive_or_not@plt>
mov    $0xa,%edi
call   1030 <print_char@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @positive_or_not(i32 98)
%3 = call i32 @positive_or_not(i32 0)
%4 = call i32 @positive_or_not(i32 402)
%5 = call i32 @positive_or_not(i32 -459)
%6 = call i32 @print_char(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @positive_or_not(i32 98)
%2 = tail call i32 @positive_or_not(i32 0)
%3 = tail call i32 @positive_or_not(i32 402)
%4 = tail call i32 @positive_or_not(i32 -459)
%5 = tail call i32 @print_char(i8 signext 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ resetHardA7GSMModule();
void startRecoveryForA7GPSPowerResetFailed(int n) { resetHardA7GSMModule(); }


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

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

LLVM IR (-O0):
define void @startRecoveryForA7GPSPowerResetFailed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @resetHardA7GSMModule()
ret void
}

LLVM IR (-O2):
define void @startRecoveryForA7GPSPowerResetFailed(i32 %0) {
%2 = tail call i32 (...) @resetHardA7GSMModule()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ md5_key_internal(void *, unsigned char *, int);
void md5_key(void *handle, unsigned char *key) {
  md5_key_internal(handle, key, 16);
}


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

x86 assembly (clang, -O2):
<md5_key>:
mov    $0x10,%edx
jmp    1030 <md5_key_internal@plt>

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

LLVM IR (-O2):
define void @md5_key(i8* %0, i8* %1) {
%3 = tail call i32 @md5_key_internal(i8* %0, i8* %1, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *fmalloc(size_t size) {
  void *p;
  if (size == 0)
    return NULL;
  if ((p = malloc(size)) == NULL)
    die("Failed to reserve memory:");
  return p;
}


x86 assembly (clang, -O0):
<fmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <fmalloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    116f <fmalloc+0x4f>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1167 <fmalloc+0x47>
lea    0xe9e(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmalloc>:
push   %rax
test   %rdi,%rdi
je     113e <fmalloc+0x1e>
call   1030 <malloc@plt>
test   %rax,%rax
je     1132 <fmalloc+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1040 <die@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"Failed to reserve memory:\00"
define noalias i8* @fmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @die(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %1 ], [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
int peephole_optimize(struct compilation_unit *cu) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.compilation_unit = type opaque
define i32 @peephole_optimize(%struct.compilation_unit* nocapture readnone %0) {
ret i32 0
}
void add_sample_to_sum_f(float sample, float *coeffs, float *sum) {
  int i;
  for (i = 0; i < 4; i++) {
    sum[i] += sample * coeffs[i];
  }
}


x86 assembly (clang, -O0):
<add_sample_to_sum_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    115c <add_sample_to_sum_f+0x5c>
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <add_sample_to_sum_f+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_sample_to_sum_f>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
addss  (%rsi),%xmm1
movss  %xmm1,(%rsi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
addss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rsi)
movss  0x8(%rdi),%xmm1
mulss  %xmm0,%xmm1
addss  0x8(%rsi),%xmm1
movss  %xmm1,0x8(%rsi)
mulss  0xc(%rdi),%xmm0
addss  0xc(%rsi),%xmm0
movss  %xmm0,0xc(%rsi)
ret

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

LLVM IR (-O2):
define void @add_sample_to_sum_f(float %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %5)
store float %6, float* %2
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = tail call float @llvm.fmuladd.f32(float %0, float %8, float %10)
store float %11, float* %9
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = getelementptr inbounds float, float* %2, i64 2
%15 = load float, float* %14
%16 = tail call float @llvm.fmuladd.f32(float %0, float %13, float %15)
store float %16, float* %14
%17 = getelementptr inbounds float, float* %1, i64 3
%18 = load float, float* %17
%19 = getelementptr inbounds float, float* %2, i64 3
%20 = load float, float* %19
%21 = tail call float @llvm.fmuladd.f32(float %0, float %18, float %20)
store float %21, float* %19
ret void
}