xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void make_checks_document_heading(FILE *latex_file) {
  fprintf(latex_file, "\\documentclass{report}\n"
                      "\\usepackage[	portrait,\n"
                      "		top=0in,\n"
                      "		left=0in,\n"
                      "		paperheight=2.875in,\n"
                      "		paperwidth=8.5in,\n"
                      "		textheight=2.875in,\n"
                      "		textwidth=8.5in,\n"
                      "		noheadfoot]{geometry}\n"
                      "\\pagenumbering{gobble}\n"
                      "\\begin{document}\n");
}


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

x86 assembly (clang, -O2):
<make_checks_document_heading>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xd9,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [218 x i8] c"\\documentclass{report}\0A\\usepackage[\09portrait,\0A\09\09top=0in,\0A\09\09left=0in,\0A\09\09paperheight=2.875in,\0A\09\09paperwidth=8.5in,\0A\09\09textheight=2.875in,\0A\09\09textwidth=8.5in,\0A\09\09noheadfoot]{geometry}\0A\\pagenumbering{gobble}\0A\\begin{document}\0A\00"
define void @make_checks_document_heading(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([218 x i8], [218 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [218 x i8] c"\\documentclass{report}\0A\\usepackage[\09portrait,\0A\09\09top=0in,\0A\09\09left=0in,\0A\09\09paperheight=2.875in,\0A\09\09paperwidth=8.5in,\0A\09\09textheight=2.875in,\0A\09\09textwidth=8.5in,\0A\09\09noheadfoot]{geometry}\0A\\pagenumbering{gobble}\0A\\begin{document}\0A\00"
define void @make_checks_document_heading(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([218 x i8], [218 x i8]* @.str, i64 0, i64 0), i64 217, i64 1, i32* %0)
ret void
}
char **cdio_get_devices_solaris(void) { return ((void *)0); }


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

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

LLVM IR (-O0):
define i8** @cdio_get_devices_solaris() {
ret i8** null
}

LLVM IR (-O2):
define noalias i8** @cdio_get_devices_solaris() {
ret i8** null
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int LOG_NDELAY;
int /*<<< orphan*/ LOG_NOTICE;
int LOG_PERROR;
int LOG_PID;
int /*<<< orphan*/ LOG_UPTO(int /*<<< orphan*/);
int /*<<< orphan*/ openlog(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ setlogmask(int /*<<< orphan*/);
void syslog_open(const char *n) {
  setlogmask(LOG_UPTO(LOG_NOTICE));
  openlog(n, LOG_PERROR | LOG_PID | LOG_NDELAY, LOG_DAEMON);
}


x86 assembly (clang, -O0):
<syslog_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
call   1040 <setlogmask@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
mov    0x2e6b(%rip),%rax
or     (%rax),%esi
mov    0x2e4a(%rip),%rax
or     (%rax),%esi
mov    0x2e71(%rip),%rax
mov    (%rax),%edx
call   1050 <openlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syslog_open>:
push   %rbx
mov    %rdi,%rbx
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
call   1040 <setlogmask@plt>
mov    0x2e90(%rip),%rax
mov    0x2e79(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e56(%rip),%rax
or     (%rax),%esi
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <openlog@plt>

LLVM IR (-O0):
@LOG_NOTICE = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_NDELAY = global i32 0
@LOG_DAEMON = global i32 0
define void @syslog_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_NOTICE
%4 = call i32 @LOG_UPTO(i32 %3)
%5 = call i32 @setlogmask(i32 %4)
%6 = load i8*, i8** %2
%7 = load i32, i32* @LOG_PERROR
%8 = load i32, i32* @LOG_PID
%9 = or i32 %7, %8
%10 = load i32, i32* @LOG_NDELAY
%11 = or i32 %9, %10
%12 = load i32, i32* @LOG_DAEMON
%13 = call i32 @openlog(i8* %6, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@LOG_NOTICE = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_NDELAY = global i32 0
@LOG_DAEMON = global i32 0
define void @syslog_open(i8* %0) {
%2 = load i32, i32* @LOG_NOTICE
%3 = tail call i32 @LOG_UPTO(i32 %2)
%4 = tail call i32 @setlogmask(i32 %3)
%5 = load i32, i32* @LOG_PERROR
%6 = load i32, i32* @LOG_PID
%7 = or i32 %6, %5
%8 = load i32, i32* @LOG_NDELAY
%9 = or i32 %7, %8
%10 = load i32, i32* @LOG_DAEMON
%11 = tail call i32 @openlog(i8* %0, i32 %9, i32 %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int currentTime() {
  time_t curtime;
  struct tm *loctime;
  curtime = time(NULL);
  loctime = localtime(&curtime);
  int seconds =
      loctime->tm_hour * 60 * 60 + loctime->tm_min * 60 + loctime->tm_sec;
  return seconds;
}


x86 assembly (clang, -O0):
<currentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x3c,(%rax),%eax
imul   $0x3c,%eax,%eax
mov    -0x10(%rbp),%rcx
imul   $0x3c,0x4(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
add    0x8(%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentTime>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
imul   $0xe10,(%rax),%edx
imul   $0x3c,0x4(%rax),%ecx
add    %edx,%ecx
add    0x8(%rax),%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define i32 @currentTime() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i32
%4 = call i32 @time(i32* null)
store i32 %4, i32* %1
%5 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %5, %struct.tm** %2
%6 = load %struct.tm*, %struct.tm** %2
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 60
%10 = mul nsw i32 %9, 60
%11 = load %struct.tm*, %struct.tm** %2
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 1
%13 = load i32, i32* %12
%14 = mul nsw i32 %13, 60
%15 = add nsw i32 %10, %14
%16 = load %struct.tm*, %struct.tm** %2
%17 = getelementptr inbounds %struct.tm, %struct.tm* %16, i32 0, i32 2
%18 = load i32, i32* %17
%19 = add nsw i32 %15, %18
store i32 %19, i32* %3
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define i32 @currentTime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul i32 %6, 3600
%8 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 60
%11 = add nsw i32 %10, %7
%12 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 2
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}
void arch_pause(void) { __asm__ __volatile__("pause"); }


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

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

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

LLVM IR (-O2):
define void @arch_pause() {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct cgroup_ops {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cgroup_exit(struct cgroup_ops *);
void __auto_cgroup_exit__(struct cgroup_ops **ops) {
  if (*ops)
    cgroup_exit(*ops);
}


x86 assembly (clang, -O0):
<__auto_cgroup_exit__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <__auto_cgroup_exit__+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <cgroup_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__auto_cgroup_exit__>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <__auto_cgroup_exit__+0xd>
jmp    1030 <cgroup_exit@plt>
ret

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

LLVM IR (-O2):
%struct.cgroup_ops = type { i32 }
define void @__auto_cgroup_exit__(%struct.cgroup_ops** nocapture %0) {
%2 = load %struct.cgroup_ops*, %struct.cgroup_ops** %0
%3 = icmp eq %struct.cgroup_ops* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @cgroup_exit(%struct.cgroup_ops* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int GENL_HDRLEN;
int genlmsg_msg_size(int payload) { return GENL_HDRLEN + payload; }


x86 assembly (clang, -O0):
<genlmsg_msg_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<genlmsg_msg_size>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
add    (%rcx),%eax
ret

LLVM IR (-O0):
@GENL_HDRLEN = global i32 0
define i32 @genlmsg_msg_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @GENL_HDRLEN
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
@GENL_HDRLEN = global i32 0
define i32 @genlmsg_msg_size(i32 %0) {
%2 = load i32, i32* @GENL_HDRLEN
%3 = add nsw i32 %2, %0
ret i32 %3
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  int i;
  i = 0;
  while (s[i]) {
    f(i, &s[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114b <ft_striteri+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rcx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ft_striteri+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = trunc i64 %6 to i32
tail call void %1(i32 %8, i8* %7)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
void redis_check_rdb_main(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               104, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<redis_check_rdb_main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x68,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<redis_check_rdb_main>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x68,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.redis_check_rdb_main = [21 x i8] c"redis_check_rdb_main\00"
define void @redis_check_rdb_main() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 104, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.redis_check_rdb_main, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.redis_check_rdb_main = [21 x i8] c"redis_check_rdb_main\00"
define void @redis_check_rdb_main() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 104, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.redis_check_rdb_main, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isprint(unsigned char);
int isPrint(const char *ptr) { return isprint(*(unsigned char *)ptr); }


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

x86 assembly (clang, -O2):
<isPrint>:
movzbl (%rdi),%edi
jmp    1030 <isprint@plt>

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

LLVM IR (-O2):
define i32 @isPrint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isprint(i8 zeroext %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: pscap [-a]\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"usage: pscap [-a]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
float *vec2_divide(float *result, float *a, float *b) {
  result[0] = a[0] / b[0];
  result[1] = a[1] / b[1];
  return result;
}


x86 assembly (clang, -O0):
<vec2_divide>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
divss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
divss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_divide>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
divss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
divss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
ret

LLVM IR (-O0):
define float* @vec2_divide(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fdiv float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fdiv float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %4
ret float* %25
}

LLVM IR (-O2):
define float* @vec2_divide(float* returned writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fdiv float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fdiv float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
ret float* %0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  while (n != 0) {
    scanf("%d", &n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     114e <main+0x3e>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
jmp    112f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     1152 <main+0x42>
lea    0xecd(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jne    1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %0, %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6, %0
ret i32 0
}
void AONRTCReset(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40092000 + 0x00000000) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40092000 + 0x00000000) & 0x000FFFFF) << 5) |
             ((7) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<AONRTCReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4324001c,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AONRTCReset>:
movq   $0x1,0x4324001c
ret

LLVM IR (-O0):
define void @AONRTCReset() {
store volatile i64 1, i64* inttoptr (i64 1126432796 to i64*)
ret void
}

LLVM IR (-O2):
define void @AONRTCReset() {
store volatile i64 1, i64* inttoptr (i64 1126432796 to i64*)
ret void
}
void g(f) {
  char e[] = {f, f, f, f};
  printf("  __\n /%.2s\\\n/%.4s\\\n|%.4s|\n\\____/\n", e, e, e);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0x8(%rbp),%rcx
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
movzbl %dil,%eax
imul   $0x1010101,%eax,%eax
mov    %eax,0x4(%rsp)
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [35 x i8] c" __\0A /%.2s\\\0A/%.4s\\\0A|%.4s|\0A\\____/\0A\00"
define void @g(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = trunc i32 %5 to i8
store i8 %6, i8* %4
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = load i32, i32* %2
%9 = trunc i32 %8 to i8
store i8 %9, i8* %7
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i32, i32* %2
%12 = trunc i32 %11 to i8
store i8 %12, i8* %10
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i32, i32* %2
%15 = trunc i32 %14 to i8
store i8 %15, i8* %13
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c" __\0A /%.2s\\\0A/%.4s\\\0A|%.4s|\0A\\____/\0A\00"
define void @g(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = trunc i32 %0 to i8
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %3, i8* %3)
ret void
}
void mmm(int y) {
  if (y != 0)
    y++;
  y = y / 0;
}


x86 assembly (clang, -O0):
<mmm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111a <mmm+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mmm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 0
store i32 %10, i32* %2
ret void
}

LLVM IR (-O2):
define void @mmm(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void socketClose(int sockfd, int new_fd) {
  close(new_fd);
  close(sockfd);
}


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

x86 assembly (clang, -O2):
<socketClose>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @socketClose(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %1)
%4 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
long double __q_atand(long double *);
long double intr_wrap_019(long double p1) { return __q_atand(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_019>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <__q_atand@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_019>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
mov    %rsp,%rdi
call   1030 <__q_atand@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @intr_wrap_019(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_atand(x86_fp80* %2)
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @intr_wrap_019(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_atand(x86_fp80* %2)
ret x86_fp80 %3
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int rec(int);
int main() {
  int i = __VERIFIER_nondet_int();
  if (i <= 0)
    return 0;
  int res = rec(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     114f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <main+0x3a>
mov    -0x8(%rbp),%edi
call   1040 <rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1133 <main+0x13>
mov    %eax,%edi
call   1040 <rec@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @rec(i32 %1)
br label %5
5: ; preds = %0, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rcc_printf(char *, int);
int /*<<< orphan*/ rcc_puts(char *);
void emit_frame_end(int sz, int ctx) {
  if (sz > 0)
    rcc_printf("  add sp, fp, $%d\n", sz);
  if (ctx > 0)
    rcc_puts("  pop {fp,pc}\n");
}


x86 assembly (clang, -O0):
<emit_frame_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1147 <emit_frame_end+0x27>
mov    -0x4(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1040 <rcc_printf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    115d <emit_frame_end+0x3d>
lea    0xebb(%rip),%rdi
call   1030 <rcc_puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_frame_end>:
push   %rbx
mov    %esi,%ebx
test   %edi,%edi
jle    1135 <emit_frame_end+0x15>
mov    %edi,%esi
lea    0xed0(%rip),%rdi
call   1040 <rcc_printf@plt>
test   %ebx,%ebx
jle    1146 <emit_frame_end+0x26>
lea    0xed3(%rip),%rdi
pop    %rbx
jmp    1030 <rcc_puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c" add sp, fp, $%d\0A\00"
@.str.1 = [15 x i8] c" pop {fp,pc}\0A\00"
define void @emit_frame_end(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 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @rcc_printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @rcc_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c" add sp, fp, $%d\0A\00"
@.str.1 = [15 x i8] c" pop {fp,pc}\0A\00"
define void @emit_frame_end(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @rcc_printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %2
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @rcc_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}
void RTManifestVerifyFiles(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestVerifyFiles() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo() {
  abort();
  return 1;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
void *memcpy(void *, void *, size_t);
void *quick_memcpy(void *, void *, size_t);
void *qmemcpy(void *dest, void *src, size_t n) {
  if ((((uintptr_t)dest & 0xf) == 0) && (((uintptr_t)src & 0xf) == 0) &&
      ((n & 0xf) == 0))
    return quick_memcpy(dest, src, n);
  else
    return memcpy(dest, src, n);
}


x86 assembly (clang, -O0):
<qmemcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
jne    1184 <qmemcpy+0x64>
mov    -0x18(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
jne    1184 <qmemcpy+0x64>
mov    -0x20(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
jne    1184 <qmemcpy+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <quick_memcpy@plt>
mov    %rax,-0x8(%rbp)
jmp    1199 <qmemcpy+0x79>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qmemcpy>:
mov    %esi,%eax
or     %edi,%eax
mov    %edx,%ecx
or     %eax,%ecx
test   $0xf,%cl
je     1132 <qmemcpy+0x12>
jmp    1040 <memcpy@plt>
jmp    1030 <quick_memcpy@plt>

LLVM IR (-O0):
define i8* @qmemcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = and i64 %9, 15
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %26
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = ptrtoint i8* %13 to i64
%15 = and i64 %14, 15
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %26
17: ; preds = %12
%18 = load i64, i64* %7
%19 = and i64 %18, 15
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i8*, i8** %5
%23 = load i8*, i8** %6
%24 = load i64, i64* %7
%25 = call i8* @quick_memcpy(i8* %22, i8* %23, i64 %24)
store i8* %25, i8** %4
br label %31
26: ; preds = %17, %12, %3
%27 = load i8*, i8** %5
%28 = load i8*, i8** %6
%29 = load i64, i64* %7
%30 = call i8* @memcpy(i8* %27, i8* %28, i64 %29)
store i8* %30, i8** %4
br label %31
31: ; preds = %26, %21
%32 = load i8*, i8** %4
ret i8* %32
}

LLVM IR (-O2):
define i8* @qmemcpy(i8* %0, i8* %1, i64 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = ptrtoint i8* %1 to i64
%6 = or i64 %5, %4
%7 = or i64 %6, %2
%8 = and i64 %7, 15
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = tail call i8* @quick_memcpy(i8* %0, i8* %1, i64 %2)
br label %13
12: ; preds = %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
br label %13
13: ; preds = %12, %10
%14 = phi i8* [ %11, %10 ], [ %0, %12 ]
ret i8* %14
}
void mod_tcpd_is_GPL_compatible() {}


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

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

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

LLVM IR (-O2):
define void @mod_tcpd_is_GPL_compatible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *ranWord(char *, char const *const *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  const char *const word[30];
  printf("%s\n", ranWord("dict.txt", word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
lea    -0x100(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1060 <ranWord@plt>
mov    %rax,%rsi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xf8,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
lea    0xea8(%rip),%rdi
mov    %rsp,%rsi
call   1060 <ranWord@plt>
lea    0xe95(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf8,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"dict.txt\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8*]
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = getelementptr inbounds [30 x i8*], [30 x i8*]* %2, i64 0, i64 0
%6 = call i8* @ranWord(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"dict.txt\00"
define i32 @main() {
%1 = alloca [30 x i8*]
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = bitcast [30 x i8*]* %1 to i8*
%5 = getelementptr inbounds [30 x i8*], [30 x i8*]* %1, i64 0, i64 0
%6 = call i8* @ranWord(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t long_from(void *_p) {
  unsigned char *p = (unsigned char *)_p;
  uint32_t r, _p0, _p1, _p2, _p3;
  _p0 = p[0];
  _p1 = p[1];
  _p2 = p[2];
  _p3 = p[3];
  r = (_p3 << 24) + (_p2 << 16) + (_p1 << 8) + _p0;
  return r;
}


x86 assembly (clang, -O0):
<long_from>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x18,%eax
mov    -0x20(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_from>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @long_from(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %2
%9 = load i8*, i8** %2
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
store i32 %13, i32* %5
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
store i32 %17, i32* %6
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
store i32 %21, i32* %7
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = shl i32 %26, 24
%28 = load i32, i32* %7
%29 = shl i32 %28, 16
%30 = add nsw i32 %27, %29
%31 = load i32, i32* %6
%32 = shl i32 %31, 8
%33 = add nsw i32 %30, %32
%34 = load i32, i32* %5
%35 = add nsw i32 %33, %34
store i32 %35, i32* %4
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
define i32 @long_from(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = getelementptr inbounds i8, i8* %0, i64 3
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw i32 %12, 24
%14 = shl nuw nsw i32 %9, 16
%15 = shl nuw nsw i32 %6, 8
%16 = or i32 %15, %3
%17 = or i32 %16, %14
%18 = or i32 %17, %13
ret i32 %18
}
int f2(int i) { return i++; }


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

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

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

LLVM IR (-O2):
define i32 @f2(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ eeprom_read_word(scalar_t__ *);
bool eeconfig_is_enabled(void) {
  return (eeprom_read_word((uint16_t *)0) == (uint16_t)0xFEED);
}


x86 assembly (clang, -O0):
<eeconfig_is_enabled>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <eeprom_read_word@plt>
cmp    $0xfeed,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_is_enabled>:
push   %rax
xor    %edi,%edi
call   1030 <eeprom_read_word@plt>
xor    %ecx,%ecx
cmp    $0xfeed,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eeconfig_is_enabled() {
%1 = call i64 @eeprom_read_word(i64* null)
%2 = icmp eq i64 %1, 65261
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @eeconfig_is_enabled() {
%1 = tail call i64 @eeprom_read_word(i64* null)
%2 = icmp eq i64 %1, 65261
%3 = zext i1 %2 to i32
ret i32 %3
}
int main() {
  long long x;
  x = 0;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int fexecve(int fd, char *const argv[], char *const envp[]) {
  if (fd < 0 || argv == NULL || envp == NULL) {
    __set_errno(EINVAL);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<fexecve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1143 <fexecve+0x33>
cmpq   $0x0,-0x10(%rbp)
je     1143 <fexecve+0x33>
cmpq   $0x0,-0x18(%rbp)
jne    115d <fexecve+0x4d>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <fexecve+0x62>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fexecve>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    %rax,%rcx
test   %rdx,%rdx
je     1127 <fexecve+0x17>
mov    0x2ec1(%rip),%rcx
test   %rsi,%rsi
cmove  %rax,%rcx
test   %edi,%edi
cmovs  %rax,%rcx
mov    (%rcx),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @fexecve(i32 %0, i8** readnone %1, i8** readnone %2) {
%4 = icmp slt i32 %0, 0
%5 = icmp eq i8** %1, null
%6 = or i1 %4, %5
%7 = icmp eq i8** %2, null
%8 = or i1 %6, %7
%9 = load i32, i32* @EINVAL
%10 = load i32, i32* @ENOSYS
%11 = select i1 %8, i32 %9, i32 %10
%12 = tail call i32 @__set_errno(i32 %11)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ baz(int /*<<< orphan*/);
void bar() { baz(0); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <baz@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bar() {
%1 = call i32 @baz(i32 0)
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 @baz(i32 0)
ret void
}
int krocetc_msinit_map(void *mapid, int size, int offset, int nsubmaps,
                       int nentries, void *arg) {
  int *cptr = (int *)arg;
  *cptr = *cptr + nentries;
  return 0;
}


x86 assembly (clang, -O0):
<krocetc_msinit_map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    -0x18(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<krocetc_msinit_map>:
add    %r8d,(%r9)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @krocetc_msinit_map(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%14 = load i8*, i8** %12
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %13
%16 = load i32*, i32** %13
%17 = load i32, i32* %16
%18 = load i32, i32* %11
%19 = add nsw i32 %17, %18
%20 = load i32*, i32** %13
store i32 %19, i32* %20
ret i32 0
}

LLVM IR (-O2):
define i32 @krocetc_msinit_map(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* nocapture %5) {
%7 = bitcast i8* %5 to i32*
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %4
store i32 %9, i32* %7
ret i32 0
}
/* Variables and functions */
int get_max_days();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("----------%d days\n", get_max_days());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"----------%d days\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_max_days()
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"----------%d days\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_max_days()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void do_nothing(void) {
  int i = 0;
  for (i = 0; i < 1000; i += 1)
    ;
}


x86 assembly (clang, -O0):
<do_nothing>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    1132 <do_nothing+0x32>
jmp    1124 <do_nothing+0x24>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <do_nothing+0x12>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do_nothing() {
%1 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

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