xunge/DecIR huggingface dataset:
void busy(int sock) {
  internal_logit(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/christophgysin/moc/refs/heads/lyrics/server.c",
      708, __FUNCTION__,
      "Closing connection due to maximum number of clients reached");
  send_int(sock, 0x05);
  close(sock);
}


x86 assembly (clang, -O0):
<busy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x2c4,%esi
lea    0xf3a(%rip),%rdx
lea    0xf38(%rip),%rcx
mov    $0x0,%al
call   1050 <internal_logit@plt>
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
mov    $0x0,%al
call   1030 <send_int@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<busy>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
lea    0xf47(%rip),%rdx
lea    0xf45(%rip),%rcx
mov    $0x2c4,%esi
xor    %eax,%eax
call   1050 <internal_logit@plt>
mov    %ebx,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <send_int@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@.str = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/christophgysin/moc/refs/heads/lyrics/server.c\00"
@__FUNCTION__.busy = [5 x i8] c"busy\00"
@.str.1 = [60 x i8] c"Closing connection due to maximum number of clients reached\00"
define void @busy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 708, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.busy, i64 0, i64 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @send_int to i32 (i32, i32, ...)*)(i32 %4, i32 5)
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [136 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/christophgysin/moc/refs/heads/lyrics/server.c\00"
@__FUNCTION__.busy = [5 x i8] c"busy\00"
@.str.1 = [60 x i8] c"Closing connection due to maximum number of clients reached\00"
define void @busy(i32 %0) {
%2 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @internal_logit to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 708, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.busy, i64 0, i64 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @send_int to i32 (i32, i32, ...)*)(i32 %0, i32 5)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
ret void
}
void SteamAPI_ISteamApps_InstallDLC(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamApps_InstallDLC>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_InstallDLC = [31 x i8] c"SteamAPI_ISteamApps_InstallDLC\00"
define void @SteamAPI_ISteamApps_InstallDLC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.SteamAPI_ISteamApps_InstallDLC, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_InstallDLC = [31 x i8] c"SteamAPI_ISteamApps_InstallDLC\00"
define void @SteamAPI_ISteamApps_InstallDLC(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.SteamAPI_ISteamApps_InstallDLC, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct fastbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bputc(struct fastbuf *, char);
int /*<<< orphan*/ bputs(struct fastbuf *, char const *);
void bputsn(struct fastbuf *f, const char *b) {
  bputs(f, b);
  bputc(f, '\n');
}


x86 assembly (clang, -O0):
<bputsn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <bputs@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <bputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bputsn>:
push   %rbx
mov    %rdi,%rbx
call   1040 <bputs@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
pop    %rbx
jmp    1030 <bputc@plt>

LLVM IR (-O0):
%struct.fastbuf = type { i32 }
define void @bputsn(%struct.fastbuf* %0, i8* %1) {
%3 = alloca %struct.fastbuf*
%4 = alloca i8*
store %struct.fastbuf* %0, %struct.fastbuf** %3
store i8* %1, i8** %4
%5 = load %struct.fastbuf*, %struct.fastbuf** %3
%6 = load i8*, i8** %4
%7 = call i32 @bputs(%struct.fastbuf* %5, i8* %6)
%8 = load %struct.fastbuf*, %struct.fastbuf** %3
%9 = call i32 @bputc(%struct.fastbuf* %8, i8 signext 10)
ret void
}

LLVM IR (-O2):
%struct.fastbuf = type { i32 }
define void @bputsn(%struct.fastbuf* %0, i8* %1) {
%3 = tail call i32 @bputs(%struct.fastbuf* %0, i8* %1)
%4 = tail call i32 @bputc(%struct.fastbuf* %0, i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mtx_t;

/* Variables and functions */
int /*<<< orphan*/ mutex_destroy(int /*<<< orphan*/ *);
void mtx_destroy(mtx_t *mtx) { (void)mutex_destroy(mtx); }


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

x86 assembly (clang, -O2):
<mtx_destroy>:
jmp    1030 <mutex_destroy@plt>

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

LLVM IR (-O2):
define void @mtx_destroy(i32* %0) {
%2 = tail call i32 @mutex_destroy(i32* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rol1(uint32_t x) { return (x << 1) | (x >> 31); }


x86 assembly (clang, -O0):
<rol1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol1>:
lea    (%rdi,%rdi,1),%eax
sar    $0x1f,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 31
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rol1(i32 %0) {
%2 = shl i32 %0, 1
%3 = ashr i32 %0, 31
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
usage() {
  fprintf(stderr, "usage: %s file\n", "age");
  fprintf(stderr, "return when file exists, otherwise wait until it does\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"usage: %s file\0A\00"
@.str.1 = [4 x i8] c"age\00"
@.str.2 = [55 x i8] c"return when file exists, otherwise wait until it does\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"usage: %s file\0A\00"
@.str.1 = [4 x i8] c"age\00"
@.str.2 = [55 x i8] c"return when file exists, otherwise wait until it does\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ GL_UNPACK_ALIGNMENT;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ makeCheckImage();
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_FLAT);
  makeCheckImage();
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1040 <glClearColor@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    $0x0,%al
call   1050 <makeCheckImage@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <glPixelStorei@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1040 <glClearColor@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
xor    %eax,%eax
call   1050 <makeCheckImage@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <glPixelStorei@plt>

LLVM IR (-O0):
@GL_FLAT = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = call i32 @glShadeModel(i32 %2)
%4 = call i32 (...) @makeCheckImage()
%5 = load i32, i32* @GL_UNPACK_ALIGNMENT
%6 = call i32 @glPixelStorei(i32 %5, i32 1)
ret void
}

LLVM IR (-O2):
@GL_FLAT = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = load i32, i32* @GL_FLAT
%3 = tail call i32 @glShadeModel(i32 %2)
%4 = tail call i32 (...) @makeCheckImage()
%5 = load i32, i32* @GL_UNPACK_ALIGNMENT
%6 = tail call i32 @glPixelStorei(i32 %5, i32 1)
ret void
}
/* Variables and functions */
long my_strtol(char const *, char **);
long int strtol_impl(const char *str, char **tail) {
  return my_strtol(str, tail);
}


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

x86 assembly (clang, -O2):
<strtol_impl>:
jmp    1030 <my_strtol@plt>

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

LLVM IR (-O2):
define i64 @strtol_impl(i8* %0, i8** %1) {
%3 = tail call i64 @my_strtol(i8* %0, i8** %1)
ret i64 %3
}
long f(long i) { return i + 1; }


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

x86 assembly (clang, -O2):
<f>:
lea    0x1(%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @f(i64 %0) {
%2 = add nsw i64 %0, 1
ret i64 %2
}
/* Type definitions */
struct root_struct {
  int dummy;
};

/* Variables and functions */
int f(struct root_struct *s) { return 0; }


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

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

LLVM IR (-O0):
%struct.root_struct = type { i32 }
define i32 @f(%struct.root_struct* %0) {
%2 = alloca %struct.root_struct*
store %struct.root_struct* %0, %struct.root_struct** %2
ret i32 0
}

LLVM IR (-O2):
%struct.root_struct = type { i32 }
define i32 @f(%struct.root_struct* nocapture readnone %0) {
ret i32 0
}
int main() {
  int i;
  for (;;) {
    if (i > 0) {
      if (i == 5)
        goto end;
    } else {
      if (i == -5)
        goto end;
    }
  }
end:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1129 <main+0x29>
cmpl   $0x5,-0x8(%rbp)
jne    1124 <main+0x24>
jmp    1142 <main+0x42>
jmp    113d <main+0x3d>
cmpl   $0xfffffffb,-0x8(%rbp)
jne    1138 <main+0x38>
jmp    1142 <main+0x42>
jmp    113d <main+0x3d>
jmp    110b <main+0xb>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int make_dgram_client_socket() { return socket(PF_INET, SOCK_DGRAM, 0); }


x86 assembly (clang, -O0):
<make_dgram_client_socket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_dgram_client_socket>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @make_dgram_client_socket() {
%1 = load i32, i32* @PF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @make_dgram_client_socket() {
%1 = load i32, i32* @PF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_Vector(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_Vector() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
int ft_abs(int nb) {
  if (nb < 0)
    return (-nb);
  return (nb);
}


x86 assembly (clang, -O0):
<ft_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <ft_abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <ft_abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ft_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int debugger_ipi(struct pt_regs *regs) { return 0; }


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

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define i32 @debugger_ipi(%struct.pt_regs* %0) {
%2 = alloca %struct.pt_regs*
store %struct.pt_regs* %0, %struct.pt_regs** %2
ret i32 0
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define i32 @debugger_ipi(%struct.pt_regs* nocapture readnone %0) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long above;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigurerequest_above(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xconfigurerequest.above = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigurerequest_above>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xconfigurerequest_above(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigurerequest_above(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int foo(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) { printf("%d\n", foo(0, 100)); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 0, i32 100)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ allocmem1();
char *malloc(int);
void allocmem2() {
  char *memleak2 = malloc(10 * sizeof(char));
  allocmem1();
}


x86 assembly (clang, -O0):
<allocmem2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <allocmem1@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @allocmem2() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 10)
store i8* %2, i8** %1
%3 = call i32 (...) @allocmem1()
ret void
}

LLVM IR (-O2):
define void @allocmem2() {
%1 = tail call i32 (...) @allocmem1()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_set_str(int /*<<< orphan*/, char *, int);
void _mpz(mpz_t ret) {
  mpz_set_str(ret, "4954735094375043750498753420975243095743095", 10);
}


x86 assembly (clang, -O0):
<_mpz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0xa,%edx
call   1030 <mpz_set_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mpz>:
lea    0xee9(%rip),%rsi
mov    $0xa,%edx
jmp    1030 <mpz_set_str@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"4954735094375043750498753420975243095743095\00"
define void @_mpz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @mpz_set_str(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 10)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"4954735094375043750498753420975243095743095\00"
define void @_mpz(i32 %0) {
%2 = tail call i32 @mpz_set_str(i32 %0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 10)
ret void
}
void ib_umem_release(struct ib_umem *umem) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @pwm1_iomux_config() {
ret void
}
char *scat(char *restrict dst, const char *restrict src) {
  while (*dst)
    dst++;
  while ((*(dst++) = *(src++)))
    ;
  return --dst;
}


x86 assembly (clang, -O0):
<scat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <scat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <scat+0xc>
jmp    112f <scat+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     115e <scat+0x5e>
jmp    112f <scat+0x2f>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scat>:
mov    %rdi,%rax
add    $0xfffffffffffffffe,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x2(%rax)
lea    0x1(%rax),%rax
jne    1110 <scat+0x10>
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <scat+0x20>
ret

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

LLVM IR (-O2):
define i8* @scat(i8* noalias %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void exit_error(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exit_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    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @exit_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 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void sn3218_exit_sysfs(struct psn3218 *data) {}


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

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

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

LLVM IR (-O2):
%struct.psn3218 = type opaque
define void @sn3218_exit_sysfs(%struct.psn3218* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iopl(int);
int /*<<< orphan*/ outb(int, int);
int main() {
  int i;
  iopl(3);
  outb(0x0a, 0x3f5);
  for (i = 0; i < 10000000; i++)
    outb(0x42, 0x3f5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <iopl@plt>
mov    $0xa,%edi
mov    $0x3f5,%esi
call   1040 <outb@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jge    1179 <main+0x59>
mov    $0x42,%edi
mov    $0x3f5,%esi
call   1040 <outb@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <main+0x2f>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
call   1030 <iopl@plt>
mov    $0xa,%edi
mov    $0x3f5,%esi
call   1040 <outb@plt>
mov    $0x989680,%ebx
nop
mov    $0x42,%edi
mov    $0x3f5,%esi
call   1040 <outb@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @iopl(i32 3)
%4 = call i32 @outb(i32 10, i32 1013)
store i32 0, i32* %2
br label %5
5: ; preds = %10, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10000000
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = call i32 @outb(i32 66, i32 1013)
br label %10
10: ; preds = %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %5
13: ; preds = %5
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @iopl(i32 3)
%2 = tail call i32 @outb(i32 10, i32 1013)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 @outb(i32 66, i32 1013)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 10000000
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int(int number) { printf("%d\n", number); }


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

x86 assembly (clang, -O2):
<print_int>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void fd203(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    a:
      goto a;
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


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

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

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

LLVM IR (-O2):
define void @fd203(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void mul(int a, int b) { printf("%d\n", a * b); }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
imul   %edi,%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t smpte_hbrmt_get_frame(const uint8_t *p_hbrmt) {
  return ((p_hbrmt[4] & 0xf) << 4) | (p_hbrmt[5] >> 4);
}


x86 assembly (clang, -O0):
<smpte_hbrmt_get_frame>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0xf,%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%rcx
mov    0x14(%rcx),%ecx
sar    $0x4,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_get_frame>:
mov    0x10(%rdi),%ecx
mov    0x14(%rdi),%eax
shl    $0x4,%ecx
movzbl %cl,%ecx
sar    $0x4,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @smpte_hbrmt_get_frame(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = and i32 %5, 15
%7 = shl i32 %6, 4
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 5
%10 = load i32, i32* %9
%11 = ashr i32 %10, 4
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @smpte_hbrmt_get_frame(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = shl i32 %3, 4
%5 = and i32 %4, 240
%6 = getelementptr inbounds i32, i32* %0, i64 5
%7 = load i32, i32* %6
%8 = ashr i32 %7, 4
%9 = or i32 %5, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ __shrt_int_memcpy(void *, void const *, size_t);
void __wrd_memcpy(void *__restrict s1, const void *__restrict s2, size_t n) {
  __shrt_int_memcpy(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<__wrd_memcpy>:
jmp    1030 <__shrt_int_memcpy@plt>

LLVM IR (-O0):
define void @__wrd_memcpy(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @__shrt_int_memcpy(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @__wrd_memcpy(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = tail call i32 @__shrt_int_memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dcl_rc();
int /*<<< orphan*/ dcl_rd();
int /*<<< orphan*/ dcl_rf();
int /*<<< orphan*/ dcl_ri();
int /*<<< orphan*/ dcl_rll();
int /*<<< orphan*/ dcl_rp();
int /*<<< orphan*/ dcl_rs();
int /*<<< orphan*/ dcl_rti();
int /*<<< orphan*/ dcl_rv();
void test_1(void) {
  dcl_rv();
  dcl_rc();
  dcl_rs();
  dcl_ri();
  dcl_rll();
  dcl_rti();
  dcl_rf();
  dcl_rd();
  dcl_rp();
}


x86 assembly (clang, -O0):
<test_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10a0 <dcl_rv@plt>
mov    $0x0,%al
call   1040 <dcl_rc@plt>
mov    $0x0,%al
call   1050 <dcl_rs@plt>
mov    $0x0,%al
call   10b0 <dcl_ri@plt>
mov    $0x0,%al
call   1070 <dcl_rll@plt>
mov    $0x0,%al
call   1030 <dcl_rti@plt>
mov    $0x0,%al
call   1060 <dcl_rf@plt>
mov    $0x0,%al
call   1080 <dcl_rd@plt>
mov    $0x0,%al
call   1090 <dcl_rp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1>:
push   %rax
xor    %eax,%eax
call   10a0 <dcl_rv@plt>
xor    %eax,%eax
call   1040 <dcl_rc@plt>
xor    %eax,%eax
call   1050 <dcl_rs@plt>
xor    %eax,%eax
call   10b0 <dcl_ri@plt>
xor    %eax,%eax
call   1070 <dcl_rll@plt>
xor    %eax,%eax
call   1030 <dcl_rti@plt>
xor    %eax,%eax
call   1060 <dcl_rf@plt>
xor    %eax,%eax
call   1080 <dcl_rd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <dcl_rp@plt>

LLVM IR (-O0):
define void @test_1() {
%1 = call i32 (...) @dcl_rv()
%2 = call i32 (...) @dcl_rc()
%3 = call i32 (...) @dcl_rs()
%4 = call i32 (...) @dcl_ri()
%5 = call i32 (...) @dcl_rll()
%6 = call i32 (...) @dcl_rti()
%7 = call i32 (...) @dcl_rf()
%8 = call i32 (...) @dcl_rd()
%9 = call i32 (...) @dcl_rp()
ret void
}

LLVM IR (-O2):
define void @test_1() {
%1 = tail call i32 (...) @dcl_rv()
%2 = tail call i32 (...) @dcl_rc()
%3 = tail call i32 (...) @dcl_rs()
%4 = tail call i32 (...) @dcl_ri()
%5 = tail call i32 (...) @dcl_rll()
%6 = tail call i32 (...) @dcl_rti()
%7 = tail call i32 (...) @dcl_rf()
%8 = tail call i32 (...) @dcl_rd()
%9 = tail call i32 (...) @dcl_rp()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t ftoi16(float s) { return (int16_t)(s * ((float)(256))); }


x86 assembly (clang, -O0):
<ftoi16>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftoi16>:
mulss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @ftoi16(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 2.560000e+02
%5 = fptosi float %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ftoi16(float %0) {
%2 = fmul float %0, 2.560000e+02
%3 = fptosi float %2 to i32
ret i32 %3
}
int array_equal(const double a[], const double b[], int size) {
  int i;
  for (i = 0; i < size; ++i)
    if (!(a[i] == b[i]))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<array_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    116c <array_equal+0x6c>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    114d <array_equal+0x4d>
jp     114d <array_equal+0x4d>
jmp    1159 <array_equal+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1173 <array_equal+0x73>
jmp    115e <array_equal+0x5e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <array_equal+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_equal>:
mov    $0x1,%eax
test   %edx,%edx
jle    1127 <array_equal+0x27>
mov    %edx,%ecx
xor    %edx,%edx
nopl   (%rax)
movsd  (%rdi,%rdx,8),%xmm0
ucomisd (%rsi,%rdx,8),%xmm0
jne    1128 <array_equal+0x28>
jp     1128 <array_equal+0x28>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <array_equal+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @array_equal(double* %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %27, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = load double*, double** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = fcmp oeq double %18, %23
br i1 %24, label %26, label %25
25: ; preds = %13
store i32 0, i32* %4
br label %31
26: ; preds = %13
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %9
30: ; preds = %9
store i32 1, i32* %4
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @array_equal(double* nocapture %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 %10
%14 = load double, double* %13
%15 = fcmp oeq double %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die(const char *error_msg) {
  perror(error_msg);
  exit(EXIT_FAILURE);
}


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

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

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void foo376() {}


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

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

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

LLVM IR (-O2):
define void @foo376() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0) {
    x = x + y;
    y = y - 1;
  }
  return 0;
}


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)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@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 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %9, %0
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
store i32 %14, i32* %3
br label %6
15: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void create_thread() {}


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

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

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

LLVM IR (-O2):
define void @create_thread() {
ret void
}
void MultiplicationAssignment(float f, double d, long double ld) {
  d *= f;
  ld *= f;
  ld *= d;
  f *= d;
  f *= ld;
  d *= ld;
}


x86 assembly (clang, -O0):
<MultiplicationAssignment>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
fstpt  -0x20(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
flds   -0x4(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
fstpt  -0x20(%rbp)
fldl   -0x10(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
fstpt  -0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
fldt   -0x20(%rbp)
flds   -0x4(%rbp)
fmulp  %st,%st(1)
fstps  -0x4(%rbp)
fldt   -0x20(%rbp)
fldl   -0x10(%rbp)
fmulp  %st,%st(1)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @MultiplicationAssignment(float %0, double %1, x86_fp80 %2) {
%4 = alloca float
%5 = alloca double
%6 = alloca x86_fp80
store float %0, float* %4
store double %1, double* %5
store x86_fp80 %2, x86_fp80* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load double, double* %5
%10 = fmul double %9, %8
store double %10, double* %5
%11 = load float, float* %4
%12 = fpext float %11 to x86_fp80
%13 = load x86_fp80, x86_fp80* %6
%14 = fmul x86_fp80 %13, %12
store x86_fp80 %14, x86_fp80* %6
%15 = load double, double* %5
%16 = fpext double %15 to x86_fp80
%17 = load x86_fp80, x86_fp80* %6
%18 = fmul x86_fp80 %17, %16
store x86_fp80 %18, x86_fp80* %6
%19 = load double, double* %5
%20 = load float, float* %4
%21 = fpext float %20 to double
%22 = fmul double %21, %19
%23 = fptrunc double %22 to float
store float %23, float* %4
%24 = load x86_fp80, x86_fp80* %6
%25 = load float, float* %4
%26 = fpext float %25 to x86_fp80
%27 = fmul x86_fp80 %26, %24
%28 = fptrunc x86_fp80 %27 to float
store float %28, float* %4
%29 = load x86_fp80, x86_fp80* %6
%30 = load double, double* %5
%31 = fpext double %30 to x86_fp80
%32 = fmul x86_fp80 %31, %29
%33 = fptrunc x86_fp80 %32 to double
store double %33, double* %5
ret void
}

LLVM IR (-O2):
define void @MultiplicationAssignment(float %0, double %1, x86_fp80 %2) {
ret void
}
void RTLogLoggerExV(void) {}


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

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

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

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