xunge/DecIR huggingface dataset:
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ expand(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s1[] = "-a-b-z0-9-";
  char s2[100] = {'0'};
  expand(s1, s2);
  printf("%s\n", s2);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xeb4(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeac(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x30,-0x80(%rbp)
lea    -0xf(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1050 <expand@plt>
lea    -0x80(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
movabs $0x2d307a2d622d612d,%rax
7a 30 2d
mov    %rax,(%rsp)
movl   $0x2d392d,0x7(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x70(%rsp)
movb   $0x30,0x10(%rsp)
mov    %rsp,%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <expand@plt>
lea    0xe88(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [11 x i8] c"-a-b-z0-9-\00"
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = bitcast [11 x i8]* %2 to i8*
%5 = bitcast [100 x i8]* %3 to i8*
%6 = bitcast i8* %5 to <{ i8, [99 x i8] }>*
%7 = getelementptr inbounds <{ i8, [99 x i8] }>, <{ i8, [99 x i8] }>* %6, i32 0, i32 0
store i8 48, i8* %7
%8 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @expand(i8* %8, i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@__const.main.s1 = [11 x i8] c"-a-b-z0-9-\00"
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [11 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8 48, i8* %4
%5 = call i32 @expand(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int graphics_exposures;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_graphics_exposures(void *_p, int _v) {
  ((XGCValues *)_p)->graphics_exposures = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XGCValues_graphics_exposures>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGCValues_graphics_exposures(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XGCValues_graphics_exposures(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int sqlite_get_msa(int /*<<< orphan*/ *, char *);
int mode_list(sqlite3 *db, int argc, char **argv) {
  char *filter = "%";
  if (argc >= 2) {
    filter = argv[1];
  }
  return sqlite_get_msa(db, filter);
}


x86 assembly (clang, -O0):
<mode_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed6(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x2,-0xc(%rbp)
jl     1144 <mode_list+0x34>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <sqlite_get_msa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode_list>:
cmp    $0x2,%esi
jl     111e <mode_list+0xe>
mov    0x8(%rdx),%rsi
jmp    1030 <sqlite_get_msa@plt>
lea    0xedb(%rip),%rsi
jmp    1030 <sqlite_get_msa@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"%\00"
define i32 @mode_list(i32* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
br label %8
8: ; preds = %5, %3
%9 = phi i8* [ %7, %5 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %3 ]
%10 = tail call i32 @sqlite_get_msa(i32* %0, i8* %9)
ret i32 %10
}
int main() {
  int x;
  x = 4;
  return x - 4;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RETI(int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x4d(void) {
  RETI(4, 7);
  T_WAIT_UNTIL(10);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x4d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x7,%esi
call   1040 <RETI@plt>
mov    $0xa,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x4d>:
push   %rax
mov    $0x4,%edi
mov    $0x7,%esi
call   1040 <RETI@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x4d() {
%1 = call i32 @RETI(i32 4, i32 7)
%2 = call i32 @T_WAIT_UNTIL(i32 10)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x4d() {
%1 = tail call i32 @RETI(i32 4, i32 7)
%2 = tail call i32 @T_WAIT_UNTIL(i32 10)
ret void
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ __lock;
};
struct TYPE_5__ {
  TYPE_1__ __data;
};
typedef TYPE_2__ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ ll_unlock(int /*<<< orphan*/ *);
int pthread_mutex_unlock(pthread_mutex_t *mutex) {
  ll_unlock(&(mutex)->__data.__lock);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
define i32 @pthread_mutex_unlock(%struct.TYPE_5__* %0) {
%2 = alloca %struct.TYPE_5__*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %2
%3 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = call i32 @ll_unlock(i32* %5)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
define i32 @pthread_mutex_unlock(%struct.TYPE_5__* %0) {
%2 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 0
%3 = tail call i32 @ll_unlock(i32* %2)
ret i32 0
}
void set_dog_pet_footprint(void) {}


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

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

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

LLVM IR (-O2):
define void @set_dog_pet_footprint() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BarTermInit();
void BarTermHandleCont(int sig) { BarTermInit(); }


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

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

LLVM IR (-O0):
define void @BarTermHandleCont(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @BarTermInit()
ret void
}

LLVM IR (-O2):
define void @BarTermHandleCont(i32 %0) {
%2 = tail call i32 (...) @BarTermInit()
ret void
}
void RTLockValidatorRecExclCheckOrder(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclCheckOrder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_sdr1();
void spr_read_sdr1(void *opaque, int sprn) { gen_op_load_sdr1(); }


x86 assembly (clang, -O0):
<spr_read_sdr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <gen_op_load_sdr1@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @spr_read_sdr1(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_load_sdr1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_version(void) {
  printf("serdi "
         "0.30.11"
         " <http://drobilla.net/software/serd>\n");
  printf("Copyright 2011-2021 David Robillard <d@drobilla.net>.\n"
         "License: <http://www.opensource.org/licenses/isc>\n"
         "This is free software; you are free to change and redistribute it."
         "\nThere is NO WARRANTY, to the extent permitted by law.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"serdi 0.30.11 <http://drobilla.net/software/serd>\0A\00"
@.str.1 = [226 x i8] c"Copyright 2011-2021 David Robillard <d@drobilla.net>.\0ALicense: <http://www.opensource.org/licenses/isc>\0AThis is free software; you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define i32 @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([226 x i8], [226 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [50 x i8] c"serdi 0.30.11 <http://drobilla.net/software/serd>\00"
@str.2 = [225 x i8] c"Copyright 2011-2021 David Robillard <d@drobilla.net>.\0ALicense: <http://www.opensource.org/licenses/isc>\0AThis is free software; you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define i32 @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([225 x i8], [225 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int test_imm_6Buint16_mem(unsigned short *val) {
  return ((*val) & (0x6B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Buint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x6b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_6Buint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 107
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ cli_putc(int);
void cursor_move(uint32_t cursor_seq) {
  for (int i = 24; i >= 0; i -= 8)
    cli_putc((cursor_seq >> i) & 0xFF);
}


x86 assembly (clang, -O0):
<cursor_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x18,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114d <cursor_move+0x3d>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
sar    %cl,%edi
and    $0xff,%edi
call   1030 <cli_putc@plt>
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <cursor_move+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cursor_move>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
mov    %eax,%edi
call   1030 <cli_putc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <cli_putc@plt>
movzbl %bh,%edi
call   1030 <cli_putc@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <cli_putc@plt>

LLVM IR (-O0):
define void @cursor_move(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 24, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = ashr i32 %8, %9
%11 = and i32 %10, 255
%12 = call i32 @cli_putc(i32 %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 8
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @cursor_move(i32 %0) {
%2 = lshr i32 %0, 24
%3 = tail call i32 @cli_putc(i32 %2)
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = tail call i32 @cli_putc(i32 %5)
%7 = lshr i32 %0, 8
%8 = and i32 %7, 255
%9 = tail call i32 @cli_putc(i32 %8)
%10 = and i32 %0, 255
%11 = tail call i32 @cli_putc(i32 %10)
ret void
}
void ali_init() {}


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

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

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

LLVM IR (-O2):
define void @ali_init() {
ret void
}
int bst_comp_char(void *data1, void *data2) {
  return *((char *)data1) - *((char *)data2);
}


x86 assembly (clang, -O0):
<bst_comp_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bst_comp_char>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bst_comp_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @bst_comp_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("in source_1, but changed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"in source_1, but changed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"in source_1, but changed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int _mm256_extract_epi32(int /*<<< orphan*/, int);
int __attribute__((target("avx"))) qq_avx(__m256i a) {
  return _mm256_extract_epi32(a, 3);
}


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

x86 assembly (clang, -O2):
<qq_avx>:
mov    $0x3,%esi
jmp    1030 <_mm256_extract_epi32@plt>

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

LLVM IR (-O2):
define i32 @qq_avx(i32 %0) {
%2 = tail call i32 @_mm256_extract_epi32(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DumpDummy();
int main() {
  DumpDummy();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @DumpDummy()
ret i32 0
}
int test_imm_DBint64_lowword_mem(long long *val) {
  return ((*val) & (0xDB << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DBint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 219
%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_DBint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 219
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t rj_xtime(uint8_t x) {
  return (x & 0x80) ? ((x << 1) ^ 0x1b) : (x << 1);
}


x86 assembly (clang, -O0):
<rj_xtime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1129 <rj_xtime+0x29>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
xor    $0x1b,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <rj_xtime+0x32>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rj_xtime>:
lea    (%rdi,%rdi,1),%ecx
mov    %ecx,%eax
xor    $0x1b,%eax
test   $0x80,%dil
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @rj_xtime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = shl i32 %7, 1
%9 = xor i32 %8, 27
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = shl i32 %11, 1
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @rj_xtime(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
%4 = shl i32 %0, 1
%5 = xor i32 %4, 27
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
int gm_gpio_pin_index(unsigned port, unsigned pin) {
  int ret = port * 32 + pin;
  return ret < (32 * 1) ? ret : -1;
}


x86 assembly (clang, -O0):
<gm_gpio_pin_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    112b <gm_gpio_pin_index+0x2b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <gm_gpio_pin_index+0x38>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <gm_gpio_pin_index+0x38>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gm_gpio_pin_index>:
shl    $0x5,%edi
lea    (%rdi,%rsi,1),%ecx
cmp    $0x20,%ecx
mov    $0xffffffff,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gm_gpio_pin_index(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 32
%8 = load i32, i32* %4
%9 = add i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 32
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ -1, %14 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @gm_gpio_pin_index(i32 %0, i32 %1) {
%3 = shl i32 %0, 5
%4 = add i32 %3, %1
%5 = icmp slt i32 %4, 32
%6 = select i1 %5, i32 %4, i32 -1
ret i32 %6
}
/* Type definitions */
struct tcp_info {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
int /*<<< orphan*/ SOL_TCP;
int /*<<< orphan*/ TCP_INFO;
int getsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, struct tcp_info *,
               int *);
int SockAPI_TCPGetInfo(int sd, struct tcp_info *tcpinfo) {
  socklen_t len = sizeof(*tcpinfo);
  int ret = getsockopt(sd, SOL_TCP, TCP_INFO, tcpinfo, &len);
  return ret;
}


x86 assembly (clang, -O0):
<SockAPI_TCPGetInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <getsockopt@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SockAPI_TCPGetInfo>:
push   %rax
mov    %rsi,%rcx
movl   $0x4,0x4(%rsp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%r8
call   1030 <getsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tcp_info = type { i32 }
@SOL_TCP = global i32 0
@TCP_INFO = global i32 0
define i32 @SockAPI_TCPGetInfo(i32 %0, %struct.tcp_info* %1) {
%3 = alloca i32
%4 = alloca %struct.tcp_info*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store %struct.tcp_info* %1, %struct.tcp_info** %4
store i32 4, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* @SOL_TCP
%9 = load i32, i32* @TCP_INFO
%10 = load %struct.tcp_info*, %struct.tcp_info** %4
%11 = call i32 @getsockopt(i32 %7, i32 %8, i32 %9, %struct.tcp_info* %10, i32* %5)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
%struct.tcp_info = type { i32 }
@SOL_TCP = global i32 0
@TCP_INFO = global i32 0
define i32 @SockAPI_TCPGetInfo(i32 %0, %struct.tcp_info* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%5 = load i32, i32* @SOL_TCP
%6 = load i32, i32* @TCP_INFO
%7 = call i32 @getsockopt(i32 %0, i32 %5, i32 %6, %struct.tcp_info* %1, i32* %3)
ret i32 %7
}
void SteamAPI_ISteamController_ActivateActionSet(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamController_ActivateActionSet>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamController_ActivateActionSet = [44 x i8] c"SteamAPI_ISteamController_ActivateActionSet\00"
define void @SteamAPI_ISteamController_ActivateActionSet(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamController_ActivateActionSet, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamController_ActivateActionSet = [44 x i8] c"SteamAPI_ISteamController_ActivateActionSet\00"
define void @SteamAPI_ISteamController_ActivateActionSet(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamController_ActivateActionSet, i64 0, i64 0), i8* %0)
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv32_12_sse4() {
ret void
}
/* Variables and functions */
scalar_t__ scalbln(double, long);
long double scalblnl(long double x, long exp) {
  return (long double)scalbln((double)x, exp);
}


x86 assembly (clang, -O0):
<scalblnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <scalbln@plt>
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalblnl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <scalbln@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %3
store i64 %1, i64* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load i64, i64* %4
%8 = call i64 @scalbln(double %6, i64 %7)
%9 = sitofp i64 %8 to x86_fp80
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = tail call i64 @scalbln(double %3, i64 %1)
%5 = sitofp i64 %4 to x86_fp80
ret x86_fp80 %5
}
void g_value_set_float() {}


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

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

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

LLVM IR (-O2):
define void @g_value_set_float() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_record(int);
void op_matread() { read_record(1); }


x86 assembly (clang, -O0):
<op_matread>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <read_record@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @op_matread() {
%1 = call i32 @read_record(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_matread() {
%1 = tail call i32 @read_record(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f6_handler(char **save) {
  write_instr(0x00);
  write_imm(0x3F);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f6_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3f,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3f,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f6_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 63)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f6_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 63)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_dobldobl_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(235, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_dobldobl_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xeb,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_dobldobl_start_solutions>:
mov    $0xeb,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_dobldobl_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 235, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_dobldobl_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 235, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void pid_add(pid_t pid) { printf("add pid %u\n", pid); }


x86 assembly (clang, -O0):
<pid_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pid_add>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"add pid %u\0A\00"
define void @pid_add(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void multicast_term(int sock) { close(sock); }


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

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

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

LLVM IR (-O2):
define void @multicast_term(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  char word[200];
  printf("%ld", hash(word));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0xc8,%rsp
mov    %rsp,%rdi
call   1030 <hash@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @hash(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
void usb_ep0_stall();
void usb_ep0_standard_endpoint_rx() { return usb_ep0_stall(); }


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

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

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

LLVM IR (-O2):
define void @usb_ep0_standard_endpoint_rx() {
tail call void (...) @usb_ep0_stall()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ icos(int);
int /*<<< orphan*/ idiv(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ isin(int);
int32_t itan(int a) { return idiv(isin(a), icos(a)); }


x86 assembly (clang, -O0):
<itan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <isin@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <icos@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <idiv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itan>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1050 <isin@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <icos@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <idiv@plt>

LLVM IR (-O0):
define i32 @itan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isin(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @icos(i32 %5)
%7 = call i32 @idiv(i32 %4, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @itan(i32 %0) {
%2 = tail call i32 @isin(i32 %0)
%3 = tail call i32 @icos(i32 %0)
%4 = tail call i32 @idiv(i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_del_untrusted_maclist() { wdctl_command(27); }


x86 assembly (clang, -O0):
<wdctl_del_untrusted_maclist>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <wdctl_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wdctl_del_untrusted_maclist>:
mov    $0x1b,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_del_untrusted_maclist() {
%1 = call i32 @wdctl_command(i32 27)
ret void
}

LLVM IR (-O2):
define void @wdctl_del_untrusted_maclist() {
%1 = tail call i32 @wdctl_command(i32 27)
ret void
}
long find_close(long handle) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @find_close(i64 %0) {
ret i64 0
}
char server() {}


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

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

LLVM IR (-O0):
define signext i8 @server() {
%1 = alloca i8
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define signext i8 @server() {
ret i8 undef
}
/* Variables and functions */
int __builtin_bsr(int);
int log2(int value) { return __builtin_bsr(value); }


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

x86 assembly (clang, -O2):
<log2>:
jmp    1030 <__builtin_bsr@plt>

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

LLVM IR (-O2):
define i32 @log2(i32 %0) {
%2 = tail call i32 @__builtin_bsr(i32 %0)
ret i32 %2
}
int main() {
  int n;
  n = 30;
  int i, Fnew, Fold, temp, ans;
  Fnew = 1;
  Fold = 0;
  for (i = 2; i <= 30 && i <= n; i++) {
    temp = Fnew;
    Fnew = Fnew + Fold;
    Fold = temp;
  }
  ans = Fnew;
  return ans;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x2,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x1e,-0xc(%rbp)
mov    %al,-0x1d(%rbp)
jg     1142 <main+0x42>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1152 <main+0x52>
jmp    1175 <main+0x75>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <main+0x27>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 1, i32* %4
store i32 0, i32* %5
store i32 2, i32* %3
br label %8
8: ; preds = %23, %0
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 30
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp sle i32 %12, %13
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ false, %8 ], [ %14, %11 ]
br i1 %16, label %17, label %26
17: ; preds = %15
%18 = load i32, i32* %4
store i32 %18, i32* %6
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
store i32 %21, i32* %4
%22 = load i32, i32* %6
store i32 %22, i32* %5
br label %23
23: ; preds = %17
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %8
26: ; preds = %15
%27 = load i32, i32* %4
store i32 %27, i32* %7
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @main() {
ret i32 832040
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage_exit(int status, const char *argv0) {
  FILE *output = status == EXIT_SUCCESS ? stdout : stderr;
  fprintf(output, "usage: %s [ list | DEVICE [ up | down | get | set VAL ]]\n",
          argv0);
  exit(status);
}


x86 assembly (clang, -O0):
<usage_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%eax
jne    1154 <usage_exit+0x34>
mov    0x2e90(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1162 <usage_exit+0x42>
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe87(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_exit>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2ea3(%rip),%rax
cmp    %edi,(%rax)
jne    113a <usage_exit+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <usage_exit+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@stderr = global i32* null
@.str = [58 x i8] c"usage: %s [ list | DEVICE [ up | down | get | set VAL ]]\0A\00"
define void @usage_exit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i32, i32* @EXIT_SUCCESS
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32*, i32** @stdout
br label %13
11: ; preds = %2
%12 = load i32*, i32** @stderr
br label %13
13: ; preds = %11, %9
%14 = phi i32* [ %10, %9 ], [ %12, %11 ]
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = load i8*, i8** %4
%17 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i32, i32* %3
%19 = call i32 @exit(i32 %18)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@stderr = global i32* null
@.str = [58 x i8] c"usage: %s [ list | DEVICE [ up | down | get | set VAL ]]\0A\00"
define void @usage_exit(i32 %0, i8* %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %0
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %1)
%9 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ redraw_error_msg(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/, int);
void redraw_msg_dialog(int lazy) { redraw_error_msg(NULL, NULL, 0, 1); }


x86 assembly (clang, -O0):
<redraw_msg_dialog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %rsi,%rdi
call   1030 <redraw_error_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redraw_msg_dialog>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <redraw_error_msg@plt>

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

LLVM IR (-O2):
define void @redraw_msg_dialog(i32 %0) {
%2 = tail call i32 @redraw_error_msg(i32* null, i32* null, i32 0, i32 1)
ret void
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ printf(char *, unsigned long, int);
int main(void) {
  struct timespec tp = {0};
  clock_gettime(CLOCK_MONOTONIC, &tp);
  printf("[%5lu.%06lu] ", (unsigned long)tp.tv_sec, tp.tv_nsec / 1000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1050 <memset@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    0x8(%rsp),%rsi
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x26,%rdx
add    %eax,%edx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64, i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [14 x i8] c"[%5lu.%06lu] \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
store i32 0, i32* %1
%3 = bitcast %struct.timespec* %2 to i8*
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %2)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64, i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [14 x i8] c"[%5lu.%06lu] \00"
define i32 @main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %6, i32 %9)
ret i32 0
}