xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, unsigned int,
                          char const *);
unsigned int test_failed(const char *test_name, const char *failure_reason,
                         const char *file_name, unsigned int line_number) {
  printf("\nTest failed: \"%s\"\nFile: \"%s\"\nLine: %u.\nReason: %s\n",
         test_name, file_name, line_number, failure_reason);
  return 0;
}


x86 assembly (clang, -O0):
<test_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_failed>:
push   %rax
mov    %rsi,%r8
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0ATest failed: \22%s\22\0AFile: \22%s\22\0ALine: %u.\0AReason: %s\0A\00"
define i32 @test_failed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = load i8*, i8** %6
%13 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0ATest failed: \22%s\22\0AFile: \22%s\22\0ALine: %u.\0AReason: %s\0A\00"
define i32 @test_failed(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i32 %3, i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main(void) {
  hello("world");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void set_bit(int nr, volatile unsigned long *addr) {
  ((addr))[(nr) / (sizeof(unsigned long) * 8)] |=
      (1UL << ((nr) % (sizeof(unsigned long) * 8)));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%esi
shl    %cl,%rsi
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rdx
or     %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
movslq %edi,%rcx
mov    $0x1,%eax
shl    %cl,%rax
shr    $0x6,%rcx
or     %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = load i64*, i64** %4
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = udiv i64 %11, 64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = load volatile i64, i64* %13
%15 = or i64 %14, %8
store volatile i64 %15, i64* %13
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i64* %1) {
%3 = sext i32 %0 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = lshr i64 %3, 6
%7 = getelementptr inbounds i64, i64* %1, i64 %6
%8 = load volatile i64, i64* %7
%9 = or i64 %8, %5
store volatile i64 %9, i64* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_SYMLINK_NOFOLLOW;
int fchownat(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
             int /*<<< orphan*/, int /*<<< orphan*/);
int lchown(const char *path, uid_t owner, gid_t group) {
  return fchownat(AT_FDCWD, path, owner, group, AT_SYMLINK_NOFOLLOW);
}


x86 assembly (clang, -O0):
<lchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    0x2ea4(%rip),%rax
mov    (%rax),%r8d
call   1030 <fchownat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lchown>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    0x2eb9(%rip),%rax
mov    (%rax),%r8d
jmp    1030 <fchownat@plt>

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lchown(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @AT_FDCWD
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%12 = call i32 @fchownat(i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@AT_SYMLINK_NOFOLLOW = global i32 0
define i32 @lchown(i8* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @AT_FDCWD
%5 = load i32, i32* @AT_SYMLINK_NOFOLLOW
%6 = tail call i32 @fchownat(i32 %4, i8* %0, i32 %1, i32 %2, i32 %5)
ret i32 %6
}
void smash_tilde(char *str) {
  for (; *str != '\0'; str++)
    if (*str == '~')
      *str = '-';
  return;
}


x86 assembly (clang, -O0):
<smash_tilde>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <smash_tilde+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jne    112f <smash_tilde+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1134 <smash_tilde+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <smash_tilde+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smash_tilde>:
jmp    1117 <smash_tilde+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2d,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x7e,%al
je     1110 <smash_tilde+0x10>
test   %al,%al
jne    1113 <smash_tilde+0x13>
ret

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

LLVM IR (-O2):
define void @smash_tilde(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 126, label %5
]
5: ; preds = %2
store i8 45, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AttitudeSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void AttitudeSettingsLogging() { UAVObjLogging(AttitudeSettingsHandle()); }


x86 assembly (clang, -O0):
<AttitudeSettingsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <AttitudeSettingsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AttitudeSettingsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <AttitudeSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @AttitudeSettingsLogging() {
%1 = call i32 (...) @AttitudeSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AttitudeSettingsLogging() {
%1 = tail call i32 (...) @AttitudeSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
char const *handlers_c() {
  static char const rcsid[] =
      "$Id: handlers.c 347 2014-05-21 15:15:57Z kny48981 $";
  return (rcsid);
}


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

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

LLVM IR (-O0):
@handlers_c.rcsid = internal constant [52 x i8] c"$Id: handlers.c 347 2014-05-21 15:15:57Z kny48981 $\00"
define i8* @handlers_c() {
ret i8* getelementptr inbounds ([52 x i8], [52 x i8]* @handlers_c.rcsid, i64 0, i64 0)
}

LLVM IR (-O2):
@handlers_c.rcsid = internal constant [52 x i8] c"$Id: handlers.c 347 2014-05-21 15:15:57Z kny48981 $\00"
define i8* @handlers_c() {
ret i8* getelementptr inbounds ([52 x i8], [52 x i8]* @handlers_c.rcsid, i64 0, i64 0)
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int tcgetattr(int, struct termios *);
int v_tcgetattr(int fd, struct termios *termios_p) {
  if ((tcgetattr(fd, termios_p)) == -1) {
    fprintf(stderr, "Error %d: tcgetattr() failure\n", errno);
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<v_tcgetattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <tcgetattr@plt>
cmp    $0xffffffff,%eax
jne    116e <v_tcgetattr+0x4e>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <v_tcgetattr+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_tcgetattr>:
push   %rax
call   1040 <tcgetattr@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1131 <v_tcgetattr+0x11>
pop    %rcx
ret
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"Error %d: tcgetattr() failure\0A\00"
@errno = global i32 0
define i32 @v_tcgetattr(i32 %0, %struct.termios* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.termios*
store i32 %0, i32* %4
store %struct.termios* %1, %struct.termios** %5
%6 = load i32, i32* %4
%7 = load %struct.termios*, %struct.termios** %5
%8 = call i32 @tcgetattr(i32 %6, %struct.termios* %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i32, i32* @errno
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %12)
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"Error %d: tcgetattr() failure\0A\00"
@errno = global i32 0
define i32 @v_tcgetattr(i32 %0, %struct.termios* %1) {
%3 = tail call i32 @tcgetattr(i32 %0, %struct.termios* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %10
}
void foo356() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @FragTrak_InitLevel() {
ret void
}
strwid_(s, len, len2) char *s;
int *len, len2;
{ strwidth_(s, len, len2); }


x86 assembly (clang, -O0):
<strwid_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1030 <strwidth_@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @strwid_(i8* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = load i32*, i32** %6
%10 = load i32, i32* %7
%11 = call i32 (i8*, i32*, i32, ...) bitcast (i32 (...)* @strwidth_ to i32 (i8*, i32*, i32, ...)*)(i8* %8, i32* %9, i32 %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @strwid_(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 (i8*, i32*, i32, ...) bitcast (i32 (...)* @strwidth_ to i32 (i8*, i32*, i32, ...)*)(i8* %0, i32* %1, i32 %2)
ret i32 undef
}
int main(void) {
  int f = 0;
  asm("{movl $42, %%eax | mov eax, 42}" : :);
  asm("{movl $41, %0||mov %0, 43}" : "=r"(f));
  if (f != 42)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x2a,%eax
mov    $0x29,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
je     1142 <main+0x32>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2a,%eax
mov    $0x29,%eax
cmp    $0x2a,%eax
jne    1122 <main+0x12>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 asm "$(movl $$41, $0$|$|mov $0, 43$)", "=r,~{dirflag},~{fpsr},~{flags}"()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %0
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "$(movl $$42, %eax $| mov eax, 42$)", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 asm "$(movl $$41, $0$|$|mov $0, 43$)", "=r,~{dirflag},~{fpsr},~{flags}"()
%2 = icmp eq i32 %1, 42
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
ret i32 0
}
/* Type definitions */
struct aeEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int tickTest(struct aeEventLoop *eventLoop, long long id, void *clientData) {
  ((void)eventLoop);
  ((void)clientData);
  printf("hello %lld\n", id);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.aeEventLoop = type { i32 }
@.str = [12 x i8] c"hello %lld\0A\00"
define i32 @tickTest(%struct.aeEventLoop* %0, i64 %1, i8* %2) {
%4 = alloca %struct.aeEventLoop*
%5 = alloca i64
%6 = alloca i8*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load %struct.aeEventLoop*, %struct.aeEventLoop** %4
%8 = load i8*, i8** %6
%9 = load i64, i64* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %9)
ret i32 0
}

LLVM IR (-O2):
%struct.aeEventLoop = type { i32 }
@.str = [12 x i8] c"hello %lld\0A\00"
define i32 @tickTest(%struct.aeEventLoop* nocapture readnone %0, i64 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
void __lyos_libdl_dummy(void) {}


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

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

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

LLVM IR (-O2):
define void @__lyos_libdl_dummy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x4f() {
  Assert_real((isascii(79)),
              "/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_isascii.c",
              400, ("isascii should be 1 for O"));
}


x86 assembly (clang, -O0):
<t_isascii_0x4f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4f,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x190,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x4f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x190,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for O\00"
define void @t_isascii_0x4f() {
%1 = call i32 @isascii(i32 79)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 400, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for O\00"
define void @t_isascii_0x4f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 400, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *tdefl_write_image_to_png_file_in_memory_ex(void const *, int, int, int,
                                                 int, size_t *, int,
                                                 int /*<<< orphan*/);
void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h,
                                              int num_chans, int bpl,
                                              size_t *pLen_out) {
  return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans,
                                                    bpl, pLen_out, 6, (0));
}


x86 assembly (clang, -O0):
<tdefl_write_image_to_png_file_in_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
xor    %eax,%eax
movl   $0x6,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdefl_write_image_to_png_file_in_memory>:
push   %rax
push   $0x0
push   $0x6
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @tdefl_write_image_to_png_file_in_memory(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i64* %5) {
%7 = tail call i8* @tdefl_write_image_to_png_file_in_memory_ex(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i64* %5, i32 6, i32 0)
ret i8* %7
}
/* Type definitions */
struct feed_screen_iterator {
  int dummy;
};
struct feed_screen_info {
  int dummy;
};

/* Variables and functions */
char feed_screen_iterator_test_write(struct feed_screen_info const *const,
                                     struct feed_screen_iterator *const,
                                     unsigned int);
char feed_screen_iterator_test_clear(
    struct feed_screen_info const *const p_screen_info,
    struct feed_screen_iterator *const p_screen_iterator) {
  return feed_screen_iterator_test_write(p_screen_info, p_screen_iterator, 1u);
}


x86 assembly (clang, -O0):
<feed_screen_iterator_test_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <feed_screen_iterator_test_write@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feed_screen_iterator_test_clear>:
mov    $0x1,%edx
jmp    1030 <feed_screen_iterator_test_write@plt>

LLVM IR (-O0):
%struct.feed_screen_info = type { i32 }
%struct.feed_screen_iterator = type { i32 }
define signext i8 @feed_screen_iterator_test_clear(%struct.feed_screen_info* %0, %struct.feed_screen_iterator* %1) {
%3 = alloca %struct.feed_screen_info*
%4 = alloca %struct.feed_screen_iterator*
store %struct.feed_screen_info* %0, %struct.feed_screen_info** %3
store %struct.feed_screen_iterator* %1, %struct.feed_screen_iterator** %4
%5 = load %struct.feed_screen_info*, %struct.feed_screen_info** %3
%6 = load %struct.feed_screen_iterator*, %struct.feed_screen_iterator** %4
%7 = call signext i8 @feed_screen_iterator_test_write(%struct.feed_screen_info* %5, %struct.feed_screen_iterator* %6, i32 1)
ret i8 %7
}

LLVM IR (-O2):
%struct.feed_screen_info = type { i32 }
%struct.feed_screen_iterator = type { i32 }
define signext i8 @feed_screen_iterator_test_clear(%struct.feed_screen_info* %0, %struct.feed_screen_iterator* %1) {
%3 = tail call signext i8 @feed_screen_iterator_test_write(%struct.feed_screen_info* %0, %struct.feed_screen_iterator* %1, i32 1)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test02(int flag) {
  if (flag)
    foo();
  foo();
}


x86 assembly (clang, -O0):
<test02>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <test02+0x1c>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test02>:
test   %edi,%edi
je     1120 <test02+0x10>
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @test02(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @foo()
br label %7
7: ; preds = %5, %1
%8 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @test02(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @foo()
ret void
}
void set_block_used(unsigned char *block_bitmap, int blocknum) {
  unsigned char bm;
  bm = block_bitmap[blocknum / 8];
  bm |= (0x80 >> (blocknum % 8));
  block_bitmap[blocknum / 8] = bm;
}


x86 assembly (clang, -O0):
<set_block_used>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x80,%eax
sar    %cl,%eax
mov    %eax,%ecx
movzbl -0xd(%rbp),%eax
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x19(%rbp),%dl
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_block_used>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
and    $0x7,%cl
mov    $0x80,%edx
shr    %cl,%edx
cltq
or     %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @set_block_used(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %5
%12 = load i32, i32* %4
%13 = srem i32 %12, 8
%14 = ashr i32 128, %13
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = or i32 %16, %14
%18 = trunc i32 %17 to i8
store i8 %18, i8* %5
%19 = load i8, i8* %5
%20 = load i8*, i8** %3
%21 = load i32, i32* %4
%22 = sdiv i32 %21, 8
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %20, i64 %23
store i8 %19, i8* %24
ret void
}

LLVM IR (-O2):
define void @set_block_used(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = and i32 %1, 7
%8 = lshr i32 128, %7
%9 = trunc i32 %8 to i8
%10 = or i8 %6, %9
store i8 %10, i8* %5
ret void
}
/* Variables and functions */
double myatof(char *);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) { printf("%f\n", myatof(argv[1])); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\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 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call double @myatof(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call double @myatof(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
ret i32 0
}
void s390_pv_unshare(void) {}


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

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

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

LLVM IR (-O2):
define void @s390_pv_unshare() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap(char *, int, int);
void reverse(char s[], int i, int j) {
  if (i < j) {
    swap(s, i, j);
    reverse(s, ++i, --j);
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1168 <reverse+0x48>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <swap@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
mov    -0x10(%rbp),%edx
add    $0xffffffff,%edx
mov    %edx,-0x10(%rbp)
call   1030 <reverse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbp
push   %r14
push   %rbx
cmp    %edx,%esi
jge    1136 <reverse+0x26>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <swap@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jl     1120 <reverse+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @reverse(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @swap(i8* %11, i32 %12, i32 %13)
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = load i32, i32* %6
%19 = add nsw i32 %18, -1
store i32 %19, i32* %6
br label %20
20: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
define void @reverse(i8* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %2, %3 ]
%7 = phi i32 [ %9, %5 ], [ %1, %3 ]
%8 = tail call i32 @swap(i8* %0, i32 %7, i32 %6)
%9 = add nsw i32 %7, 1
%10 = add nsw i32 %6, -1
%11 = icmp slt i32 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void pid_remove(pid_t pid) { printf("remove pid %u\n", pid); }


x86 assembly (clang, -O0):
<pid_remove>:
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):
<pid_remove>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"remove pid %u\0A\00"
define void @pid_remove(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int sscanf(char const *, char *, int *const, char *const);
int cmx_registry_parse_filename(const char *filename_buf, int *const process_id,
                                char *const component_name) {
  if (sscanf(filename_buf, "cmx.%d.%63s", process_id, component_name) == 2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<cmx_registry_parse_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <sscanf@plt>
cmp    $0x2,%eax
jne    1151 <cmx_registry_parse_filename+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1158 <cmx_registry_parse_filename+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmx_registry_parse_filename>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee2(%rip),%rsi
call   1030 <sscanf@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"cmx.%d.%63s\00"
define i32 @cmx_registry_parse_filename(i8* nocapture %0, i32* %1, i8* %2) {
%4 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %2)
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ fibo(int);
int main(int argc, char **argv) { fibo(argv[1] ? atoi(argv[1]) : 10); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     115a <main+0x3a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1167 <main+0x47>
mov    $0xa,%eax
mov    %eax,-0x14(%rbp)
jmp    1167 <main+0x47>
mov    -0x14(%rbp),%edi
call   1030 <fibo@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1133 <main+0x13>
call   1040 <atoi@plt>
mov    %eax,%edi
jmp    1138 <main+0x18>
mov    $0xa,%edi
call   1030 <fibo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %10
%17 = phi i32 [ %14, %10 ], [ 10, %15 ]
%18 = call i32 @fibo(i32 %17)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @atoi(i8* %4)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 10, %2 ]
%10 = tail call i32 @fibo(i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int, long long, int, long long);
int main() {
  f(2, 1, (long long)2, 3, (long long)4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edx
mov    $0x4,%r8d
mov    $0x2,%edi
mov    $0x1,%esi
mov    $0x3,%ecx
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2, i32 1, i64 2, i32 3, i64 4)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
const char *partcode_path(const char *part_type) {
  if (strcmp(part_type, "VTOC8") == 0)
    return ("/boot/boot1");
  return (NULL);
}


x86 assembly (clang, -O0):
<partcode_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1146 <partcode_path+0x36>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <partcode_path+0x3e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partcode_path>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
lea    0xedd(%rip),%rax
cmove  %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"VTOC8\00"
@.str.1 = [12 x i8] c"/boot/boot1\00"
define i8* @partcode_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"VTOC8\00"
@.str.1 = [12 x i8] c"/boot/boot1\00"
define i8* @partcode_path(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* null
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ emit_cmp(int, int);
int /*<<< orphan*/ emit_orimm(int, int, int);
int /*<<< orphan*/ emit_sbbimm(int /*<<< orphan*/, int);
void emit_cmphs(int s1, int s2, int sr, int temp) {
  emit_orimm(sr, 1, sr);
  emit_cmp(s2, s1);
  emit_sbbimm(0, sr);
}


x86 assembly (clang, -O0):
<emit_cmphs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1050 <emit_orimm@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <emit_cmp@plt>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1040 <emit_sbbimm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_cmphs>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %edx,%edi
mov    $0x1,%esi
call   1050 <emit_orimm@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <emit_cmp@plt>
xor    %edi,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <emit_sbbimm@plt>

LLVM IR (-O0):
define void @emit_cmphs(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @emit_orimm(i32 %9, i32 1, i32 %10)
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = call i32 @emit_cmp(i32 %12, i32 %13)
%15 = load i32, i32* %7
%16 = call i32 @emit_sbbimm(i32 0, i32 %15)
ret void
}

LLVM IR (-O2):
define void @emit_cmphs(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @emit_orimm(i32 %2, i32 1, i32 %2)
%6 = tail call i32 @emit_cmp(i32 %1, i32 %0)
%7 = tail call i32 @emit_sbbimm(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vecNd_print(double const *, int);
void vec3d_print(const double v[3]) { vecNd_print(v, 3); }


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

x86 assembly (clang, -O2):
<vec3d_print>:
mov    $0x3,%esi
jmp    1030 <vecNd_print@plt>

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

LLVM IR (-O2):
define void @vec3d_print(double* %0) {
%2 = tail call i32 @vecNd_print(double* %0, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void newline(int indent) {
  int i;
  putchar('\n');
  for (i = 0; i < indent; i++)
    putchar(' ');
}


x86 assembly (clang, -O0):
<newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1150 <newline+0x40>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <newline+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newline>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    113f <newline+0x2f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <newline+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @newline(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = call i32 @putchar(i8 signext 32)
br label %11
11: ; preds = %9
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @newline(i32 %0) {
%2 = tail call i32 @putchar(i8 signext 10)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i8 signext 32)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_stuff_mmx(void *, unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, char *);
void dump_stuff_mmx_msg_sepline(const void *msg, void *buf, unsigned int size,
                                unsigned int index) {
  printf("%s :\n", (char *)msg);
  dump_stuff_mmx(buf, size, index);
}


x86 assembly (clang, -O0):
<dump_stuff_mmx_msg_sepline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <dump_stuff_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_stuff_mmx_msg_sepline>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <dump_stuff_mmx@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s :\0A\00"
define void @dump_stuff_mmx_msg_sepline(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @dump_stuff_mmx(i8* %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s :\0A\00"
define void @dump_stuff_mmx_msg_sepline(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @dump_stuff_mmx(i8* %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
char *ctime(long *);
long time(int /*<<< orphan*/);
char *get_now_date_string() {
  long time_now;
  time_now = time(0);
  return ctime(&time_now);
}


x86 assembly (clang, -O0):
<get_now_date_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <ctime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_now_date_string>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @get_now_date_string() {
%1 = alloca i64
%2 = call i64 @time(i32 0)
store i64 %2, i64* %1
%3 = call i8* @ctime(i64* %1)
ret i8* %3
}

LLVM IR (-O2):
define i8* @get_now_date_string() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i64 @time(i32 0)
store i64 %3, i64* %1
%4 = call i8* @ctime(i64* %1)
ret i8* %4
}
int main1(int num) {
  int i = 1;
  while (i <= num) {
    if (num % i == 0) {
      if (!((i == 1) || (i == num))) {
        return 0;
      }
    }
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     115f <main1+0x5f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1151 <main1+0x51>
cmpl   $0x1,-0xc(%rbp)
je     114c <main1+0x4c>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     114c <main1+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1166 <main1+0x66>
jmp    1151 <main1+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <main1+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
test   %edi,%edi
jle    1139 <main1+0x39>
mov    %edi,%ecx
neg    %ecx
mov    $0x1,%esi
jmp    1122 <main1+0x22>
nop
lea    (%rcx,%rsi,1),%eax
add    $0x1,%eax
mov    %esi,%edx
add    $0x1,%edx
mov    %edx,%esi
cmp    $0x1,%eax
je     1139 <main1+0x39>
mov    %edi,%eax
cltd
idiv   %esi
mov    %ecx,%eax
add    %esi,%eax
je     1110 <main1+0x10>
cmp    $0x1,%esi
je     1110 <main1+0x10>
test   %edx,%edx
jne    1110 <main1+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @main1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %26
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = srem i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %9
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 1
br i1 %16, label %22, label %17
17: ; preds = %14
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = icmp eq i32 %18, %19
br i1 %20, label %22, label %21
21: ; preds = %17
store i32 0, i32* %2
br label %27
22: ; preds = %17, %14
br label %23
23: ; preds = %22, %9
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %5
26: ; preds = %5
store i32 1, i32* %2
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @main1(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %14, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 1, %1 ]
%8 = srem i32 %0, %7
%9 = icmp ne i32 %8, 0
%10 = icmp eq i32 %7, 1
%11 = or i1 %10, %9
%12 = icmp eq i32 %7, %0
%13 = or i1 %12, %11
br i1 %13, label %3, label %14
14: ; preds = %6, %3, %1
%15 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %15
}
void test10_HelloWorld_targetInit__I() {}


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

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

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

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