xunge/DecIR huggingface dataset:
/* Variables and functions */
int machine_proc_display_width_default();
int machine_proc_display_width(void) {
  return machine_proc_display_width_default();
}


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

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

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

LLVM IR (-O2):
define i32 @machine_proc_display_width() {
%1 = tail call i32 (...) @machine_proc_display_width_default()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: fsafilter [-ip d/s[dr]] [-op d/s] [-silent] [-v] "
                  "[-csn] [filename]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
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):
<badusage>:
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 = [75 x i8] c"Usage: fsafilter [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-csn] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: fsafilter [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-csn] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fatal_perror(char *, size_t);
void *malloc(size_t);
void *mallock(size_t size) {
  void *m;
  m = malloc(size);
  if (!m && size)
    fatal_perror("malloc(%u): ", size);
  return m;
}


x86 assembly (clang, -O0):
<mallock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <mallock+0x3f>
cmpq   $0x0,-0x8(%rbp)
je     115f <mallock+0x3f>
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <fatal_perror@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallock>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1148 <mallock+0x28>
test   %r14,%r14
jne    1148 <mallock+0x28>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <fatal_perror@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"malloc(%u): \00"
define i8* @mallock(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i64, i64* %2
%13 = call i32 @fatal_perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %8, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"malloc(%u): \00"
define noalias i8* @mallock(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @fatal_perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %8
8: ; preds = %6, %1
ret i8* %2
}
/* Variables and functions */
int parse(int /*<<< orphan*/);
int /*<<< orphan*/ slicer(char *, int);
int universal_formula(char *g) {
  if (g[1] == 'x' || g[1] == 'y' || g[1] == 'z') {
    return parse(slicer(g, 2));
  }
}


x86 assembly (clang, -O0):
<universal_formula>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x78,%eax
je     115f <universal_formula+0x3f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x79,%eax
je     115f <universal_formula+0x3f>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x7a,%eax
jne    1177 <universal_formula+0x57>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1040 <slicer@plt>
mov    %eax,%edi
call   1030 <parse@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<universal_formula>:
push   %rax
mov    0x1(%rdi),%al
add    $0x88,%al
cmp    $0x2,%al
ja     113c <universal_formula+0x1c>
mov    $0x2,%esi
call   1040 <slicer@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <parse@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @universal_formula(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 120
br i1 %8, label %21, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 121
br i1 %14, label %21, label %15
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 122
br i1 %20, label %21, label %25
21: ; preds = %15, %9, %1
%22 = load i8*, i8** %3
%23 = call i32 @slicer(i8* %22, i32 2)
%24 = call i32 @parse(i32 %23)
store i32 %24, i32* %2
br label %25
25: ; preds = %21, %15
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @universal_formula(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = add i8 %3, -120
%5 = icmp ult i8 %4, 3
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @slicer(i8* %0, i32 2)
%8 = tail call i32 @parse(i32 %7)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ undef, %1 ]
ret i32 %10
}
/* Variables and functions */
int _xdg_utf8_validate(char const *);
int xdg_mime_is_valid_mime_type(const char *mime_type) {
  return _xdg_utf8_validate(mime_type);
}


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

x86 assembly (clang, -O2):
<xdg_mime_is_valid_mime_type>:
jmp    1030 <_xdg_utf8_validate@plt>

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

LLVM IR (-O2):
define i32 @xdg_mime_is_valid_mime_type(i8* %0) {
%2 = tail call i32 @_xdg_utf8_validate(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMBIC;
int /*<<< orphan*/ TIOCMBIS;
int ioctl(int, int /*<<< orphan*/, int *);
int tty_CTRL(int fdtty, int sercmd, int stat) {
  if (stat == 0)
    return ioctl(fdtty, TIOCMBIC, &sercmd);
  else
    return ioctl(fdtty, TIOCMBIS, &sercmd);
  return -1;
}


x86 assembly (clang, -O0):
<tty_CTRL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1148 <tty_CTRL+0x38>
mov    -0x8(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <tty_CTRL+0x50>
mov    -0x8(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_CTRL>:
push   %rax
mov    %esi,0x4(%rsp)
test   %edx,%edx
jne    1122 <tty_CTRL+0x12>
mov    0x2eb8(%rip),%rax
jmp    1129 <tty_CTRL+0x19>
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@TIOCMBIC = global i32 0
@TIOCMBIS = global i32 0
define i32 @tty_CTRL(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = icmp eq i32 %2, 0
%6 = load i32, i32* @TIOCMBIC
%7 = load i32, i32* @TIOCMBIS
%8 = select i1 %5, i32 %6, i32 %7
%9 = call i32 @ioctl(i32 %0, i32 %8, i32* %4)
ret i32 %9
}
void crypt(char *s) {
  while (*s) {
    *s += 2;
    s++;
  }
}


x86 assembly (clang, -O0):
<crypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <crypt+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x2,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <crypt+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt>:
mov    (%rdi),%al
test   %al,%al
je     1120 <crypt+0x20>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
add    $0x2,%al
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <crypt+0x10>
ret

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

LLVM IR (-O2):
define void @crypt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add i8 %5, 2
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int f2(int);
int f1(int i) { return f2(i) + i; }


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

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %edi,%ebx
call   1030 <f2@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = tail call i32 @f2(i32 %0)
%3 = add nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int strlen(char const *);
const char *strip_long_arg(const char *arg, const char *option) {
  if (strlen(arg) > strlen(option) + 3) {
    return arg + (strlen(option) + 3);
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<strip_long_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    $0x3,%ecx
cmp    %ecx,%eax
jle    116e <strip_long_arg+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
add    $0x3,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1176 <strip_long_arg+0x66>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_long_arg>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x3,%eax
cmp    %eax,%ebp
jle    1143 <strip_long_arg+0x33>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %r14,%rax
add    $0x3,%rax
jmp    1145 <strip_long_arg+0x35>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @strip_long_arg(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add nsw i32 %4, 3
%6 = icmp sgt i32 %3, %5
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = tail call i32 @strlen(i8* %1)
%9 = add nsw i32 %8, 3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
br label %12
12: ; preds = %2, %7
%13 = phi i8* [ %11, %7 ], [ null, %2 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ EMLINK;
int /*<<< orphan*/ errno;
__attribute__((__weak__)) int _link(char *old __attribute__((unused)),
                                    char *new __attribute__((unused))) {
  errno = EMLINK;
  return -1;
}


x86 assembly (clang, -O0):
<_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EMLINK = global i32 0
@errno = global i32 0
define weak i32 @_link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @EMLINK
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EMLINK = global i32 0
@errno = global i32 0
define weak i32 @_link(i8* %0, i8* %1) {
%3 = load i32, i32* @EMLINK
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
struct control_packet {
  int dummy;
};

/* Variables and functions */
scalar_t__ set_volume_left(struct control_packet *, int);
scalar_t__ set_volume_right(struct control_packet *, int);
int set_volume(struct control_packet *packet, int left, int right) {
  int o = 0;
  o += set_volume_left(packet, left);
  o += set_volume_right(packet, right);
  return o;
}


x86 assembly (clang, -O0):
<set_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <set_volume_left@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <set_volume_right@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_volume>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <set_volume_left@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <set_volume_right@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.control_packet = type { i32 }
define i32 @set_volume(%struct.control_packet* %0, i32 %1, i32 %2) {
%4 = alloca %struct.control_packet*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.control_packet* %0, %struct.control_packet** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load %struct.control_packet*, %struct.control_packet** %4
%9 = load i32, i32* %5
%10 = call i64 @set_volume_left(%struct.control_packet* %8, i32 %9)
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = add nsw i64 %12, %10
%14 = trunc i64 %13 to i32
store i32 %14, i32* %7
%15 = load %struct.control_packet*, %struct.control_packet** %4
%16 = load i32, i32* %6
%17 = call i64 @set_volume_right(%struct.control_packet* %15, i32 %16)
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %7
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
%struct.control_packet = type { i32 }
define i32 @set_volume(%struct.control_packet* %0, i32 %1, i32 %2) {
%4 = tail call i64 @set_volume_left(%struct.control_packet* %0, i32 %1)
%5 = tail call i64 @set_volume_right(%struct.control_packet* %0, i32 %2)
%6 = add i64 %5, %4
%7 = trunc i64 %6 to i32
ret i32 %7
}
int fun1340() { return 1340; }


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

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

LLVM IR (-O0):
define i32 @fun1340() {
ret i32 1340
}

LLVM IR (-O2):
define i32 @fun1340() {
ret i32 1340
}
void gtk_editable_delete_selection() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_delete_selection() {
ret void
}
void hvm_msr_read_summary(struct hvm_data *h) {}


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

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

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

LLVM IR (-O2):
%struct.hvm_data = type opaque
define void @hvm_msr_read_summary(%struct.hvm_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UtilsDelay(int);
unsigned long PRCMHIBRegRead(unsigned long ulRegAddr) {
  unsigned long ulValue;
  ulValue = (*((volatile unsigned long *)(ulRegAddr)));
  UtilsDelay((80 * 200) / 3);
  return ulValue;
}


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

x86 assembly (clang, -O2):
<PRCMHIBRegRead>:
push   %rbx
mov    (%rdi),%rbx
mov    $0x14d5,%edi
call   1030 <UtilsDelay@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @PRCMHIBRegRead(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
store i64 %6, i64* %3
%7 = call i32 @UtilsDelay(i32 5333)
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @PRCMHIBRegRead(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = tail call i32 @UtilsDelay(i32 5333)
ret i64 %3
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) { return (isupper(c) ? c + 32 : c); }


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

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

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ generate();
int /*<<< orphan*/ load_functions(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "%s func_map <template >asmfile.\n", argv[0]);
    exit(1);
  }
  load_functions(argv[1]);
  generate();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1186 <main+0x46>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <load_functions@plt>
mov    $0x0,%al
call   1060 <generate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    115a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <load_functions@plt>
xor    %eax,%eax
call   1060 <generate@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe93(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"%s func_map <template >asmfile.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @load_functions(i8* %18)
%20 = call i32 (...) @generate()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"%s func_map <template >asmfile.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @load_functions(i8* %11)
%13 = tail call i32 (...) @generate()
ret i32 0
}
float plus10(float v) { return v + 10.0; }


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

x86 assembly (clang, -O2):
<plus10>:
addss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @plus10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 1.000000e+01
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @plus10(float %0) {
%2 = fadd float %0, 1.000000e+01
ret float %2
}
int test_copyLSB(int x) { return (x & 0x1) ? -1 : 0; }


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

x86 assembly (clang, -O2):
<test_copyLSB>:
mov    %edi,%eax
and    $0x1,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @test_copyLSB(i32 %0) {
%2 = and i32 %0, 1
%3 = sub nsw i32 0, %2
ret i32 %3
}
int is_abs(const char *path) { return (path[0] == '/'); }


x86 assembly (clang, -O0):
<is_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_abs>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_abs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_abs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
void _ioSignalHandler(int sig) {}


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

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

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

LLVM IR (-O2):
define void @_ioSignalHandler(i32 %0) {
ret void
}
int g_is_equal_f(float s, float d) { return (s == d); }


x86 assembly (clang, -O0):
<g_is_equal_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_is_equal_f>:
cmpeqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @g_is_equal_f(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int cairo_code_draw_casSLabel_get_width() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casSLabel_get_width() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casSLabel_get_width() {
ret i32 7
}
/* Variables and functions */
char *rpi_car_dev_version() {
  char *ver = NULL;
  ver = "VOID";
  return ver;
}


x86 assembly (clang, -O0):
<rpi_car_dev_version>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
lea    0xeed(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"VOID\00"
define i8* @rpi_car_dev_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int **combine(int, int, int **, int *);
int main(void) {
  int **res, *col, n;
  res = combine(4, 2, &col, &n);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
mov    $0x2,%esi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1030 <combine@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    $0x4,%edi
mov    $0x2,%esi
call   1030 <combine@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = bitcast i32** %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32** @combine(i32 4, i32 2, i32** %1, i32* %2)
ret i32 0
}
void ff_hevc_put_hevc_bi_epel_h24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h24_12_sse4() {
ret void
}
/* Variables and functions */
char *malloc(int);
char *NullString() {
  char *p;
  p = malloc(1);
  *p = '\0';
  return p;
}


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

x86 assembly (clang, -O2):
<NullString>:
push   %rax
mov    $0x1,%edi
call   1030 <malloc@plt>
movb   $0x0,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @NullString() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
store i8 0, i8* %1
ret i8* %1
}
void mutate_float(float *x) { *x *= 2; }


x86 assembly (clang, -O0):
<mutate_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutate_float>:
movss  (%rdi),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @mutate_float(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fmul float %4, 2.000000e+00
store float %5, float* %3
ret void
}

LLVM IR (-O2):
define void @mutate_float(float* nocapture %0) {
%2 = load float, float* %0
%3 = fmul float %2, 2.000000e+00
store float %3, float* %0
ret void
}
/* Variables and functions */
scalar_t__ is_leap(int);
int loff(int y, int m) { return is_leap(y) && m > 2 ? 1 : 0; }


x86 assembly (clang, -O0):
<loff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_leap@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1142 <loff+0x32>
cmpl   $0x2,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loff>:
push   %rbx
mov    %esi,%ebx
call   1030 <is_leap@plt>
test   %rax,%rax
setne  %al
cmp    $0x3,%ebx
setge  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @loff(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 = call i64 @is_leap(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 2
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ false, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
ret i32 %14
}

LLVM IR (-O2):
define i32 @loff(i32 %0, i32 %1) {
%3 = tail call i64 @is_leap(i32 %0)
%4 = icmp ne i64 %3, 0
%5 = icmp sgt i32 %1, 2
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int const uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t rotr(const uint32_t value, uint8_t rot) {
  return (value >> rot) | (value << (32 - rot));
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotr(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotr(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int config_READER_CRYPTOWORKS(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_READER_CRYPTOWORKS() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/ *, int,
                           int /*<<< orphan*/ *, size_t, unsigned int);
ssize_t uv__fs_copy_file_range(int fd_in, off_t *off_in, int fd_out,
                               off_t *off_out, size_t len, unsigned int flags) {
  return syscall(326, fd_in, off_in, fd_out, off_out, len, flags);
}


x86 assembly (clang, -O0):
<uv__fs_copy_file_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%eax
mov    $0x146,%edi
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__fs_copy_file_range>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    %r9d,(%rsp)
mov    $0x146,%edi
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @uv__fs_copy_file_range(i32 %0, i32* %1, i32 %2, i32* %3, i64 %4, i32 %5) {
%7 = tail call i32 @syscall(i32 326, i32 %0, i32* %1, i32 %2, i32* %3, i64 %4, i32 %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr,
          "USAGE: %s read 0x<address> <num bytes to read>\n"
          "%s write 0x<address> 0x<offset in bytes> 0x<byte value to write>\n",
          name, name);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [113 x i8] c"USAGE: %s read 0x<address> <num bytes to read>\0A%s write 0x<address> 0x<offset in bytes> 0x<byte value to write>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [113 x i8] c"USAGE: %s read 0x<address> <num bytes to read>\0A%s write 0x<address> 0x<offset in bytes> 0x<byte value to write>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
double sqrt(double x) {
  double result;
  __asm__("fsqrt" : "=t"(result) : "0"(x));
  return result;
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fsqrt
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fsqrt
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @sqrt(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double asm "fsqrt", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @sqrt(double %0) {
%2 = tail call double asm "fsqrt", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
/* Variables and functions */
int square(int);
int func2(int *tab) {
  int res, i;
  for (i = 0; i < 100; i++) {
    tab[i] = square(tab[i]) + i;
  }
  return 2;
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    115b <func2+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <square@plt>
mov    %eax,%edx
add    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1123 <func2+0x13>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%edi
call   1030 <square@plt>
add    %ebx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1120 <func2+0x10>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @func2(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %9, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @square(i32 %5)
%7 = trunc i64 %3 to i32
%8 = add nsw i32 %6, %7
store i32 %8, i32* %4
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 100
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 2
}
void test2(int i) { char c = (char __attribute__((may_alias)))i; }


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

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

LLVM IR (-O0):
define void @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
ret void
}

LLVM IR (-O2):
define void @test2(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ cfag12864b_isset(unsigned char, unsigned char);
int /*<<< orphan*/ cfag12864b_set(unsigned char, unsigned char);
int /*<<< orphan*/ cfag12864b_unset(unsigned char, unsigned char);
void cfag12864b_not(unsigned char x, unsigned char y) {
  if (cfag12864b_isset(x, y)) {
    cfag12864b_unset(x, y);
  } else {
    cfag12864b_set(x, y);
  }
}


x86 assembly (clang, -O0):
<cfag12864b_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1050 <cfag12864b_isset@plt>
cmp    $0x0,%rax
je     1171 <cfag12864b_not+0x41>
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1030 <cfag12864b_unset@plt>
jmp    1180 <cfag12864b_not+0x50>
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1040 <cfag12864b_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfag12864b_not>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <cfag12864b_isset@plt>
movzbl %bpl,%edi
movzbl %bl,%esi
add    $0x8,%rsp
test   %rax,%rax
je     1153 <cfag12864b_not+0x23>
pop    %rbx
pop    %rbp
jmp    1030 <cfag12864b_unset@plt>
pop    %rbx
pop    %rbp
jmp    1040 <cfag12864b_set@plt>

LLVM IR (-O0):
define void @cfag12864b_not(i8 zeroext %0, i8 zeroext %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 @cfag12864b_isset(i8 zeroext %5, i8 zeroext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8, i8* %3
%11 = load i8, i8* %4
%12 = call i32 @cfag12864b_unset(i8 zeroext %10, i8 zeroext %11)
br label %17
13: ; preds = %2
%14 = load i8, i8* %3
%15 = load i8, i8* %4
%16 = call i32 @cfag12864b_set(i8 zeroext %14, i8 zeroext %15)
br label %17
17: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
define void @cfag12864b_not(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i64 @cfag12864b_isset(i8 zeroext %0, i8 zeroext %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @cfag12864b_unset(i8 zeroext %0, i8 zeroext %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @cfag12864b_set(i8 zeroext %0, i8 zeroext %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef scalar_t__ int_least32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_int_least32_t(int_least32_t const k1,
                                          int_least32_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_int_least32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_int_least32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_int_least32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x2c() {
  Assert_real((isxdigit(44) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              225, ("isxdigit should be 0 for ,"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x2c>:
push   %rax
mov    $0x2c,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xe1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for ,\00"
define void @t_isxdigit_0x2c() {
%1 = call i64 @isxdigit(i32 44)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 225, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for ,\00"
define void @t_isxdigit_0x2c() {
%1 = tail call i64 @isxdigit(i32 44)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 225, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}