xunge/DecIR huggingface dataset:
OP(dd, d8) {
  illegal_1();
  op_d8();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_d8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_d8@plt>

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_d8()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void endmsg() {
  fputc('\n', stderr);
  fflush(stderr);
}


x86 assembly (clang, -O0):
<endmsg>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <fputc@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<endmsg>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
mov    $0xa,%edi
call   1030 <fputc@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @endmsg() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputc(i8 signext 10, i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @endmsg() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputc(i8 signext 10, i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
onearg() {
  int a, b, c, d;
  f(((a ? (b = 1) : (c = 2)), (d ? 3 : 4)));
}


x86 assembly (clang, -O0):
<onearg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
cmpl   $0x0,-0x8(%rbp)
je     112e <onearg+0x1e>
movl   $0x1,-0xc(%rbp)
jmp    1135 <onearg+0x25>
movl   $0x2,-0x10(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x4,%edi
mov    $0x3,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onearg>:
mov    $0x4,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @onearg() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %3
br label %10
9: ; preds = %0
store i32 2, i32* %4
br label %10
10: ; preds = %9, %8
%11 = phi i32 [ 1, %8 ], [ 2, %9 ]
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 3, i32 4
%16 = call i32 @f(i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @onearg() {
%1 = tail call i32 @f(i32 4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void main(void) {
  int i;
  printf("TASK1: executing...\n");
  i = 0;
  while (1) {
    printf("TASK1: %d\n", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [21 x i8] c"TASK1: executing...\0A\00"
@.str.1 = [11 x i8] c"TASK1: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %3
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"TASK1: %d\0A\00"
@str = [20 x i8] c"TASK1: executing...\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
br label %2
}
/* Variables and functions */
char *sysfs_get_driver(unsigned int cpu) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @sysfs_get_driver(i32 %0) {
ret i8* null
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct section {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_append(struct genlist *, struct section *);
void section_list_append(struct section_list *tthis, struct section *pfoo) {
  genlist_append((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<section_list_append>:
jmp    1030 <genlist_append@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_append(%struct.section_list* %0, %struct.section* %1) {
%3 = alloca %struct.section_list*
%4 = alloca %struct.section*
store %struct.section_list* %0, %struct.section_list** %3
store %struct.section* %1, %struct.section** %4
%5 = load %struct.section_list*, %struct.section_list** %3
%6 = bitcast %struct.section_list* %5 to %struct.genlist*
%7 = load %struct.section*, %struct.section** %4
%8 = call i32 @genlist_append(%struct.genlist* %6, %struct.section* %7)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_append(%struct.section_list* %0, %struct.section* %1) {
%3 = bitcast %struct.section_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_append(%struct.genlist* %3, %struct.section* %1)
ret void
}
void outl(unsigned short port, unsigned long value) {
  asm volatile("outl %%eax,%%dx" ::"d"(port), "a"(value));
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x10(%rbp),%rax
out    %eax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
mov    %rsi,%rax
mov    %edi,%edx
out    %eax,(%dx)
ret

LLVM IR (-O0):
define void @outl(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
define void @outl(i16 zeroext %0, i64 %1) {
tail call void asm sideeffect "outl %eax,%dx", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i64 %1)
ret void
}
void INT_Excep_USB1_USBI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_USB1_USBI1() {
ret void
}
/* Type definitions */
typedef int *__m128d;

/* Variables and functions */
__m128d __attribute__((__always___, __nodebug__))
_mm_cvtsi32_sd(__m128d a, int b) {
  a[0] = b;
  return a;
}


x86 assembly (clang, -O0):
<_mm_cvtsi32_sd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cvtsi32_sd>:
mov    %rdi,%rax
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define i32* @_mm_cvtsi32_sd(i32* returned writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_UNBLOCK;
scalar_t__ sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sigrelse(int sig) {
  sigset_t mask;
  sigemptyset(&mask);
  if (sigaddset(&mask, sig) < 0)
    return -1;
  return sigprocmask(SIG_UNBLOCK, &mask, NULL);
}


x86 assembly (clang, -O0):
<sigrelse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    -0x8(%rbp),%esi
lea    -0xc(%rbp),%rdi
call   1050 <sigaddset@plt>
cmp    $0x0,%rax
jge    1166 <sigrelse+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    117f <sigrelse+0x4f>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    -0xc(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigrelse>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <sigemptyset@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <sigaddset@plt>
test   %rax,%rax
js     1169 <sigrelse+0x39>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
jmp    116e <sigrelse+0x3e>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_UNBLOCK = global i32 0
define i32 @sigrelse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 @sigemptyset(i32* %4)
%6 = load i32, i32* %3
%7 = call i64 @sigaddset(i32* %4, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %13
10: ; preds = %1
%11 = load i32, i32* @SIG_UNBLOCK
%12 = call i32 @sigprocmask(i32 %11, i32* %4, i32* null)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@SIG_UNBLOCK = global i32 0
define i32 @sigrelse(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = call i64 @sigaddset(i32* %2, i32 %0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* @SIG_UNBLOCK
%9 = call i32 @sigprocmask(i32 %8, i32* %2, i32* null)
br label %10
10: ; preds = %1, %7
%11 = phi i32 [ %9, %7 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: dvbinfo [-h] [-d <debug>] [-f|\n");
  printf(" -d : debug level (default:none, error, warn, debug)\n");
  printf(" -f : filename\n");
  printf(" -h : help information\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: dvbinfo [-h] [-d <debug>] [-f|\0A\00"
@.str.1 = [54 x i8] c" -d : debug level (default:none, error, warn, debug)\0A\00"
@.str.2 = [16 x i8] c" -f : filename\0A\00"
@.str.3 = [24 x i8] c" -h : help information\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [38 x i8] c"Usage: dvbinfo [-h] [-d <debug>] [-f|\00"
@str.4 = [53 x i8] c" -d : debug level (default:none, error, warn, debug)\00"
@str.5 = [15 x i8] c" -f : filename\00"
@str.6 = [23 x i8] c" -h : help information\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rightrot(int, int);
int main() {
  printf("%u\n", rightrot(2487, 5));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @rightrot(i32 2487, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Alpha_Up(int value) {
  if (value) {
    cpc_key_press(0x90);
  } else {
    cpc_key_unpress(0x90);
  };
}


x86 assembly (clang, -O0):
<Joy_Alpha_Up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Alpha_Up+0x24>
mov    $0x90,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Alpha_Up+0x2e>
mov    $0x90,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Alpha_Up>:
test   %edi,%edi
je     112e <Joy_Alpha_Up+0xe>
mov    $0x90,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x90,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Alpha_Up(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 @cpc_key_press(i32 144)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 144)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Alpha_Up(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 144)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 144)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *_program_name(const char *argv0) {
  const char *pos;
  if (!argv0)
    return "otpasswd";
  pos = strrchr(argv0, '/');
  if (pos)
    return pos + 1;
  else
    return argv0;
}


x86 assembly (clang, -O0):
<_program_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <_program_name+0x27>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <_program_name+0x5d>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1165 <_program_name+0x55>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    116d <_program_name+0x5d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_program_name>:
test   %rdi,%rdi
je     1133 <_program_name+0x23>
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rbx,%rax
pop    %rbx
ret
lea    0xec6(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"otpasswd\00"
define i8* @_program_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %0, i8* %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ], [ %7, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printAsterisks(int width) {
  printf("*");
  do {
    printf(" ");
    width--;
  } while (width > 2);
  printf("*\n");
  return;
}


x86 assembly (clang, -O0):
<printAsterisks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     1127 <printAsterisks+0x17>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printAsterisks>:
push   %rbx
mov    %edi,%ebx
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
jg     1130 <printAsterisks+0x10>
lea    0xeb7(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [3 x i8] c"*\0A\00"
define void @printAsterisks(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %8, %1
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
br label %8
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 2
br i1 %10, label %4, label %11
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"*\00"
define void @printAsterisks(i32 %0) {
%2 = tail call i32 @putchar(i32 42)
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %6, %3 ]
%5 = tail call i32 @putchar(i32 32)
%6 = add nsw i32 %4, -1
%7 = icmp sgt i32 %4, 3
br i1 %7, label %3, label %8
8: ; preds = %3
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int foo3c(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo3c() {
ret i32 0
}
long long zsus() { return 0x0000ffff7fffffffLL; }


x86 assembly (clang, -O0):
<zsus>:
push   %rbp
mov    %rsp,%rbp
movabs $0xffff7fffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsus>:
movabs $0xffff7fffffff,%rax
ret

LLVM IR (-O0):
define i64 @zsus() {
ret i64 281472829227007
}

LLVM IR (-O2):
define i64 @zsus() {
ret i64 281472829227007
}
/* Variables and functions */
int PAPI_num_cmp_hwctrs(int);
void papif_num_cmp_hwctrs_(int *cidx, int *num) {
  *num = PAPI_num_cmp_hwctrs(*cidx);
}


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

x86 assembly (clang, -O2):
<papif_num_cmp_hwctrs_>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_num_cmp_hwctrs@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_num_cmp_hwctrs_(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* %5
%7 = call i32 @PAPI_num_cmp_hwctrs(i32 %6)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @papif_num_cmp_hwctrs_(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_num_cmp_hwctrs(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
double exp(double);
double mc_randf();
long mc_poisson_small(double lambda) {
  double l = exp(-lambda);
  double p = 1.0;
  long k = 0;
  do {
    k += 1;
    p *= mc_randf();
  } while (p > l);
  return k - 1;
}


x86 assembly (clang, -O0):
<mc_poisson_small>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <mc_randf@plt>
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1168 <mc_poisson_small+0x48>
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_poisson_small>:
push   %rbx
sub    $0x10,%rsp
xorps  0xed4(%rip),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xed1(%rip),%xmm0
mov    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <mc_randf@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbx
ucomisd 0x8(%rsp),%xmm0
ja     1150 <mc_poisson_small+0x30>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mc_poisson_small(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i64
store double %0, double* %2
%6 = load double, double* %2
%7 = fneg double %6
%8 = call double @exp(double %7)
store double %8, double* %3
store double 1.000000e+00, double* %4
store i64 0, i64* %5
br label %9
9: ; preds = %15, %1
%10 = load i64, i64* %5
%11 = add nsw i64 %10, 1
store i64 %11, i64* %5
%12 = call double (...) @mc_randf()
%13 = load double, double* %4
%14 = fmul double %13, %12
store double %14, double* %4
br label %15
15: ; preds = %9
%16 = load double, double* %4
%17 = load double, double* %3
%18 = fcmp ogt double %16, %17
br i1 %18, label %9, label %19
19: ; preds = %15
%20 = load i64, i64* %5
%21 = sub nsw i64 %20, 1
ret i64 %21
}

LLVM IR (-O2):
define i64 @mc_poisson_small(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
br label %4
4: ; preds = %4, %1
%5 = phi double [ 1.000000e+00, %1 ], [ %9, %4 ]
%6 = phi i64 [ 0, %1 ], [ %7, %4 ]
%7 = add nuw nsw i64 %6, 1
%8 = tail call double (...) @mc_randf()
%9 = fmul double %5, %8
%10 = fcmp ogt double %9, %3
br i1 %10, label %4, label %11
11: ; preds = %4
ret i64 %6
}
/* Variables and functions */
int intel_piix4_gpo_set(int, int);
int intel_piix4_gpo14_raise(void) { return intel_piix4_gpo_set(14, 1); }


x86 assembly (clang, -O0):
<intel_piix4_gpo14_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe,%edi
mov    $0x1,%esi
call   1030 <intel_piix4_gpo_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_piix4_gpo14_raise>:
mov    $0xe,%edi
mov    $0x1,%esi
jmp    1030 <intel_piix4_gpo_set@plt>

LLVM IR (-O0):
define i32 @intel_piix4_gpo14_raise() {
%1 = call i32 @intel_piix4_gpo_set(i32 14, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @intel_piix4_gpo14_raise() {
%1 = tail call i32 @intel_piix4_gpo_set(i32 14, i32 1)
ret i32 %1
}
void trampoline_set_kernel(void *p, unsigned long addr) {
  unsigned long *v;
  v = (p + 0x200);
  *v = addr;
}


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

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

LLVM IR (-O0):
define void @trampoline_set_kernel(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 512
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i64, i64* %4
%10 = load i64*, i64** %5
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @trampoline_set_kernel(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 512
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
void YUY2ToUV422Row_C() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @break_here() {
ret void
}
long Dynace_GetPageSize() { return 131008; }


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

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

LLVM IR (-O0):
define i64 @Dynace_GetPageSize() {
ret i64 131008
}

LLVM IR (-O2):
define i64 @Dynace_GetPageSize() {
ret i64 131008
}
/* Variables and functions */
int rand();
int get_next_int(int min, int max) { return rand() % (max + 1 - min) + min; }


x86 assembly (clang, -O0):
<get_next_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_next_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_next_int(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
void gtk_expander_set_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_expander_set_spacing() {
ret void
}
int max(float x, float y) {
  float z;
  z = x > y ? x : y;
  return (z);
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1136 <max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
cvttss2si -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %4
br label %13
13: ; preds = %11, %9
%14 = phi float [ %10, %9 ], [ %12, %11 ]
store float %14, float* %5
%15 = load float, float* %5
%16 = fptosi float %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
%5 = fptosi float %4 to i32
ret i32 %5
}
double absoluteValue(double x) {
  if (x < 0)
    x = -x;
  return x;
}


x86 assembly (clang, -O0):
<absoluteValue>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1138 <absoluteValue+0x38>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absoluteValue>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @absoluteValue(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
store double %7, double* %2
br label %8
8: ; preds = %5, %1
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @absoluteValue(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
int main() { return sizeof(long); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ parse_bool(char const *, int *);
int /*<<< orphan*/ player_set_rg_limit(int);
void set_replaygain_limit(unsigned int id, const char *buf) {
  int tmp;
  if (!parse_bool(buf, &tmp))
    return;
  player_set_rg_limit(tmp);
}


x86 assembly (clang, -O0):
<set_replaygain_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <parse_bool@plt>
cmp    $0x0,%eax
jne    114a <set_replaygain_limit+0x2a>
jmp    1152 <set_replaygain_limit+0x32>
mov    -0x14(%rbp),%edi
call   1040 <player_set_rg_limit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_replaygain_limit>:
push   %rax
mov    %rsi,%rdi
lea    0x4(%rsp),%rsi
call   1030 <parse_bool@plt>
test   %eax,%eax
je     113b <set_replaygain_limit+0x1b>
mov    0x4(%rsp),%edi
call   1040 <player_set_rg_limit@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @set_replaygain_limit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @parse_bool(i8* %6, i32* %5)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
br label %13
10: ; preds = %2
%11 = load i32, i32* %5
%12 = call i32 @player_set_rg_limit(i32 %11)
br label %13
13: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @set_replaygain_limit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @parse_bool(i8* %1, i32* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @player_set_rg_limit(i32 %8)
br label %10
10: ; preds = %2, %7
ret void
}
/* Variables and functions */
int ebbrt_newlib_unlink(char *);
int unlink(char *name) { return ebbrt_newlib_unlink(name); }


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

x86 assembly (clang, -O2):
<unlink>:
jmp    1030 <ebbrt_newlib_unlink@plt>

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

LLVM IR (-O2):
define i32 @unlink(i8* %0) {
%2 = tail call i32 @ebbrt_newlib_unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putnbr2(int);
int main(void) {
  ft_putnbr2(5258);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x148a,%edi
call   1040 <ft_putnbr2@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x148a,%edi
call   1040 <ft_putnbr2@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @ft_putnbr2(i32 5258)
%2 = call i32 @ft_putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ft_putnbr2(i32 5258)
%2 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}
int findMin(int a, int b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<findMin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <findMin+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <findMin+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findMin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @findMin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ capputchar(unsigned int, int /*<<< orphan*/);
void capputs(unsigned cap, char *s) {
  while (*s) {
    capputchar(cap, *s++);
  }
}


x86 assembly (clang, -O0):
<capputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <capputs+0x3b>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <capputchar@plt>
jmp    111f <capputs+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capputs>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <capputs+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <capputchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <capputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @capputs(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @capputchar(i32 %0, i32 %9)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __mark_inode_dirty(struct inode *, int);
void mark_inode_dirty_pages(struct inode *inode) {
  __mark_inode_dirty(inode, 4);
}


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

x86 assembly (clang, -O2):
<mark_inode_dirty_pages>:
mov    $0x4,%esi
jmp    1030 <__mark_inode_dirty@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
define void @mark_inode_dirty_pages(%struct.inode* %0) {
%2 = alloca %struct.inode*
store %struct.inode* %0, %struct.inode** %2
%3 = load %struct.inode*, %struct.inode** %2
%4 = call i32 @__mark_inode_dirty(%struct.inode* %3, i32 4)
ret void
}

LLVM IR (-O2):
%struct.inode = type { i32 }
define void @mark_inode_dirty_pages(%struct.inode* %0) {
%2 = tail call i32 @__mark_inode_dirty(%struct.inode* %0, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xe1() {
  Assert_real((ispunct(225) == 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_ispunct.c",
              1130, ("ispunct should be 0 for 0xe1"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe1\00"
define void @t_ispunct_0xe1() {
%1 = tail call i64 @ispunct(i32 225)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curve25519_donna_keypair(unsigned char *, unsigned char *);
int curve25519xsalsa20poly1305_box_keypair(unsigned char *pk,
                                           unsigned char *sk) {
  curve25519_donna_keypair(pk, sk);
  return 0;
}


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

x86 assembly (clang, -O2):
<curve25519xsalsa20poly1305_box_keypair>:
push   %rax
call   1030 <curve25519_donna_keypair@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @curve25519xsalsa20poly1305_box_keypair(i8* %0, i8* %1) {
%3 = tail call i32 @curve25519_donna_keypair(i8* %0, i8* %1)
ret i32 0
}
void HibernateDisable(void) {
  (*((volatile unsigned long *)(0x400FC010))) &= ~0x00000040;
}


x86 assembly (clang, -O0):
<HibernateDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateDisable>:
andq   $0xffffffffffffffbf,0x400fc010
40 bf
ret

LLVM IR (-O0):
define void @HibernateDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
ret void
}

LLVM IR (-O2):
define void @HibernateDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ isLowerRegularLetter(char);
scalar_t__ isUpperRegularLetter(char);
short int isRegularLetter(char chrsource) {
  if (isLowerRegularLetter(chrsource) || isUpperRegularLetter(chrsource))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isRegularLetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%edi
call   1040 <isLowerRegularLetter@plt>
cmp    $0x0,%rax
jne    1154 <isRegularLetter+0x34>
movsbl -0x3(%rbp),%edi
call   1030 <isUpperRegularLetter@plt>
cmp    $0x0,%rax
je     115f <isRegularLetter+0x3f>
movw   $0x1,-0x2(%rbp)
jmp    1165 <isRegularLetter+0x45>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isRegularLetter>:
push   %rbx
mov    %edi,%ebx
call   1040 <isLowerRegularLetter@plt>
mov    %rax,%rcx
mov    $0x1,%ax
test   %rcx,%rcx
je     1136 <isRegularLetter+0x16>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isUpperRegularLetter@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @isRegularLetter(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isLowerRegularLetter(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call i64 @isUpperRegularLetter(i8 signext %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i16 1, i16* %2
br label %13
12: ; preds = %7
store i16 0, i16* %2
br label %13
13: ; preds = %12, %11
%14 = load i16, i16* %2
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @isRegularLetter(i8 signext %0) {
%2 = tail call i64 @isLowerRegularLetter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isUpperRegularLetter(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i16
br label %8
8: ; preds = %4, %1
%9 = phi i16 [ 1, %1 ], [ %7, %4 ]
ret i16 %9
}
/* Type definitions */
struct t_config_section {
  int dummy;
};
struct t_config_option {
  int dummy;
};
struct t_config_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_file_option_free(struct t_config_option *);
int /*<<< orphan*/ gui_buffer_notify_set_all();
int config_weechat_notify_delete_option_cb(void *data,
                                           struct t_config_file *config_file,
                                           struct t_config_section *section,
                                           struct t_config_option *option) {
  (void)data;
  (void)config_file;
  (void)section;
  config_file_option_free(option);
  gui_buffer_notify_set_all();
  return 2;
}


x86 assembly (clang, -O0):
<config_weechat_notify_delete_option_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <config_file_option_free@plt>
mov    $0x0,%al
call   1030 <gui_buffer_notify_set_all@plt>
mov    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_weechat_notify_delete_option_cb>:
push   %rax
mov    %rcx,%rdi
call   1040 <config_file_option_free@plt>
xor    %eax,%eax
call   1030 <gui_buffer_notify_set_all@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_weechat_notify_delete_option_cb(i8* %0, %struct.t_config_file* %1, %struct.t_config_section* %2, %struct.t_config_option* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_config_file*
%7 = alloca %struct.t_config_section*
%8 = alloca %struct.t_config_option*
store i8* %0, i8** %5
store %struct.t_config_file* %1, %struct.t_config_file** %6
store %struct.t_config_section* %2, %struct.t_config_section** %7
store %struct.t_config_option* %3, %struct.t_config_option** %8
%9 = load i8*, i8** %5
%10 = load %struct.t_config_file*, %struct.t_config_file** %6
%11 = load %struct.t_config_section*, %struct.t_config_section** %7
%12 = load %struct.t_config_option*, %struct.t_config_option** %8
%13 = call i32 @config_file_option_free(%struct.t_config_option* %12)
%14 = call i32 (...) @gui_buffer_notify_set_all()
ret i32 2
}

LLVM IR (-O2):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_weechat_notify_delete_option_cb(i8* nocapture readnone %0, %struct.t_config_file* nocapture readnone %1, %struct.t_config_section* nocapture readnone %2, %struct.t_config_option* %3) {
%5 = tail call i32 @config_file_option_free(%struct.t_config_option* %3)
%6 = tail call i32 (...) @gui_buffer_notify_set_all()
ret i32 2
}