xunge/DecIR huggingface dataset:
void nrf_csl() { *(unsigned char *)0x500A &= ~(1 << 4); }


x86 assembly (clang, -O0):
<nrf_csl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x500a,%eax
movzbl (%rax),%eax
and    $0xffffffef,%eax
mov    %al,%cl
mov    $0x500a,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_csl>:
andb   $0xef,0x500a
ef
ret

LLVM IR (-O0):
define void @nrf_csl() {
%1 = load i8, i8* inttoptr (i64 20490 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, -17
%4 = trunc i32 %3 to i8
store i8 %4, i8* inttoptr (i64 20490 to i8*)
ret void
}

LLVM IR (-O2):
define void @nrf_csl() {
%1 = load i8, i8* inttoptr (i64 20490 to i8*)
%2 = and i8 %1, -17
store i8 %2, i8* inttoptr (i64 20490 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump(int *, int);
int /*<<< orphan*/ merge_sort(int *, int /*<<< orphan*/, int);
int main() {
  int a[10] = {30, 20, 10, 15, 4, 8, 40, 80, 20, 9};
  merge_sort(a, 0, 9);
  dump(a, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1050 <merge_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <merge_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 30, i32 20, i32 10, i32 15, i32 4, i32 8, i32 40, i32 80, i32 20, i32 9]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @merge_sort(i32* %4, i32 0, i32 9)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @dump(i32* %6, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 30, i32 20, i32 10, i32 15, i32 4, i32 8, i32 40, i32 80, i32 20, i32 9]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @merge_sort(i32* %3, i32 0, i32 9)
%5 = call i32 @dump(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void frame() {
  printf("+");
  for (int i = 0; i < 78; i++) {
    printf("-");
  }
  printf("+\n");
}


x86 assembly (clang, -O0):
<frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x4e,-0x4(%rbp)
jge    114f <frame+0x3f>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112b <frame+0x1b>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frame>:
push   %rbx
mov    $0x2b,%edi
call   1030 <putchar@plt>
mov    $0x4e,%ebx
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <frame+0x10>
lea    0xeba(%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 @frame() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 78
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
%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 @frame() {
%1 = tail call i32 @putchar(i32 43)
br label %4
2: ; preds = %4
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
4: ; preds = %0, %4
%5 = phi i32 [ 0, %0 ], [ %7, %4 ]
%6 = tail call i32 @putchar(i32 45)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, 78
br i1 %8, label %2, label %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XFocusInEvent;

/* Variables and functions */
void set_XFocusInEvent_serial(void *_p, unsigned long _v) {
  ((XFocusInEvent *)_p)->serial = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XFocusInEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("output begin\n");
  printf("content in buffer");
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"output begin\0A\00"
@.str.1 = [18 x i8] c"content in buffer\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"content in buffer\00"
@str = [13 x i8] c"output begin\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
}
__attribute__((no, noclone)) unsigned __int128 t110_3sub(unsigned char y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((unsigned char)(0x7f - 1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t110_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
xor    %ecx,%ecx
mov    $0x7e,%edx
sub    %rax,%rdx
sbb    %rcx,%rcx
setb   %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    1147 <t110_3sub+0x37>
jmp    114e <t110_3sub+0x3e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t110_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
xor    %r14d,%r14d
mov    $0x7e,%ebx
sub    %rax,%rbx
sbb    %r14,%r14
jae    112d <t110_3sub+0x1d>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t110_3sub(i8 zeroext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i128
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = zext i8 %5 to i128
%7 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 126, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
store i128 %9, i128* %4
br i1 %8, label %10, label %12
10: ; preds = %1
%11 = call i32 (...) @bar()
br label %12
12: ; preds = %10, %1
%13 = load i128, i128* %4
store i128 %13, i128* %2
%14 = bitcast i128* %2 to { i64, i64 }*
%15 = load { i64, i64 }, { i64, i64 }* %14
ret { i64, i64 } %15
}

LLVM IR (-O2):
define { i64, i64 } @t110_3sub(i8 zeroext %0) {
%2 = zext i8 %0 to i128
%3 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 126, i128 %2)
%4 = extractvalue { i128, i1 } %3, 1
%5 = extractvalue { i128, i1 } %3, 0
br i1 %4, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @bar()
br label %8
8: ; preds = %6, %1
%9 = trunc i128 %5 to i64
%10 = lshr i128 %5, 64
%11 = trunc i128 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
char *xmalloc(int amt) {
  char *value = (char *)malloc(amt);
  if (value == NULL) {
    fprintf(stderr, "Memory exhausted!!\n");
    exit(1);
  }
  memset(value, 0, amt);
  return value;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1181 <xmalloc+0x41>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xe8e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <malloc@plt>
test   %rax,%rax
je     1168 <xmalloc+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xe88(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Memory exhausted!!\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i32, i32* %2
%16 = call i32 @memset(i8* %14, i32 0, i32 %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Memory exhausted!!\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = tail call i32 @memset(i8* %3, i32 0, i32 %0)
ret i8* %3
}
void i2d_PKCS7_NDEF(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_NDEF() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hmac_sha1_vector(unsigned char *, unsigned int, int,
                                    unsigned char **, unsigned int *,
                                    unsigned char *);
void hmac_sha1(unsigned char *key, unsigned int key_len, unsigned char *data,
               unsigned int data_len, unsigned char *mac) {
  hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac);
}


x86 assembly (clang, -O0):
<hmac_sha1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x28(%rbp),%r9
mov    $0x1,%edx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
call   1030 <hmac_sha1_vector@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac_sha1>:
sub    $0x18,%rsp
mov    %r8,%r9
mov    %rdx,0x10(%rsp)
mov    %ecx,0xc(%rsp)
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x1,%edx
call   1030 <hmac_sha1_vector@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @hmac_sha1(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %10
%14 = call i32 @hmac_sha1_vector(i8* %11, i32 %12, i32 1, i8** %8, i32* %9, i8* %13)
ret void
}

LLVM IR (-O2):
define void @hmac_sha1(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
store i8* %2, i8** %6
store i32 %3, i32* %7
%8 = call i32 @hmac_sha1_vector(i8* %0, i32 %1, i32 1, i8** %6, i32* %7, i8* %4)
ret void
}
int validate_ptr(void *ptr) {
  int ret;
  __asm__ __volatile__("  mov $1, %0\n"
                       "0: mov (%1), %1\n"
                       "2:\n"
                       ".section .fixup,\"ax\"\n"
                       "3: mov $0, %0\n"
                       " jmp 2b\n"
                       ".previous\n"
                       ".section __ex_table,\"a\"\n"
                       " .align 8\n"
                       " .quad 0b,3b\n"
                       ".previous"
                       : "=&a"(ret)
                       : "c"(ptr));
  return ret;
}


x86 assembly (clang, -O0):
<validate_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%eax
mov    (%rcx),%rcx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_ptr>:
mov    %rdi,%rcx
mov    $0x1,%eax
mov    (%rcx),%rcx
ret

LLVM IR (-O0):
define i32 @validate_ptr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 asm sideeffect " mov $$1, $0\0A0: mov ($1), $1\0A2:\0A.section .fixup,\22ax\22\0A3: mov $$0, $0\0A jmp 2b\0A.previous\0A.section __ex_table,\22a\22\0A .align 8\0A .quad 0b,3b\0A.previous", "=&{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @validate_ptr(i8* %0) {
%2 = tail call i32 asm sideeffect " mov $$1, $0\0A0: mov ($1), $1\0A2:\0A.section .fixup,\22ax\22\0A3: mov $$0, $0\0A jmp 2b\0A.previous\0A.section __ex_table,\22a\22\0A .align 8\0A .quad 0b,3b\0A.previous", "=&{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i32 %2
}
void dialog_frame(int ms) {}


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

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

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

LLVM IR (-O2):
define void @dialog_frame(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_alarm(int sig) { printf("ALARM\n"); }


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

x86 assembly (clang, -O2):
<catch_alarm>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"ALARM\00"
define void @catch_alarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n *= m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_haml_element() {
  test_parser_verify_parse(test_parser_sourcefile("haml", "  %code"), "haml",
                           "%code", "", 0);
}


x86 assembly (clang, -O0):
<test_haml_element>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec0(%rip),%rdx
lea    0xebe(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_haml_element>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec9(%rip),%rdx
lea    0xec7(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"haml\00"
@.str.1 = [8 x i8] c" %code\00"
@.str.2 = [6 x i8] c"%code\00"
@.str.3 = [1 x i8] zeroinitializer
define void @test_haml_element() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"haml\00"
@.str.1 = [8 x i8] c" %code\00"
@.str.2 = [6 x i8] c"%code\00"
@.str.3 = [1 x i8] zeroinitializer
define void @test_haml_element() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
long lrand48();
__attribute__((__weak__, __always___)) long int softboundmpx_lrand48() {
  return lrand48();
}


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

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

LLVM IR (-O0):
define weak i64 @softboundmpx_lrand48() {
%1 = call i64 (...) @lrand48()
ret i64 %1
}

LLVM IR (-O2):
define weak i64 @softboundmpx_lrand48() {
%1 = tail call i64 (...) @lrand48()
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ od_hex_dump_ext(void const *, size_t, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void od_hex_dump(const void *data, size_t data_len, uint8_t width) {
  od_hex_dump_ext(data, data_len, width, 0);
}


x86 assembly (clang, -O0):
<od_hex_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <od_hex_dump_ext@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_hex_dump>:
xor    %ecx,%ecx
jmp    1030 <od_hex_dump_ext@plt>

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

LLVM IR (-O2):
define void @od_hex_dump(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @od_hex_dump_ext(i8* %0, i64 %1, i32 %2, i32 0)
ret void
}
int write_cr4_checking(unsigned long val) {
  asm volatile("movl $0, %%gs:4 \n\t"
               ".pushsection .data.ex \n\t"
               ".quad 1111f, "
               "1f"
               "\n\t"
               ".popsection \n\t"
               "1111:"
               "mov %0, %%cr4\n\t"
               "1:"
               :
               : "r"(val));
  return exception_vector();
}


x86 assembly (clang, -O0):
<write_cr4_checking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,%gs:0x4
mov    %rax,%cr4
mov    $0x0,%al
call   1030 <exception_vector@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_cr4_checking>:
movl   $0x0,%gs:0x4
mov    %rdi,%cr4
xor    %eax,%eax
jmp    1030 <exception_vector@plt>

LLVM IR (-O0):
define i32 @write_cr4_checking(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 (...) @exception_vector()
ret i32 %4
}

LLVM IR (-O2):
define i32 @write_cr4_checking(i64 %0) {
tail call void asm sideeffect "movl $$0, %gs:4 \0A\09.pushsection .data.ex \0A\09.quad 1111f, 1f\0A\09.popsection \0A\091111:mov $0, %cr4\0A\091:", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
%2 = tail call i32 (...) @exception_vector()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_clr_C(char *str) {
  sprintf(str, "CLR   C                         ");
}


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

x86 assembly (clang, -O2):
<sprint_clr_C>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"CLR C \00"
define void @sprint_clr_C(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
/* Variables and functions */
int printf(char *, int, int, int, int, int, int, unsigned int);
int foo(int a, int b, int c, int d, int e, int f, unsigned int g) {
  return printf("%d, %d, %d, %d, %d, %d, %u\n", a, b, c, d, e, f, g);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    0x10(%rbp),%eax
lea    0xeb2(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    %r9d,%eax
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x10(%rsp),%r10d
lea    0xed4(%rip),%rdi
push   %r10
push   %rax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%d, %d, %d, %d, %d, %d, %u\0A\00"
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
@.str = [28 x i8] c"%d, %d, %d, %d, %d, %d, %u\0A\00"
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ check_mem();
int /*<<< orphan*/ printk(char *, char *);
void malloc_error(char *obj) {
  printk("malloc error: can't allocate memory for %s\n", obj);
  check_mem();
}


x86 assembly (clang, -O0):
<malloc_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printk@plt>
mov    $0x0,%al
call   1040 <check_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <check_mem@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"malloc error: can't allocate memory for %s\0A\00"
define void @malloc_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printk(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @check_mem()
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"malloc error: can't allocate memory for %s\0A\00"
define void @malloc_error(i8* %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @check_mem()
ret void
}
int main(void) { return 14 + 14 + 14; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void osalOsRescheduleS(void) {}


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

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

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

LLVM IR (-O2):
define void @osalOsRescheduleS() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
DIR *fdopendir(int fd) {
  fprintf(stderr, "fdopendir not supported %d\n", fd);
  return 0;
}


x86 assembly (clang, -O0):
<fdopendir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopendir>:
push   %rax
mov    %edi,%edx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"fdopendir not supported %d\0A\00"
define i32* @fdopendir(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32* null
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"fdopendir not supported %d\0A\00"
define noalias i32* @fdopendir(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32* null
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  int tv_sec;
};

/* Variables and functions */
void advance_deadline(struct timespec *deadline) {
  deadline->tv_nsec += 100 * 1000;
  if (deadline->tv_nsec >= 1000000000) {
    deadline->tv_sec += 1;
    deadline->tv_nsec -= 1000000000;
  }
}


x86 assembly (clang, -O0):
<advance_deadline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x186a0,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x3b9aca00,(%rax)
jl     1141 <advance_deadline+0x41>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    $0x3b9aca00,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<advance_deadline>:
mov    (%rdi),%eax
lea    0x186a0(%rax),%ecx
mov    %ecx,(%rdi)
cmp    $0x3b994360,%eax
jl     111c <advance_deadline+0x1c>
addl   $0x1,0x4(%rdi)
add    $0xc466bca0,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @advance_deadline(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 100000
store i32 %6, i32* %4
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = icmp sge i32 %9, 1000000000
br i1 %10, label %11, label %20
11: ; preds = %1
%12 = load %struct.timespec*, %struct.timespec** %2
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
store i32 %15, i32* %13
%16 = load %struct.timespec*, %struct.timespec** %2
%17 = getelementptr inbounds %struct.timespec, %struct.timespec* %16, i32 0, i32 0
%18 = load i32, i32* %17
%19 = sub nsw i32 %18, 1000000000
store i32 %19, i32* %17
br label %20
20: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @advance_deadline(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 100000
store i32 %4, i32* %2
%5 = icmp sgt i32 %3, 999899999
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
%10 = add nsw i32 %3, -999900000
store i32 %10, i32* %2
br label %11
11: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void _Exit(int code) { _exit(code); }


x86 assembly (clang, -O0):
<_Exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_Exit>:
push   %rax
call   1030 <_exit@plt>

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

LLVM IR (-O2):
define void @_Exit(i32 %0) {
%2 = tail call i32 @_exit(i32 %0)
unreachable
}
void emit_package(int p1) {
  int a;
  int b[0];
  a = __fprintf_chk(0, 0, "");
}


x86 assembly (clang, -O0):
<emit_package>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %esi,%esi
lea    0xedc(%rip),%rdx
mov    %esi,%edi
mov    $0x0,%al
call   1030 <__fprintf_chk@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_package>:
lea    0xee9(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <__fprintf_chk@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @emit_package(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [0 x i32]
store i32 %0, i32* %2
%5 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @__fprintf_chk to i32 (i32, i32, i8*, ...)*)(i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %3
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @emit_package(i32 %0) {
%2 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @__fprintf_chk to i32 (i32, i32, i8*, ...)*)(i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
int gg_getopt(argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
  return _getopt_internal(argc, argv, optstring, (const struct gg_option *)0,
                          (int *)0, 0);
}


x86 assembly (clang, -O0):
<gg_getopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
mov    $0x0,%al
call   1030 <_getopt_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
jmp    1030 <_getopt_internal@plt>

LLVM IR (-O0):
%struct.gg_option = type opaque
define i32 @gg_getopt(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %6
%10 = call i32 (i32, i8**, i8*, %struct.gg_option*, i32*, i32, ...) bitcast (i32 (...)* @_getopt_internal to i32 (i32, i8**, i8*, %struct.gg_option*, i32*, i32, ...)*)(i32 %7, i8** %8, i8* %9, %struct.gg_option* null, i32* null, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.gg_option = type opaque
define i32 @gg_getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 (i32, i8**, i8*, %struct.gg_option*, i32*, i32, ...) bitcast (i32 (...)* @_getopt_internal to i32 (i32, i8**, i8*, %struct.gg_option*, i32*, i32, ...)*)(i32 %0, i8** %1, i8* %2, %struct.gg_option* null, i32* null, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ test_basic();
int /*<<< orphan*/ test_random();
int /*<<< orphan*/ test_redimension();
int /*<<< orphan*/ test_sorted();
int main() {
  srand(42);
  test_basic();
  test_random();
  test_sorted();
  test_redimension();
  printf("success\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1080 <test_basic@plt>
mov    $0x0,%al
call   1030 <test_random@plt>
mov    $0x0,%al
call   1040 <test_sorted@plt>
mov    $0x0,%al
call   1070 <test_redimension@plt>
lea    0xe64(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1080 <test_basic@plt>
xor    %eax,%eax
call   1030 <test_random@plt>
xor    %eax,%eax
call   1050 <test_sorted@plt>
xor    %eax,%eax
call   1070 <test_redimension@plt>
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"success\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @srand(i32 42)
%3 = call i32 (...) @test_basic()
%4 = call i32 (...) @test_random()
%5 = call i32 (...) @test_sorted()
%6 = call i32 (...) @test_redimension()
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i32 @srand(i32 42)
%2 = tail call i32 (...) @test_basic()
%3 = tail call i32 (...) @test_random()
%4 = tail call i32 (...) @test_sorted()
%5 = tail call i32 (...) @test_redimension()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct ComponentAssociation {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ComponentAssociation *);
void deleteComponentAssociationArray(
    struct ComponentAssociation *associationArray) {
  free(associationArray);
}


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

x86 assembly (clang, -O2):
<deleteComponentAssociationArray>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.ComponentAssociation = type { i32 }
define void @deleteComponentAssociationArray(%struct.ComponentAssociation* nocapture %0) {
%2 = tail call i32 @free(%struct.ComponentAssociation* %0)
ret void
}
int sysMotorget(int motor) {}


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

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

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

LLVM IR (-O2):
define i32 @sysMotorget(i32 %0) {
ret i32 undef
}
void bfdutil_iprules(int debug, unsigned char *intfname, unsigned char *localip,
                     unsigned char *remoteip, unsigned char *echoremoteip,
                     int enable) {
  return;
}


x86 assembly (clang, -O0):
<bfdutil_iprules>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bfdutil_iprules(i32 %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @bfdutil_iprules(i32 %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3, i8* nocapture %4, i32 %5) {
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int count_digits(char *s) {
  int count = 0;
  while (*s) {
    if (isdigit(*s))
      count++;
    s++;
  }
  return count;
}


x86 assembly (clang, -O0):
<count_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <count_digits+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     114f <count_digits+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <count_digits+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_digits>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114c <count_digits+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <isdigit@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <count_digits+0x20>
jmp    114e <count_digits+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @count_digits(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %12, %4 ], [ %0, %1 ]
%8 = tail call i64 @isdigit(i8 signext %5)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %6, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("Result: %d\n", 1 / atoi(argv[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeaa(%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 <atoi@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovae %edx,%eax
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Result: %d\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 i32 @atoi(i8* %4)
%6 = add i32 %5, 1
%7 = icmp ult i32 %6, 3
%8 = select i1 %7, i32 %5, i32 0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gf4tp_output(char *, int, char *);
void io_error(int e, char *n) { gf4tp_output("IO-ERROR #%d  %s\n", e, n); }


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

x86 assembly (clang, -O2):
<io_error>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <gf4tp_output@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"IO-ERROR #%d %s\0A\00"
define void @io_error(i32 %0, i8* %1) {
%3 = tail call i32 @gf4tp_output(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
bool same_as_digit_powers(int number, int to_power) {
  int sum_of_raised_numbers = 0;
  int intermediate_number = number;
  if (number == sum_of_raised_numbers) {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<same_as_digit_powers>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    112f <same_as_digit_powers+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <same_as_digit_powers+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<same_as_digit_powers>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @same_as_digit_powers(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void i2d_DIST_POINT(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_DIST_POINT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_lu_factor();
void Reset_LU_Factor() { reset_lu_factor(); }


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

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

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

LLVM IR (-O2):
define void @Reset_LU_Factor() {
%1 = tail call i32 (...) @reset_lu_factor()
ret void
}
void optionStart2OPTION() {}


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

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

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

LLVM IR (-O2):
define void @optionStart2OPTION() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t __noswap32(uint32_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @__noswap32(i32 returned %0) {
ret i32 %0
}