xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x47() {
  Assert_real((isprint(71)),
              "/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_isprint.c",
              360, ("isprint should be 1 for G"));
}


x86 assembly (clang, -O0):
<t_isprint_0x47>:
push   %rbp
mov    %rsp,%rbp
mov    $0x47,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x168,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x47>:
push   %rax
mov    $0x47,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x168,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for G\00"
define void @t_isprint_0x47() {
%1 = call i32 @isprint(i32 71)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for G\00"
define void @t_isprint_0x47() {
%1 = tail call i32 @isprint(i32 71)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int);
scalar_t__ malloc(int);
int main() {
  int jhala = 1000;
  int *r;
  int y;
  r = (int *)malloc(10 * sizeof(int));
  int r1[5] = {1, 2, 3, 4};
  *r = 5;
  y = *r;
  csolve_assert(y >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb0(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <csolve_assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
movl   $0x5,(%rax)
mov    $0x1,%edi
call   1040 <csolve_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.r1 = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [5 x i32]
store i32 0, i32* %1
store i32 1000, i32* %2
%6 = call i64 @malloc(i32 40)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %3
%8 = bitcast [5 x i32]* %5 to i8*
%9 = load i32*, i32** %3
store i32 5, i32* %9
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @csolve_assert(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to i32*
store i32 5, i32* %2
%3 = tail call i32 @csolve_assert(i32 1)
ret i32 0
}
/* Type definitions */
struct ptr_list {
  int dummy;
};
struct instruction_list {
  int dummy;
};

/* Variables and functions */
int ptr_list_size(struct ptr_list *);
int instruction_list_size(struct instruction_list *list) {
  return ptr_list_size((struct ptr_list *)(list));
}


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

x86 assembly (clang, -O2):
<instruction_list_size>:
jmp    1030 <ptr_list_size@plt>

LLVM IR (-O0):
%struct.instruction_list = type { i32 }
%struct.ptr_list = type { i32 }
define i32 @instruction_list_size(%struct.instruction_list* %0) {
%2 = alloca %struct.instruction_list*
store %struct.instruction_list* %0, %struct.instruction_list** %2
%3 = load %struct.instruction_list*, %struct.instruction_list** %2
%4 = bitcast %struct.instruction_list* %3 to %struct.ptr_list*
%5 = call i32 @ptr_list_size(%struct.ptr_list* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.instruction_list = type { i32 }
%struct.ptr_list = type { i32 }
define i32 @instruction_list_size(%struct.instruction_list* %0) {
%2 = bitcast %struct.instruction_list* %0 to %struct.ptr_list*
%3 = tail call i32 @ptr_list_size(%struct.ptr_list* %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t FlashIntStatus(bool bMasked) {
  if (bMasked) {
    return ((*((volatile uint32_t *)(0x400FD014))));
  } else {
    return ((*((volatile uint32_t *)(0x400FD00C))));
  }
}


x86 assembly (clang, -O0):
<FlashIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1120 <FlashIntStatus+0x20>
mov    $0x400fd014,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    112a <FlashIntStatus+0x2a>
mov    $0x400fd00c,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashIntStatus>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
mov    0x400fd00c(,%rax,8),%eax
ret

LLVM IR (-O0):
define i32 @FlashIntStatus(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1074778132 to i32*)
store i32 %7, i32* %2
br label %10
8: ; preds = %1
%9 = load volatile i32, i32* inttoptr (i64 1074778124 to i32*)
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @FlashIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32* inttoptr (i64 1074778124 to i32*), i32* inttoptr (i64 1074778132 to i32*)
%4 = load volatile i32, i32* %3
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
scalar_t__ stat(char *, struct stat *);
int fname_is_avail(char *fname) {
  struct stat stat_buf;
  if ((stat(fname, &stat_buf) < 0) && errno == ENOENT)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<fname_is_avail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    1159 <fname_is_avail+0x49>
mov    0x2ea6(%rip),%rax
mov    (%rax),%rax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
jne    1159 <fname_is_avail+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1160 <fname_is_avail+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fname_is_avail>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
jns    1139 <fname_is_avail+0x29>
mov    0x2ebb(%rip),%rax
mov    (%rax),%rcx
mov    0x2ea1(%rip),%rdx
mov    $0x1,%eax
cmp    (%rdx),%rcx
je     113b <fname_is_avail+0x2b>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i64 0
@ENOENT = global i64 0
define i32 @fname_is_avail(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = load i64, i64* @ENOENT
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i64 0
@ENOENT = global i64 0
define i32 @fname_is_avail(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* @errno
%8 = load i64, i64* @ENOENT
%9 = icmp eq i64 %7, %8
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ PageThrow();
int /*<<< orphan*/ printf(char *, int);
void NewPage(void) {
  printf("%c", 0x0C);
  PageThrow();
}


x86 assembly (clang, -O0):
<NewPage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0xc,%esi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <PageThrow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewPage>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xc,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <PageThrow@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @NewPage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = tail call i32 (...) @PageThrow()
ret void
}
/* Variables and functions */
int count(int);
int setBits(int n) {
  int bit = 0;
  for (int i = 0; i < n; i++) {
    bit = bit + count(i);
  }
  return bit;
}


x86 assembly (clang, -O0):
<setBits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <setBits+0x4b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <count@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <setBits+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBits>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1133 <setBits+0x23>
mov    %edi,%r14d
xor    %ebx,%ebx
xor    %ebp,%ebp
nop
mov    %ebx,%edi
call   1030 <count@plt>
add    %eax,%ebp
add    $0x1,%ebx
cmp    %ebx,%r14d
jne    1120 <setBits+0x10>
jmp    1135 <setBits+0x25>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @setBits(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %5, %1
%4 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %4
5: ; preds = %1, %5
%6 = phi i32 [ %10, %5 ], [ 0, %1 ]
%7 = phi i32 [ %9, %5 ], [ 0, %1 ]
%8 = tail call i32 @count(i32 %6)
%9 = add nsw i32 %8, %7
%10 = add nuw nsw i32 %6, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %3, label %5
}
__attribute__((no_sanitize("integer"))) unsigned int
blacklist_1(signed int src) {
  return src;
}


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

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

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

LLVM IR (-O2):
define i32 @blacklist_1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ usage_banner();
void usage() {
  usage_banner();
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <usage_banner@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
xor    %eax,%eax
call   1030 <usage_banner@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @usage() {
%1 = call i32 (...) @usage_banner()
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @usage() {
%1 = tail call i32 (...) @usage_banner()
%2 = tail call i32 @exit(i32 1)
unreachable
}
void foo591() {}


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

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

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

LLVM IR (-O2):
define void @foo591() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_input_line(int);
void redraw_line(char *dummy) { clear_input_line(1); }


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

x86 assembly (clang, -O2):
<redraw_line>:
mov    $0x1,%edi
jmp    1030 <clear_input_line@plt>

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

LLVM IR (-O2):
define void @redraw_line(i8* nocapture readnone %0) {
%2 = tail call i32 @clear_input_line(i32 1)
ret void
}
void LPCChannelConfigEPSet(unsigned long ulBase, unsigned long ulChannel,
                           unsigned long ulConfig, unsigned long ulAddress,
                           unsigned long ulOffset) {
  ;
  ;

  ;
  ;

  ;
  ulConfig |= (((ulOffset >> 1) << 5) & 0x00007FE0);
  (*((volatile unsigned long *)(ulBase + 0x00000010 + (ulChannel * 0x10)))) =
      ulConfig;
  (*((volatile unsigned long *)(ulBase + 0x00000018 + (ulChannel * 0x10)))) =
      ulAddress;
}


x86 assembly (clang, -O0):
<LPCChannelConfigEPSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rax
shr    $0x1,%rax
shl    $0x5,%rax
and    $0x7fe0,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelConfigEPSet>:
shl    $0x4,%r8d
and    $0x7fe0,%r8d
or     %rdx,%r8
shl    $0x4,%rsi
mov    %r8,0x10(%rsi,%rdi,1)
mov    %rcx,0x18(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @LPCChannelConfigEPSet(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %10
%12 = lshr i64 %11, 1
%13 = shl i64 %12, 5
%14 = and i64 %13, 32736
%15 = load i64, i64* %8
%16 = or i64 %15, %14
store i64 %16, i64* %8
%17 = load i64, i64* %8
%18 = load i64, i64* %6
%19 = add i64 %18, 16
%20 = load i64, i64* %7
%21 = mul i64 %20, 16
%22 = add i64 %19, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 %17, i64* %23
%24 = load i64, i64* %9
%25 = load i64, i64* %6
%26 = add i64 %25, 24
%27 = load i64, i64* %7
%28 = mul i64 %27, 16
%29 = add i64 %26, %28
%30 = inttoptr i64 %29 to i64*
store volatile i64 %24, i64* %30
ret void
}

LLVM IR (-O2):
define void @LPCChannelConfigEPSet(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = shl i64 %4, 4
%7 = and i64 %6, 32736
%8 = or i64 %7, %2
%9 = shl i64 %1, 4
%10 = add i64 %9, %0
%11 = add i64 %10, 16
%12 = inttoptr i64 %11 to i64*
store volatile i64 %8, i64* %12
%13 = add i64 %10, 24
%14 = inttoptr i64 %13 to i64*
store volatile i64 %3, i64* %14
ret void
}
int get(int i) {
  unsigned int m = 0b0001;
  return m + i;
}


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

x86 assembly (clang, -O2):
<get>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get(i32 %0) {
%2 = add i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
char *itob(int /*<<< orphan*/, int, char *);
char *int16tob(int16_t in, char *out) { return itob(in, 16, out); }


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

x86 assembly (clang, -O2):
<int16tob>:
mov    %rsi,%rdx
mov    $0x10,%esi
jmp    1030 <itob@plt>

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

LLVM IR (-O2):
define i8* @int16tob(i32 %0, i8* %1) {
%3 = tail call i8* @itob(i32 %0, i32 16, i8* %1)
ret i8* %3
}
void file2(void) { printf("Control in function %s\n", __func__); }


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

x86 assembly (clang, -O2):
<file2>:
lea    0xee9(%rip),%rdi
lea    0xefa(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Control in function %s\0A\00"
@__func__.file2 = [6 x i8] c"file2\00"
define void @file2() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.file2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Control in function %s\0A\00"
@__func__.file2 = [6 x i8] c"file2\00"
define void @file2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.file2, i64 0, i64 0))
ret void
}
void page_tracker_set_type(struct page *page, int type, int order) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @page_tracker_set_type(%struct.page* %0, i32 %1, i32 %2) {
%4 = alloca %struct.page*
%5 = alloca i32
%6 = alloca i32
store %struct.page* %0, %struct.page** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @page_tracker_set_type(%struct.page* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getcstr(char *, int, short);
void get_header_name(char *buffer, short type) {
  getcstr(buffer, 151, type);
  return;
}


x86 assembly (clang, -O0):
<get_header_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x97,%esi
movswl -0xa(%rbp),%edx
call   1030 <getcstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_header_name>:
mov    %esi,%edx
mov    $0x97,%esi
jmp    1030 <getcstr@plt>

LLVM IR (-O0):
define void @get_header_name(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = load i16, i16* %4
%7 = call i32 @getcstr(i8* %5, i32 151, i16 signext %6)
ret void
}

LLVM IR (-O2):
define void @get_header_name(i8* %0, i16 signext %1) {
%3 = tail call i32 @getcstr(i8* %0, i32 151, i16 signext %1)
ret void
}
void pcp_def_net_eicmp_metrics(void) {}


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

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

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

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

/* Variables and functions */
void nvic_irq_disable(uint8_t n) {
  int i = n / 32;
  volatile uint32_t *nvic_icer = ((volatile uint32_t *)((0xE000E180) + 4 * i));
  *nvic_icer |= (1 << (n % 32));
}


x86 assembly (clang, -O0):
<nvic_irq_disable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
add    $0xe000e180,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvic_irq_disable>:
mov    %edi,%ecx
lea    0x1f(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x5,%eax
mov    $0x1,%edx
shl    %cl,%edx
lea    -0x1fff1e80(,%rax,4),%eax
or     %edx,(%rax)
ret

LLVM IR (-O0):
define void @nvic_irq_disable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 4, %7
%9 = add i32 -536813184, %8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %4
%12 = load i32, i32* %2
%13 = srem i32 %12, 32
%14 = shl i32 1, %13
%15 = load i32*, i32** %4
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %14
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @nvic_irq_disable(i32 %0) {
%2 = sdiv i32 %0, 32
%3 = shl nsw i32 %2, 2
%4 = add nsw i32 %3, -536813184
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = and i32 %0, 31
%8 = shl nuw i32 1, %7
%9 = load volatile i32, i32* %6
%10 = or i32 %9, %8
store volatile i32 %10, i32* %6
ret void
}
void outb(unsigned int base, unsigned int offset, unsigned int v) {
  *(unsigned volatile char *)(base + offset * 1) = (unsigned char)v;
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x0,%edx
add    %edx,%eax
mov    %eax,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
add    %esi,%edi
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @outb(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* %6
%8 = trunc i32 %7 to i8
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = mul i32 %10, 1
%12 = add i32 %9, %11
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store volatile i8 %8, i8* %14
ret void
}

LLVM IR (-O2):
define void @outb(i32 %0, i32 %1, i32 %2) {
%4 = trunc i32 %2 to i8
%5 = add i32 %1, %0
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store volatile i8 %4, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ board_down();
int /*<<< orphan*/ write(int, char *, int);
void event_handler_client_in_down(int fd) {
  write(fd, "\0", 1);
  board_down();
}


x86 assembly (clang, -O0):
<event_handler_client_in_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <board_down@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_handler_client_in_down>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <board_down@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] zeroinitializer
define void @event_handler_client_in_down(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 (...) @board_down()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char *base64(int /*<<< orphan*/ *, int, int *);
int /*<<< orphan*/ *cipher_aes_hmac_encrypt(unsigned char const *, int, int *,
                                            int /*<<< orphan*/ const *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
char *cipher_aes_b64_hmac_encrypt(const unsigned char *in, int inlen,
                                  int *outb64len, const uint8_t *secret) {
  int outlen;
  uint8_t *hmac_encrypt = cipher_aes_hmac_encrypt(in, inlen, &outlen, secret);
  char *b64 = base64(hmac_encrypt, outlen, outb64len);
  free(hmac_encrypt);
  return b64;
}


x86 assembly (clang, -O0):
<cipher_aes_b64_hmac_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%rdx
call   1050 <cipher_aes_hmac_encrypt@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <base64@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cipher_aes_b64_hmac_encrypt>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
lea    0x4(%rsp),%rdx
call   1050 <cipher_aes_hmac_encrypt@plt>
mov    %rax,%rbx
mov    0x4(%rsp),%esi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <base64@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @cipher_aes_b64_hmac_encrypt(i8* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = load i32*, i32** %8
%15 = call i32* @cipher_aes_hmac_encrypt(i8* %12, i32 %13, i32* %9, i32* %14)
store i32* %15, i32** %10
%16 = load i32*, i32** %10
%17 = load i32, i32* %9
%18 = load i32*, i32** %7
%19 = call i8* @base64(i32* %16, i32 %17, i32* %18)
store i8* %19, i8** %11
%20 = load i32*, i32** %10
%21 = call i32 @free(i32* %20)
%22 = load i8*, i8** %11
ret i8* %22
}

LLVM IR (-O2):
define i8* @cipher_aes_b64_hmac_encrypt(i8* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32* @cipher_aes_hmac_encrypt(i8* %0, i32 %1, i32* %5, i32* %3)
%8 = load i32, i32* %5
%9 = call i8* @base64(i32* %7, i32 %8, i32* %2)
%10 = call i32 @free(i32* %7)
ret i8* %9
}
int test_imm_9Cint64_midword_reg(long long val) {
  return ((val >> 16) & (0x9C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Cint64_midword_reg>:
test   $0x9c0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Cint64_midword_reg(i64 %0) {
%2 = and i64 %0, 10223616
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getxs(char *);
int getbuf() {
  char buf[12];
  getxs(buf);
  return 1;
}


x86 assembly (clang, -O0):
<getbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1030 <getxs@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbuf>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdi
call   1030 <getxs@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @getbuf() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @getxs(i8* %2)
ret i32 1
}

LLVM IR (-O2):
define i32 @getbuf() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @getxs(i8* %2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(void const *, void const *, size_t);
bool cutils_cdar_DynamicArray_long_compare(const void *p1, const void *p2,
                                           size_t s) {
  return !memcmp(p1, p2, s);
}


x86 assembly (clang, -O0):
<cutils_cdar_DynamicArray_long_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cdar_DynamicArray_long_compare>:
push   %rax
call   1030 <bcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cutils_cdar_DynamicArray_long_compare(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcmp(i8* %7, i8* %8, i64 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @cutils_cdar_DynamicArray_long_compare(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @bcmp(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
size_t opt_numint_size(long long int a) { return 1; }


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

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

LLVM IR (-O0):
define i64 @opt_numint_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i64 1
}

LLVM IR (-O2):
define i64 @opt_numint_size(i64 %0) {
ret i64 1
}
/* Variables and functions */
int _tfsunlink(char *);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_tfsunlink(char *name) {
  int ret;
  monLock();
  ret = _tfsunlink(name);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_tfsunlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <monLock@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_tfsunlink@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_tfsunlink>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <monLock@plt>
mov    %rbx,%rdi
call   1030 <_tfsunlink@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mon_tfsunlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @monLock()
%5 = load i8*, i8** %2
%6 = call i32 @_tfsunlink(i8* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @monUnlock()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @mon_tfsunlink(i8* %0) {
%2 = tail call i32 (...) @monLock()
%3 = tail call i32 @_tfsunlink(i8* %0)
%4 = tail call i32 (...) @monUnlock()
ret i32 %3
}
void INT_Excep_ICU_IRQ14(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_IRQ14() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
void test_true_imp(bool *result, bool in, const char *file, int line) {
  if (!in) {
    printf("test_true failed at file: %s line: %d\n", file, line);
    *result = false;
  }
}


x86 assembly (clang, -O0):
<test_true_imp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114d <test_true_imp+0x3d>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_true_imp>:
test   %esi,%esi
je     1115 <test_true_imp+0x5>
ret
push   %rbx
mov    %rdi,%rbx
lea    0xee0(%rip),%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <printf@plt>
movl   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"test_true failed at file: %s line: %d\0A\00"
define void @test_true_imp(i32* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %4
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13)
%15 = load i32*, i32** %5
store i32 0, i32* %15
br label %16
16: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"test_true failed at file: %s line: %d\0A\00"
define void @test_true_imp(i32* nocapture writeonly %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
store i32 0, i32* %0
br label %8
8: ; preds = %6, %4
ret void
}
void ccnl_core_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ccnl_core_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ myfooint(int);
void mallocFreeUse_params2() {
  int *p = malloc(12);
  free(p);
  myfooint(*p);
}


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

x86 assembly (clang, -O2):
<mallocFreeUse_params2>:
push   %rbx
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <myfooint@plt>

LLVM IR (-O0):
define void @mallocFreeUse_params2() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @free(i32* %3)
%5 = load i32*, i32** %1
%6 = load i32, i32* %5
%7 = call i32 @myfooint(i32 %6)
ret void
}

LLVM IR (-O2):
define void @mallocFreeUse_params2() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32 @free(i32* %1)
%3 = load i32, i32* %1
%4 = tail call i32 @myfooint(i32 %3)
ret void
}
void RTMemEfAllocZNP(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfAllocZNP() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ inverte(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char frase[40];
  printf("entre com uma frase: ");
  gets(frase);
  inverte(frase);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x30(%rbp),%rdi
call   1030 <inverte@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <inverte@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"entre com uma frase: \00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%6 = call i32 @inverte(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"entre com uma frase: \00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @inverte(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t buffer_resolverKeyboardToMacro(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @buffer_resolverKeyboardToMacro() {
ret i32 0
}
void add_sw_estimates(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ iswxdigit(int /*<<< orphan*/);
void uninitvar_iswxdigit(void) {
  wint_t i;
  (void)iswxdigit(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_iswxdigit>:
jmp    1030 <iswxdigit@plt>

LLVM IR (-O0):
define void @uninitvar_iswxdigit() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @iswxdigit(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_iswxdigit() {
%1 = tail call i32 @iswxdigit(i32 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ printCompsList(int /*<<< orphan*/ *);
int /*<<< orphan*/ wbrefresh(int /*<<< orphan*/ *);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
void update_comps(WINDOW *win_comps) {
  wclear(win_comps);
  printCompsList(win_comps);
  wbrefresh(win_comps);
}


x86 assembly (clang, -O0):
<update_comps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <wclear@plt>
mov    -0x8(%rbp),%rdi
call   1050 <printCompsList@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wbrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_comps>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wclear@plt>
mov    %rbx,%rdi
call   1050 <printCompsList@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wbrefresh@plt>

LLVM IR (-O0):
define void @update_comps(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wclear(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @printCompsList(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @wbrefresh(i32* %7)
ret void
}

LLVM IR (-O2):
define void @update_comps(i32* %0) {
%2 = tail call i32 @wclear(i32* %0)
%3 = tail call i32 @printCompsList(i32* %0)
%4 = tail call i32 @wbrefresh(i32* %0)
ret void
}
/* Variables and functions */
int checkcmp();
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ unlink(char *);
int checkenv() {
  int rc;
  unlink("tools/.chk");
  system("gcc tools/chkenv.c -o tools/chkenv"
         " 2>tools/.chk ");
  return checkcmp();
}


x86 assembly (clang, -O0):
<checkenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec0(%rip),%rdi
call   1050 <system@plt>
mov    $0x0,%al
call   1040 <checkcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkenv>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec7(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <checkcmp@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"tools/.chk\00"
@.str.1 = [49 x i8] c"gcc tools/chkenv.c -o tools/chkenv 2>tools/.chk \00"
define i32 @checkenv() {
%1 = alloca i32
%2 = call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @checkcmp()
ret i32 %4
}

LLVM IR (-O2):
@.str = [11 x i8] c"tools/.chk\00"
@.str.1 = [49 x i8] c"gcc tools/chkenv.c -o tools/chkenv 2>tools/.chk \00"
define i32 @checkenv() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @checkcmp()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _convert_unsigned(char *, int, int, int);
void _convert_signed(char *buf, int x, int base, int upper) {
  if (x < 0) {
    *buf++ = '-';
    x = -x;
  }
  _convert_unsigned(buf, x, base, upper);
}


x86 assembly (clang, -O0):
<_convert_signed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1149 <_convert_signed+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <_convert_unsigned@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_convert_signed>:
test   %esi,%esi
js     1119 <_convert_signed+0x9>
jmp    1030 <_convert_unsigned@plt>
movb   $0x2d,(%rdi)
add    $0x1,%rdi
neg    %esi
jmp    1030 <_convert_unsigned@plt>

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

LLVM IR (-O2):
define void @_convert_signed(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %1, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 45, i8* %0
%8 = sub nsw i32 0, %1
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %8, %6 ], [ %1, %4 ]
%11 = phi i8* [ %7, %6 ], [ %0, %4 ]
%12 = tail call i32 @_convert_unsigned(i8* %11, i32 %10, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ tm_insert(int, int /*<<< orphan*/, void (*)(void *, int),
                             void *);
void time_handle(void *ptr, int alive) {
  if (alive)
    printf("timer expired\n");
  else
    printf("timer killed\n");
  tm_insert(5, 0, time_handle, ptr);
}


x86 assembly (clang, -O0):
<time_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114a <time_handle+0x2a>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1156 <time_handle+0x36>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rcx
mov    $0x5,%edi
xor    %esi,%esi
mov    0x2e80(%rip),%rdx
call   1040 <tm_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_handle>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
lea    0xed3(%rip),%rax
lea    0xed9(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    0x2ea4(%rip),%rdx
mov    $0x5,%edi
xor    %esi,%esi
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <tm_insert@plt>

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

LLVM IR (-O2):
@str = [13 x i8] c"timer killed\00"
@str.2 = [14 x i8] c"timer expired\00"
define void @time_handle(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
%6 = tail call i32 @tm_insert(i32 5, i32 0, void (i8*, i32)* @time_handle, i8* %0)
ret void
}