xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int search(int *, int, int);
int main() {
  int nums[10] = {3, 1};
  printf("%d\n", search(nums, 2, 1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movl   $0x3,-0x30(%rbp)
movl   $0x1,-0x2c(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1040 <search@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movabs $0x100000003,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1040 <search@plt>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = bitcast i8* %2 to <{ i32, i32, [8 x i32] }>*
%4 = getelementptr inbounds <{ i32, i32, [8 x i32] }>, <{ i32, i32, [8 x i32] }>* %3, i32 0, i32 0
store i32 3, i32* %4
%5 = getelementptr inbounds <{ i32, i32, [8 x i32] }>, <{ i32, i32, [8 x i32] }>* %3, i32 0, i32 1
store i32 1, i32* %5
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = call i32 @search(i32* %6, i32 2, i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 3, i32* %3
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 1, i32* %4
%5 = call i32 @search(i32* %3, i32 2, i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int min(int a, int b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xeb() {
  Assert_real((isascii(235) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              1180, ("isascii should be 0 for 0xeb"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xeb\00"
define void @t_isascii_0xeb() {
%1 = tail call i64 @isascii(i32 235)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long long __rthal_generic_divmod64(unsigned long long a,
                                            unsigned long long b,
                                            unsigned long long *rem) {
  unsigned long long q;
  q = a / b;
  if (rem)
    *rem = a % b;
  return q;
}


x86 assembly (clang, -O0):
<__rthal_generic_divmod64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     113e <__rthal_generic_divmod64+0x3e>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rdx,(%rax)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rthal_generic_divmod64>:
mov    %rdx,%rcx
mov    %rdi,%rax
mov    %rdi,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     1120 <__rthal_generic_divmod64+0x20>
xor    %edx,%edx
div    %rsi
test   %rcx,%rcx
je     111f <__rthal_generic_divmod64+0x1f>
mov    %rdx,(%rcx)
ret
xor    %edx,%edx
div    %esi
test   %rcx,%rcx
jne    111c <__rthal_generic_divmod64+0x1c>
jmp    111f <__rthal_generic_divmod64+0x1f>

LLVM IR (-O0):
define i64 @__rthal_generic_divmod64(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = udiv i64 %8, %9
store i64 %10, i64* %7
%11 = load i64*, i64** %6
%12 = icmp ne i64* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = urem i64 %14, %15
%17 = load i64*, i64** %6
store i64 %16, i64* %17
br label %18
18: ; preds = %13, %3
%19 = load i64, i64* %7
ret i64 %19
}

LLVM IR (-O2):
define i64 @__rthal_generic_divmod64(i64 %0, i64 %1, i64* writeonly %2) {
%4 = icmp eq i64* %2, null
%5 = udiv i64 %0, %1
%6 = urem i64 %0, %1
br i1 %4, label %8, label %7
7: ; preds = %3
store i64 %6, i64* %2
br label %8
8: ; preds = %7, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ automaticArrayInit();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ staticArrayInit();
void fig06_11() {
  puts("First call to each function:");
  staticArrayInit();
  automaticArrayInit();
  puts("\n\nSecond call to each function:");
  staticArrayInit();
  automaticArrayInit();
}


x86 assembly (clang, -O0):
<fig06_11>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <staticArrayInit@plt>
mov    $0x0,%al
call   1050 <automaticArrayInit@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <staticArrayInit@plt>
mov    $0x0,%al
call   1050 <automaticArrayInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fig06_11>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <staticArrayInit@plt>
xor    %eax,%eax
call   1050 <automaticArrayInit@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <staticArrayInit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <automaticArrayInit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"First call to each function:\00"
@.str.1 = [32 x i8] c"\0A\0ASecond call to each function:\00"
define void @fig06_11() {
%1 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @staticArrayInit()
%3 = call i32 (...) @automaticArrayInit()
%4 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @staticArrayInit()
%6 = call i32 (...) @automaticArrayInit()
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"First call to each function:\00"
@.str.1 = [32 x i8] c"\0A\0ASecond call to each function:\00"
define void @fig06_11() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @staticArrayInit()
%3 = tail call i32 (...) @automaticArrayInit()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @staticArrayInit()
%6 = tail call i32 (...) @automaticArrayInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err1Flush(int /*<<< orphan*/, int *, int *);
void errFlush(int *status) {
  int errbel = 0;
  err1Flush(0, &errbel, status);
}


x86 assembly (clang, -O0):
<errFlush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    -0xc(%rbp),%rsi
call   1030 <err1Flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errFlush>:
push   %rax
mov    %rdi,%rdx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <err1Flush@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @errFlush(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @err1Flush(i32 0, i32* %2, i32* %0)
ret void
}
/* Type definitions */
struct i2c_adapter {
  int dummy;
};

/* Variables and functions */
int sensor_i2c_write(struct i2c_adapter *, unsigned char, int, unsigned char *);
int sensor_i2c_write_register(struct i2c_adapter *i2c_adap,
                              unsigned char address, unsigned char reg,
                              unsigned char value) {
  unsigned char data[2];
  data[0] = reg;
  data[1] = value;
  return sensor_i2c_write(i2c_adap, address, 2, data);
}


x86 assembly (clang, -O0):
<sensor_i2c_write_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %cl,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xb(%rbp),%al
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
lea    -0xd(%rbp),%rcx
mov    $0x2,%edx
movzbl %al,%esi
call   1030 <sensor_i2c_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sensor_i2c_write_register>:
push   %rax
mov    %dl,0x6(%rsp)
mov    %cl,0x7(%rsp)
lea    0x6(%rsp),%rcx
mov    $0x2,%edx
call   1030 <sensor_i2c_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.i2c_adapter = type { i32 }
define i32 @sensor_i2c_write_register(%struct.i2c_adapter* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca %struct.i2c_adapter*
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [2 x i8]
store %struct.i2c_adapter* %0, %struct.i2c_adapter** %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = load i8, i8* %7
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
store i8 %10, i8* %11
%12 = load i8, i8* %8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 1
store i8 %12, i8* %13
%14 = load %struct.i2c_adapter*, %struct.i2c_adapter** %5
%15 = load i8, i8* %6
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%17 = call i32 @sensor_i2c_write(%struct.i2c_adapter* %14, i8 zeroext %15, i32 2, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.i2c_adapter = type { i32 }
define i32 @sensor_i2c_write_register(%struct.i2c_adapter* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca [2 x i8]
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %2, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %3, i8* %7
%8 = call i32 @sensor_i2c_write(%struct.i2c_adapter* %0, i8 zeroext %1, i32 2, i8* %6)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

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


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

x86 assembly (clang, -O2):
<test_mm_packs_epi16>:
jmp    1030 <_mm_packs_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_packs_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_packs_epi16(i32 %0, i32 %1)
ret i32 %3
}
int test_imm_C4int8_mem(signed char *val) {
  return ((*val) & (-0xC4 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C4int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff3c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C4int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -196
%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_C4int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -196
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
void plugin_exit_cfg(void) {}


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

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

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

LLVM IR (-O2):
define void @plugin_exit_cfg() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void show_help(void) {
  printf(
      "Usage: %s [OPTION]... TARGET LINK_NAME\t(1st form)\n   or: %s "
      "[OPTION]... TARGET\t\t(2nd form)\n\n     -s, --symbolic\tmake symbolic "
      "links instead of hard links\n     -f, --force\tdo not prompt before "
      "overwriting files\n     -i, --interactive\tprompt before overwriting "
      "files\n     -v, --verbose\tprint out links created\n     -h, "
      "--help\t\tdisplay this help\n     -V, --version\tdisplay version "
      "information\n\n     Report bugs to <bulliver@gmail.com>\n",
      "ln", "ln");
}


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

x86 assembly (clang, -O2):
<show_help>:
lea    0xee9(%rip),%rdi
lea    0x1093(%rip),%rdx
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [433 x i8] c"Usage: %s [OPTION]... TARGET LINK_NAME\09(1st form)\0A or: %s [OPTION]... TARGET\09\09(2nd form)\0A\0A -s, --symbolic\09make symbolic links instead of hard links\0A -f, --force\09do not prompt before overwriting files\0A -i, --interactive\09prompt before overwriting files\0A -v, --verbose\09print out links created\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0A Report bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"ln\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [433 x i8] c"Usage: %s [OPTION]... TARGET LINK_NAME\09(1st form)\0A or: %s [OPTION]... TARGET\09\09(2nd form)\0A\0A -s, --symbolic\09make symbolic links instead of hard links\0A -f, --force\09do not prompt before overwriting files\0A -i, --interactive\09prompt before overwriting files\0A -v, --verbose\09print out links created\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0A Report bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"ln\00"
define void @show_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([433 x i8], [433 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void IMGbltWAreaTransBlacken(short *imageBuf, int pitch, int x, int y,
                             short *bitmapWBuf, int srcX1, int srcY1, int srcX2,
                             int srcY2) {}


x86 assembly (clang, -O0):
<IMGbltWAreaTransBlacken>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @IMGbltWAreaTransBlacken(i16* %0, i32 %1, i32 %2, i32 %3, i16* %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i16*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i16*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i16* %0, i16** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i16* %4, i16** %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
ret void
}

LLVM IR (-O2):
define void @IMGbltWAreaTransBlacken(i16* nocapture %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i32 %5, i32 %6, i32 %7, i32 %8) {
ret void
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int xdialogPresent(void) {
  static int lXdialogPresent = -1;
  if (lXdialogPresent < 0) {
    lXdialogPresent = detectPresence("Xdialog");
  }
  return lXdialogPresent && graphicMode();
}


x86 assembly (clang, -O0):
<xdialogPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <xdialogPresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <xdialogPresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdialogPresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <xdialogPresent+0x23>
test   %eax,%eax
je     1159 <xdialogPresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <xdialogPresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@xdialogPresent.lXdialogPresent = internal global i32 -1
@.str = [8 x i8] c"Xdialog\00"
define i32 @xdialogPresent() {
%1 = load i32, i32* @xdialogPresent.lXdialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @xdialogPresent.lXdialogPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @xdialogPresent.lXdialogPresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@xdialogPresent.lXdialogPresent = internal unnamed_addr global i32 -1
@.str = [8 x i8] c"Xdialog\00"
define i32 @xdialogPresent() {
%1 = load i32, i32* @xdialogPresent.lXdialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @xdialogPresent.lXdialogPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ write_config_bits_PIC24(unsigned long, unsigned char *, char,
                                           int);
void write_config_bits_P24H(unsigned long address, unsigned char *data,
                            char blocksize, char lastblock) {
  write_config_bits_PIC24(address, data, blocksize, 0x4000);
}


x86 assembly (clang, -O0):
<write_config_bits_P24H>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4000,%ecx
movsbl -0x11(%rbp),%edx
call   1030 <write_config_bits_PIC24@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_config_bits_P24H>:
mov    $0x4000,%ecx
jmp    1030 <write_config_bits_PIC24@plt>

LLVM IR (-O0):
define void @write_config_bits_P24H(i64 %0, i8* %1, i8 signext %2, i8 signext %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i64, i64* %5
%10 = load i8*, i8** %6
%11 = load i8, i8* %7
%12 = call i32 @write_config_bits_PIC24(i64 %9, i8* %10, i8 signext %11, i32 16384)
ret void
}

LLVM IR (-O2):
define void @write_config_bits_P24H(i64 %0, i8* %1, i8 signext %2, i8 signext %3) {
%5 = tail call i32 @write_config_bits_PIC24(i64 %0, i8* %1, i8 signext %2, i32 16384)
ret void
}
/* Variables and functions */
int NaClMain(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char **ep) {
  if (argc < 2) {
    printf("you must specify a file to read\n");
    exit(-1);
  }
  return NaClMain(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116a <main+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <NaClMain@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1140 <main+0x10>
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <NaClMain@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"you must specify a file to read\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %3
%14 = load i8**, i8*** %6
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @NaClMain(i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@str = [32 x i8] c"you must specify a file to read\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %3
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @NaClMain(i8* %10)
ret i32 %11
}
int begin() { return 42; }


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

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

LLVM IR (-O0):
define i32 @begin() {
ret i32 42
}

LLVM IR (-O2):
define i32 @begin() {
ret i32 42
}
void fn(int i) {
  switch (i)
  case 1 << (sizeof(int) * 8 - 1):
    break;
}


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x80000000,%eax
jne    111f <fn+0x1f>
jmp    111a <fn+0x1a>
jmp    111f <fn+0x1f>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 -2147483648, label %4
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
ret void
}

LLVM IR (-O2):
define void @fn(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bmy_user_interal_call(char const *, int, char *);
void bmy_user_create(int usernum, char *userid) {
  const char *sql = "CALL procedure_insert_user(?, ?)";
  bmy_user_interal_call(sql, usernum, userid);
}


x86 assembly (clang, -O0):
<bmy_user_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <bmy_user_interal_call@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmy_user_create>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <bmy_user_interal_call@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"CALL procedure_insert_user(?, ?)\00"
define void @bmy_user_create(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %5
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @bmy_user_interal_call(i8* %6, i32 %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"CALL procedure_insert_user(?, ?)\00"
define void @bmy_user_create(i32 %0, i8* %1) {
%3 = tail call i32 @bmy_user_interal_call(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ (*cleanup)();
};
typedef TYPE_1__ RAND_METHOD;

/* Variables and functions */
TYPE_1__ *RAND_get_rand_method();
int /*<<< orphan*/ RAND_set_rand_method(int /*<<< orphan*/ *);
int /*<<< orphan*/ stub1();
void rand_cleanup_int(void) {
  const RAND_METHOD *meth = RAND_get_rand_method();
  if (meth && meth->cleanup)
    meth->cleanup();
  RAND_set_rand_method(NULL);
}


x86 assembly (clang, -O0):
<rand_cleanup_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <RAND_get_rand_method@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1154 <rand_cleanup_int+0x34>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1154 <rand_cleanup_int+0x34>
mov    -0x8(%rbp),%rcx
mov    $0x0,%al
call   *(%rcx)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <RAND_set_rand_method@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_cleanup_int>:
push   %rax
xor    %eax,%eax
call   1030 <RAND_get_rand_method@plt>
test   %rax,%rax
je     1139 <rand_cleanup_int+0x19>
mov    (%rax),%rcx
test   %rcx,%rcx
je     1139 <rand_cleanup_int+0x19>
xor    %eax,%eax
call   *%rcx
xor    %edi,%edi
pop    %rax
jmp    1040 <RAND_set_rand_method@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 (...)* }
define void @rand_cleanup_int() {
%1 = alloca %struct.TYPE_3__*
%2 = call %struct.TYPE_3__* (...) @RAND_get_rand_method()
store %struct.TYPE_3__* %2, %struct.TYPE_3__** %1
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %1
%4 = icmp ne %struct.TYPE_3__* %3, null
br i1 %4, label %5, label %15
5: ; preds = %0
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %1
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i32 (...)*, i32 (...)** %7
%9 = icmp ne i32 (...)* %8, null
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %1
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
%13 = load i32 (...)*, i32 (...)** %12
%14 = call i32 (...) %13()
br label %15
15: ; preds = %10, %5, %0
%16 = call i32 @RAND_set_rand_method(i32* null)
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 (...)* }
define void @rand_cleanup_int() {
%1 = tail call %struct.TYPE_3__* (...) @RAND_get_rand_method()
%2 = icmp eq %struct.TYPE_3__* %1, null
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i32 (...)*, i32 (...)** %4
%6 = icmp eq i32 (...)* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 (...) %5()
br label %9
9: ; preds = %7, %3, %0
%10 = tail call i32 @RAND_set_rand_method(i32* null)
ret void
}
/* Variables and functions */
int isspace(char test) { return ((test == ' ' || test == '\t')); }


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

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

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

LLVM IR (-O2):
define i32 @isspace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void PrintHeader() { fprintf(stdout, "case\tsignat.\tresult\n"); }


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [21 x i8] c"case\09signat.\09result\0A\00"
define void @PrintHeader() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [21 x i8] c"case\09signat.\09result\0A\00"
define void @PrintHeader() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
float CubicBezierP2(float t, float p) { return 3 * (1 - t) * t * t * p; }


x86 assembly (clang, -O0):
<CubicBezierP2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeee(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
movss  0xedd(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CubicBezierP2>:
movss  0xef8(%rip),%xmm2
subss  %xmm0,%xmm2
mulss  0xef0(%rip),%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @CubicBezierP2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fsub float 1.000000e+00, %5
%7 = fmul float 3.000000e+00, %6
%8 = load float, float* %3
%9 = fmul float %7, %8
%10 = load float, float* %3
%11 = fmul float %9, %10
%12 = load float, float* %4
%13 = fmul float %11, %12
ret float %13
}

LLVM IR (-O2):
define float @CubicBezierP2(float %0, float %1) {
%3 = fsub float 1.000000e+00, %0
%4 = fmul float %3, 3.000000e+00
%5 = fmul float %4, %0
%6 = fmul float %5, %0
%7 = fmul float %6, %1
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ calibrate();
int /*<<< orphan*/ detectjoy();
int /*<<< orphan*/ ginit();
int /*<<< orphan*/ gpal(int /*<<< orphan*/);
int /*<<< orphan*/ inir();
int /*<<< orphan*/ initkeyb();
int /*<<< orphan*/ initsound();
int /*<<< orphan*/ recstart();
int /*<<< orphan*/ setretr(int);
void maininit(void) {
  calibrate();
  ginit();
  gpal(0);
  setretr(-1);
  initkeyb();
  detectjoy();
  inir();
  initsound();
  recstart();
}


x86 assembly (clang, -O0):
<maininit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <calibrate@plt>
mov    $0x0,%al
call   10a0 <ginit@plt>
xor    %edi,%edi
call   1030 <gpal@plt>
mov    $0xffffffff,%edi
call   1090 <setretr@plt>
mov    $0x0,%al
call   1080 <initkeyb@plt>
mov    $0x0,%al
call   1050 <detectjoy@plt>
mov    $0x0,%al
call   1070 <inir@plt>
mov    $0x0,%al
call   10b0 <initsound@plt>
mov    $0x0,%al
call   1040 <recstart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<maininit>:
push   %rax
xor    %eax,%eax
call   1060 <calibrate@plt>
xor    %eax,%eax
call   10a0 <ginit@plt>
xor    %edi,%edi
call   1030 <gpal@plt>
mov    $0xffffffff,%edi
call   1090 <setretr@plt>
xor    %eax,%eax
call   1080 <initkeyb@plt>
xor    %eax,%eax
call   1050 <detectjoy@plt>
xor    %eax,%eax
call   1070 <inir@plt>
xor    %eax,%eax
call   10b0 <initsound@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <recstart@plt>

LLVM IR (-O0):
define void @maininit() {
%1 = call i32 (...) @calibrate()
%2 = call i32 (...) @ginit()
%3 = call i32 @gpal(i32 0)
%4 = call i32 @setretr(i32 -1)
%5 = call i32 (...) @initkeyb()
%6 = call i32 (...) @detectjoy()
%7 = call i32 (...) @inir()
%8 = call i32 (...) @initsound()
%9 = call i32 (...) @recstart()
ret void
}

LLVM IR (-O2):
define void @maininit() {
%1 = tail call i32 (...) @calibrate()
%2 = tail call i32 (...) @ginit()
%3 = tail call i32 @gpal(i32 0)
%4 = tail call i32 @setretr(i32 -1)
%5 = tail call i32 (...) @initkeyb()
%6 = tail call i32 (...) @detectjoy()
%7 = tail call i32 (...) @inir()
%8 = tail call i32 (...) @initsound()
%9 = tail call i32 (...) @recstart()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void tabletButtonCB(int button, int state, int dummy1, int dummy2) {
  printf("tabletButtonCB: button %d, state %d\n", button, state);
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"tabletButtonCB: button %d, state %d\0A\00"
define void @tabletButtonCB(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"tabletButtonCB: button %d, state %d\0A\00"
define void @tabletButtonCB(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gethostname(char *, int);
int strlen(char *);
int _XTransGetHostname(char *buf, int maxlen) {
  int len;
  buf[0] = '\0';
  (void)gethostname(buf, maxlen);
  buf[maxlen - 1] = '\0';
  len = strlen(buf);
  return len;
}


x86 assembly (clang, -O0):
<_XTransGetHostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <gethostname@plt>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_XTransGetHostname>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movb   $0x0,(%rdi)
call   1040 <gethostname@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @_XTransGetHostname(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 0, i8* %7
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @gethostname(i8* %8, i32 %9)
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %3
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %5
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @_XTransGetHostname(i8* %0, i32 %1) {
store i8 0, i8* %0
%3 = tail call i32 @gethostname(i8* %0, i32 %1)
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
%7 = tail call i32 @strlen(i8* %0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void null_world_changed(int x, int y) { printf("change at %d,%d\n", x, y); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"change at %d,%d\0A\00"
define void @null_world_changed(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 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"change at %d,%d\0A\00"
define void @null_world_changed(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ fwriteHex(int /*<<< orphan*/, int);
void writeHex(int v) { fwriteHex(STDOUT_FILENO, v); }


x86 assembly (clang, -O0):
<writeHex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <fwriteHex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeHex>:
mov    %edi,%esi
mov    0x2ed7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fwriteHex@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @writeHex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* %2
%5 = call i32 @fwriteHex(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @writeHex(i32 %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @fwriteHex(i32 %2, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mp2vseqdx_set_color(int /*<<< orphan*/ *);
void mp2vseqdx_set_matrixcoeffs(uint8_t *p_mp2vseqdx, uint8_t i_matrixcoeffs) {
  mp2vseqdx_set_color(p_mp2vseqdx);
  p_mp2vseqdx[7] = i_matrixcoeffs;
}


x86 assembly (clang, -O0):
<mp2vseqdx_set_matrixcoeffs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mp2vseqdx_set_color@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqdx_set_matrixcoeffs>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <mp2vseqdx_set_color@plt>
mov    %ebp,0x1c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @mp2vseqdx_set_matrixcoeffs(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 = call i32 @mp2vseqdx_set_color(i32* %5)
%7 = load i32, i32* %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 7
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @mp2vseqdx_set_matrixcoeffs(i32* %0, i32 %1) {
%3 = tail call i32 @mp2vseqdx_set_color(i32* %0)
%4 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %1, i32* %4
ret void
}
short htons(short value) {
  return ((value >> 8) & 0xff) | ((value & 0xff) << 8);
}


x86 assembly (clang, -O0):
<htons>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movswl -0x2(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<htons>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define signext i16 @htons(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = ashr i32 %4, 8
%6 = and i32 %5, 255
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @htons(i16 signext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ display(int /*<<< orphan*/, int /*<<< orphan*/);
void re_display() { display(0, 0); }


x86 assembly (clang, -O0):
<re_display>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <display@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_display>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <display@plt>

LLVM IR (-O0):
define void @re_display() {
%1 = call i32 @display(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @re_display() {
%1 = tail call i32 @display(i32 0, i32 0)
ret void
}
int abs(int a) {
  if (a < 0)
    return -a;
  return a;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
scalar_t__ sqrt(float const);
float magnitudeVector(const float *u) {
  return (float)(sqrt(u[0] * u[0] + u[1] * u[1] + u[2] * u[2]));
}


x86 assembly (clang, -O0):
<magnitudeVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magnitudeVector>:
push   %rax
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @magnitudeVector(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = load float*, float** %2
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = call float @llvm.fmuladd.f32(float %19, float %22, float %16)
%24 = call i64 @sqrt(float %23)
%25 = sitofp i64 %24 to float
ret float %25
}

LLVM IR (-O2):
define float @magnitudeVector(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call i64 @sqrt(float %9)
%11 = sitofp i64 %10 to float
ret float %11
}
int main(void) {
  extern int f();
  int g();
  return f() + g();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <f@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <g@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @g()
%3 = add nsw i32 %2, %1
ret i32 %3
}