xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage();
void exit_error(char *msg) {
  fputs(msg, stderr);
  usage();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exit_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x0,%al
call   1040 <usage@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_error>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
call   1040 <usage@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @exit_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = call i32 (...) @usage()
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @exit_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = tail call i32 (...) @usage()
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
char *puthex_digit(char *b, unsigned char digit) {
  char table[] = "0123456789ABCDEF";
  *b++ = table[digit];
  return b;
}


x86 assembly (clang, -O0):
<puthex_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee6(%rip),%al
mov    %al,-0x10(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x20(%rbp,%rax,1),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<puthex_digit>:
mov    %esi,%eax
lea    0xef7(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,(%rdi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
@__const.puthex_digit.table = [17 x i8] c"0123456789ABCDEF\00"
define i8* @puthex_digit(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca [17 x i8]
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = bitcast [17 x i8]* %5 to i8*
%7 = load i8, i8* %4
%8 = zext i8 %7 to i64
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %5, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 %10, i8* %11
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@__const.puthex_digit.table = [17 x i8] c"0123456789ABCDEF\00"
define i8* @puthex_digit(i8* writeonly %0, i8 zeroext %1) {
%3 = zext i8 %1 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @__const.puthex_digit.table, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %0
ret i8* %6
}
void to_sign_char_store(__float128 a, signed char *p) { *p = (signed char)a; }


x86 assembly (clang, -O0):
<to_sign_char_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__fixtfsi>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret
nopw   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<to_sign_char_store>:
push   %rbx
mov    %rdi,%rbx
call   1110 <__fixtfsi>
mov    %al,(%rbx)
pop    %rbx
ret
nopl   (%rax)

LLVM IR (-O0):
define void @to_sign_char_store(fp128 %0, i8* %1) {
%3 = alloca fp128
%4 = alloca i8*
store fp128 %0, fp128* %3
store i8* %1, i8** %4
%5 = load fp128, fp128* %3
%6 = fptosi fp128 %5 to i8
%7 = load i8*, i8** %4
store i8 %6, i8* %7
ret void
}

LLVM IR (-O2):
define void @to_sign_char_store(fp128 %0, i8* nocapture writeonly %1) {
%3 = fptosi fp128 %0 to i8
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_72_ch_97_ch_115_ch_86_ch_97_ch_108_ch_117_ch_101(i8* %0)
ret i32 %2
}
/* Variables and functions */
int double_to_bits(double);
int signbit(double x) { return double_to_bits(x) >> 63; }


x86 assembly (clang, -O0):
<signbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_bits@plt>
mov    $0x3f,%ecx
sar    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signbit>:
jmp    1030 <double_to_bits@plt>

LLVM IR (-O0):
define i32 @signbit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @double_to_bits(double %3)
%5 = ashr i32 %4, 63
ret i32 %5
}

LLVM IR (-O2):
define i32 @signbit(double %0) {
%2 = tail call i32 @double_to_bits(double %0)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x2b() {
  Assert_real((isascii(43)),
              "/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_isascii.c",
              220, ("isascii should be 1 for +"));
}


x86 assembly (clang, -O0):
<t_isascii_0x2b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2b,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xdc,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x2b>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xdc,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for +\00"
define void @t_isascii_0x2b() {
%1 = call i32 @isascii(i32 43)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for +\00"
define void @t_isascii_0x2b() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ hashpipe_ipckey(int);
int /*<<< orphan*/ strtoul(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
key_t hashpipe_status_key(int instance_id) {
  key_t key = ((key_t)-1);
  char *status_key = getenv("HASHPIPE_STATUS_KEY");
  if (status_key) {
    key = strtoul(status_key, NULL, 0);
  } else {
    key = hashpipe_ipckey((instance_id & 0x3f) | 0x40);
  }
  return key;
}


x86 assembly (clang, -O0):
<hashpipe_status_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1174 <hashpipe_status_key+0x44>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1050 <strtoul@plt>
mov    %eax,-0x8(%rbp)
jmp    1185 <hashpipe_status_key+0x55>
mov    -0x4(%rbp),%edi
and    $0x3f,%edi
or     $0x40,%edi
call   1040 <hashpipe_ipckey@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashpipe_status_key>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1151 <hashpipe_status_key+0x21>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
jmp    1050 <strtoul@plt>
and    $0x3f,%ebx
or     $0x40,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <hashpipe_ipckey@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"HASHPIPE_STATUS_KEY\00"
define i32 @hashpipe_status_key(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 -1, i32* %3
%5 = call i8* @getenv(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = call i32 @strtoul(i8* %9, i32* null, i32 0)
store i32 %10, i32* %3
br label %16
11: ; preds = %1
%12 = load i32, i32* %2
%13 = and i32 %12, 63
%14 = or i32 %13, 64
%15 = call i32 @hashpipe_ipckey(i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [20 x i8] c"HASHPIPE_STATUS_KEY\00"
define i32 @hashpipe_status_key(i32 %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strtoul(i8* nocapture %2, i32* null, i32 0)
br label %10
6: ; preds = %1
%7 = and i32 %0, 63
%8 = or i32 %7, 64
%9 = tail call i32 @hashpipe_ipckey(i32 %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ %5, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ eat_the_meal();
scalar_t__ get_yes_no(char *);
int /*<<< orphan*/ msg_print(char *);
void invite_for_meal() {
  msg_print("The occupants invite you in for a meal.");
  if (get_yes_no("Do you accept?")) {
    eat_the_meal();
  }
}


x86 assembly (clang, -O0):
<invite_for_meal>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <msg_print@plt>
lea    0xee1(%rip),%rdi
call   1050 <get_yes_no@plt>
cmp    $0x0,%rax
je     115d <invite_for_meal+0x2d>
mov    $0x0,%al
call   1030 <eat_the_meal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<invite_for_meal>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <msg_print@plt>
lea    0xee4(%rip),%rdi
call   1050 <get_yes_no@plt>
test   %rax,%rax
je     1156 <invite_for_meal+0x26>
xor    %eax,%eax
pop    %rcx
jmp    1030 <eat_the_meal@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [40 x i8] c"The occupants invite you in for a meal.\00"
@.str.1 = [15 x i8] c"Do you accept?\00"
define void @invite_for_meal() {
%1 = call i32 @msg_print(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i64 @get_yes_no(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @eat_the_meal()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"The occupants invite you in for a meal.\00"
@.str.1 = [15 x i8] c"Do you accept?\00"
define void @invite_for_meal() {
%1 = tail call i32 @msg_print(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @get_yes_no(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @eat_the_meal()
br label %6
6: ; preds = %4, %0
ret void
}
doglob(v) char **v;
{
  echo(0, v);
  flush();
}


x86 assembly (clang, -O0):
<doglob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
mov    $0x0,%al
call   1040 <echo@plt>
mov    $0x0,%al
call   1030 <flush@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doglob>:
push   %rax
mov    %rdi,%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1040 <echo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <flush@plt>

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

LLVM IR (-O2):
define i32 @doglob(i8** %0) {
%2 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @echo to i32 (i32, i8**, ...)*)(i32 0, i8** %0)
%3 = tail call i32 (...) @flush()
ret i32 undef
}
/* Variables and functions */
scalar_t__ get_k(double);
double get_edf_bound(double u, int k) {
  if (k <= 0)
    k = (double)get_k(20.0);
  return (k * u) / (k + 2 * (1 - u));
}


x86 assembly (clang, -O0):
<get_edf_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1143 <get_edf_bound+0x33>
movsd  0xece(%rip),%xmm0
call   1030 <get_k@plt>
cvtsi2sd %rax,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
movsd  0xeae(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_edf_bound>:
push   %rax
movapd %xmm0,%xmm2
test   %edi,%edi
jg     1133 <get_edf_bound+0x23>
movsd  0xedf(%rip),%xmm0
movsd  %xmm2,(%rsp)
call   1030 <get_k@plt>
movsd  (%rsp),%xmm2
mov    %rax,%rdi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd  0xec6(%rip),%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_edf_bound(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i64 @get_k(double 2.000000e+01)
%9 = sitofp i64 %8 to double
%10 = fptosi double %9 to i32
store i32 %10, i32* %4
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to double
%14 = load double, double* %3
%15 = fmul double %13, %14
%16 = load i32, i32* %4
%17 = sitofp i32 %16 to double
%18 = load double, double* %3
%19 = fsub double 1.000000e+00, %18
%20 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %19, double %17)
%21 = fdiv double %15, %20
ret double %21
}

LLVM IR (-O2):
define double @get_edf_bound(double %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i64 @get_k(double 2.000000e+01)
%6 = trunc i64 %5 to i32
br label %7
7: ; preds = %4, %2
%8 = phi i32 [ %6, %4 ], [ %1, %2 ]
%9 = sitofp i32 %8 to double
%10 = fmul double %9, %0
%11 = fsub double 1.000000e+00, %0
%12 = tail call double @llvm.fmuladd.f64(double %11, double 2.000000e+00, double %9)
%13 = fdiv double %10, %12
ret double %13
}
int displayTextOcurrencesNoShow(void *index, unsigned char *pattern,
                                unsigned long length, unsigned int radixDisplay,
                                unsigned long *numoccs) {
  return 99;
}


x86 assembly (clang, -O0):
<displayTextOcurrencesNoShow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x63,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @displayTextOcurrencesNoShow(i8* %0, i8* %1, i64 %2, i32 %3, i64* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i64*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store i64* %4, i64** %10
ret i32 99
}

LLVM IR (-O2):
define i32 @displayTextOcurrencesNoShow(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32 %3, i64* nocapture readnone %4) {
ret i32 99
}
unsigned long hash_gd3(char *uri) {
  unsigned long hash = 0;
  int c;
  while ((c = *uri++)) {
    if (c == '?' || c == '\n')
      break;
    hash = c - (hash << 3) + (hash << 15) - hash;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_gd3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     116e <hash_gd3+0x6e>
cmpl   $0x3f,-0x14(%rbp)
je     1142 <hash_gd3+0x42>
cmpl   $0xa,-0x14(%rbp)
jne    1147 <hash_gd3+0x47>
jmp    116e <hash_gd3+0x6e>
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x3,%rcx
sub    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0xf,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_gd3+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_gd3>:
xor    %eax,%eax
movabs $0x8000000000000401,%rcx
jmp    1122 <hash_gd3+0x22>
xchg   %ax,%ax
movsbq %dl,%rdx
add    $0x1,%rdi
imul   $0x7ff7,%rax,%rax
add    %rdx,%rax
movzbl (%rdi),%edx
cmp    $0x3f,%rdx
ja     1110 <hash_gd3+0x10>
bt     %rdx,%rcx
jae    1110 <hash_gd3+0x10>
ret

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

LLVM IR (-O2):
define i64 @hash_gd3(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %10, %6 ]
%4 = phi i8* [ %0, %1 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %11
i8 63, label %11
i8 10, label %11
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = sext i8 %5 to i64
%9 = mul i64 %3, 32759
%10 = add i64 %9, %8
br label %2
11: ; preds = %2, %2, %2
ret i64 %3
}
/* Type definitions */
typedef double uint16_t;

/* Variables and functions */
long uint16_to_light(uint16_t value) {
  return (long)(value * 5000000.0 / 65535);
}


x86 assembly (clang, -O0):
<uint16_to_light>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint16_to_light>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @uint16_to_light(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 5.000000e+06
%5 = fdiv double %4, 6.553500e+04
%6 = fptosi double %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @uint16_to_light(double %0) {
%2 = fmul double %0, 5.000000e+06
%3 = fdiv double %2, 6.553500e+04
%4 = fptosi double %3 to i64
ret i64 %4
}
float kmph2mph(float kmph) { return kmph * (1.0f / 1.609344f); }


x86 assembly (clang, -O0):
<kmph2mph>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmph2mph>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @kmph2mph(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3FE3E245E0000000
ret float %4
}

LLVM IR (-O2):
define float @kmph2mph(float %0) {
%2 = fmul float %0, 0x3FE3E245E0000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x27() {
  Assert_real((isupper(39) == 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",
              200, ("isupper should be 0 for '"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x27>:
push   %rax
mov    $0x27,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xc8,%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 = [26 x i8] c"isupper should be 0 for '\00"
define void @t_isupper_0x27() {
%1 = call i64 @isupper(i32 39)
%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 200, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"isupper should be 0 for '\00"
define void @t_isupper_0x27() {
%1 = tail call i64 @isupper(i32 39)
%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 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *bs_malloc(size_t size) {
  void *thing = malloc(size);
  if (!thing) {
    perror("malloc");
    exit(EXIT_FAILURE);
  }
  return thing;
}


x86 assembly (clang, -O0):
<bs_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <bs_malloc+0x3e>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_malloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <bs_malloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @bs_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ has_flag(char *, int);
int /*<<< orphan*/ mark_invoked(char *);
int dummy_init(void *handle, void *config) {
  mark_invoked("rapp_init");
  if (has_flag("rapp_init", 0x04)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dummy_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <mark_invoked@plt>
lea    0xebd(%rip),%rdi
mov    $0x4,%esi
call   1040 <has_flag@plt>
cmp    $0x0,%rax
je     1163 <dummy_init+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <dummy_init+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_init>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <mark_invoked@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <has_flag@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"rapp_init\00"
define i32 @dummy_init(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @mark_invoked(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i64 @has_flag(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = icmp ne i64 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
unsigned char f8(unsigned char arg) { return arg; }


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @f8(i8 returned zeroext %0) {
ret i8 %0
}
unsigned char pack_config(int maintest, int sideconfig) {
  return (maintest << 4) | sideconfig;
}


x86 assembly (clang, -O0):
<pack_config>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
or     -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_config>:
mov    %edi,%eax
shl    $0x4,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @pack_config(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = shl i32 %5, 4
%7 = load i32, i32* %4
%8 = or i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @pack_config(i32 %0, i32 %1) {
%3 = shl i32 %0, 4
%4 = or i32 %3, %1
%5 = trunc i32 %4 to i8
ret i8 %5
}
void led_init(void) {}


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

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

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

LLVM IR (-O2):
define void @led_init() {
ret void
}
double s_ff_diag(const double *h, const double *d, double zeta, double *kv,
                 int a) {
  return h[a] * d[a] * (2 * zeta) + h[a] * kv[a];
}


x86 assembly (clang, -O0):
<s_ff_diag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xec6(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_ff_diag>:
movslq %ecx,%rax
movsd  (%rdi,%rax,8),%xmm1
movsd  (%rsi,%rax,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm0
mulsd  %xmm2,%xmm0
mulsd  (%rdx,%rax,8),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @s_ff_diag(double* %0, double* %1, double %2, double* %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double
%9 = alloca double*
%10 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store double %2, double* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %6
%12 = load i32, i32* %10
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %7
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = fmul double %15, %20
%22 = load double, double* %8
%23 = fmul double 2.000000e+00, %22
%24 = load double*, double** %6
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %9
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
%33 = load double, double* %32
%34 = fmul double %28, %33
%35 = call double @llvm.fmuladd.f64(double %21, double %23, double %34)
ret double %35
}

LLVM IR (-O2):
define double @s_ff_diag(double* nocapture %0, double* nocapture %1, double %2, double* nocapture %3, i32 %4) {
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds double, double* %0, i64 %6
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 %6
%10 = load double, double* %9
%11 = fmul double %8, %10
%12 = fmul double %2, 2.000000e+00
%13 = getelementptr inbounds double, double* %3, i64 %6
%14 = load double, double* %13
%15 = fmul double %8, %14
%16 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %15)
ret double %16
}
/* Type definitions */
struct perf_event_attr {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int syscall(int, struct perf_event_attr *, int /*<<< orphan*/, int, int,
            unsigned long);
int sys_perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu,
                        int group_fd, unsigned long flags) {
  return syscall(298, attr, pid, cpu, group_fd, flags);
}


x86 assembly (clang, -O0):
<sys_perf_event_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    $0x12a,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_perf_event_open>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x12a,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.perf_event_attr = type { i32 }
define i32 @sys_perf_event_open(%struct.perf_event_attr* %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = alloca %struct.perf_event_attr*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store %struct.perf_event_attr* %0, %struct.perf_event_attr** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load %struct.perf_event_attr*, %struct.perf_event_attr** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i64, i64* %10
%16 = call i32 @syscall(i32 298, %struct.perf_event_attr* %11, i32 %12, i32 %13, i32 %14, i64 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.perf_event_attr = type { i32 }
define i32 @sys_perf_event_open(%struct.perf_event_attr* %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = tail call i32 @syscall(i32 298, %struct.perf_event_attr* %0, i32 %1, i32 %2, i32 %3, i64 %4)
ret i32 %6
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t sha512_ROTR64(uint64_t x, int k) { return (x >> k) | (x << (64 - k)); }


x86 assembly (clang, -O0):
<sha512_ROTR64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha512_ROTR64>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @sha512_ROTR64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @sha512_ROTR64(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
char lwc__dolower(const char c) {
  if (c >= 'A' && c <= 'Z')
    return c + 'a' - 'A';
  return c;
}


x86 assembly (clang, -O0):
<lwc__dolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <lwc__dolower+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <lwc__dolower+0x36>
movsbl -0x2(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    113c <lwc__dolower+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwc__dolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @lwc__dolower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 97
%15 = sub nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @lwc__dolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int BLAS_idamax(int *, double *, int *);
int idamax(int n, double *x, int is) {
  x++;
  return (BLAS_idamax(&n, x, &is));
}


x86 assembly (clang, -O0):
<idamax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
call   1030 <BLAS_idamax@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idamax>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %edx,(%rsp)
add    $0x8,%rsi
lea    0x4(%rsp),%rdi
mov    %rsp,%rdx
call   1030 <BLAS_idamax@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @idamax(i32 %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca i32
store i32 %0, i32* %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i32 1
store double* %8, double** %5
%9 = load double*, double** %5
%10 = call i32 @BLAS_idamax(i32* %4, double* %9, i32* %6)
ret i32 %10
}

LLVM IR (-O2):
define i32 @idamax(i32 %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %2, i32* %5
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = call i32 @BLAS_idamax(i32* %4, double* %6, i32* %5)
ret i32 %7
}
int somma_n(int a, int b) {
  int somma = a + b;
  return somma;
}


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

x86 assembly (clang, -O2):
<somma_n>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @somma_n(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t p264_clip_uint8(int x) { return x & (~255) ? (-x) >> 31 : x; }


x86 assembly (clang, -O0):
<p264_clip_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff00,%eax
cmp    $0x0,%eax
je     1128 <p264_clip_uint8+0x28>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <p264_clip_uint8+0x2e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_clip_uint8>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
neg    %eax
cmp    $0x100,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @p264_clip_uint8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -256
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
%9 = ashr i32 %8, 31
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @p264_clip_uint8(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = icmp sgt i32 %0, 0
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ init_term_unix();
void init_term(void) { init_term_unix(); }


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

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

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

LLVM IR (-O2):
define void @init_term() {
%1 = tail call i32 (...) @init_term_unix()
ret void
}
void yy_1_TableBlockHeader(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TableBlockHeader(i8* nocapture %0, i32 %1) {
ret void
}
void uDMADisable(void) {
  (*((volatile unsigned long *)(0x400FF000 + 0x00000004))) = 0;
}


x86 assembly (clang, -O0):
<uDMADisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400ff004,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMADisable>:
movq   $0x0,0x400ff004
ret

LLVM IR (-O0):
define void @uDMADisable() {
store volatile i64 0, i64* inttoptr (i64 1074786308 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMADisable() {
store volatile i64 0, i64* inttoptr (i64 1074786308 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ echo(int);
main() {
  echo(2 * 10 + 10 * 3);
  echo((2 * (10 + 10)) * 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <echo@plt>
mov    $0x78,%edi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x32,%edi
call   1030 <echo@plt>
mov    $0x78,%edi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @echo(i32 50)
%2 = call i32 @echo(i32 120)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @echo(i32 50)
%2 = tail call i32 @echo(i32 120)
ret i32 0
}
/* Type definitions */
struct rb_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *rb_delete(struct rb_table *, void *);
void *(rb_assert_delete)(struct rb_table *table, void *item) {
  void *p = rb_delete(table, item);
  assert(p != NULL);
  return p;
}


x86 assembly (clang, -O0):
<rb_assert_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <rb_delete@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_assert_delete>:
push   %rbx
call   1040 <rb_delete@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rb_table = type { i32 }
define i8* @rb_assert_delete(%struct.rb_table* %0, i8* %1) {
%3 = alloca %struct.rb_table*
%4 = alloca i8*
%5 = alloca i8*
store %struct.rb_table* %0, %struct.rb_table** %3
store i8* %1, i8** %4
%6 = load %struct.rb_table*, %struct.rb_table** %3
%7 = load i8*, i8** %4
%8 = call i8* @rb_delete(%struct.rb_table* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
%struct.rb_table = type { i32 }
define i8* @rb_assert_delete(%struct.rb_table* %0, i8* %1) {
%3 = tail call i8* @rb_delete(%struct.rb_table* %0, i8* %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* %3
}
/* Variables and functions */
scalar_t__ do16(int);
int do32(int);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(void) {
  printf("do32: 0x%08X\n", do32(0xCafeBabe));
  printf("do16: 0x%08X\n", (unsigned int)do16(0xfeBa));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xcafebabe,%edi
call   1050 <do32@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfeba,%edi
call   1040 <do16@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xcafebabe,%edi
call   1050 <do32@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xfeba,%edi
call   1040 <do16@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"do32: 0x%08X\0A\00"
@.str.1 = [14 x i8] c"do16: 0x%08X\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @do32(i32 -889275714)
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i64 @do16(i32 65210)
%5 = trunc i64 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"do32: 0x%08X\0A\00"
@.str.1 = [14 x i8] c"do16: 0x%08X\0A\00"
define i32 @main() {
%1 = tail call i32 @do32(i32 -889275714)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i64 @do16(i32 65210)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, double, double);
void printreferencefooter(char *name, double referencetime,
                          double referencesd) {
  printf("%s time     = %f microseconds +/- %f\n", name, referencetime,
         1.96 * referencesd);
}


x86 assembly (clang, -O0):
<printreferencefooter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printreferencefooter>:
mov    %rdi,%rsi
mulsd  0xee5(%rip),%xmm1
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"%s time = %f microseconds +/- %f\0A\00"
define void @printreferencefooter(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fmul double 1.960000e+00, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %7, double %8, double %10)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"%s time = %f microseconds +/- %f\0A\00"
define void @printreferencefooter(i8* %0, double %1, double %2) {
%4 = fmul double %2, 1.960000e+00
%5 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0, double %1, double %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendPadInterrupt(void) { SendInterrupt(0x48, 0x8, 0x0100, 0x00000100); }


x86 assembly (clang, -O0):
<ScuSendPadInterrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48,%edi
mov    $0x8,%esi
mov    $0x100,%ecx
mov    %ecx,%edx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendPadInterrupt>:
mov    $0x48,%edi
mov    $0x8,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendPadInterrupt() {
%1 = call i32 @SendInterrupt(i32 72, i32 8, i32 256, i32 256)
ret void
}

LLVM IR (-O2):
define void @ScuSendPadInterrupt() {
%1 = tail call i32 @SendInterrupt(i32 72, i32 8, i32 256, i32 256)
ret void
}