xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xfd() {
  Assert_real((isupper(253) == 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",
              1270, ("isupper should be 0 for 0xfd"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfd\00"
define void @t_isupper_0xfd() {
%1 = call i64 @isupper(i32 253)
%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 1270, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfd\00"
define void @t_isupper_0xfd() {
%1 = tail call i64 @isupper(i32 253)
%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 1270, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int execute_chown32() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_chown32() {
ret i32 0
}
void crypto_hmac_init(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<crypto_hmac_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_hmac_init>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.crypto_hmac_init = [17 x i8] c"crypto_hmac_init\00"
define void @crypto_hmac_init() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.crypto_hmac_init, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.crypto_hmac_init = [17 x i8] c"crypto_hmac_init\00"
define void @crypto_hmac_init() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.crypto_hmac_init, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void show_usage(char *name) {
  printf("Usage: %s [OPTION] [NVIDIA VBIOS]\n", name);
  printf("   -h, --help\tThis help message\n");
  printf("   -v, --verbose\tShow verbose VESA modelines\n");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: %s [OPTION] [NVIDIA VBIOS]\0A\00"
@.str.1 = [33 x i8] c" -h, --help\09This help message\0A\00"
@.str.2 = [46 x i8] c" -v, --verbose\09Show verbose VESA modelines\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Usage: %s [OPTION] [NVIDIA VBIOS]\0A\00"
@str = [32 x i8] c" -h, --help\09This help message\00"
@str.3 = [45 x i8] c" -v, --verbose\09Show verbose VESA modelines\00"
define void @show_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int fcntl(int, int, long);
int Fcntl(int fd, int cmd, long arg) {
  int retval;
  retval = fcntl(fd, cmd, arg);
  if (retval == -1)
    Sys_failure("fcntl");
  return retval;
}


x86 assembly (clang, -O0):
<Fcntl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <fcntl@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    115a <Fcntl+0x3a>
lea    0xeab(%rip),%rdi
call   1040 <Sys_failure@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fcntl>:
push   %rbx
call   1030 <fcntl@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <Fcntl+0x19>
lea    0xecc(%rip),%rdi
call   1040 <Sys_failure@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"fcntl\00"
define i32 @Fcntl(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 @fcntl(i32 %0, i32 %1, i64 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ readl(void *);
uint32_t read_pxmskc(unsigned port) {
  return readl((void *)0xb0010000 + (port * 0x100) + (0x28));
}


x86 assembly (clang, -O0):
<read_pxmskc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%edi
add    %rax,%rdi
add    $0x28,%rdi
call   1030 <readl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pxmskc>:
shl    $0x8,%edi
mov    $0xb0010028,%eax
add    %rax,%rdi
jmp    1030 <readl@plt>

LLVM IR (-O0):
define i32 @read_pxmskc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 256
%5 = zext i32 %4 to i64
%6 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %5
%7 = getelementptr i8, i8* %6, i64 40
%8 = call i32 @readl(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @read_pxmskc(i32 %0) {
%2 = shl i32 %0, 8
%3 = zext i32 %2 to i64
%4 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %3
%5 = getelementptr i8, i8* %4, i64 40
%6 = tail call i32 @readl(i8* %5)
ret i32 %6
}
/* Variables and functions */
double errcheck(int /*<<< orphan*/, char *);
int /*<<< orphan*/ pow(double, double);
double Pow(double x, double y) { return errcheck(pow(x, y), "exponentiation"); }


x86 assembly (clang, -O0):
<Pow>:
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   1040 <pow@plt>
mov    %eax,%edi
lea    0xeb6(%rip),%rsi
call   1030 <errcheck@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pow>:
push   %rax
call   1040 <pow@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <errcheck@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"exponentiation\00"
define double @Pow(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 i32 @pow(double %5, double %6)
%8 = call double @errcheck(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret double %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"exponentiation\00"
define double @Pow(double %0, double %1) {
%3 = tail call i32 @pow(double %0, double %1)
%4 = tail call double @errcheck(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret double %4
}
void foo6(void) {}


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

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

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

LLVM IR (-O2):
define void @foo6() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "sentperm [-dh] [arg0 [arg1 ...]]\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"sentperm [-dh] [arg0 [arg1 ...]]\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"sentperm [-dh] [arg0 [arg1 ...]]\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
struct fid_domain {
  int dummy;
};
struct fid_av {
  int dummy;
};
struct fi_av_attr {
  int dummy;
};

/* Variables and functions */
int gnix_av_open(struct fid_domain *, struct fi_av_attr *, struct fid_av **,
                 void *);
int fi_av_open(struct fid_domain *domain, struct fi_av_attr *attr,
               struct fid_av **av, void *context) {
  return gnix_av_open(domain, attr, av, context);
}


x86 assembly (clang, -O0):
<fi_av_open>:
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 <gnix_av_open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi_av_open>:
jmp    1030 <gnix_av_open@plt>

LLVM IR (-O0):
%struct.fid_domain = type { i32 }
%struct.fi_av_attr = type { i32 }
%struct.fid_av = type { i32 }
define i32 @fi_av_open(%struct.fid_domain* %0, %struct.fi_av_attr* %1, %struct.fid_av** %2, i8* %3) {
%5 = alloca %struct.fid_domain*
%6 = alloca %struct.fi_av_attr*
%7 = alloca %struct.fid_av**
%8 = alloca i8*
store %struct.fid_domain* %0, %struct.fid_domain** %5
store %struct.fi_av_attr* %1, %struct.fi_av_attr** %6
store %struct.fid_av** %2, %struct.fid_av*** %7
store i8* %3, i8** %8
%9 = load %struct.fid_domain*, %struct.fid_domain** %5
%10 = load %struct.fi_av_attr*, %struct.fi_av_attr** %6
%11 = load %struct.fid_av**, %struct.fid_av*** %7
%12 = load i8*, i8** %8
%13 = call i32 @gnix_av_open(%struct.fid_domain* %9, %struct.fi_av_attr* %10, %struct.fid_av** %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.fid_domain = type { i32 }
%struct.fi_av_attr = type { i32 }
%struct.fid_av = type { i32 }
define i32 @fi_av_open(%struct.fid_domain* %0, %struct.fi_av_attr* %1, %struct.fid_av** %2, i8* %3) {
%5 = tail call i32 @gnix_av_open(%struct.fid_domain* %0, %struct.fi_av_attr* %1, %struct.fid_av** %2, i8* %3)
ret i32 %5
}
float vertical(mag, arg)
float mag, arg;
{ return ((float)(mag * sin((double)arg))); }


x86 assembly (clang, -O0):
<vertical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm1,-0x18(%rbp)
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vertical>:
push   %rax
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @vertical(double %0, double %1) {
%3 = alloca float
%4 = alloca float
%5 = fptrunc double %0 to float
%6 = fptrunc double %1 to float
store float %5, float* %3
store float %6, float* %4
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = load float, float* %4
%10 = fpext float %9 to double
%11 = call double @sin(double %10)
%12 = fmul double %8, %11
%13 = fptrunc double %12 to float
ret float %13
}

LLVM IR (-O2):
define float @vertical(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fpext float %3 to double
%6 = fpext float %4 to double
%7 = tail call double @sin(double %6)
%8 = fmul double %7, %5
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stdout;
void usage(char *name) {
  fprintf(stdout,
          "Usage: %s [options] <seconds to delay> [-- command]\n"
          "   or  %s [options] until <timespec> [-- command]\n",
          name, name);
  exit(1);
}


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [103 x i8] c"Usage: %s [options] <seconds to delay> [-- command]\0A or %s [options] until <timespec> [-- command]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [103 x i8] c"Usage: %s [options] <seconds to delay> [-- command]\0A or %s [options] until <timespec> [-- command]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char getchar();
char custom_ioread() {
  char ch;
  ch = getchar();
  return ch;
}


x86 assembly (clang, -O0):
<custom_ioread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @custom_ioread() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @custom_ioread() {
%1 = tail call signext i8 (...) @getchar()
ret i8 %1
}
/* Variables and functions */
scalar_t__ memcmp(char const *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
int str_cmp(const char *str1, const char *str2) {
  if (strlen(str1) != strlen(str2))
    return 0;
  return memcmp(str1, str2, strlen(str1)) == 0;
}


x86 assembly (clang, -O0):
<str_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     1162 <str_cmp+0x42>
movl   $0x0,-0x4(%rbp)
jmp    119a <str_cmp+0x7a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cmp>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
jne    115e <str_cmp+0x3e>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @str_cmp(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @memcmp(i8* %0, i8* %1, i64 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
char *strcpy(char *dest, const char *src) {
  int d0, d1, d2;
  __asm__ __volatile__("1:\tlodsb\n\t"
                       "stosb\n\t"
                       "testb %%al,%%al\n\t"
                       "jne 1b"
                       : "=&S"(d0), "=&D"(d1), "=&a"(d2)
                       : "0"(src), "1"(dest)
                       : "memory");
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1114 <strcpy+0x14>
mov    %esi,%ecx
mov    %ecx,-0x14(%rbp)
mov    %edi,%ecx
mov    %ecx,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rcx
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1103 <strcpy+0x3>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %8, i8* %9)
%11 = extractvalue { i8*, i8*, i32 } %10, 0
%12 = extractvalue { i8*, i8*, i32 } %10, 1
%13 = extractvalue { i8*, i8*, i32 } %10, 2
%14 = ptrtoint i8* %11 to i64
%15 = trunc i64 %14 to i32
store i32 %15, i32* %5
%16 = ptrtoint i8* %12 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
store i32 %13, i32* %7
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* %1) {
%3 = tail call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int BN_div_internal(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                    int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                    int /*<<< orphan*/ *, int);
int BN_div_ct(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
              BN_CTX *ctx) {
  return BN_div_internal(dv, rm, num, divisor, ctx, 1);
}


x86 assembly (clang, -O0):
<BN_div_ct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <BN_div_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_div_ct>:
mov    $0x1,%r9d
jmp    1030 <BN_div_internal@plt>

LLVM IR (-O0):
define i32 @BN_div_ct(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i32 @BN_div_internal(i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
define i32 @BN_div_ct(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @BN_div_internal(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32 1)
ret i32 %6
}
returnImplicitInt() { return 77; }


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

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

LLVM IR (-O0):
define i32 @returnImplicitInt() {
ret i32 77
}

LLVM IR (-O2):
define i32 @returnImplicitInt() {
ret i32 77
}
/* Type definitions */
struct rb3_tree {
  int dummy;
};
struct rb3_head {
  int dummy;
};

/* Variables and functions */
struct rb3_head *rb3_get_minmax_in_subtree(int /*<<< orphan*/, int);
int /*<<< orphan*/ rb3_get_root(struct rb3_tree *);
extern struct rb3_head *rb3_get_minmax(struct rb3_tree *tree, int dir) {
  return rb3_get_minmax_in_subtree(rb3_get_root(tree), dir);
}


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

x86 assembly (clang, -O2):
<rb3_get_minmax>:
push   %rbx
mov    %esi,%ebx
call   1040 <rb3_get_root@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <rb3_get_minmax_in_subtree@plt>

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
%struct.rb3_tree = type { i32 }
define %struct.rb3_head* @rb3_get_minmax(%struct.rb3_tree* %0, i32 %1) {
%3 = alloca %struct.rb3_tree*
%4 = alloca i32
store %struct.rb3_tree* %0, %struct.rb3_tree** %3
store i32 %1, i32* %4
%5 = load %struct.rb3_tree*, %struct.rb3_tree** %3
%6 = call i32 @rb3_get_root(%struct.rb3_tree* %5)
%7 = load i32, i32* %4
%8 = call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %6, i32 %7)
ret %struct.rb3_head* %8
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
%struct.rb3_tree = type { i32 }
define %struct.rb3_head* @rb3_get_minmax(%struct.rb3_tree* %0, i32 %1) {
%3 = tail call i32 @rb3_get_root(%struct.rb3_tree* %0)
%4 = tail call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %3, i32 %1)
ret %struct.rb3_head* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  scanf("%d", &x);
  printf("%d minutos\n", 150 / 60 * x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = mul nsw i32 2, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct list_elem {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
struct list_elem *list_head(struct list *);
int /*<<< orphan*/ list_isempty(struct list *);
struct list_elem *list_remove(struct list_elem *);
struct list_elem *list_popfront(struct list *l) {
  struct list_elem *e;
  assert(l != NULL);
  assert(!list_isempty(l));
  e = list_head(l);
  return list_remove(e);
}


x86 assembly (clang, -O0):
<list_popfront>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <list_isempty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <list_head@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <list_remove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_popfront>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <list_isempty@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <list_head@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1060 <list_remove@plt>

LLVM IR (-O0):
%struct.list_elem = type { i32 }
%struct.list = type { i32 }
define %struct.list_elem* @list_popfront(%struct.list* %0) {
%2 = alloca %struct.list*
%3 = alloca %struct.list_elem*
store %struct.list* %0, %struct.list** %2
%4 = load %struct.list*, %struct.list** %2
%5 = icmp ne %struct.list* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load %struct.list*, %struct.list** %2
%9 = call i32 @list_isempty(%struct.list* %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load %struct.list*, %struct.list** %2
%15 = call %struct.list_elem* @list_head(%struct.list* %14)
store %struct.list_elem* %15, %struct.list_elem** %3
%16 = load %struct.list_elem*, %struct.list_elem** %3
%17 = call %struct.list_elem* @list_remove(%struct.list_elem* %16)
ret %struct.list_elem* %17
}

LLVM IR (-O2):
%struct.list_elem = type { i32 }
%struct.list = type { i32 }
define %struct.list_elem* @list_popfront(%struct.list* %0) {
%2 = icmp ne %struct.list* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @list_isempty(%struct.list* %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call %struct.list_elem* @list_head(%struct.list* %0)
%10 = tail call %struct.list_elem* @list_remove(%struct.list_elem* %9)
ret %struct.list_elem* %10
}
char *hash_plugin_summary(void) { return ("sha256 \t\tSHA-256 plugin"); }


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"sha256 \09\09SHA-256 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"sha256 \09\09SHA-256 plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ op_to_dn(char *, int /*<<< orphan*/, int);
void i_or_dn(void) { op_to_dn("or", 0, 1); }


x86 assembly (clang, -O0):
<i_or_dn>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <op_to_dn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_or_dn>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <op_to_dn@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"or\00"
define void @i_or_dn() {
%1 = call i32 @op_to_dn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"or\00"
define void @i_or_dn() {
%1 = tail call i32 @op_to_dn(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
ret void
}
void rop3_219_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk1 = S ^ T;
  stk2 = *D ^ S;
  stk1 = stk1 & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_219_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_219_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
not    %cl
and    %al,%sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_219_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %8
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = trunc i32 %30 to i8
store i8 %31, i8* %7
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %5
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = xor i32 %39, -1
%41 = and i32 %37, %40
%42 = load i8*, i8** %4
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = load i8, i8* %5
%46 = zext i8 %45 to i32
%47 = and i32 %44, %46
%48 = or i32 %41, %47
%49 = load i8*, i8** %4
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = load i8, i8* %6
%53 = zext i8 %52 to i32
%54 = and i32 %51, %53
%55 = or i32 %48, %54
%56 = trunc i32 %55 to i8
%57 = load i8*, i8** %4
store i8 %56, i8* %57
ret void
}

LLVM IR (-O2):
define void @rop3_219_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = xor i8 %5, -1
%7 = and i8 %4, %1
%8 = or i8 %7, %6
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
int d_le_rc1(double a1) { return (((a1) <= (100))); }


x86 assembly (clang, -O0):
<d_le_rc1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_le_rc1>:
movsd  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @d_le_rc1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ole double %3, 1.000000e+02
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @d_le_rc1(double %0) {
%2 = fcmp ole double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void progress(float complete, void *data) {
  fprintf(stderr, "\rkdt2kdt: %3.0f%% complete    ",
          (complete > 1. ? 1. : complete) * 100.);
}


x86 assembly (clang, -O0):
<progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115a <progress+0x4a>
movsd  0xeb0(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1168 <progress+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress>:
mov    0x2ec9(%rip),%rax
cvtss2sd %xmm0,%xmm0
movsd  0xedd(%rip),%xmm1
minsd  %xmm0,%xmm1
mulsd  0xed9(%rip),%xmm1
mov    (%rax),%edi
cvttsd2si %xmm1,%edx
lea    0xed4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"\0Dkdt2kdt: %3.0f%% complete \00"
define void @progress(float %0, i8* %1) {
%3 = alloca float
%4 = alloca i8*
store float %0, float* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %2
br label %13
10: ; preds = %2
%11 = load float, float* %3
%12 = fpext float %11 to double
br label %13
13: ; preds = %10, %9
%14 = phi double [ 1.000000e+00, %9 ], [ %12, %10 ]
%15 = fmul double %14, 1.000000e+02
%16 = fptosi double %15 to i32
%17 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"\0Dkdt2kdt: %3.0f%% complete \00"
define void @progress(float %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = fpext float %0 to double
%5 = fcmp ogt double %4, 1.000000e+00
%6 = select i1 %5, double 1.000000e+00, double %4
%7 = fmul double %6, 1.000000e+02
%8 = fptosi double %7 to i32
%9 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void fastafree(void *ptr) { free((char *)ptr); }


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

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

LLVM IR (-O0):
define void @fastafree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @fastafree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x5a() {
  Assert_real((islower(90) == 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_islower.c",
              455, ("islower should be 0 for Z"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x5a>:
push   %rax
mov    $0x5a,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1c7,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for Z\00"
define void @t_islower_0x5a() {
%1 = call i64 @islower(i32 90)
%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 455, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for Z\00"
define void @t_islower_0x5a() {
%1 = tail call i64 @islower(i32 90)
%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 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
int /*<<< orphan*/ *strstr(char *, char *);
char *progname(char *argv[]) {
  if (strstr(argv[0], "/") == NULL) {
    return (argv[0]);
  }
  return (strrchr(argv[0], '/') + 1);
}


x86 assembly (clang, -O0):
<progname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec6(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    1159 <progname+0x39>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <progname+0x52>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progname>:
push   %rbx
mov    (%rdi),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     114a <progname+0x2a>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @progname(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32* @strstr(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
store i8* %12, i8** %2
br label %19
13: ; preds = %1
%14 = load i8**, i8*** %3
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i8* @strrchr(i8* %16, i8 signext 47)
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8* %18, i8** %2
br label %19
19: ; preds = %13, %9
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @progname(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @strchr(i8* dereferenceable(1) %2, i32 47)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 47)
%7 = getelementptr inbounds i8, i8* %6, i64 1
br label %8
8: ; preds = %1, %5
%9 = phi i8* [ %7, %5 ], [ %2, %1 ]
ret i8* %9
}
float rolloff(float f, float limit) {
  float a = f / limit;
  return 1.0f - (.45 + .3 * a) * a;
}


x86 assembly (clang, -O0):
<rolloff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rolloff>:
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xee8(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @rolloff(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fdiv float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %10, double 4.500000e-01)
%12 = load float, float* %5
%13 = fpext float %12 to double
%14 = fneg double %11
%15 = call double @llvm.fmuladd.f64(double %14, double %13, double 1.000000e+00)
%16 = fptrunc double %15 to float
ret float %16
}

LLVM IR (-O2):
define float @rolloff(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = fpext float %3 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 3.000000e-01, double 4.500000e-01)
%6 = fneg double %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double 1.000000e+00)
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ done(int);
void onintr(int ignore) { done(1); }


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

x86 assembly (clang, -O2):
<onintr>:
mov    $0x1,%edi
jmp    1030 <done@plt>

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

LLVM IR (-O2):
define void @onintr(i32 %0) {
%2 = tail call i32 @done(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
int /*<<< orphan*/ show_version();
int show_help(void) {
  const char *help_info =
      "usage : ulz77 [-options]\n\n"
      "  --method   <method>       Specify interface of compression library\n"
      "    [stream|file]\n"
      "  -c         <sourcefile>   Input file\n"
      "  -o         <destfile>     Output file\n"
      "  -bs        <blocksize>    Specify block size of stream\n"
      "\n"
      "  --help                    Show help info\n"
      "  --version                 Show version info\n";
  show_version();
  puts(help_info);
  return 0;
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <show_version@plt>
mov    -0x8(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [340 x i8] c"usage : ulz77 [-options]\0A\0A --method <method> Specify interface of compression library\0A [stream|file]\0A -c <sourcefile> Input file\0A -o <destfile> Output file\0A -bs <blocksize> Specify block size of stream\0A\0A --help Show help info\0A --version Show version info\0A\00"
define i32 @show_help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = call i32 (...) @show_version()
%3 = load i8*, i8** %1
%4 = call i32 @puts(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [340 x i8] c"usage : ulz77 [-options]\0A\0A --method <method> Specify interface of compression library\0A [stream|file]\0A -c <sourcefile> Input file\0A -o <destfile> Output file\0A -bs <blocksize> Specify block size of stream\0A\0A --help Show help info\0A --version Show version info\0A\00"
define i32 @show_help() {
%1 = tail call i32 (...) @show_version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ StopAudio297(unsigned long);
void stopaudio(unsigned long id) { StopAudio297(id); }


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

x86 assembly (clang, -O2):
<stopaudio>:
jmp    1030 <StopAudio297@plt>

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

LLVM IR (-O2):
define void @stopaudio(i64 %0) {
%2 = tail call i32 @StopAudio297(i64 %0)
ret void
}