xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_75() {
  Assert_real((isqrt(75) == 8),
              "/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/stdlib/isqrt.c",
              380, ("Integer square root of 75 should be 8"));
}


x86 assembly (clang, -O0):
<t_sqrt_75>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4b,%edi
call   1030 <isqrt@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x17c,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_75>:
push   %rax
mov    $0x4b,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x17c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 75 should be 8\00"
define void @t_sqrt_75() {
%1 = call i32 @isqrt(i32 75)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 75 should be 8\00"
define void @t_sqrt_75() {
%1 = tail call i32 @isqrt(i32 75)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int renameat2(int olddirfd, const char *oldpath, int newdirfd,
              const char *newpath, unsigned int flags) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<renameat2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<renameat2>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @renameat2(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @renameat2(i32 %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}
int test_imm_68int8_mem(signed char *val) {
  return ((*val) & (-0x68 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_68int8_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, -104
%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_68int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -104
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *str_str(char *, char *);
char *str_str_003() {
  char *rel = str_str("1234567", "789");
  do {
    return NULL == rel ? NULL : "expect NULL pointer";
  } while (0);
  ;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0xee2(%rip),%rsi
call   1030 <str_str@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
lea    0xece(%rip),%rax
cmp    %rdx,%rcx
cmove  %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1030 <str_str@plt>
test   %rax,%rax
lea    0xede(%rip),%rcx
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"1234567\00"
@.str.1 = [4 x i8] c"789\00"
@.str.2 = [20 x i8] c"expect NULL pointer\00"
define i8* @str_str_003() {
%1 = alloca i8*
%2 = call i8* @str_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %2, i8** %1
br label %3
3: ; preds = %0
%4 = load i8*, i8** %1
%5 = icmp eq i8* null, %4
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* null, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0)
br label %8
8: ; preds = %3
ret i8* %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"1234567\00"
@.str.1 = [4 x i8] c"789\00"
@.str.2 = [20 x i8] c"expect NULL pointer\00"
define i8* @str_str_003() {
%1 = tail call i8* @str_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ emscripten_run_script(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void c_writedebug(char *str) {
  char *buf = malloc(4096);
  if (!buf)
    exit(1);
  sprintf(buf, "writedebug(\"%s\");", str);
  emscripten_run_script(buf);
  free(buf);
}


x86 assembly (clang, -O0):
<c_writedebug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1000,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <c_writedebug+0x2f>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe72(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <emscripten_run_script@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_writedebug>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1000,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1192 <c_writedebug+0x42>
mov    %rax,%rbx
lea    0xe90(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <emscripten_run_script@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"writedebug(\22%s\22);\00"
define void @c_writedebug(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 4096)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 @emscripten_run_script(i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"writedebug(\22%s\22);\00"
define void @c_writedebug(i8* %0) {
%2 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @emscripten_run_script(i8* %2)
%9 = tail call i32 @free(i8* %2)
ret void
}
int d_gt_mr1(double *a1, double a2) { return (((*a1) > (a2))); }


x86 assembly (clang, -O0):
<d_gt_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_gt_mr1>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @d_gt_mr1(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* %5
%7 = load double, double* %4
%8 = fcmp ogt double %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_gt_mr1(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp ogt double %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
const char *ti_version() { return "0.8.4"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0.8.4\00"
define i8* @ti_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.8.4\00"
define i8* @ti_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ intif_request_partyinfo(int);
void party_request_info(int party_id) {
  intif_request_partyinfo(party_id);
  return;
}


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

x86 assembly (clang, -O2):
<party_request_info>:
jmp    1030 <intif_request_partyinfo@plt>

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

LLVM IR (-O2):
define void @party_request_info(i32 %0) {
%2 = tail call i32 @intif_request_partyinfo(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ unix_error(char *);
void Fclose(FILE *stream) {
  if (fclose(stream) == EOF) {
    unix_error("fclose failed");
  }
}


x86 assembly (clang, -O0):
<Fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%rax
jne    1151 <Fclose+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <unix_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fclose>:
push   %rax
call   1030 <fclose@plt>
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%rax
jne    113f <Fclose+0x1f>
lea    0xec7(%rip),%rdi
pop    %rax
jmp    1040 <unix_error@plt>
pop    %rax
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [14 x i8] c"fclose failed\00"
define void @Fclose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @fclose(i32* %3)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @unix_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [14 x i8] c"fclose failed\00"
define void @Fclose(i32* nocapture %0) {
%2 = tail call i64 @fclose(i32* %0)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @unix_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *canonicalize_file_name(char const *);
char *realpath(const char *restrict filename, char *restrict null) {
  if (null)
    abort();
  return canonicalize_file_name(filename);
}


x86 assembly (clang, -O0):
<realpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <realpath+0x22>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1040 <canonicalize_file_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realpath>:
test   %rsi,%rsi
jne    112a <realpath+0xa>
jmp    1040 <canonicalize_file_name@plt>
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @realpath(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i8* @canonicalize_file_name(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @realpath(i8* noalias %0, i8* noalias readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = tail call i8* @canonicalize_file_name(i8* %0)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void Send_Copyright(void) { exit(-1); }


x86 assembly (clang, -O0):
<Send_Copyright>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Send_Copyright>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @Send_Copyright() {
%1 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @Send_Copyright() {
%1 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XReconfigureWMWindow() {
  printf("XReconfigureWMWindow called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"XReconfigureWMWindow called\00"
define i32 @XReconfigureWMWindow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
long int rightChildIndex(long int index) { return (index << 1) + 1; }


x86 assembly (clang, -O0):
<rightChildIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightChildIndex>:
lea    (%rdi,%rdi,1),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @rightChildIndex(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 1
%5 = add nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @rightChildIndex(i64 %0) {
%2 = shl i64 %0, 1
%3 = or i64 %2, 1
ret i64 %3
}
void EntrarDato(int dato, int ind_p) {
  extern vector[100];
  vector[ind_p] = dato;
}


x86 assembly (clang, -O0):
<EntrarDato>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
movslq -0x8(%rbp),%rcx
mov    0x2ed0(%rip),%rax
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EntrarDato>:
movslq %esi,%rax
mov    0x2ede(%rip),%rcx
mov    %edi,(%rcx,%rax,4)
ret

LLVM IR (-O0):
@vector = external global [100 x i32]
define void @EntrarDato(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 = sext i32 %6 to i64
%8 = getelementptr inbounds [100 x i32], [100 x i32]* @vector, i64 0, i64 %7
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
@vector = external global [100 x i32]
define void @EntrarDato(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [100 x i32], [100 x i32]* @vector, i64 0, i64 %3
store i32 %0, i32* %4
ret void
}
/* Variables and functions */
double sqrt(double);
double przeciwprostokatna(double a, double b) { return sqrt(a * a + b * b); }


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

x86 assembly (clang, -O2):
<przeciwprostokatna>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <przeciwprostokatna+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @przeciwprostokatna(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @przeciwprostokatna(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
unsigned short runtime_class(long);
void mustBe(unsigned short class, long x) {
  if (runtime_class(x) != class)
    die("Type error.");
}


x86 assembly (clang, -O0):
<mustBe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <runtime_class@plt>
movzwl %ax,%eax
movzwl -0x2(%rbp),%ecx
cmp    %ecx,%eax
je     1157 <mustBe+0x37>
lea    0xeae(%rip),%rdi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mustBe>:
push   %rbx
mov    %edi,%ebx
mov    %rsi,%rdi
call   1030 <runtime_class@plt>
cmp    %bx,%ax
jne    1132 <mustBe+0x12>
pop    %rbx
ret
lea    0xec7(%rip),%rdi
pop    %rbx
jmp    1040 <die@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Type error.\00"
define void @mustBe(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call zeroext i16 @runtime_class(i64 %5)
%7 = zext i16 %6 to i32
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = icmp ne i32 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Type error.\00"
define void @mustBe(i16 zeroext %0, i64 %1) {
%3 = tail call zeroext i16 @runtime_class(i64 %1)
%4 = icmp eq i16 %3, %0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cs2srcb(void *);
void cs2srcb_(void *remcb) { cs2srcb(remcb); }


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

x86 assembly (clang, -O2):
<cs2srcb_>:
jmp    1030 <cs2srcb@plt>

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

LLVM IR (-O2):
define void @cs2srcb_(i8* %0) {
%2 = tail call i32 @cs2srcb(i8* %0)
ret void
}
/* Variables and functions */
int f2();
int f1(void) { return f2(); }


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

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

LLVM IR (-O0):
define i32 @f1() {
%1 = call i32 (...) @f2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @f1() {
%1 = tail call i32 (...) @f2()
ret i32 %1
}
int libc_ads(int i) { return (i) ? 0 : 1; }


x86 assembly (clang, -O0):
<libc_ads>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libc_ads>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @libc_ads(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __real_write(int, void const *, size_t);
int /*<<< orphan*/ printf(char *, size_t);
ssize_t __wrap_write(int fd, const void *buf, size_t count) {
  printf("write:chars#:%lu\n", count);
  ssize_t result = __real_write(fd, buf, count);
  return result;
}


x86 assembly (clang, -O0):
<__wrap_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <__real_write@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_write>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xecd(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <__real_write@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"write:chars#:%lu\0A\00"
define i32 @__wrap_write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @__real_write(i32 %10, i8* %11, i64 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
@.str = [18 x i8] c"write:chars#:%lu\0A\00"
define i32 @__wrap_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %2)
%5 = tail call i32 @__real_write(i32 %0, i8* %1, i64 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ standard_extension(char *, char *, char *);
void rdf2_filename(char *inname, char *outname) {
  standard_extension(inname, outname, ".rdf");
}


x86 assembly (clang, -O0):
<rdf2_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <standard_extension@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdf2_filename>:
lea    0xee9(%rip),%rdx
jmp    1030 <standard_extension@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".rdf\00"
define void @rdf2_filename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @standard_extension(i8* %5, i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".rdf\00"
define void @rdf2_filename(i8* %0, i8* %1) {
%3 = tail call i32 @standard_extension(i8* %0, i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
char *procprt_VDATA_e(struct tstat *curstat, int avgval, int nsecs) {
  return "    0K";
}


x86 assembly (clang, -O0):
<procprt_VDATA_e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_VDATA_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_VDATA_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ qsort(void *, size_t, size_t,
                         int (*)(void const *, void const *));
extern void qsort_(void *array, int *len, int *isize,
                   int (*compar)(const void *, const void *)) {
  qsort(array, (size_t)*len, (size_t)*isize, compar);
}


x86 assembly (clang, -O0):
<qsort_>:
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),%rax
movslq (%rax),%rsi
mov    -0x18(%rbp),%rax
movslq (%rax),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_>:
movslq (%rsi),%rsi
movslq (%rdx),%rdx
jmp    1030 <qsort@plt>

LLVM IR (-O0):
define void @qsort_(i8* %0, i32* %1, i32* %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = sext i32 %14 to i64
%16 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%17 = call i32 @qsort(i8* %9, i64 %12, i64 %15, i32 (i8*, i8*)* %16)
ret void
}

LLVM IR (-O2):
define void @qsort_(i8* %0, i32* nocapture %1, i32* nocapture %2, i32 (i8*, i8*)* nocapture %3) {
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = tail call i32 @qsort(i8* %0, i64 %6, i64 %8, i32 (i8*, i8*)* %3)
ret void
}
int ext2_hook_check(struct fs_st *fs) {
  if (!fs)
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<ext2_hook_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <ext2_hook_check+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1126 <ext2_hook_check+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.fs_st = type opaque
define i32 @ext2_hook_check(%struct.fs_st* %0) {
%2 = alloca i32
%3 = alloca %struct.fs_st*
store %struct.fs_st* %0, %struct.fs_st** %3
%4 = load %struct.fs_st*, %struct.fs_st** %3
%5 = icmp ne %struct.fs_st* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.fs_st = type opaque
define i32 @ext2_hook_check(%struct.fs_st* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int function(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  printf("%d\n", function(a, b, c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <function@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @function(i32 %8, i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
extern void prefetchw(const void *ptr) { __builtin_prefetch(ptr, 1, 3); }


x86 assembly (clang, -O0):
<prefetchw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
prefetcht0 (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefetchw>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetchw(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 1, i32 3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Term_erase(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ Term_gotoxy(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ roff_name(int, int);
void roff_top(int r_idx, int ego) {
  Term_erase(0, 0, 255);
  Term_gotoxy(0, 0);
  roff_name(r_idx, ego);
}


x86 assembly (clang, -O0):
<roff_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %esi,%esi
mov    $0xff,%edx
mov    %esi,%edi
call   1050 <Term_erase@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <Term_gotoxy@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <roff_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roff_top>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    $0xff,%edx
call   1050 <Term_erase@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <Term_gotoxy@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <roff_name@plt>

LLVM IR (-O0):
define void @roff_top(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Term_erase(i32 0, i32 0, i32 255)
%6 = call i32 @Term_gotoxy(i32 0, i32 0)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @roff_name(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @roff_top(i32 %0, i32 %1) {
%3 = tail call i32 @Term_erase(i32 0, i32 0, i32 255)
%4 = tail call i32 @Term_gotoxy(i32 0, i32 0)
%5 = tail call i32 @roff_name(i32 %0, i32 %1)
ret void
}
void f10() {
  char a1[4] = "abc";
  char a3[6] = "abc";
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xef1(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeeb(%rip),%ax
mov    %ax,-0x6(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.f10.a1 = [4 x i8] c"abc\00"
@__const.f10.a3 = [6 x i8] c"abc\00\00\00"
define void @f10() {
%1 = alloca [4 x i8]
%2 = alloca [6 x i8]
%3 = bitcast [4 x i8]* %1 to i8*
%4 = bitcast [6 x i8]* %2 to i8*
ret void
}

LLVM IR (-O2):
define void @f10() {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2CMasterLineStateGet(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x0000002C))));
}


x86 assembly (clang, -O0):
<I2CMasterLineStateGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterLineStateGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x2c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
int Cyc_BansheeIf_discharge_implications(void) { ; }


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

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

LLVM IR (-O0):
define i32 @Cyc_BansheeIf_discharge_implications() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @Cyc_BansheeIf_discharge_implications() {
ret i32 undef
}
/* Variables and functions */
void *malloc(int);
int *mallocArraySize() {
  static const int sTable[10];
  static const int nestedTable[10][2];
  int *table = malloc(sizeof sTable);
  int *table1 = malloc(sizeof nestedTable);
  int(*table2)[2] = malloc(sizeof nestedTable);
  int(*table3)[10][2] = malloc(sizeof nestedTable);
  return table;
}


x86 assembly (clang, -O0):
<mallocArraySize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocArraySize>:
mov    $0x28,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
@mallocArraySize.sTable = internal constant [10 x i32] zeroinitializer
@mallocArraySize.nestedTable = internal constant [10 x [2 x i32]] zeroinitializer
define i32* @mallocArraySize() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca [2 x i32]*
%4 = alloca [10 x [2 x i32]]*
%5 = call i8* @malloc(i32 40)
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %1
%7 = call i8* @malloc(i32 80)
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %2
%9 = call i8* @malloc(i32 80)
%10 = bitcast i8* %9 to [2 x i32]*
store [2 x i32]* %10, [2 x i32]** %3
%11 = call i8* @malloc(i32 80)
%12 = bitcast i8* %11 to [10 x [2 x i32]]*
store [10 x [2 x i32]]* %12, [10 x [2 x i32]]** %4
%13 = load i32*, i32** %1
ret i32* %13
}

LLVM IR (-O2):
define noalias i32* @mallocArraySize() {
%1 = tail call dereferenceable_or_null(40) i8* @malloc(i32 40)
%2 = bitcast i8* %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void message() { printf("This is a message.\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"This is a message.\00"
define void @message() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
void __attribute__((weak)) usicCh0Receive(unsigned int val) {
  val = val & 0xFF;
  (((volatile unsigned int *)(0x48000000 + 0x180)))[0] = val;
  if ((unsigned char)val == '\r') {
    (((volatile unsigned int *)(0x48000000 + 0x180)))[0] = '\n';
  }
}


x86 assembly (clang, -O0):
<usicCh0Receive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x48000180,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0xd,%eax
jne    1136 <usicCh0Receive+0x36>
mov    $0x48000180,%eax
movl   $0xa,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<usicCh0Receive>:
movzbl %dil,%eax
mov    %eax,0x48000180
cmp    $0xd,%eax
jne    111b <usicCh0Receive+0x1b>
movl   $0xa,0x48000180
ret

LLVM IR (-O0):
define weak void @usicCh0Receive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
store i32 %4, i32* %2
%5 = load i32, i32* %2
store volatile i32 %5, i32* inttoptr (i64 1207959936 to i32*)
%6 = load i32, i32* %2
%7 = trunc i32 %6 to i8
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 13
br i1 %9, label %10, label %11
10: ; preds = %1
store volatile i32 10, i32* inttoptr (i64 1207959936 to i32*)
br label %11
11: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
define weak void @usicCh0Receive(i32 %0) {
%2 = and i32 %0, 255
store volatile i32 %2, i32* inttoptr (i64 1207959936 to i32*)
%3 = icmp eq i32 %2, 13
br i1 %3, label %4, label %5
4: ; preds = %1
store volatile i32 10, i32* inttoptr (i64 1207959936 to i32*)
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_char(unsigned char);
void print_info_char(unsigned char byte) { __console_tx_char(byte); }


x86 assembly (clang, -O0):
<print_info_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <__console_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info_char>:
jmp    1030 <__console_tx_char@plt>

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

LLVM IR (-O2):
define void @print_info_char(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_char(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
void check_ch(int ch) { printf("you hit %c %d\n", (char)ch, ch); }


x86 assembly (clang, -O0):
<check_ch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
lea    0xed8(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ch>:
mov    %edi,%edx
movsbl %dl,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"you hit %c %d\0A\00"
define void @check_ch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext %4, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"you hit %c %d\0A\00"
define void @check_ch(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext %2, i32 %0)
ret void
}
void RTPathSetTimes(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathSetTimes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void svg_printf_begin_polyline(void) { printf("<polyline points=\"\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"<polyline points=\22\00"
define void @svg_printf_begin_polyline() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *utf8ndup_ex(void const *, size_t, int /*<<< orphan*/, int /*<<< orphan*/);
void *utf8ndup(const void *src, size_t n) { return utf8ndup_ex(src, n, 0, 0); }


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

x86 assembly (clang, -O2):
<utf8ndup>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <utf8ndup_ex@plt>

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

LLVM IR (-O2):
define i8* @utf8ndup(i8* %0, i64 %1) {
%3 = tail call i8* @utf8ndup_ex(i8* %0, i64 %1, i32 0, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ b1();
int /*<<< orphan*/ b2();
int main() {
  b1();
  b2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <b1@plt>
mov    $0x0,%al
call   1030 <b2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @b1()
%3 = call i32 (...) @b2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @b1()
%2 = tail call i32 (...) @b2()
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int equal_string(void *s1, void *s2) {
  char *s1C = (char *)s1;
  char *s2C = (char *)s2;
  if (strcmp(s1C, s2C) == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1153 <equal_string+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115a <equal_string+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
void scmDlClose(sqlite3_vfs *pVfs, void *pHandle) { return; }


x86 assembly (clang, -O0):
<scmDlClose>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @scmDlClose(i32* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int gca_cmp2_int8(const void *aa, const void *bb, void *p) {
  (void)p;
  const int8_t a = *(const int8_t *)aa;
  const int8_t b = *(const int8_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp2_int8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x28(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp2_int8>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp2_int8(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %7
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
store i64 %15, i64* %8
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = icmp sgt i64 %16, %17
%19 = zext i1 %18 to i32
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = icmp sgt i64 %20, %21
%23 = zext i1 %22 to i32
%24 = sub nsw i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @gca_cmp2_int8(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = icmp sgt i64 %5, %7
%9 = zext i1 %8 to i32
%10 = icmp sgt i64 %7, %5
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}
int fst_global_start(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fst_global_start() {
ret i32 0
}
void report_stats(struct thread *tinfo) { (void)tinfo; }


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

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

LLVM IR (-O0):
%struct.thread = type opaque
define void @report_stats(%struct.thread* %0) {
%2 = alloca %struct.thread*
store %struct.thread* %0, %struct.thread** %2
%3 = load %struct.thread*, %struct.thread** %2
ret void
}

LLVM IR (-O2):
%struct.thread = type opaque
define void @report_stats(%struct.thread* nocapture %0) {
ret void
}