xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  char alpha = 'A';
  printf("Character %c has code %d.\n", alpha, alpha);
  alpha = 'B';
  printf("Character %c has code %d.\n", alpha, alpha);
  alpha = alpha + 1;
  printf("Character %c has code %d.\n", alpha, alpha);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xed3(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
movb   $0x42,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xeb9(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xe99(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x41,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
mov    $0x42,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
mov    $0x43,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Character %c has code %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %4)
store i8 66, i8* %2
%6 = load i8, i8* %2
%7 = load i8, i8* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8 signext %7)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
%13 = load i8, i8* %2
%14 = load i8, i8* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %13, i8 signext %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Character %c has code %d.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext 66, i8 signext 66)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext 67, i8 signext 67)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err(char *, ...);
void *malloc(unsigned int);
void *mymalloc(unsigned length) {
  void *p;
  if (length == 0)
    err("malloc(0) requested.");
  p = malloc(length);
  if (NULL == p)
    err("Out of memory: %u bytes requested.", length);
  return p;
}


x86 assembly (clang, -O0):
<mymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1143 <mymalloc+0x23>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <err@plt>
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    116c <mymalloc+0x4c>
mov    -0x4(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
test   %edi,%edi
jne    1137 <mymalloc+0x17>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <err@plt>
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1156 <mymalloc+0x36>
lea    0xec8(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"malloc(0) requested.\00"
@.str.1 = [35 x i8] c"Out of memory: %u bytes requested.\00"
define i8* @mymalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, ...) @err(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp eq i8* null, %11
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @err(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %8
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [21 x i8] c"malloc(0) requested.\00"
@.str.1 = [35 x i8] c"Out of memory: %u bytes requested.\00"
define noalias i8* @mymalloc(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @err(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i32 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (i8*, ...) @err(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %10
10: ; preds = %8, %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ f9a();
void f9b(void) { f9a(); }


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

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

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

LLVM IR (-O2):
define void @f9b() {
%1 = tail call i32 (...) @f9a()
ret void
}
void gtk_expander_set_label_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_expander_set_label_widget() {
ret void
}
/* Variables and functions */
int m_stricmp(char *, char *);
int compare_text_line(char **s1, char **s2) { return m_stricmp(*s1, *s2); }


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

x86 assembly (clang, -O2):
<compare_text_line>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <m_stricmp@plt>

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

LLVM IR (-O2):
define i32 @compare_text_line(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @m_stricmp(i8* %3, i8* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xc4() {
  Assert_real((isxdigit(196) == 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_isxdigit.c",
              985, ("isxdigit should be 0 for 0xc4"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xc4>:
push   %rax
mov    $0xc4,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3d9,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc4\00"
define void @t_isxdigit_0xc4() {
%1 = call i64 @isxdigit(i32 196)
%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 985, 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc4\00"
define void @t_isxdigit_0xc4() {
%1 = tail call i64 @isxdigit(i32 196)
%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 985, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_bi_w_epel_v48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v48_8_sse4() {
ret void
}
/* Variables and functions */
unsigned short outw(unsigned short, int);
unsigned short outw_p(unsigned short val, int port) {
  return (outw(val, port));
}


x86 assembly (clang, -O0):
<outw_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x8(%rbp),%esi
movzwl %ax,%edi
call   1030 <outw@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw_p>:
jmp    1030 <outw@plt>

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

LLVM IR (-O2):
define zeroext i16 @outw_p(i16 zeroext %0, i32 %1) {
%3 = tail call zeroext i16 @outw(i16 zeroext %0, i32 %1)
ret i16 %3
}
/* Variables and functions */
int stb_filewrite(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int stb_filewritestr(char *filename, char *data) {
  return stb_filewrite(filename, data, strlen(data));
}


x86 assembly (clang, -O0):
<stb_filewritestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <stb_filewrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_filewritestr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <stb_filewrite@plt>

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

LLVM IR (-O2):
define i32 @stb_filewritestr(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @stb_filewrite(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
int libpreiser4_version() { return 1; }


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

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

LLVM IR (-O0):
define i32 @libpreiser4_version() {
ret i32 1
}

LLVM IR (-O2):
define i32 @libpreiser4_version() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgscale(void) { gen("shlq\t$3,%rax"); }


x86 assembly (clang, -O0):
<cgscale>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"shlq\09$3,%rax\00"
define void @cgscale() {
%1 = call i32 @gen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"shlq\09$3,%rax\00"
define void @cgscale() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int bar(int, char);
int foo(int x, char y) {
  int tmp;
  {
    tmp = bar(x, y);
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <bar@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <bar@plt>

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i8 signext %1) {
%3 = tail call i32 @bar(i32 %0, i8 signext %1)
ret i32 %3
}
/* Variables and functions */
int greaterInt(const int *arr, size_t count) {
  const size_t right = count - 1;
  for (size_t i = 0; i < right; ++i) {
    if (arr[i] > arr[i + 1])
      return -1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<greaterInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    116d <greaterInt+0x6d>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x28(%rbp),%rdx
cmp    0x4(%rcx,%rdx,4),%eax
jle    1157 <greaterInt+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <greaterInt+0x74>
jmp    115c <greaterInt+0x5c>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1120 <greaterInt+0x20>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greaterInt>:
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %rax,%rsi
je     112b <greaterInt+0x2b>
mov    -0x4(%rdi,%rax,4),%ecx
lea    0x1(%rax),%rdx
cmp    (%rdi,%rax,4),%ecx
mov    %rdx,%rax
jle    1110 <greaterInt+0x10>
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @greaterInt(i32* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
%8 = load i64, i64* %5
%9 = sub i64 %8, 1
store i64 %9, i64* %6
store i64 0, i64* %7
br label %10
10: ; preds = %27, %2
%11 = load i64, i64* %7
%12 = load i64, i64* %6
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %30
14: ; preds = %10
%15 = load i32*, i32** %4
%16 = load i64, i64* %7
%17 = getelementptr inbounds i32, i32* %15, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i64, i64* %7
%21 = add i64 %20, 1
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = icmp sgt i32 %18, %23
br i1 %24, label %25, label %26
25: ; preds = %14
store i32 -1, i32* %3
br label %31
26: ; preds = %14
br label %27
27: ; preds = %26
%28 = load i64, i64* %7
%29 = add i64 %28, 1
store i64 %29, i64* %7
br label %10
30: ; preds = %10
store i32 1, i32* %3
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @greaterInt(i32* nocapture %0, i64 %1) {
%3 = add i64 %1, -1
br label %4
4: ; preds = %7, %2
%5 = phi i64 [ 0, %2 ], [ %10, %7 ]
%6 = icmp eq i64 %5, %3
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = getelementptr inbounds i32, i32* %0, i64 %5
%9 = load i32, i32* %8
%10 = add i64 %5, 1
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp sgt i32 %9, %12
br i1 %13, label %14, label %4
14: ; preds = %7, %4
%15 = phi i32 [ -1, %7 ], [ 1, %4 ]
ret i32 %15
}
/* Variables and functions */
int **alloc2d(int, int);
int /*<<< orphan*/ free2d(int **, int);
int test_2d_array(int **, int, int);
int test_alloc2d() {
  int **ptr = alloc2d(10, 10);
  int ret = test_2d_array(ptr, 10, 10);
  free2d(ptr, 10);
  return ret;
}


x86 assembly (clang, -O0):
<test_alloc2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%esi
mov    %esi,%edi
call   1030 <alloc2d@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%edx
mov    %edx,%esi
call   1050 <test_2d_array@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1040 <free2d@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_alloc2d>:
push   %rbp
push   %rbx
push   %rax
mov    $0xa,%edi
mov    $0xa,%esi
call   1030 <alloc2d@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xa,%esi
mov    $0xa,%edx
call   1050 <test_2d_array@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <free2d@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test_alloc2d() {
%1 = alloca i32**
%2 = alloca i32
%3 = call i32** @alloc2d(i32 10, i32 10)
store i32** %3, i32*** %1
%4 = load i32**, i32*** %1
%5 = call i32 @test_2d_array(i32** %4, i32 10, i32 10)
store i32 %5, i32* %2
%6 = load i32**, i32*** %1
%7 = call i32 @free2d(i32** %6, i32 10)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_alloc2d() {
%1 = tail call i32** @alloc2d(i32 10, i32 10)
%2 = tail call i32 @test_2d_array(i32** %1, i32 10, i32 10)
%3 = tail call i32 @free2d(i32** %1, i32 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", 10);
  printf("%u\n", 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog_name) {
  fprintf(stderr, "Usage: %s data signature rootcert\n", prog_name);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s data signature rootcert\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s data signature rootcert\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void btfree(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @btfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
size_t int_hash(void *key) {
  size_t i = *(long *)key;
  return i * 2654435761;
}


x86 assembly (clang, -O0):
<int_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
movabs $0x9e3779b1,%rax
imul   -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_hash>:
mov    $0x9e3779b1,%eax
imul   (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @int_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = mul i64 %7, 2654435761
ret i64 %8
}

LLVM IR (-O2):
define i64 @int_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = mul i64 %3, 2654435761
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void test_vorrimm_u8x8(uint8_t *__restrict__ dest, uint8_t *a) {
  int i;
  for (i = 0; i < 8; i++) {
    dest[i] = a[i] | 1;
  }
}


x86 assembly (clang, -O0):
<test_vorrimm_u8x8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1144 <test_vorrimm_u8x8+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vorrimm_u8x8+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorrimm_u8x8>:
movups (%rsi),%xmm0
movaps 0xef6(%rip),%xmm1
orps   %xmm1,%xmm0
movups %xmm0,(%rdi)
movups 0x10(%rsi),%xmm0
orps   %xmm1,%xmm0
movups %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorrimm_u8x8(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = or <4 x i32> %4, <i32 1, i32 1, i32 1, i32 1>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %1, i64 4
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = bitcast i32* %7 to <4 x i32>*
%10 = load <4 x i32>, <4 x i32>* %9
%11 = or <4 x i32> %10, <i32 1, i32 1, i32 1, i32 1>
%12 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %12
ret void
}
int test_imm_38uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x38,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38uint64_midword_mem>:
testb  $0x38,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_38uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 56
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_38uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3670016
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ normal_syntax(char *);
char *strchr(char *, char);
char *alttext(char *p, char *e) {
  normal_syntax(p);
  p = strchr(e + 1, *e);
  if (p)
    p++;
  return p;
}


x86 assembly (clang, -O0):
<alttext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <normal_syntax@plt>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1168 <alttext+0x48>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alttext>:
push   %rbx
mov    %rsi,%rbx
call   1040 <normal_syntax@plt>
movsbl (%rbx),%esi
add    $0x1,%rbx
mov    %rbx,%rdi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @alttext(i8* %0, i8* %1) {
%3 = tail call i32 @normal_syntax(i8* %0)
%4 = getelementptr inbounds i8, i8* %1, i64 1
%5 = load i8, i8* %1
%6 = tail call i8* @strchr(i8* %4, i8 signext %5)
%7 = icmp eq i8* %6, null
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = select i1 %7, i8* null, i8* %8
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ sodium_memzero(void *, size_t);
void secure_zero_memory(void *v, size_t n) { sodium_memzero(v, n); }


x86 assembly (clang, -O0):
<secure_zero_memory>:
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 <sodium_memzero@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secure_zero_memory>:
jmp    1030 <sodium_memzero@plt>

LLVM IR (-O0):
define void @secure_zero_memory(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 i32 @sodium_memzero(i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @secure_zero_memory(i8* %0, i64 %1) {
%3 = tail call i32 @sodium_memzero(i8* %0, i64 %1)
ret void
}
/* Variables and functions */
size_t c_deque_max_size(void) { return (-1); }


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

x86 assembly (clang, -O2):
<c_deque_max_size>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @c_deque_max_size() {
ret i64 -1
}

LLVM IR (-O2):
define i64 @c_deque_max_size() {
ret i64 -1
}
void tsig_finalize() {}


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

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

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

LLVM IR (-O2):
define void @tsig_finalize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void usage(void) { errx(1, "Use --help for help"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Use --help for help\00"
define void @usage() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Use --help for help\00"
define void @usage() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ prt_depth();
int /*<<< orphan*/ prt_map();
int /*<<< orphan*/ prt_stat_block();
void draw_cave() {
  clear_screen();
  prt_stat_block();
  prt_map();
  prt_depth();
}


x86 assembly (clang, -O0):
<draw_cave>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <clear_screen@plt>
mov    $0x0,%al
call   1030 <prt_stat_block@plt>
mov    $0x0,%al
call   1050 <prt_map@plt>
mov    $0x0,%al
call   1040 <prt_depth@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_cave>:
push   %rax
xor    %eax,%eax
call   1060 <clear_screen@plt>
xor    %eax,%eax
call   1030 <prt_stat_block@plt>
xor    %eax,%eax
call   1050 <prt_map@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <prt_depth@plt>

LLVM IR (-O0):
define void @draw_cave() {
%1 = call i32 (...) @clear_screen()
%2 = call i32 (...) @prt_stat_block()
%3 = call i32 (...) @prt_map()
%4 = call i32 (...) @prt_depth()
ret void
}

LLVM IR (-O2):
define void @draw_cave() {
%1 = tail call i32 (...) @clear_screen()
%2 = tail call i32 (...) @prt_stat_block()
%3 = tail call i32 (...) @prt_map()
%4 = tail call i32 (...) @prt_depth()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ED(void) { printf("\f"); }


x86 assembly (clang, -O0):
<ED>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ED>:
mov    $0xc,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0C\00"
define void @ED() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @ED() {
%1 = tail call i32 @putchar(i32 12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x21() {
  Assert_real((islower(33) == 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_islower.c",
              170, ("islower should be 0 for !"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x21>:
push   %rax
mov    $0x21,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xaa,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for !\00"
define void @t_islower_0x21() {
%1 = call i64 @islower(i32 33)
%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 170, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for !\00"
define void @t_islower_0x21() {
%1 = tail call i64 @islower(i32 33)
%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 170, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t blz_max_packed_size(size_t src_size) {
  return src_size + src_size / 8 + 64;
}


x86 assembly (clang, -O0):
<blz_max_packed_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x3,%rcx
add    %rcx,%rax
add    $0x40,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blz_max_packed_size>:
mov    %rdi,%rax
shr    $0x3,%rax
add    %rdi,%rax
add    $0x40,%rax
ret

LLVM IR (-O0):
define i64 @blz_max_packed_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = udiv i64 %4, 8
%6 = add i64 %3, %5
%7 = add i64 %6, 64
ret i64 %7
}

LLVM IR (-O2):
define i64 @blz_max_packed_size(i64 %0) {
%2 = lshr i64 %0, 3
%3 = add i64 %0, 64
%4 = add i64 %3, %2
ret i64 %4
}
float f_sq(float f) { return f * f; }


x86 assembly (clang, -O0):
<f_sq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_sq>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f_sq(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @f_sq(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *mystrndup(const char *src, int n) {
  char *dst;
  dst = (char *)calloc(n + 1, 1);
  strncpy(dst, src, n);
  return dst;
}


x86 assembly (clang, -O0):
<mystrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrndup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mystrndup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @calloc(i32 %7, i32 1)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @strncpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @mystrndup(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @calloc(i32 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %1)
ret i8* %5
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_get_property(void *bus, const char *destination, const char *path,
                    const char *interface, const char *member, void *ret_error,
                    void **reply, const char *type) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_get_property>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
mov    0x2eb3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_get_property>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_get_property(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8** %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8**
%16 = alloca i8*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8** %6, i8*** %15
store i8* %7, i8** %16
%17 = load i32, i32* @EINVAL
%18 = sub nsw i32 0, %17
ret i32 %18
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_get_property(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8** nocapture readnone %6, i8* nocapture readnone %7) {
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
ret i32 %10
}
/* Variables and functions */
int dup2(int, int);
int outside_dup2(int oldfd, int newfd) { return dup2(oldfd, newfd); }


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

x86 assembly (clang, -O2):
<outside_dup2>:
jmp    1030 <dup2@plt>

LLVM IR (-O0):
define i32 @outside_dup2(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 @dup2(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @outside_dup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ barf(char *, size_t);
void *realloc(void *, size_t);
void *realloc_nofail(void *ptr, size_t size) {
  ptr = realloc(ptr, size);
  if (ptr)
    return ptr;
  barf("realloc of %zu failed", size);
}


x86 assembly (clang, -O0):
<realloc_nofail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <realloc_nofail+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <realloc_nofail+0x49>
mov    -0x18(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <barf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_nofail>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <realloc_nofail+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <barf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"realloc of %zu failed\00"
define i8* @realloc_nofail(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = load i64, i64* %5
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i8*, i8** %4
store i8* %12, i8** %3
br label %16
13: ; preds = %2
%14 = load i64, i64* %5
%15 = call i32 @barf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %14)
br label %16
16: ; preds = %13, %11
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [22 x i8] c"realloc of %zu failed\00"
define noalias i8* @realloc_nofail(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 %7
5: ; preds = %2
%6 = tail call i32 @barf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void trc_3() { fprintf(stderr, "trc_3\n"); }


x86 assembly (clang, -O0):
<trc_3>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trc_3>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"trc_3\0A\00"
define void @trc_3() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"trc_3\0A\00"
define void @trc_3() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct A {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ f(struct A *);
g(struct A *p) { f(p); }


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

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

LLVM IR (-O0):
%struct.A = type { i32 }
define i32 @g(%struct.A* %0) {
%2 = alloca i32
%3 = alloca %struct.A*
store %struct.A* %0, %struct.A** %3
%4 = load %struct.A*, %struct.A** %3
%5 = call i32 @f(%struct.A* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
%struct.A = type { i32 }
define i32 @g(%struct.A* %0) {
%2 = tail call i32 @f(%struct.A* %0)
ret i32 undef
}
/* Variables and functions */
int memcmp(char *, char *, int);
int main() {
  char *str1 = "Hello World";
  char *str2 = "Hello Dave";
  return !(memcmp(str1, str2, 9) == false);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [11 x i8] c"Hello Dave\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 @memcmp(i8* %4, i8* %5, i32 9)
%7 = icmp eq i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [11 x i8] c"Hello Dave\00"
define i32 @main() {
%1 = tail call i32 @memcmp(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 9)
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct dvb_state {
  int dummy;
};

/* Variables and functions */
int dvb_frontend_open(struct dvb_state *, int);
int /*<<< orphan*/ dvb_frontend_release(struct dvb_state *, int);
int dvb_frontend_is_busy(struct dvb_state *h) {
  int rc;
  int is_busy = 0;
  if ((rc = dvb_frontend_open(h, 1)) < 0) {
    is_busy = 1;
  } else {
    dvb_frontend_release(h, 1);
  }
  return is_busy;
}


x86 assembly (clang, -O0):
<dvb_frontend_is_busy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <dvb_frontend_open@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1159 <dvb_frontend_is_busy+0x39>
movl   $0x1,-0x10(%rbp)
jmp    1167 <dvb_frontend_is_busy+0x47>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <dvb_frontend_release@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvb_frontend_is_busy>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%ebp
mov    $0x1,%esi
call   1030 <dvb_frontend_open@plt>
test   %eax,%eax
js     1148 <dvb_frontend_is_busy+0x28>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <dvb_frontend_release@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.dvb_state = type { i32 }
define i32 @dvb_frontend_is_busy(%struct.dvb_state* %0) {
%2 = tail call i32 @dvb_frontend_open(%struct.dvb_state* %0, i32 1)
%3 = icmp slt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @dvb_frontend_release(%struct.dvb_state* %0, i32 1)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
float __infer_nondet_float();
float fmaxf(float x, float y) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<fmaxf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fmaxf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @fmaxf(float %0, float %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}