xunge/DecIR huggingface dataset:
void do_pushw_pos(void) {
  unsigned long long int block[3];
  __asm__ __volatile__("movq  %0, %%rdx\n\t"
                       "pushq $0x55555555\n\t"
                       "movq  %%rsp, 0(%%rdx)\n\t"
                       "pushw $0x3344\n\t"
                       "movq  %%rsp, 8(%%rdx)\n\t"
                       "popq  %%rax\n\t"
                       "movq  %%rax,16(%%rdx)\n\t"
                       "movq  0(%%rdx),%%rsp\n\t"
                       "addq  $8, %%rsp"
                       :
                       : "r"(&block)
                       : "rax", "rdx", "cc", "memory");
  printf("  pushw_neg: delta %lld, top64 0x%016llx\n", block[0] - block[1],
         block[2]);
}


x86 assembly (clang, -O0):
<do_pushw_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rcx
mov    %rcx,%rdx
push   $0x55555555
mov    %rsp,(%rdx)
pushw  $0x3344
mov    %rsp,0x8(%rdx)
pop    %rax
mov    %rax,0x10(%rdx)
mov    (%rdx),%rsp
add    $0x8,%rsp
mov    -0x20(%rbp),%rsi
sub    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pushw_pos>:
sub    $0x18,%rsp
mov    %rsp,%rcx
mov    %rcx,%rdx
push   $0x55555555
mov    %rsp,(%rdx)
pushw  $0x3344
mov    %rsp,0x8(%rdx)
pop    %rax
mov    %rax,0x10(%rdx)
mov    (%rdx),%rsp
add    $0x8,%rsp
mov    (%rsp),%rsi
mov    0x10(%rsp),%rdx
sub    0x8(%rsp),%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [42 x i8] c" pushw_neg: delta %lld, top64 0x%016llx\0A\00"
define void @do_pushw_pos() {
%1 = alloca [3 x i64]
%2 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 0
%3 = load i64, i64* %2
%4 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 1
%5 = load i64, i64* %4
%6 = sub i64 %3, %5
%7 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
%8 = load i64, i64* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c" pushw_neg: delta %lld, top64 0x%016llx\0A\00"
define void @do_pushw_pos() {
%1 = alloca [3 x i64]
%2 = bitcast [3 x i64]* %1 to i8*
%3 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 1
%6 = load i64, i64* %5
%7 = sub i64 %4, %6
%8 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
%9 = load i64, i64* %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int linux_tracefork_grandchild(void *arg) { _exit(0); }


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

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

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

LLVM IR (-O2):
define i32 @linux_tracefork_grandchild(i8* nocapture readnone %0) {
%2 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ deasplay_hal_set_extended(int /*<<< orphan*/,
                                             int /*<<< orphan*/ *,
                                             int /*<<< orphan*/);
void display_set_extended(uint8_t id, uint8_t *data, uint8_t len) {
  deasplay_hal_set_extended(id, data, len);
}


x86 assembly (clang, -O0):
<display_set_extended>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <deasplay_hal_set_extended@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_set_extended>:
jmp    1030 <deasplay_hal_set_extended@plt>

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

LLVM IR (-O2):
define void @display_set_extended(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @deasplay_hal_set_extended(i32 %0, i32* %1, i32 %2)
ret void
}
/* Type definitions */
struct snck_ctxt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ snck_heap_realloc(struct snck_ctxt const *const, char *const,
                                     unsigned int);
void snck_string_put(struct snck_ctxt const *const p_ctxt, char *const p_buf) {
  snck_heap_realloc(p_ctxt, p_buf, 0u);
}


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

x86 assembly (clang, -O2):
<snck_string_put>:
xor    %edx,%edx
jmp    1030 <snck_heap_realloc@plt>

LLVM IR (-O0):
%struct.snck_ctxt = type { i32 }
define void @snck_string_put(%struct.snck_ctxt* %0, i8* %1) {
%3 = alloca %struct.snck_ctxt*
%4 = alloca i8*
store %struct.snck_ctxt* %0, %struct.snck_ctxt** %3
store i8* %1, i8** %4
%5 = load %struct.snck_ctxt*, %struct.snck_ctxt** %3
%6 = load i8*, i8** %4
%7 = call i32 @snck_heap_realloc(%struct.snck_ctxt* %5, i8* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.snck_ctxt = type { i32 }
define void @snck_string_put(%struct.snck_ctxt* %0, i8* %1) {
%3 = tail call i32 @snck_heap_realloc(%struct.snck_ctxt* %0, i8* %1, i32 0)
ret void
}
int isComment(char *str) {
  int i = 0;
  while (str[i] == ' ') {
    i++;
  }
  return str[i] == '#';
}


x86 assembly (clang, -O0):
<isComment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1132 <isComment+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <isComment+0xf>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x23,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isComment>:
movzbl (%rdi),%ecx
add    $0x1,%rdi
cmp    $0x20,%cl
je     1100 <isComment>
xor    %eax,%eax
cmp    $0x23,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isComment(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
%7 = add nuw i64 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
%9 = icmp eq i8 %5, 35
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x6f() {
  Assert_real((ispunct(111) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              560, ("ispunct should be 0 for o"));
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__1__Timer__overflow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *lxqt_backlight_backend_get_driver();
int read_backlight(char *);
int lxqt_backlight_backend_get() {
  char *driver = lxqt_backlight_backend_get_driver();
  if (driver == NULL) {
    return -1;
  }
  int value = read_backlight(driver);
  free(driver);
  return value;
}


x86 assembly (clang, -O0):
<lxqt_backlight_backend_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <lxqt_backlight_backend_get_driver@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115a <lxqt_backlight_backend_get+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <lxqt_backlight_backend_get+0x45>
mov    -0x10(%rbp),%rdi
call   1050 <read_backlight@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lxqt_backlight_backend_get>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <lxqt_backlight_backend_get_driver@plt>
test   %rax,%rax
je     1158 <lxqt_backlight_backend_get+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <read_backlight@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
jmp    115d <lxqt_backlight_backend_get+0x2d>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @lxqt_backlight_backend_get() {
%1 = tail call i8* (...) @lxqt_backlight_backend_get_driver()
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @read_backlight(i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ %4, %3 ], [ -1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void pr_space_line(int n) {
  int i;
  for (i = 0; i < n; i++) {
    puts("\n");
  }
}


x86 assembly (clang, -O0):
<pr_space_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <pr_space_line+0x38>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <pr_space_line+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_space_line>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <pr_space_line+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
jne    1130 <pr_space_line+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @pr_space_line(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ random();
unsigned dict_rand() { return (unsigned)random(); }


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

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

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

LLVM IR (-O2):
define i32 @dict_rand() {
%1 = tail call i32 (...) @random()
ret i32 %1
}
/* Variables and functions */
int gob_encode_bytes(char *, size_t, char *, scalar_t__);
scalar_t__ strlen(char *);
int gob_encode_string(char *buf, size_t buf_size, char *s) {
  return gob_encode_bytes(buf, buf_size, s, strlen(s) + 1);
}


x86 assembly (clang, -O0):
<gob_encode_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
add    $0x1,%rcx
call   1030 <gob_encode_bytes@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_encode_string>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <gob_encode_bytes@plt>

LLVM IR (-O0):
define i32 @gob_encode_string(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i64 @strlen(i8* %10)
%12 = add nsw i64 %11, 1
%13 = call i32 @gob_encode_bytes(i8* %7, i64 %8, i8* %9, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @gob_encode_string(i8* %0, i64 %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%5 = add nsw i64 %4, 1
%6 = tail call i32 @gob_encode_bytes(i8* %0, i64 %1, i8* %2, i64 %5)
ret i32 %6
}
void TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) &= ~(ulIntFlags);
}


x86 assembly (clang, -O0):
<TimerIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntDisable>:
not    %rsi
and    %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @TimerIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 24
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @TimerIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 24
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0 && x < y) {
    x = 2 * x;
    y = y + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    114e <main+0x3e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115e <main+0x4e>
jmp    1175 <main+0x65>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br label %13
13: ; preds = %9, %6
%14 = phi i1 [ false, %6 ], [ %12, %9 ]
br i1 %14, label %15, label %20
15: ; preds = %13
%16 = load i32, i32* %2
%17 = mul nsw i32 2, %16
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void glStencilFunc(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glStencilFunc() {
ret void
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reloadwindowdesktop(struct client *);
int /*<<< orphan*/ reloadwindowstate(struct client *);
int /*<<< orphan*/ reloadwindowtype(struct client *);
void ewmh_maprequest(struct client *c) {
  reloadwindowdesktop(c);
  reloadwindowstate(c);
  reloadwindowtype(c);
}


x86 assembly (clang, -O0):
<ewmh_maprequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <reloadwindowdesktop@plt>
mov    -0x8(%rbp),%rdi
call   1040 <reloadwindowstate@plt>
mov    -0x8(%rbp),%rdi
call   1030 <reloadwindowtype@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ewmh_maprequest>:
push   %rbx
mov    %rdi,%rbx
call   1050 <reloadwindowdesktop@plt>
mov    %rbx,%rdi
call   1040 <reloadwindowstate@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <reloadwindowtype@plt>

LLVM IR (-O0):
%struct.client = type { i32 }
define void @ewmh_maprequest(%struct.client* %0) {
%2 = alloca %struct.client*
store %struct.client* %0, %struct.client** %2
%3 = load %struct.client*, %struct.client** %2
%4 = call i32 @reloadwindowdesktop(%struct.client* %3)
%5 = load %struct.client*, %struct.client** %2
%6 = call i32 @reloadwindowstate(%struct.client* %5)
%7 = load %struct.client*, %struct.client** %2
%8 = call i32 @reloadwindowtype(%struct.client* %7)
ret void
}

LLVM IR (-O2):
%struct.client = type { i32 }
define void @ewmh_maprequest(%struct.client* %0) {
%2 = tail call i32 @reloadwindowdesktop(%struct.client* %0)
%3 = tail call i32 @reloadwindowstate(%struct.client* %0)
%4 = tail call i32 @reloadwindowtype(%struct.client* %0)
ret void
}
/* Variables and functions */
scalar_t__ light_isalnum(int const);
int burl_is_unreserved(const int c) {
  return (light_isalnum(c) || c == '-' || c == '.' || c == '_' || c == '~');
}


x86 assembly (clang, -O0):
<burl_is_unreserved>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <light_isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116c <burl_is_unreserved+0x5c>
mov    $0x1,%al
cmpl   $0x2d,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <burl_is_unreserved+0x5c>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <burl_is_unreserved+0x5c>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <burl_is_unreserved+0x5c>
cmpl   $0x7e,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<burl_is_unreserved>:
push   %rbx
mov    %edi,%ebx
call   1030 <light_isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <burl_is_unreserved+0x17>
pop    %rbx
ret
lea    -0x2d(%rbx),%ecx
cmp    $0x32,%ecx
ja     113f <burl_is_unreserved+0x2f>
movabs $0x4000000000003,%rdx
bt     %rcx,%rdx
jb     1125 <burl_is_unreserved+0x15>
xor    %eax,%eax
cmp    $0x7e,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @burl_is_unreserved(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @light_isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 45
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 46
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 95
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 126
br label %18
18: ; preds = %15, %12, %9, %6, %1
%19 = phi i1 [ true, %12 ], [ true, %9 ], [ true, %6 ], [ true, %1 ], [ %17, %15 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @burl_is_unreserved(i32 %0) {
%2 = tail call i64 @light_isalnum(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 95, label %9
i32 46, label %9
i32 45, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 126
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ], [ 1, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ umask(int /*<<< orphan*/);
mode_t getumask(void) {
  mode_t mask = umask(0);
  umask(mask);
  return mask;
}


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

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

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

LLVM IR (-O2):
define i32 @getumask() {
%1 = tail call i32 @umask(i32 0)
%2 = tail call i32 @umask(i32 %1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ hdsState(int *, int *);
void hds_state_(int *state, int *status) { hdsState(state, status); }


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

x86 assembly (clang, -O2):
<hds_state_>:
jmp    1030 <hdsState@plt>

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

LLVM IR (-O2):
define void @hds_state_(i32* %0, i32* %1) {
%3 = tail call i32 @hdsState(i32* %0, i32* %1)
ret void
}
int latin1_alpha(int c) {
  if (c >= 192 && c != 215 && c != 247)
    return 1;
  if ((c >= 97 && c < 123) || (c >= 65 && c < 91))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<latin1_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xc0,-0x8(%rbp)
jl     113a <latin1_alpha+0x3a>
cmpl   $0xd7,-0x8(%rbp)
je     113a <latin1_alpha+0x3a>
cmpl   $0xf7,-0x8(%rbp)
je     113a <latin1_alpha+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1175 <latin1_alpha+0x75>
cmpl   $0x61,-0x8(%rbp)
jl     114e <latin1_alpha+0x4e>
cmpl   $0x7b,-0x8(%rbp)
jl     1162 <latin1_alpha+0x62>
cmpl   $0x41,-0x8(%rbp)
jl     116e <latin1_alpha+0x6e>
cmpl   $0x5b,-0x8(%rbp)
jge    116e <latin1_alpha+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <latin1_alpha+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<latin1_alpha>:
cmp    $0xc0,%edi
setge  %al
and    $0xffffffdf,%edi
cmp    $0xd7,%edi
setne  %cl
and    %al,%cl
add    $0xffffffbf,%edi
cmp    $0x1a,%edi
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @latin1_alpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 192
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 215
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 247
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %2
br label %27
13: ; preds = %9, %6, %1
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 97
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 123
br i1 %18, label %25, label %19
19: ; preds = %16, %13
%20 = load i32, i32* %3
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i32, i32* %3
%24 = icmp slt i32 %23, 91
br i1 %24, label %25, label %26
25: ; preds = %22, %16
store i32 1, i32* %2
br label %27
26: ; preds = %22, %19
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %12
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @latin1_alpha(i32 %0) {
%2 = icmp sgt i32 %0, 191
%3 = and i32 %0, -33
%4 = icmp ne i32 %3, 215
%5 = and i1 %2, %4
%6 = add i32 %3, -65
%7 = icmp ult i32 %6, 26
%8 = or i1 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
double min2(double a, double b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min2+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <min2+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @min2(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void command_show(void) {
  printf("%s, %s, %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/"
         "base-usage/make_study/command.c",
         __func__, 20);
  display();
}


x86 assembly (clang, -O0):
<command_show>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xeda(%rip),%rsi
lea    0xf77(%rip),%rdx
mov    $0x14,%ecx
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <display@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_show>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedd(%rip),%rsi
lea    0xf7a(%rip),%rdx
mov    $0x14,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <display@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/command.c\00"
@__func__.command_show = [13 x i8] c"command_show\00"
define void @command_show() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.command_show, i64 0, i64 0), i32 20)
%2 = call i32 (...) @display()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/command.c\00"
@__func__.command_show = [13 x i8] c"command_show\00"
define void @command_show() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.command_show, i64 0, i64 0), i32 20)
%2 = tail call i32 (...) @display()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *erealloc(void *ptr, size_t newsize) {
  if (!(ptr = realloc(ptr, newsize))) {
    fprintf(stderr, "Out of memory\n");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    117a <erealloc+0x4a>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <erealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ riv_nbits(scalar_t__);
uint32_t dci_format0_sizeof_(uint32_t nof_prb) {
  return 1 + 1 + riv_nbits(nof_prb) + 5 + 1 + 2 + 3 + 1;
}


x86 assembly (clang, -O0):
<dci_format0_sizeof_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <riv_nbits@plt>
add    $0x2,%rax
add    $0x5,%rax
add    $0x1,%rax
add    $0x2,%rax
add    $0x3,%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dci_format0_sizeof_>:
push   %rax
call   1030 <riv_nbits@plt>
add    $0xe,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @dci_format0_sizeof_(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @riv_nbits(i64 %3)
%5 = add nsw i64 2, %4
%6 = add nsw i64 %5, 5
%7 = add nsw i64 %6, 1
%8 = add nsw i64 %7, 2
%9 = add nsw i64 %8, 3
%10 = add nsw i64 %9, 1
ret i64 %10
}

LLVM IR (-O2):
define i64 @dci_format0_sizeof_(i64 %0) {
%2 = tail call i64 @riv_nbits(i64 %0)
%3 = add nsw i64 %2, 14
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ RES_b_r(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ get_mem(int /*<<< orphan*/);
int /*<<< orphan*/ set_mem(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ update_all_cycles(int);
void RES_b_mem(uint16_t addr, uint8_t bit) {
  update_all_cycles(4);
  uint8_t result = RES_b_r(get_mem(addr), bit);
  update_all_cycles(4);
  set_mem(addr, result);
}


x86 assembly (clang, -O0):
<RES_b_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x4,%edi
call   1060 <update_all_cycles@plt>
mov    -0x4(%rbp),%edi
call   1040 <get_mem@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1030 <RES_b_r@plt>
mov    %eax,-0xc(%rbp)
mov    $0x4,%edi
call   1060 <update_all_cycles@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <set_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RES_b_mem>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x4,%edi
call   1060 <update_all_cycles@plt>
mov    %ebp,%edi
call   1040 <get_mem@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <RES_b_r@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1060 <update_all_cycles@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <set_mem@plt>

LLVM IR (-O0):
define void @RES_b_mem(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @update_all_cycles(i32 4)
%7 = load i32, i32* %3
%8 = call i32 @get_mem(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @RES_b_r(i32 %8, i32 %9)
store i32 %10, i32* %5
%11 = call i32 @update_all_cycles(i32 4)
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = call i32 @set_mem(i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @RES_b_mem(i32 %0, i32 %1) {
%3 = tail call i32 @update_all_cycles(i32 4)
%4 = tail call i32 @get_mem(i32 %0)
%5 = tail call i32 @RES_b_r(i32 %4, i32 %1)
%6 = tail call i32 @update_all_cycles(i32 4)
%7 = tail call i32 @set_mem(i32 %0, i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
char *ctime(scalar_t__ *);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long, char *,
                          unsigned long);
void printTime(time_t t) {
  char *humanTime = ctime(&t);
  printf("0x%lx or %ld is %s (string is at address 0x%lx)\n\n",
         (unsigned long)t, (unsigned long)t, humanTime,
         (unsigned long)humanTime);
}


x86 assembly (clang, -O0):
<printTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTime>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
mov    (%rsp),%rdx
lea    0xec8(%rip),%rdi
mov    %rdx,%rsi
mov    %rax,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [50 x i8] c"0x%lx or %ld is %s (string is at address 0x%lx)\0A\0A\00"
define void @printTime(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = call i8* @ctime(i64* %2)
store i8* %4, i8** %3
%5 = load i64, i64* %2
%6 = load i64, i64* %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %8 to i64
%10 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6, i8* %7, i64 %9)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"0x%lx or %ld is %s (string is at address 0x%lx)\0A\0A\00"
define void @printTime(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i8* @ctime(i64* %2)
%4 = load i64, i64* %2
%5 = ptrtoint i8* %3 to i64
%6 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %4, i8* %3, i64 %5)
ret void
}
int decode_wire(eci, x, y, pvec)
struct ecinfox *eci;
int x;
int y;
int *pvec;
{ return decode_wire_but(eci, x, y, pvec, (-1), (-1)); }


x86 assembly (clang, -O0):
<decode_wire>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0xffffffff,%r9d
mov    %r9d,%r8d
mov    $0x0,%al
call   1030 <decode_wire_but@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_wire>:
mov    $0xffffffff,%r8d
mov    $0xffffffff,%r9d
xor    %eax,%eax
jmp    1030 <decode_wire_but@plt>

LLVM IR (-O0):
%struct.ecinfox = type opaque
define i32 @decode_wire(%struct.ecinfox* %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca %struct.ecinfox*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store %struct.ecinfox* %0, %struct.ecinfox** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load %struct.ecinfox*, %struct.ecinfox** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 (%struct.ecinfox*, i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @decode_wire_but to i32 (%struct.ecinfox*, i32, i32, i32*, i32, i32, ...)*)(%struct.ecinfox* %9, i32 %10, i32 %11, i32* %12, i32 -1, i32 -1)
ret i32 %13
}

LLVM IR (-O2):
%struct.ecinfox = type opaque
define i32 @decode_wire(%struct.ecinfox* %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 (%struct.ecinfox*, i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @decode_wire_but to i32 (%struct.ecinfox*, i32, i32, i32*, i32, i32, ...)*)(%struct.ecinfox* %0, i32 %1, i32 %2, i32* %3, i32 -1, i32 -1)
ret i32 %5
}
/* Variables and functions */
scalar_t__ ReadString();
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char *temp;
  temp = (char *)ReadString();
  puts(temp);
  free(temp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <ReadString@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <ReadString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 (...) @ReadString()
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @puts(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @ReadString()
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_String();
int cstrcspn(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  return cstrcspn(__VERIFIER_nondet_String(), __VERIFIER_nondet_String());
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_String@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_String@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <cstrcspn@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_String()
%2 = tail call i32 (...) @__VERIFIER_nondet_String()
%3 = tail call i32 @cstrcspn(i32 %1, i32 %2)
ret i32 %3
}
int isEqaElement(char inElement) {
  if ((inElement == '(' || inElement == ')') ||
      (inElement >= '0' && inElement <= '9') || inElement == '+' ||
      inElement == '*' || inElement == '/') {
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<isEqaElement>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x28,%eax
je     1165 <isEqaElement+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x29,%eax
je     1165 <isEqaElement+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     113e <isEqaElement+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1165 <isEqaElement+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1165 <isEqaElement+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1165 <isEqaElement+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1171 <isEqaElement+0x71>
movl   $0x1,-0x4(%rbp)
jmp    1178 <isEqaElement+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEqaElement>:
mov    %edi,%ecx
and    $0xfe,%cl
mov    $0x1,%eax
cmp    $0x28,%cl
je     1125 <isEqaElement+0x25>
cmp    $0x2a,%cl
sete   %al
add    $0xd1,%dil
cmp    $0xb,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isEqaElement(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 40
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 41
br i1 %10, label %31, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 48
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 57
br i1 %18, label %31, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 43
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 42
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 47
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %19, %15, %7, %1
store i32 1, i32* %2
br label %33
32: ; preds = %27
store i32 0, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @isEqaElement(i8 signext %0) {
%2 = and i8 %0, -2
%3 = icmp eq i8 %2, 40
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = icmp eq i8 %2, 42
%6 = add i8 %0, -47
%7 = icmp ult i8 %6, 11
%8 = or i1 %7, %5
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %9, %4 ]
ret i32 %11
}
/* Variables and functions */
char *OC_mkBuildTabFunc(char *, char *);
char *OC_mkBuildKTabFunc(char *entries) {
  return OC_mkBuildTabFunc("buildPervasiveKinds", entries);
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"buildPervasiveKinds\00"
define i8* @OC_mkBuildKTabFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @OC_mkBuildTabFunc(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"buildPervasiveKinds\00"
define i8* @OC_mkBuildKTabFunc(i8* %0) {
%2 = tail call i8* @OC_mkBuildTabFunc(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
/* Variables and functions */
int isblank(char c) { return (c == ' ' || c == '\t'); }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <isblank+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isblank(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}