xunge/DecIR huggingface dataset:
/* Variables and functions */
double log(double);
double pdfStandard(double);
double pdfLognormal(double a, double b, double x) {
  double t = (log(x) - a) / b;
  return (pdfStandard(t) / (b * x));
}


x86 assembly (clang, -O0):
<pdfLognormal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <log@plt>
subsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <pdfStandard@plt>
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdfLognormal>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
call   1040 <log@plt>
subsd  0x8(%rsp),%xmm0
divsd  (%rsp),%xmm0
call   1030 <pdfStandard@plt>
movsd  (%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @pdfLognormal(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %6
%9 = call double @log(double %8)
%10 = load double, double* %4
%11 = fsub double %9, %10
%12 = load double, double* %5
%13 = fdiv double %11, %12
store double %13, double* %7
%14 = load double, double* %7
%15 = call double @pdfStandard(double %14)
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = fdiv double %15, %18
ret double %19
}

LLVM IR (-O2):
define double @pdfLognormal(double %0, double %1, double %2) {
%4 = tail call double @log(double %2)
%5 = fsub double %4, %0
%6 = fdiv double %5, %1
%7 = tail call double @pdfStandard(double %6)
%8 = fmul double %1, %2
%9 = fdiv double %7, %8
ret double %9
}
int test_005(int a, int b, int c) {
  int x = a < 0;
  return c - (b + x);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
sar    $0x1f,%edi
sub    %esi,%edi
lea    (%rdi,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @test_005(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
%10 = zext i1 %9 to i32
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
%15 = sub nsw i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @test_005(i32 %0, i32 %1, i32 %2) {
%4 = ashr i32 %0, 31
%5 = sub i32 %4, %1
%6 = add i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int *alloca(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int *);
main() {
  int *ptr = alloca(sizeof(int));
  *ptr = 5;
  foo(ptr);
  if (*ptr == 5)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <foo@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x5,(%rax)
jne    1184 <main+0x44>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <alloca@plt>
mov    %rax,%rbx
movl   $0x5,(%rax)
mov    %rax,%rdi
call   1050 <foo@plt>
cmpl   $0x5,(%rbx)
jne    1168 <main+0x28>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @alloca(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
store i32 5, i32* %4
%5 = load i32*, i32** %2
%6 = call i32 @foo(i32* %5)
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 5
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @alloca(i32 4)
store i32 5, i32* %1
%2 = tail call i32 @foo(i32* %1)
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 5
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Cffdelt(int, int *);
extern void ftdelt_(int *A1, int *A2) {
  ;
  Cffdelt(*A1, A2);
  return;
}


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

x86 assembly (clang, -O2):
<ftdelt_>:
mov    (%rdi),%edi
jmp    1030 <Cffdelt@plt>

LLVM IR (-O0):
define void @ftdelt_(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* %5
%7 = load i32*, i32** %4
%8 = call i32 @Cffdelt(i32 %6, i32* %7)
ret void
}

LLVM IR (-O2):
define void @ftdelt_(i32* nocapture %0, i32* %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @Cffdelt(i32 %3, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void print_n(unsigned int num, unsigned int scale) {
  if (num < scale)
    printf("%u", num);
  else {
    print_n(num / scale, scale);
    printf("%u", num % scale);
  }
}


x86 assembly (clang, -O0):
<print_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    114e <print_n+0x2e>
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <print_n+0x56>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1040 <print_n@plt>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_n>:
push   %rbx
mov    %edi,%ebx
cmp    %esi,%edi
jb     1136 <print_n+0x16>
mov    %ebx,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%ebx
mov    %eax,%edi
call   1040 <print_n@plt>
lea    0xec3(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define void @print_n(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %20
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = udiv i32 %12, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = urem i32 %16, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @print_n(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
br i1 %3, label %4, label %7
4: ; preds = %2, %7
%5 = phi i32 [ %9, %7 ], [ %0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
7: ; preds = %2
%8 = udiv i32 %0, %1
tail call void @print_n(i32 %8, i32 %1)
%9 = urem i32 %0, %1
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ beClient();
int /*<<< orphan*/ createVorrat();
int /*<<< orphan*/ printNL();
int /*<<< orphan*/ printSharpRow(int);
int /*<<< orphan*/ printf(char *);
void prepare() {
  createVorrat();
  printf("Inital LOG [\t Try to create Client\t]\n");
  beClient();
  printSharpRow(70);
  printNL();
}


x86 assembly (clang, -O0):
<prepare>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <createVorrat@plt>
lea    0xe9e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <beClient@plt>
mov    $0x46,%edi
call   1070 <printSharpRow@plt>
mov    $0x0,%al
call   1030 <printNL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare>:
push   %rax
xor    %eax,%eax
call   1060 <createVorrat@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <beClient@plt>
mov    $0x46,%edi
call   1070 <printSharpRow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <printNL@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Inital LOG [\09 Try to create Client\09]\0A\00"
define void @prepare() {
%1 = call i32 (...) @createVorrat()
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @beClient()
%4 = call i32 @printSharpRow(i32 70)
%5 = call i32 (...) @printNL()
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"Inital LOG [\09 Try to create Client\09]\00"
define void @prepare() {
%1 = tail call i32 (...) @createVorrat()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @beClient()
%4 = tail call i32 @printSharpRow(i32 70)
%5 = tail call i32 (...) @printNL()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_SIGN_ENVELOPE;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_SIGN_ENVELOPE_it;
void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a) {
  ASN1_item_free((ASN1_VALUE *)a, &PKCS7_SIGN_ENVELOPE_it);
}


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

x86 assembly (clang, -O2):
<PKCS7_SIGN_ENVELOPE_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@PKCS7_SIGN_ENVELOPE_it = global i32 0
define void @PKCS7_SIGN_ENVELOPE_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @PKCS7_SIGN_ENVELOPE_it)
ret void
}

LLVM IR (-O2):
@PKCS7_SIGN_ENVELOPE_it = global i32 0
define void @PKCS7_SIGN_ENVELOPE_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS7_SIGN_ENVELOPE_it)
ret void
}
/* Variables and functions */
int toupper(int);
int CMUTIL_StringHexChar(int inp) {
  int ic = toupper(inp);
  if (ic >= 'A' && ic <= 'F')
    return 10 + (ic - 'A');
  else if (ic >= '0' && ic <= '9')
    return ic - '0';
  else
    return -1;
}


x86 assembly (clang, -O0):
<CMUTIL_StringHexChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <toupper@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x41,-0xc(%rbp)
jl     114b <CMUTIL_StringHexChar+0x3b>
cmpl   $0x46,-0xc(%rbp)
jg     114b <CMUTIL_StringHexChar+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <CMUTIL_StringHexChar+0x64>
cmpl   $0x30,-0xc(%rbp)
jl     116d <CMUTIL_StringHexChar+0x5d>
cmpl   $0x39,-0xc(%rbp)
jg     116d <CMUTIL_StringHexChar+0x5d>
mov    -0xc(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <CMUTIL_StringHexChar+0x64>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMUTIL_StringHexChar>:
push   %rax
call   1030 <toupper@plt>
lea    -0x41(%rax),%ecx
lea    -0x37(%rax),%edx
add    $0xffffffd0,%eax
cmp    $0xa,%eax
mov    $0xffffffff,%esi
cmovae %esi,%eax
cmp    $0x6,%ecx
cmovb  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CMUTIL_StringHexChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @toupper(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 65
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 70
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %4
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 10, %14
store i32 %15, i32* %2
br label %26
16: ; preds = %9, %1
%17 = load i32, i32* %4
%18 = icmp sge i32 %17, 48
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp sle i32 %20, 57
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %4
%24 = sub nsw i32 %23, 48
store i32 %24, i32* %2
br label %26
25: ; preds = %19, %16
store i32 -1, i32* %2
br label %26
26: ; preds = %25, %22, %12
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @CMUTIL_StringHexChar(i32 %0) {
%2 = tail call i32 @toupper(i32 %0)
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 6
%5 = add nsw i32 %2, -55
%6 = add i32 %2, -48
%7 = icmp ult i32 %6, 10
%8 = select i1 %7, i32 %6, i32 -1
%9 = select i1 %4, i32 %5, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xae() {
  Assert_real((isalpha(174) == 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_isalpha.c",
              875, ("isalpha should be 0 for 0xae"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xae>:
push   %rax
mov    $0xae,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x36b,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xae\00"
define void @t_isalpha_0xae() {
%1 = call i64 @isalpha(i32 174)
%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 875, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xae\00"
define void @t_isalpha_0xae() {
%1 = tail call i64 @isalpha(i32 174)
%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 875, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t rnd();
size_t randomSize8(int i) {
  size_t maxSize = 2 * 160 * 0x2000;
  return (((rnd() % ((((maxSize >> (i / 10))) > (2)) ? ((maxSize >> (i / 10)))
                                                     : (2)) +
            1) +
           (8) - 1) &
          ~((size_t)(8) - 1));
}


x86 assembly (clang, -O0):
<randomSize8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x280000,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rnd@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
shr    %cl,%rax
cmp    $0x2,%rax
jbe    117d <randomSize8+0x6d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,%ecx
shr    %cl,%rax
mov    %rax,-0x28(%rbp)
jmp    118b <randomSize8+0x7b>
mov    $0x2,%eax
mov    %rax,-0x28(%rbp)
jmp    118b <randomSize8+0x7b>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
add    $0x1,%rax
add    $0x8,%rax
sub    $0x1,%rax
and    $0xfffffffffffffff8,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomSize8>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rnd@plt>
movslq %ebx,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
mov    $0x280000,%edx
shr    %cl,%rdx
cmp    $0x3,%rdx
mov    $0x2,%ecx
cmovae %rdx,%rcx
mov    %rax,%rdx
shr    $0x20,%rdx
je     1159 <randomSize8+0x49>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
jmp    115f <randomSize8+0x4f>
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
add    $0x8,%eax
and    $0x7ffff8,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @randomSize8(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 2621440, i64* %3
%4 = call i64 (...) @rnd()
%5 = load i64, i64* %3
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
%8 = zext i32 %7 to i64
%9 = lshr i64 %5, %8
%10 = icmp ugt i64 %9, 2
br i1 %10, label %11, label %17
11: ; preds = %1
%12 = load i64, i64* %3
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
%15 = zext i32 %14 to i64
%16 = lshr i64 %12, %15
br label %18
17: ; preds = %1
br label %18
18: ; preds = %17, %11
%19 = phi i64 [ %16, %11 ], [ 2, %17 ]
%20 = urem i64 %4, %19
%21 = add i64 %20, 1
%22 = add i64 %21, 8
%23 = sub i64 %22, 1
%24 = and i64 %23, -8
ret i64 %24
}

LLVM IR (-O2):
define i64 @randomSize8(i32 %0) {
%2 = tail call i64 (...) @rnd()
%3 = sdiv i32 %0, 10
%4 = zext i32 %3 to i64
%5 = lshr i64 2621440, %4
%6 = icmp ugt i64 %5, 2
%7 = select i1 %6, i64 %5, i64 2
%8 = urem i64 %2, %7
%9 = add nuw nsw i64 %8, 8
%10 = and i64 %9, 8388600
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ atof(char *);
double cos(int /*<<< orphan*/);
char *ext_arg(char *, char *);
double cal_cos(char *S) {
  char *tmp = S;
  char arg[50];
  double sum = 0;
  tmp = ext_arg(tmp, arg);
  sum = cos(atof(arg));
  return sum;
}


x86 assembly (clang, -O0):
<cal_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <ext_arg@plt>
mov    %rax,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <atof@plt>
mov    %eax,%edi
call   1050 <cos@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal_cos>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <ext_arg@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
mov    %eax,%edi
call   1050 <cos@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @cal_cos(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [50 x i8]
%5 = alloca double
store i8* %0, i8** %2
%6 = load i8*, i8** %2
store i8* %6, i8** %3
store double 0.000000e+00, double* %5
%7 = load i8*, i8** %3
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%9 = call i8* @ext_arg(i8* %7, i8* %8)
store i8* %9, i8** %3
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%11 = call i32 @atof(i8* %10)
%12 = call double @cos(i32 %11)
store double %12, double* %5
%13 = load double, double* %5
ret double %13
}

LLVM IR (-O2):
define double @cal_cos(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = call i8* @ext_arg(i8* %0, i8* %3)
%5 = call i32 @atof(i8* %3)
%6 = call double @cos(i32 %5)
ret double %6
}
int queueEnqueueHead(struct queueHead *head, struct linkNode *node) {}


x86 assembly (clang, -O0):
<queueEnqueueHead>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.queueHead = type opaque
%struct.linkNode = type opaque
define i32 @queueEnqueueHead(%struct.queueHead* nocapture readnone %0, %struct.linkNode* nocapture readnone %1) {
ret i32 undef
}
double Sleef_hypot_u05(double x, double y) { return __builtin_hypot(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_hypot_u05>:
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define double @Sleef_hypot_u05(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @hypot(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Sleef_hypot_u05(double %0, double %1) {
%3 = tail call double @hypot(double %0, double %1)
ret double %3
}
int is_fence_start(char c) { return (c == '|') ? 1 : 0; }


x86 assembly (clang, -O0):
<is_fence_start>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x7c,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_fence_start>:
xor    %eax,%eax
cmp    $0x7c,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_fence_start(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 124
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_fence_start(i8 signext %0) {
%2 = icmp eq i8 %0, 124
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
int random_in_range(int min, int max) {
  int diff = (max - min) + 1;
  return ((int)((double)rand() / ((double)RAND_MAX + 1) * diff)) + min;
}


x86 assembly (clang, -O0):
<random_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eab(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xeb6(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_in_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
sub    %edi,%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
addsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @random_in_range(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* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %5
%10 = call i64 (...) @rand()
%11 = sitofp i64 %10 to double
%12 = load i64, i64* @RAND_MAX
%13 = sitofp i64 %12 to double
%14 = fadd double %13, 1.000000e+00
%15 = fdiv double %11, %14
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fmul double %15, %17
%19 = fptosi double %18 to i32
%20 = load i32, i32* %3
%21 = add nsw i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @random_in_range(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 (...) @rand()
%6 = sitofp i64 %5 to double
%7 = load i64, i64* @RAND_MAX
%8 = sitofp i64 %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %6, %9
%11 = sitofp i32 %4 to double
%12 = fmul double %10, %11
%13 = fptosi double %12 to i32
%14 = add nsw i32 %13, %0
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int suzerain_inorder_wavenumber_max(const int N) {
  assert(0 < N);
  return N / 2;
}


x86 assembly (clang, -O0):
<suzerain_inorder_wavenumber_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suzerain_inorder_wavenumber_max>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @suzerain_inorder_wavenumber_max(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 0, %3
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
define i32 @suzerain_inorder_wavenumber_max(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = sdiv i32 %0, 2
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t sigma1(uint32_t x) {
  return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10);
}


x86 assembly (clang, -O0):
<sigma1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x11,%eax
mov    -0x4(%rbp),%ecx
shl    $0xf,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x13,%ecx
mov    -0x4(%rbp),%edx
shl    $0xd,%edx
or     %edx,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0xa,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma1>:
mov    %edi,%eax
sar    $0x11,%eax
mov    %edi,%ecx
shl    $0xf,%ecx
or     %eax,%ecx
mov    %edi,%edx
sar    $0x13,%edx
mov    %edi,%eax
shl    $0xd,%eax
or     %edx,%eax
sar    $0xa,%edi
xor    %edi,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sigma1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 17
%5 = load i32, i32* %2
%6 = shl i32 %5, 15
%7 = or i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 19
%10 = load i32, i32* %2
%11 = shl i32 %10, 13
%12 = or i32 %9, %11
%13 = xor i32 %7, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 10
%16 = xor i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @sigma1(i32 %0) {
%2 = ashr i32 %0, 17
%3 = shl i32 %0, 15
%4 = or i32 %2, %3
%5 = ashr i32 %0, 19
%6 = shl i32 %0, 13
%7 = or i32 %5, %6
%8 = ashr i32 %0, 10
%9 = xor i32 %7, %8
%10 = xor i32 %9, %4
ret i32 %10
}
/* Type definitions */
struct Userland_slab {
  int dummy;
};

/* Variables and functions */
struct Userland_slab *get_owning_slab(void *obj, size_t pg_sz) {
  return *((struct Userland_slab **)({ ((uintptr_t)obj / pg_sz) * pg_sz; }));
}


x86 assembly (clang, -O0):
<get_owning_slab>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_owning_slab>:
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1116 <get_owning_slab+0x16>
mov    %rdi,%rax
xor    %edx,%edx
div    %rsi
jmp    111c <get_owning_slab+0x1c>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rdi
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.Userland_slab = type { i32 }
define %struct.Userland_slab* @get_owning_slab(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i64, i64* %4
%9 = udiv i64 %7, %8
%10 = load i64, i64* %4
%11 = mul i64 %9, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = inttoptr i64 %12 to %struct.Userland_slab**
%14 = load %struct.Userland_slab*, %struct.Userland_slab** %13
ret %struct.Userland_slab* %14
}

LLVM IR (-O2):
%struct.Userland_slab = type { i32 }
define %struct.Userland_slab* @get_owning_slab(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = urem i64 %3, %1
%5 = sub i64 %3, %4
%6 = inttoptr i64 %5 to %struct.Userland_slab**
%7 = load %struct.Userland_slab*, %struct.Userland_slab** %6
ret %struct.Userland_slab* %7
}
void XUnlockDisplay() {}


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

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

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

LLVM IR (-O2):
define void @XUnlockDisplay() {
ret void
}
int main(void) {
  int a[2];
  (a + 2);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%3 = getelementptr inbounds i32, i32* %2, i64 2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char toupper(char);
void toUppercase(char *sptr) {
  while (*sptr != '\0') {
    *sptr = toupper(*sptr);
    sptr++;
  }
}


x86 assembly (clang, -O0):
<toUppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <toUppercase+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <toUppercase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toUppercase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <toUppercase+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <toUppercase+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @toUppercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t fread_float(void *ptr, size_t size, size_t nitems, FILE *stream) {
  return fread(ptr, size, nitems, stream);
}


x86 assembly (clang, -O0):
<fread_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fread_float>:
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @fread_float(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *Extension(const char *path) {
  const char *cp = path;
  cp = strrchr(path, '.');
  if (cp == NULL)
    return ("");
  return (cp);
}


x86 assembly (clang, -O0):
<Extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <Extension+0x41>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <Extension+0x49>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Extension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
lea    0xedb(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @Extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strrchr(i8* %6, i8 signext 46)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %13
11: ; preds = %1
%12 = load i8*, i8** %4
store i8* %12, i8** %2
br label %13
13: ; preds = %11, %10
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @Extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}
/* Variables and functions */
char getch_(int /*<<< orphan*/);
char getch(void) { return getch_(0); }


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <getch_@plt>
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @getch() {
%1 = call signext i8 @getch_(i32 0)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @getch() {
%1 = tail call signext i8 @getch_(i32 0)
ret i8 %1
}
int generic_init(struct mm *mm) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mm = type opaque
define i32 @generic_init(%struct.mm* nocapture readnone %0) {
ret i32 0
}
int emac1_rev_set(unsigned int dev_id, union emac1_rev_u *value) { return 1; }


x86 assembly (clang, -O0):
<emac1_rev_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac1_rev_u = type opaque
define i32 @emac1_rev_set(i32 %0, %union.emac1_rev_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_rev_u*
store i32 %0, i32* %3
store %union.emac1_rev_u* %1, %union.emac1_rev_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_rev_u = type opaque
define i32 @emac1_rev_set(i32 %0, %union.emac1_rev_u* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(short, int /*<<< orphan*/ *);
void write16(register short what, register FILE *out) {
  (void)fputc(what >> 8, out);
  (void)fputc(what & 0xFF, out);
}


x86 assembly (clang, -O0):
<write16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    -0x10(%rbp),%rsi
movswl %ax,%edi
call   1030 <fputc@plt>
movswl -0x2(%rbp),%eax
and    $0xff,%eax
mov    -0x10(%rbp),%rsi
movswl %ax,%edi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write16>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
sar    $0x8,%edi
call   1030 <fputc@plt>
movzbl %bpl,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @write16(i16 signext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = trunc i32 %7 to i16
%9 = load i32*, i32** %4
%10 = call i32 @fputc(i16 signext %8, i32* %9)
%11 = load i16, i16* %3
%12 = sext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i16
%15 = load i32*, i32** %4
%16 = call i32 @fputc(i16 signext %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @write16(i16 signext %0, i32* nocapture %1) {
%3 = ashr i16 %0, 8
%4 = tail call i32 @fputc(i16 signext %3, i32* %1)
%5 = and i16 %0, 255
%6 = tail call i32 @fputc(i16 signext %5, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xd1() {
  Assert_real((isgraph(209) == 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_isgraph.c",
              1050, ("isgraph should be 0 for 0xd1"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xd1>:
push   %rax
mov    $0xd1,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41a,%edx
pop    %rax
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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd1\00"
define void @t_isgraph_0xd1() {
%1 = call i64 @isgraph(i32 209)
%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 1050, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd1\00"
define void @t_isgraph_0xd1() {
%1 = tail call i64 @isgraph(i32 209)
%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 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char rotate_left(unsigned char data, unsigned char bits) {
  return data << bits | data >> (sizeof(data) * 8 - bits);
}


x86 assembly (clang, -O0):
<rotate_left>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
movzbl -0x2(%rbp),%ecx
mov    %ecx,%esi
mov    $0x8,%ecx
sub    %rsi,%rcx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_left>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @rotate_left(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i8, i8* %4
%13 = zext i8 %12 to i64
%14 = sub i64 8, %13
%15 = trunc i64 %14 to i32
%16 = ashr i32 %11, %15
%17 = or i32 %9, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @rotate_left(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i8 @llvm.fshl.i8(i8 %0, i8 %0, i8 %1)
ret i8 %3
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_33(int Salt, int Parameter) {
  unsigned b = Salt * 0x5B611AB + 0x570B;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x5b611ab,-0x4(%rbp),%eax
add    $0x570b,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_33>:
imul   $0x5b611ab,%edi,%edi
add    $0x570b,%edi
jmp    1030 <yahoo_M1Common@plt>

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

LLVM IR (-O2):
define i32 @yahoo_f01_33(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 95818155
%4 = add nsw i32 %3, 22283
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
scalar_t__ isnan(double);
int /*<<< orphan*/ unit_error(char *, char const *, int);
void assert_not_nan(double real, char const *caller, int line) {
  if (isnan(real)) {
    unit_error("%s: %d unexpected NAN", caller, line);
  }
}


x86 assembly (clang, -O0):
<assert_not_nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     115b <assert_not_nan+0x3b>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xeaa(%rip),%rdi
call   1030 <unit_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_not_nan>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <isnan@plt>
test   %rax,%rax
je     1149 <assert_not_nan+0x29>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <unit_error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%s: %d unexpected NAN\00"
define void @assert_not_nan(double %0, i8* %1, i32 %2) {
%4 = alloca double
%5 = alloca i8*
%6 = alloca i32
store double %0, double* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = call i64 @isnan(double %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @unit_error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
br label %14
14: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s: %d unexpected NAN\00"
define void @assert_not_nan(double %0, i8* %1, i32 %2) {
%4 = tail call i64 @isnan(double %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @unit_error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
bool nrf52_errata_133(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf52_errata_133() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_133() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
void Oburni() {
  char c;
  scanf("%c", &c);
  if (c != '\n') {
    Oburni();
    printf("%c", c);
  }
}


x86 assembly (clang, -O0):
<Oburni>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     116a <Oburni+0x3a>
call   1030 <Oburni@plt>
lea    0xe9f(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Oburni>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
je     115f <Oburni+0x2f>
call   1030 <Oburni@plt>
movsbl 0x7(%rsp),%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @Oburni() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8, i8* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @Oburni() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 10
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i8, i8* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
br label %8
8: ; preds = %5, %0
ret void
}
int test_imm_F4uint16_mem(unsigned short *val) {
  return ((*val) & (-0xF4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F4uint16_mem>:
movzwl (%rdi),%eax
test   $0xff0c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -244
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void setreg(unsigned long addr, unsigned char value) {
  *((volatile unsigned char *)addr) = value;
}


x86 assembly (clang, -O0):
<setreg>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setreg>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @setreg(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i8*
store volatile i8 %5, i8* %7
ret void
}

LLVM IR (-O2):
define void @setreg(i64 %0, i8 zeroext %1) {
%3 = inttoptr i64 %0 to i8*
store volatile i8 %1, i8* %3
ret void
}