xunge/DecIR huggingface dataset:
void bsr(p, a) struct h8_opcode *p;
char *a;
{
  printf("reg[7]-=2;\n");
  printf("tmp = reg[7];\n");
  printf("SET_WORD_MEM(tmp, (npc-saved_state.mem)*2);\n");
  printf("npc += ((char)b1)>>1;\n");
}


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

x86 assembly (clang, -O2):
<bsr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.h8_opcode = type opaque
@.str = [12 x i8] c"reg[7]-=2;\0A\00"
@.str.1 = [15 x i8] c"tmp = reg[7];\0A\00"
@.str.2 = [45 x i8] c"SET_WORD_MEM(tmp, (npc-saved_state.mem)*2);\0A\00"
@.str.3 = [23 x i8] c"npc += ((char)b1)>>1;\0A\00"
define void @bsr(%struct.h8_opcode* %0, i8* %1) {
%3 = alloca %struct.h8_opcode*
%4 = alloca i8*
store %struct.h8_opcode* %0, %struct.h8_opcode** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.h8_opcode = type opaque
@str = [11 x i8] c"reg[7]-=2;\00"
@str.4 = [14 x i8] c"tmp = reg[7];\00"
@str.5 = [44 x i8] c"SET_WORD_MEM(tmp, (npc-saved_state.mem)*2);\00"
@str.6 = [22 x i8] c"npc += ((char)b1)>>1;\00"
define void @bsr(%struct.h8_opcode* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyunput(int /*<<< orphan*/, char *);
int d_wrap(void) {
  {
    if (0) {
      yyunput(0, "");
    }
  }
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @d_wrap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ mapif_delete_merc_ack(int, int /*<<< orphan*/);
int /*<<< orphan*/ mercdb_sql_delete(int);
int mapif_delete_merc(int fd, int merc_id) {
  mapif_delete_merc_ack(fd, mercdb_sql_delete(merc_id));
  return 0;
}


x86 assembly (clang, -O0):
<mapif_delete_merc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <mercdb_sql_delete@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <mapif_delete_merc_ack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_delete_merc>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <mercdb_sql_delete@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <mapif_delete_merc_ack@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mapif_delete_merc(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 @mercdb_sql_delete(i32 %6)
%8 = call i32 @mapif_delete_merc_ack(i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @mapif_delete_merc(i32 %0, i32 %1) {
%3 = tail call i32 @mercdb_sql_delete(i32 %1)
%4 = tail call i32 @mapif_delete_merc_ack(i32 %0, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ handle_memerr();
void *memalign(size_t const, size_t const);
__attribute__((always_)) void *xaligned_malloc(const size_t alignment,
                                               const size_t size) {
  void *ptr = memalign(alignment, size);
  if (ptr == ((void *)0))
    handle_memerr();
  return ptr;
}


x86 assembly (clang, -O0):
<xaligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <memalign@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xaligned_malloc+0x33>
mov    $0x0,%al
call   1040 <handle_memerr@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xaligned_malloc>:
push   %rbx
call   1030 <memalign@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xaligned_malloc+0x15>
xor    %eax,%eax
call   1040 <handle_memerr@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xaligned_malloc(i64 %0, i64 %1) {
%3 = tail call i8* @memalign(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @handle_memerr()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void INI_CfgDepBase_str_ctx() {}


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

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

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

LLVM IR (-O2):
define void @INI_CfgDepBase_str_ctx() {
ret void
}
int MR_getopt_long(argc, argv, MR_options, long_options, opt_index)
int argc;
char *const *argv;
const char *MR_options;
const struct MR_option *long_options;
int *opt_index;
{
  return MR__getopt_internal(argc, argv, MR_options, long_options, opt_index,
                             0);
}


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

x86 assembly (clang, -O2):
<MR_getopt_long>:
xor    %r9d,%r9d
xor    %eax,%eax
jmp    1030 <MR__getopt_internal@plt>

LLVM IR (-O0):
%struct.MR_option = type opaque
define i32 @MR_getopt_long(i32 %0, i8** %1, i8* %2, %struct.MR_option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.MR_option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.MR_option* %3, %struct.MR_option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.MR_option*, %struct.MR_option** %9
%15 = load i32*, i32** %10
%16 = call i32 (i32, i8**, i8*, %struct.MR_option*, i32*, i32, ...) bitcast (i32 (...)* @MR__getopt_internal to i32 (i32, i8**, i8*, %struct.MR_option*, i32*, i32, ...)*)(i32 %11, i8** %12, i8* %13, %struct.MR_option* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.MR_option = type opaque
define i32 @MR_getopt_long(i32 %0, i8** %1, i8* %2, %struct.MR_option* %3, i32* %4) {
%6 = tail call i32 (i32, i8**, i8*, %struct.MR_option*, i32*, i32, ...) bitcast (i32 (...)* @MR__getopt_internal to i32 (i32, i8**, i8*, %struct.MR_option*, i32*, i32, ...)*)(i32 %0, i8** %1, i8* %2, %struct.MR_option* %3, i32* %4, i32 0)
ret i32 %6
}
void liberarMemoria(int **matriz, int nFil) {
  int i = 0;
  for (i = 0; i < nFil; i++) {
    free(*(matriz + i));
  }
  free(matriz);
}


x86 assembly (clang, -O0):
<liberarMemoria>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <liberarMemoria+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <liberarMemoria+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<liberarMemoria>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <liberarMemoria+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <liberarMemoria+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @liberarMemoria(i32** %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
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32**, i32*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32*, i32** %11, i64 %13
%15 = load i32*, i32** %14
%16 = bitcast i32* %15 to i8*
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load i32**, i32*** %3
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @liberarMemoria(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn45() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn45");
  return result;
}


x86 assembly (clang, -O0):
<fn45>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn45>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn45\00"
define i8* @fn45() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn45\00"
define i8* @fn45() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
void Z80_Reti(void) {}


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

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

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

LLVM IR (-O2):
define void @Z80_Reti() {
ret void
}
int main() {
  unsigned int a = 1;
  a = a * 6;
  a = a / 3;
  return 0x2bad;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
imul   $0x6,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
mov    $0x2bad,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 11181
}
/* Type definitions */
struct sysinfo {
  size_t totalswap;
};

/* Variables and functions */
int /*<<< orphan*/ sysinfo(struct sysinfo *);
size_t totalswap() {
  struct sysinfo info;
  sysinfo(&info);
  return info.totalswap;
}


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

x86 assembly (clang, -O2):
<totalswap>:
push   %rax
mov    %rsp,%rdi
call   1030 <sysinfo@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i64 }
define i64 @totalswap() {
%1 = alloca %struct.sysinfo
%2 = call i32 @sysinfo(%struct.sysinfo* %1)
%3 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i32 0, i32 0
%4 = load i64, i64* %3
ret i64 %4
}

LLVM IR (-O2):
%struct.sysinfo = type { i64 }
define i64 @totalswap() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
%4 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i64 0, i32 0
%5 = load i64, i64* %4
ret i64 %5
}
/* Type definitions */
struct timeval {
  int tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long time_queue_time() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<time_queue_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_queue_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @time_queue_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @time_queue_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %9, %7
ret i64 %10
}
void h_versname(char *name, int argc, char **argv, void *user_data) {
  printf("Called: %s\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<h_versname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xed2(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Called: %s\0A\00"
@__FUNCTION__.h_versname = [11 x i8] c"h_versname\00"
define void @h_versname(i8* %0, i32 %1, i8** %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8* %3, i8** %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.h_versname, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Called: %s\0A\00"
@__FUNCTION__.h_versname = [11 x i8] c"h_versname\00"
define void @h_versname(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.h_versname, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cec_msg {
  int len;
  int *msg;
};
typedef int __u8;

/* Variables and functions */
void cec_ops_vendor_command(const struct cec_msg *msg, __u8 *size,
                            const __u8 **vendor_cmd) {
  *size = msg->len - 2;
  if (*size > 14) {
    *size = 14;
  }
  *vendor_cmd = msg->msg + 2;
}


x86 assembly (clang, -O0):
<cec_ops_vendor_command>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0xe,(%rax)
jle    1136 <cec_ops_vendor_command+0x36>
mov    -0x10(%rbp),%rax
movl   $0xe,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
add    $0x8,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_vendor_command>:
mov    (%rdi),%eax
lea    -0x2(%rax),%ecx
cmp    $0x11,%eax
mov    $0xe,%eax
cmovl  %ecx,%eax
mov    %eax,(%rsi)
mov    0x8(%rdi),%rax
add    $0x8,%rax
mov    %rax,(%rdx)
ret

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

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
define void @cec_ops_vendor_command(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1, i32** nocapture writeonly %2) {
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, -2
%7 = icmp sgt i32 %5, 16
%8 = select i1 %7, i32 14, i32 %6
store i32 %8, i32* %1
%9 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 2
store i32* %11, i32** %2
ret void
}
char *hash_plugin_summary(void) {
  return ("oscommerce \tmd5(salt,password) plugin (osCommerce)");
}


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [51 x i8] c"oscommerce \09md5(salt,password) plugin (osCommerce)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [51 x i8] c"oscommerce \09md5(salt,password) plugin (osCommerce)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strd(char *s) {
  char *d;
  d = (char *)malloc(strlen(s) + 1);
  strcpy(d, s);
  return (d);
}


x86 assembly (clang, -O0):
<strd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strd>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strd(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
int link_map_cmp(struct link_map *a, struct link_map *b) {
  return ((unsigned long)a) < ((unsigned long)b);
}


x86 assembly (clang, -O0):
<link_map_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<link_map_cmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
setb   %al
ret

LLVM IR (-O0):
%struct.link_map = type opaque
define i32 @link_map_cmp(%struct.link_map* %0, %struct.link_map* %1) {
%3 = alloca %struct.link_map*
%4 = alloca %struct.link_map*
store %struct.link_map* %0, %struct.link_map** %3
store %struct.link_map* %1, %struct.link_map** %4
%5 = load %struct.link_map*, %struct.link_map** %3
%6 = ptrtoint %struct.link_map* %5 to i64
%7 = load %struct.link_map*, %struct.link_map** %4
%8 = ptrtoint %struct.link_map* %7 to i64
%9 = icmp ult i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.link_map = type opaque
define i32 @link_map_cmp(%struct.link_map* readnone %0, %struct.link_map* readnone %1) {
%3 = icmp ult %struct.link_map* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int popcount(int);
int openFileCount(uint64_t pawns) {
  pawns |= pawns >> 8;
  pawns |= pawns >> 16;
  pawns |= pawns >> 32;
  return popcount(~pawns & 0xFF);
}


x86 assembly (clang, -O0):
<openFileCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
and    $0xff,%edi
call   1030 <popcount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFileCount>:
jmp    1030 <popcount@plt>

LLVM IR (-O0):
define i32 @openFileCount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 16
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 32
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = xor i32 %15, -1
%17 = and i32 %16, 255
%18 = call i32 @popcount(i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @openFileCount(i32 %0) {
%2 = tail call i32 @popcount(i32 poison)
ret i32 %2
}
int rl_set_retained_kills(num)
int num __attribute__((unused));
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rl_set_retained_kills(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
unsigned long getdiskspace(const char *path, unsigned long unit,
                           int freespace) {
  fprintf(stderr, "\n*** !Missing getfreediskspace implementation ***\n");
  return (0);
}


x86 assembly (clang, -O0):
<getdiskspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"\0A*** !Missing getfreediskspace implementation ***\0A\00"
define i64 @getdiskspace(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i64 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"\0A*** !Missing getfreediskspace implementation ***\0A\00"
define i64 @getdiskspace(i8* nocapture readnone %0, i64 %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void mr_panic() { abort(); }


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

x86 assembly (clang, -O2):
<mr_panic>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @mr_panic() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @mr_panic() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t bytes) {
  void *ptr;
  if ((ptr = malloc(bytes)) == NULL) {
    fprintf(stderr, "malloc failed to get %d bytes.\n", (int)bytes);
    exit(1);
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1178 <xmalloc+0x48>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
lea    0xe97(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <xmalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"malloc failed to get %d bytes.\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = trunc i64 %0 to i32
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ a_function();
int /*<<< orphan*/ b_function();
int /*<<< orphan*/ c_function();
void d_function(void) {
  a_function();
  b_function();
  c_function();
}


x86 assembly (clang, -O0):
<d_function>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <a_function@plt>
mov    $0x0,%al
call   1040 <b_function@plt>
mov    $0x0,%al
call   1030 <c_function@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_function>:
push   %rax
xor    %eax,%eax
call   1050 <a_function@plt>
xor    %eax,%eax
call   1040 <b_function@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <c_function@plt>

LLVM IR (-O0):
define void @d_function() {
%1 = call i32 (...) @a_function()
%2 = call i32 (...) @b_function()
%3 = call i32 (...) @c_function()
ret void
}

LLVM IR (-O2):
define void @d_function() {
%1 = tail call i32 (...) @a_function()
%2 = tail call i32 (...) @b_function()
%3 = tail call i32 (...) @c_function()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ evil_exception(char *, int);
int /*<<< orphan*/ finish_exception();
void do_prefetch_abort(void) {
  evil_exception("prefetch abort", 3);
  finish_exception();
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"prefetch abort\00"
define void @do_prefetch_abort() {
%1 = call i32 @evil_exception(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = call i32 (...) @finish_exception()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"prefetch abort\00"
define void @do_prefetch_abort() {
%1 = tail call i32 @evil_exception(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 (...) @finish_exception()
ret void
}
/* Type definitions */
struct conn_info_st {
  int dummy;
};

/* Variables and functions */
int cmds_after_pass(struct conn_info_st *);
scalar_t__ fw_set_fwpass(char const *, struct conn_info_st *);
int fw_acct_type9(const char *args, struct conn_info_st *conn_info) {
  if (fw_set_fwpass(args, conn_info) != 0) {
    return (-2);
  }
  return cmds_after_pass(conn_info);
}


x86 assembly (clang, -O0):
<fw_acct_type9>:
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 <fw_set_fwpass@plt>
cmp    $0x0,%rax
je     1153 <fw_acct_type9+0x33>
movl   $0xfffffffe,-0x4(%rbp)
jmp    115f <fw_acct_type9+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <cmds_after_pass@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_acct_type9>:
push   %rbx
mov    %rsi,%rbx
call   1040 <fw_set_fwpass@plt>
test   %rax,%rax
je     1135 <fw_acct_type9+0x15>
mov    $0xfffffffe,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cmds_after_pass@plt>

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

LLVM IR (-O2):
%struct.conn_info_st = type { i32 }
define i32 @fw_acct_type9(i8* %0, %struct.conn_info_st* %1) {
%3 = tail call i64 @fw_set_fwpass(i8* %0, %struct.conn_info_st* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @cmds_after_pass(%struct.conn_info_st* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -2, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_adds_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_adds_epi16(__m128i A, __m128i B) {
  return _mm_adds_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_adds_epi16>:
jmp    1030 <_mm_adds_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_adds_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_adds_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ generateArray(int **, int, int);
int /*<<< orphan*/ printArray(int **, int, int);
int main() {
  int nums[3][3];
  generateArray(nums, 3, 3);
  printArray(nums, 3, 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0x3,%edx
mov    %edx,%esi
call   1030 <generateArray@plt>
lea    -0x30(%rbp),%rdi
mov    $0x3,%edx
mov    %edx,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <generateArray@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0
%3 = bitcast [3 x i32]* %2 to i32**
%4 = call i32 @generateArray(i32** %3, i32 3, i32 3)
%5 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0
%6 = bitcast [3 x i32]* %5 to i32**
%7 = call i32 @printArray(i32** %6, i32 3, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = bitcast [3 x [3 x i32]]* %1 to i8*
%3 = bitcast [3 x [3 x i32]]* %1 to i32**
%4 = call i32 @generateArray(i32** %3, i32 3, i32 3)
%5 = call i32 @printArray(i32** %3, i32 3, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__28__IO__clr();
void Msp430GpioC__12__HplGeneralIO__clr(void) {
  HplMsp430GeneralIOP__28__IO__clr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__12__HplGeneralIO__clr() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__28__IO__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d centimeters tall.\n", height);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [27 x i8] c"I am %d centimeters tall.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [27 x i8] c"I am %d centimeters tall.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
/* Variables and functions */
double Melder_roundDown(double);
double Melder_roundUp(double);
double Melder_roundTowardsZero(double x) {
  return x >= 0.0 ? Melder_roundDown(x) : Melder_roundUp(x);
}


x86 assembly (clang, -O0):
<Melder_roundTowardsZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <Melder_roundTowardsZero+0x33>
movsd  -0x8(%rbp),%xmm0
call   1030 <Melder_roundDown@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1162 <Melder_roundTowardsZero+0x42>
movsd  -0x8(%rbp),%xmm0
call   1040 <Melder_roundUp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Melder_roundTowardsZero>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    112f <Melder_roundTowardsZero+0xf>
jmp    1040 <Melder_roundUp@plt>
jmp    1030 <Melder_roundDown@plt>

LLVM IR (-O0):
define double @Melder_roundTowardsZero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @Melder_roundDown(double %6)
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @Melder_roundUp(double %9)
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
ret double %12
}

LLVM IR (-O2):
define double @Melder_roundTowardsZero(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @Melder_roundDown(double %0)
br label %7
5: ; preds = %1
%6 = tail call double @Melder_roundUp(double %0)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
int __attribute__((target("arch=goldmont"))) foo(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 3
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 3
}
void gtk_selection_remove_all() {}


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

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

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

LLVM IR (-O2):
define void @gtk_selection_remove_all() {
ret void
}
/* Variables and functions */
bool nrf91_errata_31(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_31() {
ret i32 0
}
/* Variables and functions */
int ss2qxh();
int ss2qxh_() { return ss2qxh(); }


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

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

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

LLVM IR (-O2):
define i32 @ss2qxh_() {
%1 = tail call i32 (...) @ss2qxh()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void insTerra() {
  printf("Test");
  system("pause");
}


x86 assembly (clang, -O0):
<insTerra>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<insTerra>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"Test\00"
@.str.1 = [6 x i8] c"pause\00"
define void @insTerra() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_assign(float *, float *);
__attribute__((always_)) struct vec2 *psvec2_assign(struct vec2 *result,
                                                    struct vec2 *a) {
  vec2_assign((float *)result, (float *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec2_assign>:
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 <vec2_assign@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2_assign>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_assign@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_assign(%struct.vec2* %0, %struct.vec2* %1) {
%3 = alloca %struct.vec2*
%4 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %3
store %struct.vec2* %1, %struct.vec2** %4
%5 = load %struct.vec2*, %struct.vec2** %3
%6 = bitcast %struct.vec2* %5 to float*
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = call i32 @vec2_assign(float* %6, float* %8)
%10 = load %struct.vec2*, %struct.vec2** %3
ret %struct.vec2* %10
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_assign(%struct.vec2* returned %0, %struct.vec2* %1) {
%3 = bitcast %struct.vec2* %0 to float*
%4 = bitcast %struct.vec2* %1 to float*
%5 = tail call i32 @vec2_assign(float* %3, float* %4)
ret %struct.vec2* %0
}
/* Type definitions */
struct GCodeParser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct GCodeParser *);
void gcodep_delete(struct GCodeParser *parser) { free(parser); }


x86 assembly (clang, -O0):
<gcodep_delete>:
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):
<gcodep_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.GCodeParser = type { i32 }
define void @gcodep_delete(%struct.GCodeParser* nocapture %0) {
%2 = tail call i32 @free(%struct.GCodeParser* %0)
ret void
}