xunge/DecIR huggingface dataset:
int ispunct(int ch) {
  if ((ch >= 0x21 && ch <= 0x2F) || (ch >= 0x3A && ch <= 0x40) ||
      (ch >= 0x5B && ch <= 0x60) || (ch >= 0x7B && ch <= 0x7E))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x21,-0x8(%rbp)
jl     111b <ispunct+0x1b>
cmpl   $0x2f,-0x8(%rbp)
jle    1157 <ispunct+0x57>
cmpl   $0x3a,-0x8(%rbp)
jl     112f <ispunct+0x2f>
cmpl   $0x40,-0x8(%rbp)
jle    1157 <ispunct+0x57>
cmpl   $0x5b,-0x8(%rbp)
jl     1143 <ispunct+0x43>
cmpl   $0x60,-0x8(%rbp)
jle    1157 <ispunct+0x57>
cmpl   $0x7b,-0x8(%rbp)
jl     1163 <ispunct+0x63>
cmpl   $0x7e,-0x8(%rbp)
jg     1163 <ispunct+0x63>
movl   $0x1,-0x4(%rbp)
jmp    116a <ispunct+0x6a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
pxor   0xef7(%rip),%xmm0
movdqa 0xeff(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 33
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 47
br i1 %8, label %27, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 58
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 64
br i1 %14, label %27, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 91
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 96
br i1 %20, label %27, label %21
21: ; preds = %18, %15
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 123
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sle i32 %25, 126
br i1 %26, label %27, label %28
27: ; preds = %24, %18, %12, %6
store i32 1, i32* %2
br label %29
28: ; preds = %24, %21
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = add <4 x i32> %3, <i32 -123, i32 -91, i32 -33, i32 -58>
%5 = icmp ult <4 x i32> %4, <i32 4, i32 6, i32 15, i32 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ close(intptr_t);
void cleanup(void *p) { close((intptr_t)p); }


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

x86 assembly (clang, -O2):
<cleanup>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @cleanup(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @close(i64 %2)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ func1(int);
int main(int argc, char **argv) {
  func1(99);
  return EXIT_SUCCESS;
}


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    $0x63,%edi
call   1030 <func1@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x63,%edi
call   1030 <func1@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 @func1(i32 99)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @func1(i32 99)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ insertionSort(int *, int);
int /*<<< orphan*/ printArray(int *, int);
int main() {
  int arr[] = {12, 11, 13, 5, 6};
  int n = sizeof(arr) / sizeof(arr[0]);
  insertionSort(arr, n);
  printArray(arr, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x5,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <insertionSort@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xee5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <insertionSort@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [5 x i32] [i32 12, i32 11, i32 13, i32 5, i32 6]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
store i32 5, i32* %3
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @insertionSort(i32* %5, i32 %6)
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @printArray(i32* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [5 x i32] [i32 12, i32 11, i32 13, i32 5, i32 6]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @insertionSort(i32* %3, i32 5)
%5 = call i32 @printArray(i32* %3, i32 5)
ret i32 0
}
int bad8(void) {
  char buf[10];
  return __builtin_constant_p(buf);
}


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

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

LLVM IR (-O0):
define i32 @bad8() {
%1 = alloca [10 x i8]
ret i32 0
}

LLVM IR (-O2):
define i32 @bad8() {
ret i32 0
}
void block_init(const struct hvt_boot_info *bi __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
%struct.hvt_boot_info = type opaque
define void @block_init(%struct.hvt_boot_info* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void *needLargeMemResize(void *, size_t);
void *needLargeZeroedMemResize(void *vp, size_t oldSize, size_t newSize) {
  void *v = needLargeMemResize(vp, newSize);
  if (newSize > oldSize)
    memset(((char *)v) + oldSize, 0, newSize - oldSize);
  return v;
}


x86 assembly (clang, -O0):
<needLargeZeroedMemResize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <needLargeMemResize@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    116a <needLargeZeroedMemResize+0x4a>
mov    -0x20(%rbp),%rdi
add    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
sub    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<needLargeZeroedMemResize>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdx,%rsi
call   1040 <needLargeMemResize@plt>
mov    %rax,%r14
sub    %r15,%rbx
jbe    114b <needLargeZeroedMemResize+0x2b>
mov    %r14,%rdi
add    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @needLargeZeroedMemResize(i8* %0, i64 %1, i64 %2) {
%4 = tail call i8* @needLargeMemResize(i8* %0, i64 %2)
%5 = icmp ugt i64 %2, %1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 %1
%8 = sub i64 %2, %1
%9 = tail call i32 @memset(i8* %7, i32 0, i64 %8)
br label %10
10: ; preds = %6, %3
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-d | --device name   Video device name [/dev/video]\n"
          "-h | --help          Print this message\n"
          "-m | --mmap          Use memory mapped buffers\n"
          "-r | --read          Use read() calls\n"
          "-u | --userp         Use application allocated buffers\n"
          "-f | --fmt           Output "
          "format(yuv422,rgb555,rgb565,grey,yuv422p,yuv411p\n"
          "-b | --bypass        Capture image data to LCM \n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdx),%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [388 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A-f | --fmt Output format(yuv422,rgb555,rgb565,grey,yuv422p,yuv411p\0A-b | --bypass Capture image data to LCM \0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([388 x i8], [388 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [388 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-d | --device name Video device name [/dev/video]\0A-h | --help Print this message\0A-m | --mmap Use memory mapped buffers\0A-r | --read Use read() calls\0A-u | --userp Use application allocated buffers\0A-f | --fmt Output format(yuv422,rgb555,rgb565,grey,yuv422p,yuv411p\0A-b | --bypass Capture image data to LCM \0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([388 x i8], [388 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
void test_06(unsigned short tab[], int index, int val) {
  tab[index + 1] = (unsigned short)val;
}


x86 assembly (clang, -O0):
<test_06>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %ax,%dx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %dx,(%rax,%rcx,2)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_06>:
movslq %esi,%rax
mov    %dx,0x2(%rdi,%rax,2)
ret

LLVM IR (-O0):
define void @test_06(i16* %0, i32 %1, i32 %2) {
%4 = alloca i16*
%5 = alloca i32
%6 = alloca i32
store i16* %0, i16** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = trunc i32 %7 to i16
%9 = load i16*, i16** %4
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i16, i16* %9, i64 %12
store i16 %8, i16* %13
ret void
}

LLVM IR (-O2):
define void @test_06(i16* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = trunc i32 %2 to i16
%5 = add nsw i32 %1, 1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i16, i16* %0, i64 %6
store i16 %4, i16* %7
ret void
}
void mc_stacktrace(int skip_count) {}


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

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

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

LLVM IR (-O2):
define void @mc_stacktrace(i32 %0) {
ret void
}
/* Type definitions */
struct wpa_driver_test_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct wpa_driver_test_data *);
int /*<<< orphan*/
wpa_driver_test_close_test_socket(struct wpa_driver_test_data *);
void wpa_driver_test_deinit(void *priv) {
  struct wpa_driver_test_data *drv = priv;
  wpa_driver_test_close_test_socket(drv);
  free(drv);
}


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

x86 assembly (clang, -O2):
<wpa_driver_test_deinit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wpa_driver_test_close_test_socket@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.wpa_driver_test_data = type { i32 }
define void @wpa_driver_test_deinit(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.wpa_driver_test_data*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.wpa_driver_test_data*
store %struct.wpa_driver_test_data* %5, %struct.wpa_driver_test_data** %3
%6 = load %struct.wpa_driver_test_data*, %struct.wpa_driver_test_data** %3
%7 = call i32 @wpa_driver_test_close_test_socket(%struct.wpa_driver_test_data* %6)
%8 = load %struct.wpa_driver_test_data*, %struct.wpa_driver_test_data** %3
%9 = call i32 @free(%struct.wpa_driver_test_data* %8)
ret void
}

LLVM IR (-O2):
%struct.wpa_driver_test_data = type { i32 }
define void @wpa_driver_test_deinit(i8* %0) {
%2 = bitcast i8* %0 to %struct.wpa_driver_test_data*
%3 = tail call i32 @wpa_driver_test_close_test_socket(%struct.wpa_driver_test_data* %2)
%4 = tail call i32 @free(%struct.wpa_driver_test_data* %2)
ret void
}
/* Variables and functions */
scalar_t__ __cmpdf2(long long, double);
long long __negdf2(long long);
long long __absdf2(long long a1) {
  if (__cmpdf2(a1, 0.0) < 0)
    return __negdf2(a1);
  else
    return a1;
}


x86 assembly (clang, -O0):
<__absdf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xorps  %xmm0,%xmm0
call   1030 <__cmpdf2@plt>
cmp    $0x0,%rax
jge    1154 <__absdf2+0x34>
mov    -0x10(%rbp),%rdi
call   1040 <__negdf2@plt>
mov    %rax,-0x8(%rbp)
jmp    115c <__absdf2+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__absdf2>:
push   %rbx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
call   1030 <__cmpdf2@plt>
test   %rax,%rax
js     1136 <__absdf2+0x16>
mov    %rbx,%rax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__negdf2@plt>

LLVM IR (-O0):
define i64 @__absdf2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i64 @__cmpdf2(i64 %4, double 0.000000e+00)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @__negdf2(i64 %8)
store i64 %9, i64* %2
br label %12
10: ; preds = %1
%11 = load i64, i64* %3
store i64 %11, i64* %2
br label %12
12: ; preds = %10, %7
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @__absdf2(i64 %0) {
%2 = tail call i64 @__cmpdf2(i64 %0, double 0.000000e+00)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @__negdf2(i64 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i64 [ %5, %4 ], [ %0, %1 ]
ret i64 %7
}
void f(void) {
  int a[100][100];
  int n = 10;
  int m = 20;
#pragma hlt block factors(n, m)
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 100; j++) {
      a[i][j] = i * j;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9bd0,%rsp
movl   $0xa,-0x9c44(%rbp)
movl   $0x14,-0x9c48(%rbp)
movl   $0x0,-0x9c4c(%rbp)
cmpl   $0x64,-0x9c4c(%rbp)
jge    11a9 <f+0xa9>
movl   $0x0,-0x9c50(%rbp)
cmpl   $0x64,-0x9c50(%rbp)
jge    1190 <f+0x90>
mov    -0x9c4c(%rbp),%edx
imul   -0x9c50(%rbp),%edx
movslq -0x9c4c(%rbp),%rcx
lea    -0x9c40(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x9c50(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x9c50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c50(%rbp)
jmp    1140 <f+0x40>
jmp    1195 <f+0x95>
mov    -0x9c4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c4c(%rbp)
jmp    1129 <f+0x29>
add    $0x9bd0,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void DEBUG_TYPE(const char *type) { printf(" %s\n", type); }


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

x86 assembly (clang, -O2):
<DEBUG_TYPE>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c" %s\0A\00"
define void @DEBUG_TYPE(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void IRC_OnChannelSuperOp(const struct instance_data *pID,
                          const struct userinfo *pUI, const char *szChannel,
                          const char *szTargetNick) {}


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

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

LLVM IR (-O0):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelSuperOp(%struct.instance_data* %0, %struct.userinfo* %1, i8* %2, i8* %3) {
%5 = alloca %struct.instance_data*
%6 = alloca %struct.userinfo*
%7 = alloca i8*
%8 = alloca i8*
store %struct.instance_data* %0, %struct.instance_data** %5
store %struct.userinfo* %1, %struct.userinfo** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelSuperOp(%struct.instance_data* nocapture %0, %struct.userinfo* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
void lc_conn_state_dump_all_dev(void) {}


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

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

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

LLVM IR (-O2):
define void @lc_conn_state_dump_all_dev() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int safe_close(int fd) {
  if (fd >= 0)
    close(fd);
  return -1;
}


x86 assembly (clang, -O0):
<safe_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112d <safe_close+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_close>:
test   %edi,%edi
js     111e <safe_close+0xe>
push   %rax
call   1030 <close@plt>
add    $0x8,%rsp
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @safe_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Flush_Buffer32();
unsigned int Show_Bits(int);
unsigned int Get_Bits32() {
  unsigned int l;
  l = Show_Bits(32);
  Flush_Buffer32();
  return l;
}


x86 assembly (clang, -O0):
<Get_Bits32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20,%edi
call   1030 <Show_Bits@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <Flush_Buffer32@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_Bits32>:
push   %rbx
mov    $0x20,%edi
call   1030 <Show_Bits@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <Flush_Buffer32@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Get_Bits32() {
%1 = alloca i32
%2 = call i32 @Show_Bits(i32 32)
store i32 %2, i32* %1
%3 = call i32 (...) @Flush_Buffer32()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @Get_Bits32() {
%1 = tail call i32 @Show_Bits(i32 32)
%2 = tail call i32 (...) @Flush_Buffer32()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int asprintf(char **, char *, char const *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *get_container_launcher_file(const char *work_dir) {
  char *ret;
  int bytesPrinted = asprintf(&ret, "%s/%s", work_dir, "launch_container.sh");
  if (bytesPrinted == -1) {
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<get_container_launcher_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
lea    0xec4(%rip),%rcx
call   1030 <asprintf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1162 <get_container_launcher_file+0x42>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_container_launcher_file>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rsi
lea    0xed4(%rip),%rcx
mov    %rsp,%rdi
call   1030 <asprintf@plt>
cmp    $0xffffffff,%eax
je     1145 <get_container_launcher_file+0x25>
mov    (%rsp),%rax
pop    %rcx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [20 x i8] c"launch_container.sh\00"
@EXIT_FAILURE = global i32 0
define i8* @get_container_launcher_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @asprintf(i8** %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [20 x i8] c"launch_container.sh\00"
@EXIT_FAILURE = global i32 0
define i8* @get_container_launcher_file(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @asprintf(i8** %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = load i8*, i8** %2
ret i8* %10
}
void fz_nullfreeuser(void *user) {}


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

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

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

LLVM IR (-O2):
define void @fz_nullfreeuser(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog_name) {
  printf("Usage: %s <Input file> [<Output file> [<Width> <Height>]]\n",
         prog_name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Usage: %s <Input file> [<Output file> [<Width> <Height>]]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Usage: %s <Input file> [<Output file> [<Width> <Height>]]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void plat_extra_sync_for_device(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @plat_extra_sync_for_device(%struct.device* nocapture %0) {
ret void
}
/* Type definitions */
struct stat64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _STAT_VER;
int __xstat64(int /*<<< orphan*/, char const *, struct stat64 *);
int __stat64(const char *file, struct stat64 *buf) {
  return __xstat64(_STAT_VER, file, buf);
}


x86 assembly (clang, -O0):
<__stat64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <__xstat64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__stat64>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__xstat64@plt>

LLVM IR (-O0):
%struct.stat64 = type { i32 }
@_STAT_VER = global i32 0
define i32 @__stat64(i8* %0, %struct.stat64* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat64*
store i8* %0, i8** %3
store %struct.stat64* %1, %struct.stat64** %4
%5 = load i32, i32* @_STAT_VER
%6 = load i8*, i8** %3
%7 = load %struct.stat64*, %struct.stat64** %4
%8 = call i32 @__xstat64(i32 %5, i8* %6, %struct.stat64* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat64 = type { i32 }
@_STAT_VER = global i32 0
define i32 @__stat64(i8* %0, %struct.stat64* %1) {
%3 = load i32, i32* @_STAT_VER
%4 = tail call i32 @__xstat64(i32 %3, i8* %0, %struct.stat64* %1)
ret i32 %4
}
int cfg_increment_handler(const char *optarg, void *value_addr,
                          const struct argconfig_options *opt) {
  (*((int *)value_addr))++;
  return 0;
}


x86 assembly (clang, -O0):
<cfg_increment_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_increment_handler>:
addl   $0x1,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
%struct.argconfig_options = type opaque
define i32 @cfg_increment_handler(i8* nocapture readnone %0, i8* nocapture %1, %struct.argconfig_options* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strtold(char *, int /*<<< orphan*/ *);
int main(void) {
  strtold("10", NULL);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"10\00"
define i32 @main() {
%1 = tail call i32 @strtold(i8* nocapture getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}
void NullTextR(struct ADrawTag *ctx __attribute__((unused)),
               unsigned int x __attribute__((unused)),
               unsigned int y __attribute__((unused)),
               const char *string __attribute__((unused)),
               const char *url __attribute__((unused))) {}


x86 assembly (clang, -O0):
<NullTextR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ADrawTag = type opaque
define void @NullTextR(%struct.ADrawTag* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca %struct.ADrawTag*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store %struct.ADrawTag* %0, %struct.ADrawTag** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type opaque
define void @NullTextR(%struct.ADrawTag* nocapture %0, i32 %1, i32 %2, i8* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SysPerfTimerSetup();
void PerfTimerSetup(void) { SysPerfTimerSetup(); }


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

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

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

LLVM IR (-O2):
define void @PerfTimerSetup() {
%1 = tail call i32 (...) @SysPerfTimerSetup()
ret void
}
int load(char *arguments) {}


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

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

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

LLVM IR (-O2):
define i32 @load(i8* nocapture readnone %0) {
ret i32 undef
}
void do_nothing_el(struct expr_list *e, struct traversal_algorithm *algo) {
  (void)(e);
  (void)(algo);
}


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

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

LLVM IR (-O0):
%struct.expr_list = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_el(%struct.expr_list* %0, %struct.traversal_algorithm* %1) {
%3 = alloca %struct.expr_list*
%4 = alloca %struct.traversal_algorithm*
store %struct.expr_list* %0, %struct.expr_list** %3
store %struct.traversal_algorithm* %1, %struct.traversal_algorithm** %4
%5 = load %struct.expr_list*, %struct.expr_list** %3
%6 = load %struct.traversal_algorithm*, %struct.traversal_algorithm** %4
ret void
}

LLVM IR (-O2):
%struct.expr_list = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_el(%struct.expr_list* nocapture %0, %struct.traversal_algorithm* nocapture %1) {
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char *);
int /*<<< orphan*/ stderr;
char *strerror(int);
void print_errno(const char *s) {
  fprintf(stderr, "%s error %d, %s\n", s, errno, strerror(errno));
}


x86 assembly (clang, -O0):
<print_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    %rax,%r8
lea    0xe92(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_errno>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2eb2(%rip),%rax
mov    (%rax),%ebp
mov    0x2ea1(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1040 <strerror@plt>
lea    0xeb9(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %rax,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"%s error %d, %s\0A\00"
@errno = global i32 0
define void @print_errno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s error %d, %s\0A\00"
@errno = global i32 0
define void @print_errno(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %4)
ret void
}
/* Variables and functions */
int do_cmd(char *, int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int ret;
  if (argc < 3) {
    printf("too few arguments");
    return 0;
  }
  if (argc > 2) {
    ret = do_cmd(argv[1], argc - 1, argv + 1);
    return ret;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1186 <main+0x66>
cmpl   $0x2,-0x8(%rbp)
jle    1186 <main+0x66>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   1040 <do_cmd@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jg     1136 <main+0x16>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x8(%rdx),%rdi
add    $0x8,%rdx
add    $0xffffffff,%esi
pop    %rax
jmp    1040 <do_cmd@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"too few arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %24
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 2
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = call i32 @do_cmd(i8* %17, i32 %19, i8** %21)
store i32 %22, i32* %6
%23 = load i32, i32* %6
store i32 %23, i32* %3
br label %24
24: ; preds = %9, %14, %11
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [18 x i8] c"too few arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = add nsw i32 %0, -1
%10 = tail call i32 @do_cmd(i8* %8, i32 %9, i8** %7)
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ 0, %4 ], [ %10, %6 ]
ret i32 %12
}
void yy_2_TableContentStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_2_TableContentStar(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_2_TableContentStar(i8* nocapture %0, i32 %1) {
ret void
}
void test3(int a) { int w = a + 2; }


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

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

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

LLVM IR (-O2):
define void @test3(i32 %0) {
ret void
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/tctyp.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tctyp.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tctyp.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Type definitions */
typedef unsigned long u_int32_t;

/* Variables and functions */
void set_bit_u32(int nr, u_int32_t *addr) {
  addr[nr >> 5] |= (1UL << (nr & 31));
}


x86 assembly (clang, -O0):
<set_bit_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit_u32>:
mov    %edi,%ecx
and    $0x1f,%cl
mov    $0x1,%eax
shl    %cl,%rax
sar    $0x5,%edi
movslq %edi,%rcx
or     %rax,(%rsi,%rcx,8)
ret

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

LLVM IR (-O2):
define void @set_bit_u32(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 31
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = ashr i32 %0, 5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = or i64 %9, %5
store i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x07() {
  Assert_real((isbdigit(7) == 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_isbdigit.c",
              40, ("isbdigit should be 0 for 0x07"));
}


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

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

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

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


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

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

LLVM IR (-O0):
define signext i16 @__VERIFIER_nondet_short() {
ret i16 0
}

LLVM IR (-O2):
define signext i16 @__VERIFIER_nondet_short() {
ret i16 0
}