xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ play(int **);
void main() {
  int a[4][4] = {};
  play(a);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
call   1040 <play@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <play@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %1, i64 0, i64 0
%4 = bitcast [4 x i32]* %3 to i32**
%5 = call i32 @play(i32** %4)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = bitcast [4 x [4 x i32]]* %1 to i32**
%4 = call i32 @play(i32** %3)
ret void
}
int scanf(format)
char *format;
{
  int getchar(), ungetch();
  return _scn(&format, getchar, ungetch);
}


x86 assembly (clang, -O0):
<scanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rsi
mov    0x2ebe(%rip),%rdx
xor    %eax,%eax
lea    -0x8(%rbp),%rdi
call   1030 <_scn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanf>:
push   %rax
mov    %rdi,(%rsp)
mov    0x2ebc(%rip),%rsi
mov    0x2ec5(%rip),%rdx
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <_scn@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @scanf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8**, i32 (...)*, i32 (...)*, ...) bitcast (i32 (...)* @_scn to i32 (i8**, i32 (...)*, i32 (...)*, ...)*)(i8** %2, i32 (...)* @getchar, i32 (...)* @ungetch)
ret i32 %3
}

LLVM IR (-O2):
define i32 @scanf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8**, i32 (...)*, i32 (...)*, ...) bitcast (i32 (...)* @_scn to i32 (i8**, i32 (...)*, i32 (...)*, ...)*)(i8** %2, i32 (...)* @getchar, i32 (...)* @ungetch)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%zd", sizeof(void *) * 8);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x40,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%zd\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 64)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%zd\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 64)
ret i32 0
}
int fun931() { return 931; }


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

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

LLVM IR (-O0):
define i32 @fun931() {
ret i32 931
}

LLVM IR (-O2):
define i32 @fun931() {
ret i32 931
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Func() { printf("DEBUG: What's up?!\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"DEBUG: What's up?!\0A\00"
define void @Func() {
%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"DEBUG: What's up?!\00"
define void @Func() {
%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 */
bool PDC_scrn_modes_equal(int mode1, int mode2) { return (mode1 == mode2); }


x86 assembly (clang, -O0):
<PDC_scrn_modes_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDC_scrn_modes_equal>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @PDC_scrn_modes_equal(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Clear163(unsigned long);
void clear(unsigned long c) { Clear163(c); }


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

x86 assembly (clang, -O2):
<clear>:
jmp    1030 <Clear163@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @gl2psPrintGzipFooter() {
ret void
}
/* Type definitions */
typedef int uint16_t;
struct pcg_state_32 {
  int dummy;
};

/* Variables and functions */
int pcg_oneseq_32_xsh_rr_16_random_r(struct pcg_state_32 *);
uint16_t pcg_oneseq_32_xsh_rr_16_boundedrand_r(struct pcg_state_32 *rng,
                                               uint16_t bound) {
  uint16_t threshold = ((uint16_t)(-bound)) % bound;
  for (;;) {
    uint16_t r = pcg_oneseq_32_xsh_rr_16_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_oneseq_32_xsh_rr_16_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_oneseq_32_xsh_rr_16_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_oneseq_32_xsh_rr_16_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_oneseq_32_xsh_rr_16_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_oneseq_32_xsh_rr_16_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_oneseq_32_xsh_rr_16_random_r@plt>
test   %eax,%eax
js     1120 <pcg_oneseq_32_xsh_rr_16_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_32 = type { i32 }
define i32 @pcg_oneseq_32_xsh_rr_16_boundedrand_r(%struct.pcg_state_32* %0, i32 %1) {
%3 = alloca %struct.pcg_state_32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_32* %0, %struct.pcg_state_32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_32*, %struct.pcg_state_32** %3
%13 = call i32 @pcg_oneseq_32_xsh_rr_16_random_r(%struct.pcg_state_32* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_32 = type { i32 }
define i32 @pcg_oneseq_32_xsh_rr_16_boundedrand_r(%struct.pcg_state_32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_oneseq_32_xsh_rr_16_random_r(%struct.pcg_state_32* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
struct regulator *regulator_get(struct device_d *dev, const char *id) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.regulator = type opaque
%struct.device_d = type opaque
define %struct.regulator* @regulator_get(%struct.device_d* %0, i8* %1) {
%3 = alloca %struct.device_d*
%4 = alloca i8*
store %struct.device_d* %0, %struct.device_d** %3
store i8* %1, i8** %4
ret %struct.regulator* null
}

LLVM IR (-O2):
%struct.regulator = type opaque
%struct.device_d = type opaque
define noalias %struct.regulator* @regulator_get(%struct.device_d* nocapture readnone %0, i8* nocapture readnone %1) {
ret %struct.regulator* null
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("!!!Hello World");
  char address[50] = "Middlesex University NW4 4BT NORTH LONDON ";
  char stack[20] = "DevOps Engineering";
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    -0x40(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x32,%edx
call   1040 <memcpy@plt>
mov    0xf00(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xefd(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xefb(%rip),%eax
mov    %eax,-0x50(%rbp)
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"!!!Hello World\00"
@__const.main.address = [50 x i8] c"Middlesex University NW4 4BT NORTH LONDON \00\00\00\00\00\00\00\00"
@__const.main.stack = [20 x i8] c"DevOps Engineering\00\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [20 x i8]
%3 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [50 x i8]* %1 to i8*
%5 = bitcast [20 x i8]* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"!!!Hello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int getpid();
void write_pid() {
  FILE *fp;
  fp = fopen("/var/run/ip_485_gw.pid", "w");
  fprintf(fp, "%d", getpid());
  fclose(fp);
}


x86 assembly (clang, -O0):
<write_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
lea    0xe9e(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pid>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"/var/run/ip_485_gw.pid\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"%d\00"
define void @write_pid() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 (...) @getpid()
%5 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %1
%7 = call i32 @fclose(i32* %6)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"/var/run/ip_485_gw.pid\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"%d\00"
define void @write_pid() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fclose(i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t my_time(time_t *tloc) { return time(tloc); }


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

x86 assembly (clang, -O2):
<my_time>:
jmp    1030 <time@plt>

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

LLVM IR (-O2):
define i32 @my_time(i32* %0) {
%2 = tail call i32 @time(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_error(char *s_error) {
  fprintf(stderr, "%s\n", s_error);
  exit(3);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @print_error(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)
%6 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @print_error(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)
%4 = tail call i32 @exit(i32 3)
unreachable
}
/* Variables and functions */
char *ttodata(char const *, size_t, int /*<<< orphan*/, char *, size_t,
              size_t *);
size_t atodata(const char *src, size_t srclen, char *dst, size_t dstlen) {
  size_t len;
  const char *err;
  err = ttodata(src, srclen, 0, dst, dstlen, &len);
  if (err != NULL)
    return 0;
  return len;
}


x86 assembly (clang, -O0):
<atodata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %edx,%edx
lea    -0x30(%rbp),%r9
call   1030 <ttodata@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     115f <atodata+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    1167 <atodata+0x57>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atodata>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r8
mov    %rdx,%rcx
xor    %ebx,%ebx
lea    0x8(%rsp),%r9
xor    %edx,%edx
call   1030 <ttodata@plt>
test   %rax,%rax
jne    1133 <atodata+0x23>
mov    0x8(%rsp),%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @atodata(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = call i8* @ttodata(i8* %0, i64 %1, i32 0, i8* %2, i64 %3, i64* %5)
%8 = icmp eq i8* %7, null
%9 = load i64, i64* %5
%10 = select i1 %8, i64 %9, i64 0
ret i64 %10
}
void console_record_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @console_record_reset() {
ret void
}
/* Variables and functions */
int maze_solve_helper_2(char **);
int maze_solve(char maze[41][81]) { return maze_solve_helper_2(maze); }


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

x86 assembly (clang, -O2):
<maze_solve>:
jmp    1030 <maze_solve_helper_2@plt>

LLVM IR (-O0):
define i32 @maze_solve([81 x i8]* %0) {
%2 = alloca [81 x i8]*
store [81 x i8]* %0, [81 x i8]** %2
%3 = load [81 x i8]*, [81 x i8]** %2
%4 = bitcast [81 x i8]* %3 to i8**
%5 = call i32 @maze_solve_helper_2(i8** %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @maze_solve([81 x i8]* %0) {
%2 = bitcast [81 x i8]* %0 to i8**
%3 = tail call i32 @maze_solve_helper_2(i8** %2)
ret i32 %3
}
/* Variables and functions */
int ffsl(long);
int __ffsl(long mask) { return (ffsl(mask) - 1); }


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

x86 assembly (clang, -O2):
<__ffsl>:
bsf    %rdi,%rcx
cmp    $0x1,%rdi
sbb    %eax,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__ffsl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @ffsl(i64 %3)
%5 = sub nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @__ffsl(i64 %0) {
%2 = tail call i64 @llvm.cttz.i64(i64 %0, i1 true)
%3 = trunc i64 %2 to i32
%4 = icmp eq i64 %0, 0
%5 = select i1 %4, i32 -1, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __asan_init();
void __asan_init_v1() { __asan_init(); }


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

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

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

LLVM IR (-O2):
define void @__asan_init_v1() {
%1 = tail call i32 (...) @__asan_init()
ret void
}
void FORBLOCK(int x) {}


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

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

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

LLVM IR (-O2):
define void @FORBLOCK(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadu_ps(float *);
__m128 test_mm_loadu_ps(float *A) { return _mm_loadu_ps(A); }


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

x86 assembly (clang, -O2):
<test_mm_loadu_ps>:
jmp    1030 <_mm_loadu_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_loadu_ps(float* %0) {
%2 = tail call i32 @_mm_loadu_ps(float* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_dl_save_numeric(void *, char *);
void umf4snum(void **Numeric, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "n", filename);
  *status = umfpack_dl_save_numeric(*Numeric, filename);
}


x86 assembly (clang, -O0):
<umf4snum>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1040 <make_filename@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <umfpack_dl_save_numeric@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4snum>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1040 <make_filename@plt>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1030 <umfpack_dl_save_numeric@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"n\00"
define void @umf4snum(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%15 = call i64 @umfpack_dl_save_numeric(i8* %13, i8* %14)
%16 = load i64*, i64** %6
store i64 %15, i64* %16
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"n\00"
define void @umf4snum(i8** nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i8*, i8** %0
%9 = call i64 @umfpack_dl_save_numeric(i8* %8, i8* %5)
store i64 %9, i64* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int);
int get_qos_flags(void *data) {
  int32_t *qosf = (int32_t *)data;
  *qosf = htonl(0x20000000);
  return 1;
}


x86 assembly (clang, -O0):
<get_qos_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x20000000,%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_qos_flags>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20000000,%edi
call   1030 <htonl@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_qos_flags(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = call i32 @htonl(i32 536870912)
%7 = load i32*, i32** %3
store i32 %6, i32* %7
ret i32 1
}

LLVM IR (-O2):
define i32 @get_qos_flags(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @htonl(i32 536870912)
store i32 %3, i32* %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pexit(char *msg) {
  perror(msg);
  exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<pexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pexit>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @pexit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @pexit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ isupper(int);
int toupper(int c) {
  if (isupper(c)) {
    return c;
  }
  return c - ('a' - 'A');
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1138 <toupper+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmovne %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int min_caml_truncate(void *fv, double f) { return (int)f; }


x86 assembly (clang, -O0):
<min_caml_truncate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_caml_truncate>:
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @min_caml_truncate(i8* nocapture readnone %0, double %1) {
%3 = fptosi double %1 to i32
ret i32 %3
}
double test_cimag(_Complex double x) { return __builtin_cimag(x); }


x86 assembly (clang, -O0):
<test_cimag>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cimag>:
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @test_cimag(double %0, double returned %1) {
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xf1() {
  Assert_real((islower(241) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              1210, ("islower should be 0 for 0xf1"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf1\00"
define void @t_islower_0xf1() {
%1 = call i64 @islower(i32 241)
%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 1210, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf1\00"
define void @t_islower_0xf1() {
%1 = tail call i64 @islower(i32 241)
%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 1210, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file) {}


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
%struct.file = type opaque
define void @set_mm_exe_file(%struct.mm_struct* %0, %struct.file* %1) {
%3 = alloca %struct.mm_struct*
%4 = alloca %struct.file*
store %struct.mm_struct* %0, %struct.mm_struct** %3
store %struct.file* %1, %struct.file** %4
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.file = type opaque
define void @set_mm_exe_file(%struct.mm_struct* nocapture %0, %struct.file* nocapture %1) {
ret void
}
void DebugMemCheckEndPoint(void) {}


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

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

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

LLVM IR (-O2):
define void @DebugMemCheckEndPoint() {
ret void
}
char *tocn(char c) {
  char num[10][5] = {"零", "一", "二", "三", "四",
                     "五", "六", "七", "八", "九"};
  printf("%s", num[c - '0']);
  return num[(c - '0')];
}


x86 assembly (clang, -O0):
<tocn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x32,%edx
call   1040 <memcpy@plt>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cltq
lea    -0x40(%rbp),%rsi
imul   $0x5,%rax,%rax
add    %rax,%rsi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tocn>:
push   %rbx
sub    $0x40,%rsp
movzwl 0xf14(%rip),%eax
mov    %ax,0x30(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,(%rsp)
movslq %edi,%rax
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,1),%rbx
add    $0xffffffffffffff10,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.tocn.num = [10 x [5 x i8]] [[5 x i8] c"\E9\9B\B6\00\00", [5 x i8] c"\E4\B8\80\00\00", [5 x i8] c"\E4\BA\8C\00\00", [5 x i8] c"\E4\B8\89\00\00", [5 x i8] c"\E5\9B\9B\00\00", [5 x i8] c"\E4\BA\94\00\00", [5 x i8] c"\E5\85\AD\00\00", [5 x i8] c"\E4\B8\83\00\00", [5 x i8] c"\E5\85\AB\00\00", [5 x i8] c"\E4\B9\9D\00\00"]
@.str = [3 x i8] c"%s\00"
define i8* @tocn(i8 signext %0) {
%2 = alloca i8
%3 = alloca [10 x [5 x i8]]
store i8 %0, i8* %2
%4 = bitcast [10 x [5 x i8]]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [10 x [5 x i8]], [10 x [5 x i8]]* %3, i64 0, i64 %8
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x [5 x i8]], [10 x [5 x i8]]* %3, i64 0, i64 %15
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 0
ret i8* %17
}

LLVM IR (-O2):
@__const.tocn.num = [10 x [5 x i8]] [[5 x i8] c"\E9\9B\B6\00\00", [5 x i8] c"\E4\B8\80\00\00", [5 x i8] c"\E4\BA\8C\00\00", [5 x i8] c"\E4\B8\89\00\00", [5 x i8] c"\E5\9B\9B\00\00", [5 x i8] c"\E4\BA\94\00\00", [5 x i8] c"\E5\85\AD\00\00", [5 x i8] c"\E4\B8\83\00\00", [5 x i8] c"\E5\85\AB\00\00", [5 x i8] c"\E4\B9\9D\00\00"]
@.str = [3 x i8] c"%s\00"
define i8* @tocn(i8 signext %0) {
%2 = alloca [10 x [5 x i8]]
%3 = getelementptr inbounds [10 x [5 x i8]], [10 x [5 x i8]]* %2, i64 0, i64 0, i64 0
%4 = sext i8 %0 to i64
%5 = add nsw i64 %4, -48
%6 = getelementptr inbounds [10 x [5 x i8]], [10 x [5 x i8]]* %2, i64 0, i64 %5, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void debug_dump_u8(uint8_t *buf, int len, unsigned int addr) {}


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

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

LLVM IR (-O0):
define void @debug_dump_u8(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @debug_dump_u8(i32* nocapture %0, i32 %1, i32 %2) {
ret void
}
__attribute__((always_)) int
module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
                   char *name, char *module_name, int *exported) {
  return -34;
}


x86 assembly (clang, -O0):
<module_get_kallsym>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0xffffffde,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @module_get_kallsym(i32 %0, i64* %1, i8* %2, i8* %3, i8* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
store i32 %0, i32* %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32* %5, i32** %12
ret i32 -34
}

LLVM IR (-O2):
define i32 @module_get_kallsym(i32 %0, i64* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32* nocapture readnone %5) {
ret i32 -34
}
const char *five_loud() {
  char *loud;
  loud = "FIVE";
  return loud;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"FIVE\00"
define i8* @five_loud() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"FIVE\00"
define i8* @five_loud() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double sqrt(double);
double get(double x, double y) { return sqrt(x * x + y * y); }


x86 assembly (clang, -O0):
<get>:
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):
<get>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <get+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @get(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 @get(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 */
double exp(double);
double sigmoid_grad(double x) {
  return exp(-x) / ((1.0 + exp(-x)) * (1.0 + exp(-x)));
}


x86 assembly (clang, -O0):
<sigmoid_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x10(%rbp),%xmm0
movsd  0xe52(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid_grad>:
sub    $0x28,%rsp
xorps  0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
call   1030 <exp@plt>
addsd  0xed2(%rip),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x10(%rsp),%xmm0
call   1030 <exp@plt>
addsd  0xeba(%rip),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @sigmoid_grad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
%6 = load double, double* %2
%7 = fneg double %6
%8 = call double @exp(double %7)
%9 = fadd double 1.000000e+00, %8
%10 = load double, double* %2
%11 = fneg double %10
%12 = call double @exp(double %11)
%13 = fadd double 1.000000e+00, %12
%14 = fmul double %9, %13
%15 = fdiv double %5, %14
ret double %15
}

LLVM IR (-O2):
define double @sigmoid_grad(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
%4 = tail call double @exp(double %2)
%5 = fadd double %4, 1.000000e+00
%6 = tail call double @exp(double %2)
%7 = fadd double %6, 1.000000e+00
%8 = fmul double %5, %7
%9 = fdiv double %3, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void m3f_copy_m3fo(const float *m, float *result) {
  memcpy(result, m, 9 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<m3f_copy_m3fo>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x24,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @m3f_copy_m3fo(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = load float*, float** %3
%7 = call i32 @memcpy(float* %5, float* %6, i32 36)
ret void
}

LLVM IR (-O2):
define void @m3f_copy_m3fo(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 36)
ret void
}
/* Variables and functions */
int buddyFree(void *);
int liballoc_free(void *ptr, size_t pages) { return buddyFree(ptr); }


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

x86 assembly (clang, -O2):
<liballoc_free>:
jmp    1030 <buddyFree@plt>

LLVM IR (-O0):
define i32 @liballoc_free(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 = call i32 @buddyFree(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @liballoc_free(i8* %0, i64 %1) {
%3 = tail call i32 @buddyFree(i8* %0)
ret i32 %3
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_error_get_errno(const void *e) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_error_get_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_error_get_errno>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_error_get_errno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_error_get_errno(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void OS_EndProgram2(void) {}


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

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

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

LLVM IR (-O2):
define void @OS_EndProgram2() {
ret void
}
void amd_pmu_disable_virt(void) {}


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

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

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

LLVM IR (-O2):
define void @amd_pmu_disable_virt() {
ret void
}
__attribute__((no, noclone)) void foo(char *str, char c) {
  asm volatile("" : : "r"(str), "r"(c) : "memory");
  *str = c;
}


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

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

LLVM IR (-O0):
define void @foo(i8* %0, i8 signext %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 = load i8, i8* %4
%8 = load i8*, i8** %3
store i8 %7, i8* %8
ret void
}

LLVM IR (-O2):
define void @foo(i8* %0, i8 signext %1) {
tail call void asm sideeffect "", "r,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8 %1)
store i8 %1, i8* %0
ret void
}
void setproctitle(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @setproctitle(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int exp(double);
double md3(double i, int dummy, double n) {
  double ratio;
  ratio = (exp(i * n) - 1) / (exp(i / 12) - 1);
  return (ratio);
}


x86 assembly (clang, -O0):
<md3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
sub    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md3>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
mov    %eax,%ebx
add    $0xffffffff,%ebx
movsd  0x8(%rsp),%xmm0
divsd  0xec5(%rip),%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @md3(double %0, i32 %1, double %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store i32 %1, i32* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %6
%10 = fmul double %8, %9
%11 = call i32 @exp(double %10)
%12 = sub nsw i32 %11, 1
%13 = load double, double* %4
%14 = fdiv double %13, 1.200000e+01
%15 = call i32 @exp(double %14)
%16 = sub nsw i32 %15, 1
%17 = sdiv i32 %12, %16
%18 = sitofp i32 %17 to double
store double %18, double* %7
%19 = load double, double* %7
ret double %19
}

LLVM IR (-O2):
define double @md3(double %0, i32 %1, double %2) {
%4 = fmul double %0, %2
%5 = tail call i32 @exp(double %4)
%6 = add nsw i32 %5, -1
%7 = fdiv double %0, 1.200000e+01
%8 = tail call i32 @exp(double %7)
%9 = add nsw i32 %8, -1
%10 = sdiv i32 %6, %9
%11 = sitofp i32 %10 to double
ret double %11
}
void func3() {
  int i = 11, j = 999;
  printf("\t\t\t[in func3] i @ 0x%08x = %d\n", &i, i);
  printf("\t\t\t[in func3] j @ 0x%08x = %d\n", &j, j);
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xb,-0x4(%rbp)
movl   $0x3e7,-0x8(%rbp)
mov    -0x4(%rbp),%edx
lea    0xed0(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edx
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
push   %rax
movl   $0xb,0x4(%rsp)
movl   $0x3e7,(%rsp)
lea    0xed9(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
mov    $0x3e7,%edx
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\09\09\09[in func3] i @ 0x%08x = %d\0A\00"
@.str.1 = [31 x i8] c"\09\09\09[in func3] j @ 0x%08x = %d\0A\00"
define void @func3() {
%1 = alloca i32
%2 = alloca i32
store i32 11, i32* %1
store i32 999, i32* %2
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32* %1, i32 %3)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"\09\09\09[in func3] i @ 0x%08x = %d\0A\00"
@.str.1 = [31 x i8] c"\09\09\09[in func3] j @ 0x%08x = %d\0A\00"
define void @func3() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 11, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 999, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32* %1, i32 11)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32 999)
ret void
}