xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow(int, double);
double db_to_vol(double db) { return pow(10., db / 20.); }


x86 assembly (clang, -O0):
<db_to_vol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_to_vol>:
divsd  0xee8(%rip),%xmm0
mov    $0xa,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @db_to_vol(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.000000e+01
%5 = call double @pow(i32 10, double %4)
ret double %5
}

LLVM IR (-O2):
define double @db_to_vol(double %0) {
%2 = fdiv double %0, 2.000000e+01
%3 = tail call double @pow(i32 10, double %2)
ret double %3
}
/* Variables and functions */
scalar_t__ iosr_read();
unsigned int dps_lsflags(void) {
  volatile unsigned int *lsflags;
  lsflags = (unsigned int *)((char *)iosr_read() + 0x1fc);
  return *lsflags;
}


x86 assembly (clang, -O0):
<dps_lsflags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <iosr_read@plt>
add    $0x1fc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dps_lsflags>:
push   %rax
xor    %eax,%eax
call   1030 <iosr_read@plt>
mov    0x1fc(%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dps_lsflags() {
%1 = alloca i32*
%2 = call i64 (...) @iosr_read()
%3 = inttoptr i64 %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 508
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %1
%6 = load i32*, i32** %1
%7 = load volatile i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dps_lsflags() {
%1 = tail call i64 (...) @iosr_read()
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 508
%4 = bitcast i8* %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int redislite_stringmatchlen(char const *, int /*<<< orphan*/, char const *,
                             int /*<<< orphan*/, int);
int /*<<< orphan*/ strlen(char const *);
int redislite_stringmatch(const char *pattern, const char *string, int nocase) {
  return redislite_stringmatchlen(pattern, strlen(pattern), string,
                                  strlen(string), nocase);
}


x86 assembly (clang, -O0):
<redislite_stringmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
mov    -0x14(%rbp),%r8d
call   1030 <redislite_stringmatchlen@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redislite_stringmatch>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
mov    %r14d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <redislite_stringmatchlen@plt>

LLVM IR (-O0):
define i32 @redislite_stringmatch(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 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = load i8*, i8** %5
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
%13 = load i32, i32* %6
%14 = call i32 @redislite_stringmatchlen(i8* %7, i32 %9, i8* %10, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @redislite_stringmatch(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i32 @redislite_stringmatchlen(i8* %0, i32 %4, i8* %1, i32 %5, i32 %2)
ret i32 %6
}
/* Variables and functions */
scalar_t__ checkPall(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char str[10000];
  gets(str);
  if (checkPall(str)) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2720,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x2720(%rbp),%rdi
call   1050 <checkPall@plt>
cmp    $0x0,%rax
je     1175 <main+0x45>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x51>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x2710,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <checkPall@plt>
test   %rax,%rax
lea    0xeaf(%rip),%rax
lea    0xea4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2710,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10000 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%6 = call i64 @checkPall(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca [10000 x i8]
%2 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i64 @checkPall(i8* %2)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
ret i32 0
}
/* Variables and functions */
int daylight;
int /*<<< orphan*/ tzset();
int tm_hasdaylightsavingtimerules(void) {
  tzset();
  return daylight;
}


x86 assembly (clang, -O0):
<tm_hasdaylightsavingtimerules>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tzset@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_hasdaylightsavingtimerules>:
push   %rax
xor    %eax,%eax
call   1030 <tzset@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@daylight = global i32 0
define i32 @tm_hasdaylightsavingtimerules() {
%1 = call i32 (...) @tzset()
%2 = load i32, i32* @daylight
ret i32 %2
}

LLVM IR (-O2):
@daylight = global i32 0
define i32 @tm_hasdaylightsavingtimerules() {
%1 = tail call i32 (...) @tzset()
%2 = load i32, i32* @daylight
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *sys_tmpfile();
FILE *tmpfile(void) {
  FILE *tmp = sys_tmpfile();
  if (tmp != NULL) {
  }
  return tmp;
}


x86 assembly (clang, -O0):
<tmpfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <sys_tmpfile@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1133 <tmpfile+0x23>
jmp    1133 <tmpfile+0x23>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32* @tmpfile() {
%1 = alloca i32*
%2 = call i32* (...) @sys_tmpfile()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = load i32*, i32** %1
ret i32* %7
}

LLVM IR (-O2):
define i32* @tmpfile() {
%1 = tail call i32* (...) @sys_tmpfile()
ret i32* %1
}
/* Variables and functions */
char *strrchr(char *, char);
char *f_basename(char *name) {
  char *p1, *p2;
  p1 = strrchr(name, '/');
  p2 = strrchr(name, '\\');
  if (p1 == NULL || p2 > p1)
    p1 = p2;
  if (p1 == NULL)
    p1 = name;
  else
    p1++;
  return p1;
}


x86 assembly (clang, -O0):
<f_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <f_basename+0x49>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1161 <f_basename+0x51>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <f_basename+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1185 <f_basename+0x75>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_basename>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
cmp    %rbx,%rax
mov    %rbx,%rcx
cmova  %rax,%rcx
test   %rbx,%rbx
cmove  %rax,%rcx
lea    0x1(%rcx),%rax
test   %rcx,%rcx
cmove  %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @f_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = call i8* @strrchr(i8* %7, i8 signext 92)
store i8* %8, i8** %4
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = load i8*, i8** %3
%14 = icmp ugt i8* %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11, %1
%16 = load i8*, i8** %4
store i8* %16, i8** %3
br label %17
17: ; preds = %15, %11
%18 = load i8*, i8** %3
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = load i8*, i8** %2
store i8* %21, i8** %3
br label %25
22: ; preds = %17
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %3
br label %25
25: ; preds = %22, %20
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @f_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 92)
%4 = icmp eq i8* %2, null
%5 = icmp ugt i8* %3, %2
%6 = select i1 %4, i1 true, i1 %5
%7 = select i1 %6, i8* %3, i8* %2
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %0, i8* %9
ret i8* %10
}
int rsa_self_test(int verbose) {
  ((void)verbose);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @rsa_self_test(i32 %0) {
ret i32 0
}
void __stack_chk_fail(void) {}


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

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

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

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

/* Variables and functions */
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
int vsprintf(char *buf, const char *fmt, va_list args) {
  return vsnprintf(buf, ((int)0x7fffffff), fmt, args);
}


x86 assembly (clang, -O0):
<vsprintf>:
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    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x7fffffff,%esi
call   1030 <vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x7fffffff,%esi
jmp    1030 <vsnprintf@plt>

LLVM IR (-O0):
define i32 @vsprintf(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 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @vsnprintf(i8* %7, i32 2147483647, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vsnprintf(i8* %0, i32 2147483647, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __real_main148();
int /*<<< orphan*/ igt_exit();
int /*<<< orphan*/
igt_subtest_init_parse_opts(int *, char **, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  igt_subtest_init_parse_opts(&argc, argv, NULL, NULL, NULL, NULL, NULL);
  __real_main148();
  igt_exit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x4(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rdx
mov    %r9,%rcx
mov    %r9,%r8
movq   $0x0,(%rsp)
call   1050 <igt_subtest_init_parse_opts@plt>
mov    $0x0,%al
call   1030 <__real_main148@plt>
mov    $0x0,%al
call   1040 <igt_exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
movq   $0x0,(%rsp)
lea    0x14(%rsp),%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1050 <igt_subtest_init_parse_opts@plt>
xor    %eax,%eax
call   1030 <__real_main148@plt>
xor    %eax,%eax
call   1040 <igt_exit@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = call i32 @igt_subtest_init_parse_opts(i32* %3, i8** %5, i32* null, i32* null, i32* null, i32* null, i32* null)
%7 = call i32 (...) @__real_main148()
%8 = call i32 (...) @igt_exit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @igt_subtest_init_parse_opts(i32* %3, i8** %1, i32* null, i32* null, i32* null, i32* null, i32* null)
%5 = call i32 (...) @__real_main148()
%6 = call i32 (...) @igt_exit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char first[] = "fishy cakes";
  char verboten[] = "skh";
  squeeze(first, verboten);
  printf("First: %s\n", first);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec3(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x6163207968736966,%rax
20 63 61
mov    %rax,0x10(%rsp)
movl   $0x73656b,0x18(%rsp)
movl   $0x686b73,0xc(%rsp)
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.first = [12 x i8] c"fishy cakes\00"
@__const.main.verboten = [4 x i8] c"skh\00"
@.str = [11 x i8] c"First: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
%3 = alloca [4 x i8]
store i32 0, i32* %1
%4 = bitcast [12 x i8]* %2 to i8*
%5 = bitcast [4 x i8]* %3 to i8*
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%8 = call i32 @squeeze(i8* %6, i8* %7)
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.first = [12 x i8] c"fishy cakes\00"
@.str = [11 x i8] c"First: %s\0A\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
store i32 6843251, i32* %2
%5 = call i32 @squeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ KeccakP200_ExtractBytes(void *, unsigned char *,
                                           unsigned int, int);
unsigned char Ket_StateExtractByte(void *state, unsigned int offset) {
  unsigned char data[1];
  KeccakP200_ExtractBytes(state, data, offset, 1);
  return data[0];
}


x86 assembly (clang, -O0):
<Ket_StateExtractByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xd(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%ecx
call   1030 <KeccakP200_ExtractBytes@plt>
movzbl -0xd(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ket_StateExtractByte>:
push   %rax
mov    %esi,%edx
lea    0x7(%rsp),%rsi
mov    $0x1,%ecx
call   1030 <KeccakP200_ExtractBytes@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @Ket_StateExtractByte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @KeccakP200_ExtractBytes(i8* %6, i8* %7, i32 %8, i32 1)
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%11 = load i8, i8* %10
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @Ket_StateExtractByte(i8* %0, i32 %1) {
%3 = alloca [1 x i8]
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = call i32 @KeccakP200_ExtractBytes(i8* %0, i8* %4, i32 %1, i32 1)
%6 = load i8, i8* %4
ret i8 %6
}
void set_white(unsigned char *bw, int i) { bw[i / 8] &= ~(1 << (7 - i % 8)); }


x86 assembly (clang, -O0):
<set_white>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%esi
shl    %cl,%esi
xor    $0xffffffff,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_white>:
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
mov    %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%esi
mov    $0x7,%cl
sub    %sil,%cl
mov    $0x1,%edx
shl    %cl,%edx
sar    $0x3,%eax
cltq
not    %dl
and    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @set_white(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 = srem i32 %5, 8
%7 = sub nsw i32 7, %6
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = sdiv i32 %11, 8
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %10, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = and i32 %16, %9
%18 = trunc i32 %17 to i8
store i8 %18, i8* %14
ret void
}

LLVM IR (-O2):
define void @set_white(i8* nocapture %0, i32 %1) {
%3 = srem i32 %1, 8
%4 = sub nsw i32 7, %3
%5 = shl nuw nsw i32 1, %4
%6 = sdiv i32 %1, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = trunc i32 %5 to i8
%11 = xor i8 %10, -1
%12 = and i8 %9, %11
store i8 %12, i8* %8
ret void
}
void appendInt(int num, char bool) {
  char buf[22 + 1];
  itos(num, buf);
  appendString(buf);
  if (bool)
    appendString("\n");
}


x86 assembly (clang, -O0):
<appendInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <itos@plt>
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <appendString@plt>
cmpb   $0x0,-0x5(%rbp)
je     1162 <appendInt+0x42>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <appendString@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appendInt>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <itos@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <appendString@plt>
test   %bl,%bl
je     1152 <appendInt+0x32>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <appendString@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @appendInt(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [23 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds [23 x i8], [23 x i8]* %5, i64 0, i64 0
%8 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itos to i32 (i32, i8*, ...)*)(i32 %6, i8* %7)
%9 = getelementptr inbounds [23 x i8], [23 x i8]* %5, i64 0, i64 0
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @appendString to i32 (i8*, ...)*)(i8* %9)
%11 = load i8, i8* %4
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @appendString to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @appendInt(i32 %0, i8 signext %1) {
%3 = alloca [23 x i8]
%4 = getelementptr inbounds [23 x i8], [23 x i8]* %3, i64 0, i64 0
%5 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itos to i32 (i32, i8*, ...)*)(i32 %0, i8* %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @appendString to i32 (i8*, ...)*)(i8* %4)
%7 = icmp eq i8 %1, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @appendString to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ UINT64_C(int);
bool CGROUP_BLKIO_WEIGHT_IS_OK(uint64_t x) {
  return x == ((uint64_t)-1) || (x >= UINT64_C(10) && x <= UINT64_C(1000));
}


x86 assembly (clang, -O0):
<CGROUP_BLKIO_WEIGHT_IS_OK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0xffffffffffffffff,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <CGROUP_BLKIO_WEIGHT_IS_OK+0x6b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0xa,%edi
call   1030 <UINT64_C@plt>
mov    -0x18(%rbp),%rcx
mov    %rax,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0xa(%rbp)
jl     1175 <CGROUP_BLKIO_WEIGHT_IS_OK+0x65>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x3e8,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
setle  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CGROUP_BLKIO_WEIGHT_IS_OK>:
push   %rbx
cmp    $0xffffffffffffffff,%rdi
je     1145 <CGROUP_BLKIO_WEIGHT_IS_OK+0x35>
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
jg     1143 <CGROUP_BLKIO_WEIGHT_IS_OK+0x33>
mov    $0x3e8,%edi
call   1030 <UINT64_C@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
setge  %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CGROUP_BLKIO_WEIGHT_IS_OK(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, -1
br i1 %4, label %15, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i64 @UINT64_C(i32 10)
%8 = icmp sge i64 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i64, i64* %2
%11 = call i64 @UINT64_C(i32 1000)
%12 = icmp sle i64 %10, %11
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br label %15
15: ; preds = %13, %1
%16 = phi i1 [ true, %1 ], [ %14, %13 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @CGROUP_BLKIO_WEIGHT_IS_OK(i64 %0) {
%2 = icmp eq i64 %0, -1
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @UINT64_C(i32 10)
%5 = icmp sgt i64 %4, %0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @UINT64_C(i32 1000)
%8 = icmp sge i64 %7, %0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %3, %6, %1
%11 = phi i32 [ 1, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
struct ZHashTable {
  int dummy;
};

/* Variables and functions */
struct ZHashTable *zcreate_hash_table_with_size(int /*<<< orphan*/);
struct ZHashTable *zcreate_hash_table(void) {
  return zcreate_hash_table_with_size(0);
}


x86 assembly (clang, -O0):
<zcreate_hash_table>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <zcreate_hash_table_with_size@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ZHashTable = type { i32 }
define %struct.ZHashTable* @zcreate_hash_table() {
%1 = call %struct.ZHashTable* @zcreate_hash_table_with_size(i32 0)
ret %struct.ZHashTable* %1
}

LLVM IR (-O2):
%struct.ZHashTable = type { i32 }
define %struct.ZHashTable* @zcreate_hash_table() {
%1 = tail call %struct.ZHashTable* @zcreate_hash_table_with_size(i32 0)
ret %struct.ZHashTable* %1
}
int charcomp(char *x, char *y) { return *x - *y; }


x86 assembly (clang, -O0):
<charcomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charcomp>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @charcomp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
char *strndup(char *, unsigned int);
char *mode_attribute(char *line, unsigned int length) {
  return strndup(line, length);
}


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

x86 assembly (clang, -O2):
<mode_attribute>:
jmp    1030 <strndup@plt>

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

LLVM IR (-O2):
define noalias i8* @mode_attribute(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @strndup(i8* %0, i32 %1)
ret i8* %3
}
void addmul1_nc_1(unsigned long *z, const unsigned long *x,
                  const unsigned long c) {
  __asm__ volatile("    movq    %2, %%rax\n"
                   "    mulq    %[mult]\n"
                   "    addq    %%rax, %0\n"
                   "    adcq    $0, %%rdx\n"
                   "    movq    %%rdx, %%rcx\n"
                   "    addq    %%rcx, %1\n"
                   : "+rm"(z[0]), "+rm"(z[1])
                   : "rm"(x[0]), [mult] "r"(c)
                   : "%rax", "%rcx", "%rdx");
}


x86 assembly (clang, -O0):
<addmul1_nc_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    (%rax),%rdi
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%r8
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mul    %r8
add    %rax,%rdi
adc    $0x0,%rdx
mov    %rdx,%rcx
add    %rcx,%rsi
mov    %rdi,-0x30(%rbp)
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rsi,(%rdx)
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<addmul1_nc_1>:
mov    %rdx,%r8
mov    (%rdi),%r9
mov    0x8(%rdi),%r10
mov    (%rsi),%rax
mov    %rax,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mul    %r8
add    %rax,%r9
adc    $0x0,%rdx
mov    %rdx,%rcx
add    %rcx,%r10
mov    %r9,(%rdi)
mov    %r10,0x8(%rdi)
ret

LLVM IR (-O0):
define void @addmul1_nc_1(i64* %0, i64* %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64 %2, i64* %6
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = load i64*, i64** %4
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = load i64*, i64** %5
%14 = getelementptr inbounds i64, i64* %13, i64 0
%15 = load i64, i64* %14
%16 = load i64, i64* %6
ret void
}

LLVM IR (-O2):
define void @addmul1_nc_1(i64* %0, i64* nocapture %1, i64 %2) {
%4 = load i64, i64* %0
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = load i64, i64* %1
tail call void asm sideeffect " movq $2, %rax\0A mulq $3\0A addq %rax, $0\0A adcq $$0, %rdx\0A movq %rdx, %rcx\0A addq %rcx, $1\0A", "=*rm,=*rm,rm,r,0,1,~{rax},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64* elementtype(i64) %5, i64 %7, i64 %2, i64 %4, i64 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ write_buff_tmp(char *, size_t, int /*<<< orphan*/ *);
void write_buff_tmp_finish(char *buff, size_t length, FILE *fd) {
  if (length)
    write_buff_tmp(buff, length, fd);
  if (fflush(fd) != 0) {
    perror("fflush");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<write_buff_tmp_finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1170 <write_buff_tmp_finish+0x30>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <write_buff_tmp@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fflush@plt>
cmp    $0x0,%rax
je     1199 <write_buff_tmp_finish+0x59>
lea    0xe76(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_buff_tmp_finish>:
push   %rbx
mov    %rdx,%rbx
test   %rsi,%rsi
je     1151 <write_buff_tmp_finish+0x11>
mov    %rbx,%rdx
call   1040 <write_buff_tmp@plt>
mov    %rbx,%rdi
call   1030 <fflush@plt>
test   %rax,%rax
jne    1160 <write_buff_tmp_finish+0x20>
pop    %rbx
ret
lea    0xe99(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fflush\00"
define void @write_buff_tmp_finish(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i64, i64* %5
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = load i64, i64* %5
%12 = load i32*, i32** %6
%13 = call i32 @write_buff_tmp(i8* %10, i64 %11, i32* %12)
br label %14
14: ; preds = %9, %3
%15 = load i32*, i32** %6
%16 = call i64 @fflush(i32* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %14
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fflush\00"
define void @write_buff_tmp_finish(i8* %0, i64 %1, i32* %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @write_buff_tmp(i8* %0, i64 %1, i32* %2)
br label %7
7: ; preds = %5, %3
%8 = tail call i64 @fflush(i32* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %7
ret void
}
void *test_anti_range_119(short n) {
  extern void *alloc_anti_range_119(short) __attribute__((alloc_size(1)));
  if ((-0x7fff - 1) + 2 <= n && n <= 0)
    n = (-0x7fff - 1) + 2 - 1;
  return alloc_anti_range_119(n);
}


x86 assembly (clang, -O0):
<test_anti_range_119>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0xffff8002,%eax
cmp    %ecx,%eax
jg     1143 <test_anti_range_119+0x33>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jg     1143 <test_anti_range_119+0x33>
movw   $0x8001,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_119@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_119>:
lea    0x7ffe(%rdi),%eax
movzwl %ax,%eax
cmp    $0x7fff,%eax
mov    $0x8001,%eax
cmovae %edi,%eax
movswl %ax,%edi
jmp    1030 <alloc_anti_range_119@plt>

LLVM IR (-O0):
define i8* @test_anti_range_119(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp sle i32 -32766, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -32767, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_119(i16 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_119(i16 signext %0) {
%2 = add i16 %0, 32766
%3 = icmp ult i16 %2, 32767
%4 = select i1 %3, i16 -32767, i16 %0
%5 = tail call i8* @alloc_anti_range_119(i16 signext %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ stringLength(char *);
int /*<<< orphan*/ test(int /*<<< orphan*/, int);
void testStringLength(void) {
  test(stringLength("abcde"), 5);
  test(stringLength(""), 0);
}


x86 assembly (clang, -O0):
<testStringLength>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <stringLength@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <test@plt>
lea    0xec2(%rip),%rdi
call   1030 <stringLength@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testStringLength>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <stringLength@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <test@plt>
lea    0xec5(%rip),%rdi
call   1030 <stringLength@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <test@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [1 x i8] zeroinitializer
define void @testStringLength() {
%1 = call i32 @stringLength(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @test(i32 %1, i32 5)
%3 = call i32 @stringLength(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @test(i32 %3, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [1 x i8] zeroinitializer
define void @testStringLength() {
%1 = tail call i32 @stringLength(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @test(i32 %1, i32 5)
%3 = tail call i32 @stringLength(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @test(i32 %3, i32 0)
ret void
}
void _asm_gmegabuf_end(void) {}


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

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

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

LLVM IR (-O2):
define void @_asm_gmegabuf_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void usage(void) {
  static char umsg[] =
      "usage: at [-v] [-c command] time [month month_day | week_day] [file]";
  die(umsg);
}


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

x86 assembly (clang, -O2):
<usage>:
lea    0x2f19(%rip),%rdi
jmp    1030 <die@plt>

LLVM IR (-O0):
@usage.umsg = internal global [69 x i8] c"usage: at [-v] [-c command] time [month month_day | week_day] [file]\00"
define void @usage() {
%1 = call i32 @die(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @usage.umsg, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@usage.umsg = internal global [69 x i8] c"usage: at [-v] [-c command] time [month month_day | week_day] [file]\00"
define void @usage() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @usage.umsg, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int mode_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int umask(int);
int _umask_get(void) {
  mode_t mask;
  mask = umask(0);
  printf("%04o%s", mask, "\n");
  umask(mask);
  return 0;
}


x86 assembly (clang, -O0):
<_umask_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <umask@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
lea    0xec4(%rip),%rdx
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <umask@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_umask_get>:
push   %rbx
xor    %edi,%edi
call   1040 <umask@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
lea    0xecf(%rip),%rdx
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <umask@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%04o%s\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @_umask_get() {
%1 = alloca i32
%2 = call i32 @umask(i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 @umask(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%04o%s\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @_umask_get() {
%1 = tail call i32 @umask(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @umask(i32 %1)
ret i32 0
}
double target(double time, double inc, int movestogo) {
  double safety = (inc < 0.05) ? 20.0 : 2.5;
  double target = (time + (movestogo - 1) * inc - safety) / movestogo;
  return ((target) >= (0.05) ? (target) : (0.05));
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm3
movsd  0xeea(%rip),%xmm2
movsd  0xed2(%rip),%xmm1
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     119c <target+0x9c>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    11ae <target+0xae>
movsd  0xe5c(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    11ae <target+0xae>
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
movsd  0xef8(%rip),%xmm2
xor    %eax,%eax
ucomisd %xmm1,%xmm2
seta   %al
lea    -0x1(%rdi),%ecx
cvtsi2sd %ecx,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm3,%xmm0
lea    0xee1(%rip),%rcx
subsd  (%rcx,%rax,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
divsd  %xmm1,%xmm0
maxsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @target(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%9 = load double, double* %5
%10 = fcmp olt double %9, 5.000000e-02
%11 = zext i1 %10 to i64
%12 = select i1 %10, double 2.000000e+01, double 2.500000e+00
store double %12, double* %7
%13 = load double, double* %4
%14 = load i32, i32* %6
%15 = sub nsw i32 %14, 1
%16 = sitofp i32 %15 to double
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double %16, double %17, double %13)
%19 = load double, double* %7
%20 = fsub double %18, %19
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to double
%23 = fdiv double %20, %22
store double %23, double* %8
%24 = load double, double* %8
%25 = fcmp oge double %24, 5.000000e-02
br i1 %25, label %26, label %28
26: ; preds = %3
%27 = load double, double* %8
br label %29
28: ; preds = %3
br label %29
29: ; preds = %28, %26
%30 = phi double [ %27, %26 ], [ 5.000000e-02, %28 ]
ret double %30
}

LLVM IR (-O2):
define double @target(double %0, double %1, i32 %2) {
%4 = fcmp olt double %1, 5.000000e-02
%5 = select i1 %4, double 2.000000e+01, double 2.500000e+00
%6 = add nsw i32 %2, -1
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double %1, double %0)
%9 = fsub double %8, %5
%10 = sitofp i32 %2 to double
%11 = fdiv double %9, %10
%12 = fcmp oge double %11, 5.000000e-02
%13 = select i1 %12, double %11, double 5.000000e-02
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void turn_on(int fpointer) { write(fpointer, "1", 1); }


x86 assembly (clang, -O0):
<turn_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_on>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
define void @turn_on(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int Ego();
int /*<<< orphan*/ printf(char *, int);
void *printme(void *arg) {
  printf("Hi.  I'm thread %d\n", Ego());
  return NULL;
}


x86 assembly (clang, -O0):
<printme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Ego@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printme>:
push   %rax
xor    %eax,%eax
call   1030 <Ego@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hi. I'm thread %d\0A\00"
define i8* @printme(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @Ego()
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}

LLVM IR (-O2):
@.str = [20 x i8] c"Hi. I'm thread %d\0A\00"
define noalias i8* @printme(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @Ego()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* null
}
void dpi_exit(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Hello !\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int int16_t;

/* Variables and functions */
int encode_signed16(uint8_t *apdu, int16_t value) {
  apdu[0] = (uint8_t)((value & 0xff00) >> 8);
  apdu[1] = (uint8_t)(value & 0x00ff);
  return 2;
}


x86 assembly (clang, -O0):
<encode_signed16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_signed16>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %rcx,(%rdi)
movzbl %al,%eax
mov    %rax,0x8(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @encode_signed16(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 65280
%7 = ashr i32 %6, 8
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 0
store i64 %8, i64* %10
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %3
%15 = getelementptr inbounds i64, i64* %14, i64 1
store i64 %13, i64* %15
ret i32 2
}

LLVM IR (-O2):
define i32 @encode_signed16(i64* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
%5 = zext i32 %4 to i64
store i64 %5, i64* %0
%6 = and i32 %1, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_strerror() {
  printf("NOT IMPLEMENTED:"
         "pa_strerror"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"NOT IMPLEMENTED:pa_strerror\00"
define i32 @pa_strerror() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 undef
}