xunge/DecIR huggingface dataset:
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructModuleName(struct constructHeader *);
const char *EnvDefclassModule(void *theEnv, void *theClass) {
  return GetConstructModuleName((struct constructHeader *)theClass);
}


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

x86 assembly (clang, -O2):
<EnvDefclassModule>:
mov    %rsi,%rdi
jmp    1030 <GetConstructModuleName@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvDefclassModule(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.constructHeader*
%7 = call i8* @GetConstructModuleName(%struct.constructHeader* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvDefclassModule(i8* nocapture readnone %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructModuleName(%struct.constructHeader* %3)
ret i8* %4
}
int mult(int w, int z) { return w * z; }


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

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

LLVM IR (-O0):
define i32 @mult(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mult(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void foo479() {}


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

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

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

LLVM IR (-O2):
define void @foo479() {
ret void
}
int NOP() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @NOP() {
ret i32 0
}
void out_dec(fmt, n) const char fmt[];
int n;
{
  printf(fmt, n);
  out_line_count(fmt);
}


x86 assembly (clang, -O0):
<out_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <out_line_count@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_dec>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <out_line_count@plt>

LLVM IR (-O0):
define void @out_dec(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* %5, i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %8)
ret void
}

LLVM IR (-O2):
define void @out_dec(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i32 %1)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void printMessage(const char *message) { fprintf(stderr, "%s\n", message); }


x86 assembly (clang, -O0):
<printMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMessage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @printMessage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sound_Play(int, int);
void ToneE() { Sound_Play(1318, 50); }


x86 assembly (clang, -O0):
<ToneE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x526,%edi
mov    $0x32,%esi
call   1030 <Sound_Play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToneE>:
mov    $0x526,%edi
mov    $0x32,%esi
jmp    1030 <Sound_Play@plt>

LLVM IR (-O0):
define void @ToneE() {
%1 = call i32 @Sound_Play(i32 1318, i32 50)
ret void
}

LLVM IR (-O2):
define void @ToneE() {
%1 = tail call i32 @Sound_Play(i32 1318, i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x01() {
  Assert_real((isprint(1) == 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_isprint.c",
              10, ("isprint should be 0 for 0x01"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x01>:
push   %rax
mov    $0x1,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x01\00"
define void @t_isprint_0x01() {
%1 = call i64 @isprint(i32 1)
%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 10, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x01\00"
define void @t_isprint_0x01() {
%1 = tail call i64 @isprint(i32 1)
%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 10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__typeof__(stpcpy(1, 1)) test_stpcpy_135(void) { return stpcpy(1, 1); }


x86 assembly (clang, -O0):
<test_stpcpy_135>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %rsi,%rdi
call   1030 <stpcpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stpcpy_135>:
push   %rax
mov    $0x1,%edi
call   1030 <strlen@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @test_stpcpy_135() {
%1 = call i8* @stpcpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*))
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_stpcpy_135() {
%1 = tail call i64 @strlen(i8* inttoptr (i64 1 to i8*))
%2 = getelementptr inbounds i8, i8* inttoptr (i64 1 to i8*), i64 %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: newroot [-i] <block-special>\n");
  fprintf(stderr, "-i: copy mfs binary from boot image to memory\n");
  exit(1);
}


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    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: newroot [-i] <block-special>\0A\00"
@.str.1 = [47 x i8] c"-i: copy mfs binary from boot image to memory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: newroot [-i] <block-special>\0A\00"
@.str.1 = [47 x i8] c"-i: copy mfs binary from boot image to memory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printPrivate(char *);
void cannotBeOpened(void) { printPrivate("That cannot be opened.\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"That cannot be opened.\0A\00"
define void @cannotBeOpened() {
%1 = call i32 @printPrivate(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"That cannot be opened.\0A\00"
define void @cannotBeOpened() {
%1 = tail call i32 @printPrivate(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char const *);
void writeFile(const char *fileName, const char *fileContent) {
  FILE *fp = fopen(fileName, "wb");
  fprintf(fp, fileContent);
  fclose(fp);
}


x86 assembly (clang, -O0):
<writeFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define void @writeFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32* %3, i8* %1)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
void gtk_tree_model_foreach() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_foreach() {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
struct ifreq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SIOCGIFADDR;
struct sockaddr *if_addr_value(char const *, struct ifreq *,
                               int /*<<< orphan*/);
struct sockaddr *if_addr(const char *iface, struct ifreq *r) {
  return if_addr_value(iface, r, SIOCGIFADDR);
}


x86 assembly (clang, -O0):
<if_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
call   1030 <if_addr_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<if_addr>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <if_addr_value@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.ifreq = type { i32 }
@SIOCGIFADDR = global i32 0
define %struct.sockaddr* @if_addr(i8* %0, %struct.ifreq* %1) {
%3 = alloca i8*
%4 = alloca %struct.ifreq*
store i8* %0, i8** %3
store %struct.ifreq* %1, %struct.ifreq** %4
%5 = load i8*, i8** %3
%6 = load %struct.ifreq*, %struct.ifreq** %4
%7 = load i32, i32* @SIOCGIFADDR
%8 = call %struct.sockaddr* @if_addr_value(i8* %5, %struct.ifreq* %6, i32 %7)
ret %struct.sockaddr* %8
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.ifreq = type { i32 }
@SIOCGIFADDR = global i32 0
define %struct.sockaddr* @if_addr(i8* %0, %struct.ifreq* %1) {
%3 = load i32, i32* @SIOCGIFADDR
%4 = tail call %struct.sockaddr* @if_addr_value(i8* %0, %struct.ifreq* %1, i32 %3)
ret %struct.sockaddr* %4
}
/* Variables and functions */
int /*<<< orphan*/ kare_ciz(int);
int /*<<< orphan*/ ters_ucgen_ciz(int);
int /*<<< orphan*/ ucgen_ciz(int);
int main() {
  int sayi;
  ucgen_ciz(sayi);
  ters_ucgen_ciz(sayi);
  kare_ciz(sayi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <ucgen_ciz@plt>
mov    -0x8(%rbp),%edi
call   1030 <ters_ucgen_ciz@plt>
mov    -0x8(%rbp),%edi
call   1040 <kare_ciz@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <ucgen_ciz@plt>
call   1030 <ters_ucgen_ciz@plt>
call   1040 <kare_ciz@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = call i32 @ucgen_ciz(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @ters_ucgen_ciz(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @kare_ciz(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ucgen_ciz(i32 undef)
%2 = tail call i32 @ters_ucgen_ciz(i32 undef)
%3 = tail call i32 @kare_ciz(i32 undef)
ret i32 0
}
float funArea(float r) {
  float a;
  a = 3.14 * r * r;
  return a;
}


x86 assembly (clang, -O0):
<funArea>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<funArea>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @funArea(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double 3.140000e+00, %5
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %6, %8
%10 = fptrunc double %9 to float
store float %10, float* %3
%11 = load float, float* %3
ret float %11
}

LLVM IR (-O2):
define float @funArea(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 3.140000e+00
%4 = fmul double %3, %2
%5 = fptrunc double %4 to float
ret float %5
}
int test_imm_F1int8_reg(signed char val) {
  return ((val) & (0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xf1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F1int8_reg(i8 signext %0) {
%2 = and i8 %0, -15
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help(void) { fprintf(stderr, "usage: cfw\n"); }


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"usage: cfw\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"usage: cfw\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_assembler_comment_entities();
int /*<<< orphan*/ test_assembler_comments();
void all_assembler_tests() {
  test_assembler_comments();
  test_assembler_comment_entities();
}


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

x86 assembly (clang, -O2):
<all_assembler_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_assembler_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_assembler_comment_entities@plt>

LLVM IR (-O0):
define void @all_assembler_tests() {
%1 = call i32 (...) @test_assembler_comments()
%2 = call i32 (...) @test_assembler_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_assembler_tests() {
%1 = tail call i32 (...) @test_assembler_comments()
%2 = tail call i32 (...) @test_assembler_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  int a = 1;
  int b = 2;
  __VERIFIER_assert(a == b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x25() {
  Assert_real((isascii(37)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              190, ("isascii should be 1 for %"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x25>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xbe,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for %\00"
define void @t_isascii_0x25() {
%1 = call i32 @isascii(i32 37)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for %\00"
define void @t_isascii_0x25() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_help(void) {
  puts("fsb:\n"
       "\tBuilds a frosk file system.\n"
       "Options\n"
       "\t-h\n"
       "\t\t\nPrint this help.\n"
       "\t-i[input file]\n"
       "\t\tSpecify the input source file.\n"
       "\t-o[output file]\n"
       "\t\tSpecify the disk image to create and output to.\n"
       "\t-w[owner]\n"
       "\t\tSpecify the owner of the root directory.\n"
       "\t-p[perm]\n"
       "\t\tSpecify the permissions of the root directory.\n"
       "\t-b[block size]\n"
       "\t\tSpecify the size of blocks in bytes for the filesystem. (default = "
       "4096)\n"
       "\t-s[offset]\n"
       "\t\tSpecify the block of the superblock for the filesystem. (default = "
       "1)\n");
}


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

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

LLVM IR (-O0):
@.str = [471 x i8] c"fsb:\0A\09Builds a frosk file system.\0AOptions\0A\09-h\0A\09\09\0APrint this help.\0A\09-i[input file]\0A\09\09Specify the input source file.\0A\09-o[output file]\0A\09\09Specify the disk image to create and output to.\0A\09-w[owner]\0A\09\09Specify the owner of the root directory.\0A\09-p[perm]\0A\09\09Specify the permissions of the root directory.\0A\09-b[block size]\0A\09\09Specify the size of blocks in bytes for the filesystem. (default = 4096)\0A\09-s[offset]\0A\09\09Specify the block of the superblock for the filesystem. (default = 1)\0A\00"
define void @print_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [471 x i8] c"fsb:\0A\09Builds a frosk file system.\0AOptions\0A\09-h\0A\09\09\0APrint this help.\0A\09-i[input file]\0A\09\09Specify the input source file.\0A\09-o[output file]\0A\09\09Specify the disk image to create and output to.\0A\09-w[owner]\0A\09\09Specify the owner of the root directory.\0A\09-p[perm]\0A\09\09Specify the permissions of the root directory.\0A\09-b[block size]\0A\09\09Specify the size of blocks in bytes for the filesystem. (default = 4096)\0A\09-s[offset]\0A\09\09Specify the block of the superblock for the filesystem. (default = 1)\0A\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_dot(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) int32_t psvec2i_dot(struct vec2i *a, struct vec2i *b) {
  return vec2i_dot((int32_t *)a, (int32_t *)b);
}


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

x86 assembly (clang, -O2):
<psvec2i_dot>:
jmp    1030 <vec2i_dot@plt>

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define i32 @psvec2i_dot(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = alloca %struct.vec2i*
%4 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %3
store %struct.vec2i* %1, %struct.vec2i** %4
%5 = load %struct.vec2i*, %struct.vec2i** %3
%6 = bitcast %struct.vec2i* %5 to i32*
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = call i32 @vec2i_dot(i32* %6, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define i32 @psvec2i_dot(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%5 = tail call i32 @vec2i_dot(i32* %3, i32* %4)
ret i32 %5
}
void foo_2_2_2_1_2_1_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_1_2_1_2_1_2() {
ret void
}
/* Variables and functions */
int arithmetic_sequence_sum(int, int, int);
int /*<<< orphan*/ assert(int);
void arithmetic_sequence_sum_test(void) {
  assert(arithmetic_sequence_sum(1, 101, 1) == 5050);
  assert(arithmetic_sequence_sum(1, 101, 2) == 2500);
}


x86 assembly (clang, -O0):
<arithmetic_sequence_sum_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
mov    $0x65,%esi
mov    %edx,%edi
call   1030 <arithmetic_sequence_sum@plt>
cmp    $0x13ba,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0x65,%esi
mov    $0x2,%edx
call   1030 <arithmetic_sequence_sum@plt>
cmp    $0x9c4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arithmetic_sequence_sum_test>:
push   %rax
mov    $0x1,%edi
mov    $0x65,%esi
mov    $0x1,%edx
call   1030 <arithmetic_sequence_sum@plt>
xor    %edi,%edi
cmp    $0x13ba,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0x65,%esi
mov    $0x2,%edx
call   1030 <arithmetic_sequence_sum@plt>
xor    %edi,%edi
cmp    $0x9c4,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @arithmetic_sequence_sum_test() {
%1 = call i32 @arithmetic_sequence_sum(i32 1, i32 101, i32 1)
%2 = icmp eq i32 %1, 5050
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @arithmetic_sequence_sum(i32 1, i32 101, i32 2)
%6 = icmp eq i32 %5, 2500
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
define void @arithmetic_sequence_sum_test() {
%1 = tail call i32 @arithmetic_sequence_sum(i32 1, i32 101, i32 1)
%2 = icmp eq i32 %1, 5050
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @arithmetic_sequence_sum(i32 1, i32 101, i32 2)
%6 = icmp eq i32 %5, 2500
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *player_line_query(char *);
long strtol(char *, int /*<<< orphan*/ *, int);
long int player_numeric_query(char *description) {
  long int answer_int;
  char *answer = NULL;
  while (answer == NULL) {
    answer = player_line_query(description);
  }
  answer_int = strtol(answer, NULL, 10);
  free(answer);
  return answer_int;
}


x86 assembly (clang, -O0):
<player_numeric_query>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <player_numeric_query+0x31>
mov    -0x8(%rbp),%rdi
call   1050 <player_line_query@plt>
mov    %rax,-0x18(%rbp)
jmp    1144 <player_numeric_query+0x14>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<player_numeric_query>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <player_line_query@plt>
test   %rax,%rax
je     1140 <player_numeric_query+0x10>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @player_numeric_query(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %4
br label %5
5: ; preds = %8, %1
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = call i8* @player_line_query(i8* %9)
store i8* %10, i8** %4
br label %5
11: ; preds = %5
%12 = load i8*, i8** %4
%13 = call i64 @strtol(i8* %12, i32* null, i32 10)
store i64 %13, i64* %3
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @player_numeric_query(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i8* @player_line_query(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = tail call i64 @strtol(i8* nocapture %3, i32* null, i32 10)
%7 = tail call i32 @free(i8* %3)
ret i64 %6
}
/* Variables and functions */
int f269(int *);
int f270(int *p) { return f269(p); }


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

x86 assembly (clang, -O2):
<f270>:
jmp    1030 <f269@plt>

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

LLVM IR (-O2):
define i32 @f270(i32* %0) {
%2 = tail call i32 @f269(i32* %0)
ret i32 %2
}
int Printf(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define i32 @Printf(i8* nocapture readnone %0, ...) {
ret i32 undef
}
int test12b(const char *X) { return sizeof(X == "foo"); }


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

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

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

LLVM IR (-O2):
define i32 @test12b(i8* nocapture readnone %0) {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void finish_b1(void) { printf("finish_b1\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"finish_b1\00"
define void @finish_b1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t choose(size_t n, size_t suggest) { return n < suggest ? n : suggest; }


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <choose+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <choose+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @choose(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @choose(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void perror(const char *s) {
  if (s != NULL)
    fprintf(stderr, "%s\n", s);
}


x86 assembly (clang, -O0):
<perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <perror+0x30>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perror>:
test   %rdi,%rdi
je     112d <perror+0x1d>
mov    %rdi,%rdx
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @perror(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
ret void
}
int is_ws(char ch) {
  if (ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     113e <is_ws+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     113e <is_ws+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     113e <is_ws+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    114a <is_ws+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <is_ws+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ws>:
cmp    $0x20,%dil
ja     1120 <is_ws+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    1120 <is_ws+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_ws(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int test_imm_60int8_mem(signed char *val) {
  return ((*val) & (0x60 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_60int8_mem>:
testb  $0x60,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_60int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 96
%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_60int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 96
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void fd160(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  p024A:
    goto p024A;
    goto a;
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd160>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd160+0x7>

x86 assembly (clang, -O2):
<fd160>:
jmp    1100 <fd160>

LLVM IR (-O0):
define void @fd160(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd160(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int alignof_address() {
  struct s {
    char x;
    char *y;
  };
  return sizeof(char) + (sizeof(struct s) - (sizeof(char) + sizeof(char *)));
}


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

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

LLVM IR (-O0):
define i32 @alignof_address() {
ret i32 8
}

LLVM IR (-O2):
define i32 @alignof_address() {
ret i32 8
}
int fun1211() { return 1211; }


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

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

LLVM IR (-O0):
define i32 @fun1211() {
ret i32 1211
}

LLVM IR (-O2):
define i32 @fun1211() {
ret i32 1211
}
void test_113(unsigned short *x, unsigned int *y) { y[0] = x[1] >> 14; }


x86 assembly (clang, -O0):
<test_113>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%ecx
sar    $0xe,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_113>:
movzwl 0x2(%rdi),%eax
shr    $0xe,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_113(i16* %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 = getelementptr inbounds i16, i16* %5, i64 1
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 14
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_113(i16* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %3
%5 = lshr i16 %4, 14
%6 = zext i16 %5 to i32
store i32 %6, i32* %1
ret void
}
/* Type definitions */
struct data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct data *);
void data_shutdown(struct data *d) {
  free(d);
  d = NULL;
}


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

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

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

LLVM IR (-O2):
%struct.data = type { i32 }
define void @data_shutdown(%struct.data* nocapture %0) {
%2 = tail call i32 @free(%struct.data* %0)
ret void
}
float test_atanf(float x) { return __builtin_atanf(x); }


x86 assembly (clang, -O0):
<test_atanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_atanf>:
jmp    1030 <atanf@plt>

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

LLVM IR (-O2):
define float @test_atanf(float %0) {
%2 = tail call float @atanf(float %0)
ret float %2
}
int num_diagnostics(void) { return (5); }


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

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

LLVM IR (-O0):
define i32 @num_diagnostics() {
ret i32 5
}

LLVM IR (-O2):
define i32 @num_diagnostics() {
ret i32 5
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
unsigned long VIM_MARB_GetJbufStartAddr(void) {
  unsigned long Temp = 0;
  Temp = (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x006)));
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x005))) << 8;
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x004))) << 16;
  return Temp;
}


x86 assembly (clang, -O0):
<VIM_MARB_GetJbufStartAddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x2406,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0x2405,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x2404,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_GetJbufStartAddr>:
push   %r14
push   %rbx
push   %rax
mov    $0x2406,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%r14
mov    $0x2405,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
shl    $0x8,%rbx
or     %r14,%rbx
mov    $0x2404,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @VIM_MARB_GetJbufStartAddr() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i64 @VIM_HIF_GetReg8(i32 9222)
store i64 %2, i64* %1
%3 = call i64 @VIM_HIF_GetReg8(i32 9221)
%4 = shl i64 %3, 8
%5 = load i64, i64* %1
%6 = or i64 %5, %4
store i64 %6, i64* %1
%7 = call i64 @VIM_HIF_GetReg8(i32 9220)
%8 = shl i64 %7, 16
%9 = load i64, i64* %1
%10 = or i64 %9, %8
store i64 %10, i64* %1
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
define i64 @VIM_MARB_GetJbufStartAddr() {
%1 = tail call i64 @VIM_HIF_GetReg8(i32 9222)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 9221)
%3 = shl i64 %2, 8
%4 = or i64 %3, %1
%5 = tail call i64 @VIM_HIF_GetReg8(i32 9220)
%6 = shl i64 %5, 16
%7 = or i64 %4, %6
ret i64 %7
}
/* Variables and functions */
unsigned char *xsalsa12_decrypt(unsigned char *, size_t *,
                                unsigned char const *, size_t,
                                unsigned char const *, unsigned char const *);
unsigned char *crypt_decrypt_xsalsa12(unsigned char *out, size_t *out_len,
                                      const unsigned char *in, size_t in_len,
                                      const unsigned char *nonce,
                                      const unsigned char *key) {
  return xsalsa12_decrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_decrypt_xsalsa12>:
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    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <xsalsa12_decrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_decrypt_xsalsa12>:
jmp    1030 <xsalsa12_decrypt@plt>

LLVM IR (-O0):
define i8* @crypt_decrypt_xsalsa12(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @xsalsa12_decrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_decrypt_xsalsa12(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @xsalsa12_decrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}