xunge/DecIR huggingface dataset:
float absof(float num) {
  if (num < 0)
    return (-num);
  else
    return (num);
}


x86 assembly (clang, -O0):
<absof>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1132 <absof+0x32>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113c <absof+0x3c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absof>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @absof(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = fneg float %7
store float %8, float* %2
br label %11
9: ; preds = %1
%10 = load float, float* %3
store float %10, float* %2
br label %11
11: ; preds = %9, %6
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @absof(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
double cos(double);
__attribute__((__weak__, __always___)) double softboundcets_cos(double x) {
  return cos(x);
}


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

x86 assembly (clang, -O2):
<softboundcets_cos>:
jmp    1030 <cos@plt>

LLVM IR (-O0):
define weak double @softboundcets_cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cos(double %3)
ret double %4
}

LLVM IR (-O2):
define weak double @softboundcets_cos(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
double vy_x(double x, double y, int T) { return (0.0); }


x86 assembly (clang, -O0):
<vy_x>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vy_x>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @vy_x(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @vy_x(double %0, double %1, i32 %2) {
ret double 0.000000e+00
}
/* Type definitions */
struct tap_enc_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tap_enc_t *);
void tapenc_exit(struct tap_enc_t *tap) { free(tap); }


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

x86 assembly (clang, -O2):
<tapenc_exit>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.tap_enc_t = type { i32 }
define void @tapenc_exit(%struct.tap_enc_t* nocapture %0) {
%2 = tail call i32 @free(%struct.tap_enc_t* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_help(void) {
  printf(
      "Usage: %s [OPTION]...\n\n Options:\n     -a, --access\tonly change "
      "access time\n     -m, --modification\tonly change modification time\n   "
      "  -c, --nocreate\tdon't create the file if it doesn't exist\n     -n, "
      "--nodereference\taffect each symbolic link instead of any referenced "
      "file\n     -h, --help\t\tdisplay this help\n    -V, --version\tdisplay "
      "version information\n\nReport bugs to <bulliver@gmail.com>\n",
      "touch");
}


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

x86 assembly (clang, -O2):
<show_help>:
lea    0xee9(%rip),%rdi
lea    0x106a(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [392 x i8] c"Usage: %s [OPTION]...\0A\0A Options:\0A -a, --access\09only change access time\0A -m, --modification\09only change modification time\0A -c, --nocreate\09don't create the file if it doesn't exist\0A -n, --nodereference\09affect each symbolic link instead of any referenced file\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [6 x i8] c"touch\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([392 x i8], [392 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [392 x i8] c"Usage: %s [OPTION]...\0A\0A Options:\0A -a, --access\09only change access time\0A -m, --modification\09only change modification time\0A -c, --nocreate\09don't create the file if it doesn't exist\0A -n, --nodereference\09affect each symbolic link instead of any referenced file\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [6 x i8] c"touch\00"
define void @show_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([392 x i8], [392 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
long long __fixunssfdi(float);
long long __fixsfdi(float a1) {
  long long ret;
  int s;
  ret = __fixunssfdi((s = a1 >= 0) ? a1 : -a1);
  return s ? ret : -ret;
}


x86 assembly (clang, -O0):
<__fixsfdi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1133 <__fixsfdi+0x33>
jmp    1142 <__fixsfdi+0x42>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1159 <__fixsfdi+0x59>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   11a0 <__fixunssfdi>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     117e <__fixsfdi+0x7e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1188 <__fixsfdi+0x88>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<__fixsfdi>:
sub    $0x18,%rsp
movaps %xmm0,%xmm3
movaps %xmm0,(%rsp)
movaps 0xeee(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cmpless %xmm3,%xmm0
movaps %xmm0,%xmm2
andps  %xmm3,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
call   1150 <__fixunssfdi>
mov    %rax,%rcx
neg    %rcx
movaps (%rsp),%xmm0
ucomiss 0xed1(%rip),%xmm0
cmovb  %rcx,%rax
add    $0x18,%rsp
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define i64 @__fixsfdi(float %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca i32
store float %0, float* %2
%5 = load float, float* %2
%6 = fcmp oge float %5, 0.000000e+00
%7 = zext i1 %6 to i32
store i32 %7, i32* %4
br i1 %6, label %8, label %10
8: ; preds = %1
%9 = load float, float* %2
br label %13
10: ; preds = %1
%11 = load float, float* %2
%12 = fneg float %11
br label %13
13: ; preds = %10, %8
%14 = phi float [ %9, %8 ], [ %12, %10 ]
%15 = call i64 @__fixunssfdi(float %14)
store i64 %15, i64* %3
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13
%19 = load i64, i64* %3
br label %23
20: ; preds = %13
%21 = load i64, i64* %3
%22 = sub nsw i64 0, %21
br label %23
23: ; preds = %20, %18
%24 = phi i64 [ %19, %18 ], [ %22, %20 ]
ret i64 %24
}

LLVM IR (-O2):
define i64 @__fixsfdi(float %0) {
%2 = fcmp oge float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
%5 = tail call i64 @__fixunssfdi(float %4)
%6 = sub nsw i64 0, %5
%7 = select i1 %2, i64 %5, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Starting system call . . .\n");
  system("ls -l");
  printf("Done with system call\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Starting system call . . .\0A\00"
@.str.1 = [6 x i8] c"ls -l\00"
@.str.2 = [23 x i8] c"Done with system call\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"ls -l\00"
@str = [27 x i8] c"Starting system call . . .\00"
@str.3 = [22 x i8] c"Done with system call\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
void *yy_flex_realloc(ptr, size) void *ptr;
int size;
{ return (void *)realloc(ptr, (unsigned)size); }


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

x86 assembly (clang, -O2):
<yy_flex_realloc>:
mov    %esi,%esi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @yy_flex_realloc(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 = zext i32 %6 to i64
%8 = call i8* @realloc(i8* %5, i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @yy_flex_realloc(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i8* @realloc(i8* %0, i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err_quit(char *message) {
  fprintf(stderr, "%s\n", message);
  exit(0);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @err_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @err_quit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, int,
                          char const *);
void _mecho(const char *pref, const char *str, const char *fs, int ll, int nl) {
  if (nl)
    printf("%s: (%s,%d) %s\n", pref, fs, ll, str);
  else
    printf("%s: (%s,%d) %s", pref, fs, ll, str);
}


x86 assembly (clang, -O0):
<_mecho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1155 <_mecho+0x45>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <_mecho+0x60>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mecho>:
mov    %rsi,%rax
mov    %rdi,%rsi
test   %r8d,%r8d
lea    0xef0(%rip),%r8
lea    0xed9(%rip),%rdi
cmove  %r8,%rdi
mov    %rax,%r8
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"%s: (%s,%d) %s\0A\00"
@.str.1 = [15 x i8] c"%s: (%s,%d) %s\00"
define void @_mecho(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8* %0, i8* %2, i32 %3, i8* %1)
ret void
}
void update_disp_left(void) {}


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

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

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

LLVM IR (-O2):
define void @update_disp_left() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ my_main();
void _start(void) {
  (void)my_main();
  exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <my_main@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %eax,%eax
call   1040 <my_main@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @my_main()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @my_main()
%2 = tail call i32 @exit(i32 0)
unreachable
}
int len_strstr(char const *str) {
  int i = 0;
  while (str[i] != '\0')
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<len_strstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <len_strstr+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <len_strstr+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @len_strstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ AUDIO_STOP;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int audioStop(int fd) {
  int ans;
  if ((ans = ioctl(fd, AUDIO_STOP, 0)) < 0) {
    perror("AUDIO STOP: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<audioStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <ioctl@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1162 <audioStop+0x42>
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <audioStop+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audioStop>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %ebx,%ebx
xor    %edx,%edx
call   1030 <ioctl@plt>
test   %eax,%eax
js     113b <audioStop+0x1b>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%ebx
jmp    1137 <audioStop+0x17>

LLVM IR (-O0):
@AUDIO_STOP = global i32 0
@.str = [13 x i8] c"AUDIO STOP: \00"
define i32 @audioStop(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @AUDIO_STOP
%7 = call i32 @ioctl(i32 %5, i32 %6, i32 0)
store i32 %7, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@AUDIO_STOP = global i32 0
@.str = [13 x i8] c"AUDIO STOP: \00"
define i32 @audioStop(i32 %0) {
%2 = load i32, i32* @AUDIO_STOP
%3 = tail call i32 @ioctl(i32 %0, i32 %2, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
__attribute__((always_)) void BEUnpackUint16(uint16_t *data,
                                             const uint8_t container[2]) {
  *data = (uint16_t)container[1] | ((uint16_t)container[0] << 8);
}


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

x86 assembly (clang, -O2):
<BEUnpackUint16>:
mov    (%rsi),%eax
shl    $0x8,%eax
or     0x8(%rsi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @BEUnpackUint16(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 1
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = load i64*, i64** %4
%10 = getelementptr inbounds i64, i64* %9, i64 0
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
%15 = load i32*, i32** %3
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @BEUnpackUint16(i32* nocapture writeonly %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = load i64, i64* %1
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = or i32 %8, %5
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __raw_local_save_flags();
int raw_irqs_disabled_flags(int /*<<< orphan*/);
int raw_irqs_disabled(void) {
  return raw_irqs_disabled_flags(__raw_local_save_flags());
}


x86 assembly (clang, -O0):
<raw_irqs_disabled>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <__raw_local_save_flags@plt>
mov    %eax,%edi
call   1040 <raw_irqs_disabled_flags@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_irqs_disabled>:
push   %rax
xor    %eax,%eax
call   1030 <__raw_local_save_flags@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <raw_irqs_disabled_flags@plt>

LLVM IR (-O0):
define i32 @raw_irqs_disabled() {
%1 = call i32 (...) @__raw_local_save_flags()
%2 = call i32 @raw_irqs_disabled_flags(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @raw_irqs_disabled() {
%1 = tail call i32 (...) @__raw_local_save_flags()
%2 = tail call i32 @raw_irqs_disabled_flags(i32 %1)
ret i32 %2
}
int foo(int c) {
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k < 5; k++) {
        c += i;
        c *= j;
      }
    }
    if (c > 100)
      return c;
  }
  c++;
  return c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1196 <foo+0x96>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    116e <foo+0x6e>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    115b <foo+0x5b>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <foo+0x30>
jmp    1160 <foo+0x60>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <foo+0x1f>
cmpl   $0x64,-0x8(%rbp)
jle    1183 <foo+0x83>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11a5 <foo+0xa5>
jmp    1188 <foo+0x88>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <foo+0xe>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %38, %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %41
10: ; preds = %7
store i32 0, i32* %5
br label %11
11: ; preds = %29, %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %32
14: ; preds = %11
store i32 0, i32* %6
br label %15
15: ; preds = %25, %14
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 5
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = add nsw i32 %20, %19
store i32 %21, i32* %3
%22 = load i32, i32* %5
%23 = load i32, i32* %3
%24 = mul nsw i32 %23, %22
store i32 %24, i32* %3
br label %25
25: ; preds = %18
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %15
28: ; preds = %15
br label %29
29: ; preds = %28
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %11
32: ; preds = %11
%33 = load i32, i32* %3
%34 = icmp sgt i32 %33, 100
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = load i32, i32* %3
store i32 %36, i32* %2
br label %45
37: ; preds = %32
br label %38
38: ; preds = %37
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %7
41: ; preds = %7
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
store i32 %43, i32* %3
%44 = load i32, i32* %3
store i32 %44, i32* %2
br label %45
45: ; preds = %41, %35
%46 = load i32, i32* %2
ret i32 %46
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 222
}
void receive_message(int conn) {}


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

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

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

LLVM IR (-O2):
define void @receive_message(i32 %0) {
ret void
}
int test_imm_E1int32_reg(int val) { return ((val) & (0xE1 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_E1int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xe1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E1int32_reg>:
test   $0xe1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E1int32_reg(i32 %0) {
%2 = and i32 %0, 225
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_136(void) {
  if ((*(uint32_t *)0x10000130ul == 0xAul) &&
      (*(uint32_t *)0x10000134ul == 0x0ul)) {
    return true;
  }
  return true;
}


x86 assembly (clang, -O0):
<errata_136>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000130,%eax
movslq (%rax),%rax
cmp    $0xa,%rax
jne    1134 <errata_136+0x34>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x0,%rax
jne    1134 <errata_136+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <errata_136+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @errata_136() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 268435760 to i32*)
%3 = sext i32 %2 to i64
%4 = icmp eq i64 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 268435764 to i32*)
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %11
10: ; preds = %5, %0
store i32 1, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @errata_136() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ r4030_delay();
extern void r4030_write_reg16(unsigned addr, unsigned val) {
  *((volatile unsigned short *)addr) = val;
  r4030_delay();
}


x86 assembly (clang, -O0):
<r4030_write_reg16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %ax,%cx
mov    -0x4(%rbp),%eax
mov    %cx,(%rax)
mov    $0x0,%al
call   1030 <r4030_delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r4030_write_reg16>:
mov    %edi,%eax
mov    %si,(%rax)
xor    %eax,%eax
jmp    1030 <r4030_delay@plt>

LLVM IR (-O0):
define void @r4030_write_reg16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i16
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i16*
store volatile i16 %6, i16* %9
%10 = call i32 (...) @r4030_delay()
ret void
}

LLVM IR (-O2):
define void @r4030_write_reg16(i32 %0, i32 %1) {
%3 = trunc i32 %1 to i16
%4 = zext i32 %0 to i64
%5 = inttoptr i64 %4 to i16*
store volatile i16 %3, i16* %5
%6 = tail call i32 (...) @r4030_delay()
ret void
}
void output_y_to_x() {}


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

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

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

LLVM IR (-O2):
define void @output_y_to_x() {
ret void
}
/* Variables and functions */
int gf_inv(int const);
int gf_mul(int const, int);
int gf_div(const int x, const int y) {
  if (x == 0) {
    return 0;
  }
  if (y == 0) {
    return -1;
  }
  int inverse = gf_inv(y);
  return gf_mul(x, inverse);
}


x86 assembly (clang, -O0):
<gf_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1144 <gf_div+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1173 <gf_div+0x53>
cmpl   $0x0,-0xc(%rbp)
jne    115a <gf_div+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <gf_div+0x53>
mov    -0xc(%rbp),%edi
call   1030 <gf_inv@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <gf_mul@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_div>:
test   %edi,%edi
je     113c <gf_div+0x1c>
test   %esi,%esi
je     113f <gf_div+0x1f>
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <gf_inv@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <gf_mul@plt>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @gf_div(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = tail call i32 @gf_inv(i32 %1)
%8 = tail call i32 @gf_mul(i32 %0, i32 %7)
br label %9
9: ; preds = %4, %2, %6
%10 = phi i32 [ %8, %6 ], [ 0, %2 ], [ -1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xb4() {
  Assert_real((isupper(180) == 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_isupper.c",
              905, ("isupper should be 0 for 0xb4"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xb4>:
push   %rax
mov    $0xb4,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x389,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb4\00"
define void @t_isupper_0xb4() {
%1 = call i64 @isupper(i32 180)
%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 905, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb4\00"
define void @t_isupper_0xb4() {
%1 = tail call i64 @isupper(i32 180)
%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 905, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ power_mod(unsigned int, unsigned int, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *, unsigned int *,
                         unsigned int *);
int main(int argc, char **argv) {
  unsigned int x, y, a;
  scanf("%u %u %u", &x, &y, &a);
  power_mod(x, y, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1030 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <power_mod@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1030 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1040 <power_mod@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%u %u %u\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @power_mod(i32 %10, i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%u %u %u\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @power_mod(i32 %10, i32 %11, i32 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HSMMCSDIntrStatusEnable(unsigned int, unsigned int);
void HSMMCSDIntrEnable(unsigned int baseAddr, unsigned int flag) {
  (*((volatile unsigned int *)(baseAddr + (0x238)))) |= flag;
  HSMMCSDIntrStatusEnable(baseAddr, flag);
}


x86 assembly (clang, -O0):
<HSMMCSDIntrEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x238,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <HSMMCSDIntrStatusEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDIntrEnable>:
lea    0x238(%rdi),%eax
or     %esi,(%rax)
jmp    1030 <HSMMCSDIntrStatusEnable@plt>

LLVM IR (-O0):
define void @HSMMCSDIntrEnable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = add i32 %6, 568
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %5
store volatile i32 %11, i32* %9
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @HSMMCSDIntrStatusEnable(i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @HSMMCSDIntrEnable(i32 %0, i32 %1) {
%3 = add i32 %0, 568
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, %1
store volatile i32 %7, i32* %5
%8 = tail call i32 @HSMMCSDIntrStatusEnable(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
double pow(double, int);
double cbrt(double x) {
  if (x < 0)
    return -pow(-x, 1 / 3.0);
  else
    return pow(x, 1 / 3.0);
}


x86 assembly (clang, -O0):
<cbrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116f <cbrt+0x5f>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
xor    %edi,%edi
call   1030 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1180 <cbrt+0x70>
movsd  -0x10(%rbp),%xmm0
xor    %edi,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1134 <cbrt+0x24>
push   %rax
xorpd  0xedd(%rip),%xmm0
xor    %edi,%edi
call   1030 <pow@plt>
xorpd  0xece(%rip),%xmm0
pop    %rax
ret
xor    %edi,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @cbrt(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
%9 = call double @pow(double %8, i32 0)
%10 = fneg double %9
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = call double @pow(double %12, i32 0)
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @cbrt(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fneg double %0
%5 = tail call double @pow(double %4, i32 0)
%6 = fneg double %5
br label %9
7: ; preds = %1
%8 = tail call double @pow(double %0, i32 0)
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ endpolygon();
void endpolygon_() { endpolygon(); }


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

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

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

LLVM IR (-O2):
define void @endpolygon_() {
%1 = tail call i32 (...) @endpolygon()
ret void
}
/* Variables and functions */
void _Locale_final(void) {}


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

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

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

LLVM IR (-O2):
define void @_Locale_final() {
ret void
}
/* Variables and functions */
int longGreaterThan(void const *, void const *);
int longLessThan(const void *a, const void *b) { return longGreaterThan(b, a); }


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

x86 assembly (clang, -O2):
<longLessThan>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <longGreaterThan@plt>

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

LLVM IR (-O2):
define i32 @longLessThan(i8* %0, i8* %1) {
%3 = tail call i32 @longGreaterThan(i8* %1, i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcoll(char *, char *);
void uninitvar_strcoll(void) {
  char *cs;
  char *ct;
  (void)strcoll(cs, ct);
}


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

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

LLVM IR (-O0):
define void @uninitvar_strcoll() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcoll(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strcoll() {
ret void
}
void ecl2fk4(dtheta, dphi, epoch) double *dtheta;
double *dphi;
double epoch;
{
  void ecl2fk5(), fk524e();
  ecl2fk5(dtheta, dphi, epoch);
  fk524e(dtheta, dphi, epoch);
  return;
}


x86 assembly (clang, -O0):
<ecl2fk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <ecl2fk5@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1040 <fk524e@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecl2fk4>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%al
call   1030 <ecl2fk5@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
movsd  (%rsp),%xmm0
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fk524e@plt>

LLVM IR (-O0):
define void @ecl2fk4(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load double, double* %6
%10 = load double*, double** %4
%11 = load double*, double** %5
%12 = load double, double* %6
ret void
}

LLVM IR (-O2):
define void @ecl2fk4(double* %0, double* %1, double %2) {
tail call void (double*, double*, double, ...) bitcast (void (...)* @ecl2fk5 to void (double*, double*, double, ...)*)(double* %0, double* %1, double %2)
tail call void (double*, double*, double, ...) bitcast (void (...)* @fk524e to void (double*, double*, double, ...)*)(double* %0, double* %1, double %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ static_assert(int);
scalar_t__ unknown1();
void main() {
  int x = 1;
  int y = 1;
  while (unknown1()) {
    int t1 = x;
    int t2 = y;
    x = t1 + t2;
    y = t1 + t2;
  }
  static_assert(y >= 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <unknown1@plt>
cmp    $0x0,%rax
je     116a <main+0x4a>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
cmpl   $0x1,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%ebx
xor    %eax,%eax
call   1030 <unknown1@plt>
lea    (%rbx,%rbx,1),%ecx
test   %rax,%rax
jne    1130 <main+0x10>
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
pop    %rbx
jmp    1040 <static_assert@plt>

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

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = tail call i64 (...) @unknown1()
%4 = icmp eq i64 %3, 0
%5 = shl nsw i32 %2, 1
br i1 %4, label %6, label %1
6: ; preds = %1
%7 = icmp sgt i32 %2, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @static_assert(i32 %8)
ret void
}
/* Variables and functions */
int keyboard_getStatus();
unsigned char keyboard_hasData() { return !!(keyboard_getStatus() & 0x01); }


x86 assembly (clang, -O0):
<keyboard_hasData>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <keyboard_getStatus@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard_hasData>:
push   %rax
xor    %eax,%eax
call   1030 <keyboard_getStatus@plt>
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @keyboard_hasData() {
%1 = call i32 (...) @keyboard_getStatus()
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @keyboard_hasData() {
%1 = tail call i32 (...) @keyboard_getStatus()
%2 = trunc i32 %1 to i8
%3 = and i8 %2, 1
ret i8 %3
}
/* Variables and functions */
char *lower(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc == 2)
    printf("%s\n", lower(argv[1]));
  else
    printf("I need a \"string\"\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1163 <main+0x43>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <lower@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1171 <main+0x51>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1134 <main+0x14>
mov    0x8(%rsi),%rdi
call   1040 <lower@plt>
mov    %rax,%rdi
jmp    113b <main+0x1b>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [19 x i8] c"I need a \22string\22\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i8* @lower(i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %16
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@str = [18 x i8] c"I need a \22string\22\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i8* @lower(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), %2 ]
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}