xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct ndarray {
  int dummy;
};
typedef int int8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int stdlib_ndarray_get_ptr_bool(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ *stdlib_ndarray_iget_ptr(struct ndarray const *,
                                            int /*<<< orphan*/ const);
int8_t stdlib_ndarray_iget_bool(const struct ndarray *arr, const int64_t idx,
                                bool *out) {
  uint8_t *ptr = stdlib_ndarray_iget_ptr(arr, idx);
  if (ptr == NULL) {
    return -1;
  }
  return stdlib_ndarray_get_ptr_bool(ptr, out);
}


x86 assembly (clang, -O0):
<stdlib_ndarray_iget_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <stdlib_ndarray_iget_ptr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115a <stdlib_ndarray_iget_bool+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <stdlib_ndarray_iget_bool+0x4a>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <stdlib_ndarray_get_ptr_bool@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_iget_bool>:
push   %rbx
mov    %rdx,%rbx
call   1040 <stdlib_ndarray_iget_ptr@plt>
test   %rax,%rax
je     113a <stdlib_ndarray_iget_bool+0x1a>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <stdlib_ndarray_get_ptr_bool@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ndarray = type { i32 }
define i32 @stdlib_ndarray_iget_bool(%struct.ndarray* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.ndarray*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store %struct.ndarray* %0, %struct.ndarray** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%9 = load %struct.ndarray*, %struct.ndarray** %5
%10 = load i32, i32* %6
%11 = call i32* @stdlib_ndarray_iget_ptr(%struct.ndarray* %9, i32 %10)
store i32* %11, i32** %8
%12 = load i32*, i32** %8
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %4
br label %19
15: ; preds = %3
%16 = load i32*, i32** %8
%17 = load i32*, i32** %7
%18 = call i32 @stdlib_ndarray_get_ptr_bool(i32* %16, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %15, %14
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
%struct.ndarray = type { i32 }
define i32 @stdlib_ndarray_iget_bool(%struct.ndarray* %0, i32 %1, i32* %2) {
%4 = tail call i32* @stdlib_ndarray_iget_ptr(%struct.ndarray* %0, i32 %1)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @stdlib_ndarray_get_ptr_bool(i32* %4, i32* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
int msm8x55_init_modemctl_device(struct modem_ctl *mc,
                                 struct modem_data *pdata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @msm8x55_init_modemctl_device(%struct.modem_ctl* %0, %struct.modem_data* %1) {
%3 = alloca %struct.modem_ctl*
%4 = alloca %struct.modem_data*
store %struct.modem_ctl* %0, %struct.modem_ctl** %3
store %struct.modem_data* %1, %struct.modem_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @msm8x55_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
int indent_tab(int indent) { return (indent | 7) + 1; }


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

x86 assembly (clang, -O2):
<indent_tab>:
or     $0x7,%edi
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @indent_tab(i32 %0) {
%2 = or i32 %0, 7
%3 = add nsw i32 %2, 1
ret i32 %3
}
void fd50(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    a:
      goto a;
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd50>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd50+0x7>

x86 assembly (clang, -O2):
<fd50>:
jmp    1100 <fd50>

LLVM IR (-O0):
define void @fd50(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
br label %17
17: ; preds = %17, %14
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; preds = %42
br label %42
43: ; No predecessors!
%44 = load i32, i32* %2
%45 = zext i32 %44 to i64
br label %46
46: ; preds = %46, %43
br label %46
47: ; preds = %47
br label %47
}

LLVM IR (-O2):
define void @fd50(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
char *ffi_test_15(char *x, char *y) {
  if (strcmp(x, y))
    return "foo";
  else
    return "bar";
}


x86 assembly (clang, -O0):
<ffi_test_15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1147 <ffi_test_15+0x37>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <ffi_test_15+0x42>
lea    0xeb6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffi_test_15>:
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
lea    0xee4(%rip),%rcx
lea    0xed9(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@.str.1 = [4 x i8] c"bar\00"
define i8* @ffi_test_15(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ u;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint64_t double_to_bits(double d) {
  union {
    uint64_t i;
    double d;
  } u;
  assert(8 == sizeof(uint64_t));
  assert(8 == sizeof(double));
  assert(8 == sizeof(u));
  u.d = d;
  return u.i;
}


x86 assembly (clang, -O0):
<double_to_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_bits>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
movq   (%rsp),%xmm0
movq   %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @double_to_bits(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = call i32 @assert(i32 0)
%5 = call i32 @assert(i32 1)
%6 = call i32 @assert(i32 1)
%7 = load double, double* %2
%8 = bitcast %union.anon* %3 to double*
store double %7, double* %8
%9 = bitcast %union.anon* %3 to i32*
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @double_to_bits(double %0) {
%2 = tail call i32 @assert(i32 0)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = bitcast double %0 to i64
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() { printf("usage: disasm filename\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"usage: disasm filename\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"usage: disasm filename\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
void post(int id) {}


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

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

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

LLVM IR (-O2):
define void @post(i32 %0) {
ret void
}
int setupWiringPiI2C(const int devId) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setupWiringPiI2C(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
void LittleEndianWriteU16(uint16_t value, uint8_t *bytes) {
  bytes[0] = (uint8_t)value;
  bytes[1] = (uint8_t)(value >> 8);
}


x86 assembly (clang, -O0):
<LittleEndianWriteU16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LittleEndianWriteU16>:
movslq %edi,%rax
mov    %rax,(%rsi)
sar    $0x8,%eax
cltq
mov    %rax,0x8(%rsi)
ret

LLVM IR (-O0):
define void @LittleEndianWriteU16(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64 %6, i64* %8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = sext i32 %10 to i64
%12 = load i64*, i64** %4
%13 = getelementptr inbounds i64, i64* %12, i64 1
store i64 %11, i64* %13
ret void
}

LLVM IR (-O2):
define void @LittleEndianWriteU16(i32 %0, i64* nocapture writeonly %1) {
%3 = sext i32 %0 to i64
store i64 %3, i64* %1
%4 = ashr i32 %0, 8
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* %1, i64 1
store i64 %5, i64* %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmple_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmple_ss(__m128 __a, __m128 __b) {
  return _mm_cmple_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmple_ss>:
jmp    1030 <_mm_cmple_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmple_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmple_ss(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int32_t GSM_SUB(int16_t a, int16_t b) {
  int32_t ltmp;
  ltmp = ((int32_t)a) - ((int32_t)b);
  if (ltmp >= 32767)
    ltmp = 32767;
  else if (ltmp <= (-32767 - 1))
    ltmp = (-32767 - 1);
  return ltmp;
}


x86 assembly (clang, -O0):
<GSM_SUB>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x7fff,-0x14(%rbp)
jl     1132 <GSM_SUB+0x32>
movl   $0x7fff,-0x14(%rbp)
jmp    114b <GSM_SUB+0x4b>
cmpl   $0xffff8000,-0x14(%rbp)
jg     1146 <GSM_SUB+0x46>
movl   $0xffff8000,-0x14(%rbp)
jmp    114b <GSM_SUB+0x4b>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSM_SUB>:
sub    %esi,%edi
cmp    $0xffff8001,%edi
mov    $0xffff8000,%ecx
cmovge %edi,%ecx
cmp    $0x7fff,%ecx
mov    $0x7fff,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @GSM_SUB(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = sub nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sge i32 %11, 32767
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 32767, i32* %5
br label %19
14: ; preds = %2
%15 = load i32, i32* %5
%16 = icmp sle i32 %15, -32768
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 -32768, i32* %5
br label %18
18: ; preds = %17, %14
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @GSM_SUB(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub nsw i32 %3, %4
%6 = icmp sgt i32 %5, -32768
%7 = select i1 %6, i32 %5, i32 -32768
%8 = icmp slt i32 %7, 32767
%9 = select i1 %8, i32 %7, i32 32767
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void pa_xfree(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @pa_xfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
long sex_change(long number) {
  long b0, b1, b2, b3;
  b0 = number & 255L;
  number >>= 8L;
  b1 = number & 255L;
  number >>= 8L;
  b2 = number & 255L;
  number >>= 8L;
  b3 = number & 255L;
  number = b0;
  number <<= 8L;
  number = number | b1;
  number <<= 8L;
  number = number | b2;
  number <<= 8L;
  number = number | b3;
  return (number);
}


x86 assembly (clang, -O0):
<sex_change>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sex_change>:
mov    %rdi,%rax
bswap  %eax
ret

LLVM IR (-O0):
define i64 @sex_change(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %2
%7 = load i64, i64* %2
%8 = and i64 %7, 255
store i64 %8, i64* %3
%9 = load i64, i64* %2
%10 = ashr i64 %9, 8
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = and i64 %11, 255
store i64 %12, i64* %4
%13 = load i64, i64* %2
%14 = ashr i64 %13, 8
store i64 %14, i64* %2
%15 = load i64, i64* %2
%16 = and i64 %15, 255
store i64 %16, i64* %5
%17 = load i64, i64* %2
%18 = ashr i64 %17, 8
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = and i64 %19, 255
store i64 %20, i64* %6
%21 = load i64, i64* %3
store i64 %21, i64* %2
%22 = load i64, i64* %2
%23 = shl i64 %22, 8
store i64 %23, i64* %2
%24 = load i64, i64* %2
%25 = load i64, i64* %4
%26 = or i64 %24, %25
store i64 %26, i64* %2
%27 = load i64, i64* %2
%28 = shl i64 %27, 8
store i64 %28, i64* %2
%29 = load i64, i64* %2
%30 = load i64, i64* %5
%31 = or i64 %29, %30
store i64 %31, i64* %2
%32 = load i64, i64* %2
%33 = shl i64 %32, 8
store i64 %33, i64* %2
%34 = load i64, i64* %2
%35 = load i64, i64* %6
%36 = or i64 %34, %35
store i64 %36, i64* %2
%37 = load i64, i64* %2
ret i64 %37
}

LLVM IR (-O2):
define i64 @sex_change(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
struct bwb_line *bwb_QUEST(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  return bwb_PRINT(l);
}


x86 assembly (clang, -O0):
<bwb_QUEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <bwb_PRINT@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_QUEST>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <bwx_DEBUG@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <bwb_PRINT@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_QUEST = [10 x i8] c"bwb_QUEST\00"
define %struct.bwb_line* @bwb_QUEST(%struct.bwb_line* %0) {
%2 = alloca %struct.bwb_line*
store %struct.bwb_line* %0, %struct.bwb_line** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.bwb_QUEST, i64 0, i64 0))
%4 = load %struct.bwb_line*, %struct.bwb_line** %2
%5 = call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_PRINT to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.bwb_line*
ret %struct.bwb_line* %7
}

LLVM IR (-O2):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_QUEST = [10 x i8] c"bwb_QUEST\00"
define %struct.bwb_line* @bwb_QUEST(%struct.bwb_line* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.bwb_QUEST, i64 0, i64 0))
%3 = tail call i32 (%struct.bwb_line*, ...) bitcast (i32 (...)* @bwb_PRINT to i32 (%struct.bwb_line*, ...)*)(%struct.bwb_line* %0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.bwb_line*
ret %struct.bwb_line* %5
}
int((generic_notification_ind_receive))(struct ss7 *ss7, struct isup_call *c,
                                        int messagetype, unsigned char *parm,
                                        int len) {
  return len;
}


x86 assembly (clang, -O0):
<generic_notification_ind_receive>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_notification_ind_receive>:
mov    %r8d,%eax
ret

LLVM IR (-O0):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @generic_notification_ind_receive(%struct.ss7* %0, %struct.isup_call* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca %struct.ss7*
%7 = alloca %struct.isup_call*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store %struct.ss7* %0, %struct.ss7** %6
store %struct.isup_call* %1, %struct.isup_call** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @generic_notification_ind_receive(%struct.ss7* nocapture readnone %0, %struct.isup_call* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 returned %4) {
ret i32 %4
}
void wifi_rsp_ethernet_connected(
    const struct wifi_msg_ethernet_connected_rsp_t *msg) {}


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

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

LLVM IR (-O0):
%struct.wifi_msg_ethernet_connected_rsp_t = type opaque
define void @wifi_rsp_ethernet_connected(%struct.wifi_msg_ethernet_connected_rsp_t* %0) {
%2 = alloca %struct.wifi_msg_ethernet_connected_rsp_t*
store %struct.wifi_msg_ethernet_connected_rsp_t* %0, %struct.wifi_msg_ethernet_connected_rsp_t** %2
ret void
}

LLVM IR (-O2):
%struct.wifi_msg_ethernet_connected_rsp_t = type opaque
define void @wifi_rsp_ethernet_connected(%struct.wifi_msg_ethernet_connected_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isalpha(int);
int is_scheme_char(int c) {
  return (!isalpha(c) && '+' != c && '-' != c && '.' != c) ? 0 : 1;
}


x86 assembly (clang, -O0):
<is_scheme_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalpha@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1167 <is_scheme_char+0x57>
xor    %eax,%eax
mov    $0x2b,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
je     1167 <is_scheme_char+0x57>
xor    %eax,%eax
mov    $0x2d,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
je     1167 <is_scheme_char+0x57>
mov    $0x2e,%eax
cmp    -0x4(%rbp),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_scheme_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1125 <is_scheme_char+0x15>
pop    %rbx
ret
cmp    $0x2b,%ebx
je     1123 <is_scheme_char+0x13>
cmp    $0x2d,%ebx
je     1123 <is_scheme_char+0x13>
xor    %eax,%eax
cmp    $0x2e,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_scheme_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isalpha(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 43, %7
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp ne i32 45, %10
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp ne i32 46, %13
br label %15
15: ; preds = %12, %9, %6, %1
%16 = phi i1 [ false, %9 ], [ false, %6 ], [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 0, i32 1
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_scheme_char(i32 %0) {
%2 = tail call i32 @isalpha(i32 %0)
%3 = freeze i32 %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 45, label %9
i32 43, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 46
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void doThatArgThing(int argc, char *argv[]) {
  int i;
  char *buffer;
  for (i = 0; i < argc; i++) {
    printf("argument %i = %s\n", i, argv[i]);
  }
}


x86 assembly (clang, -O0):
<doThatArgThing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <doThatArgThing+0x4b>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <doThatArgThing+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doThatArgThing>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <doThatArgThing+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <doThatArgThing+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"argument %i = %s\0A\00"
define void @doThatArgThing(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %5
%13 = load i8**, i8*** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %7
22: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"argument %i = %s\0A\00"
define void @doThatArgThing(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
void I422ToARGB4444Row_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGB4444Row_SSSE3() {
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  i = 0;
  if (!s || !f)
    return;
  while (s[i]) {
    f(i, s + i);
    ++i;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112d <ft_striteri+0x2d>
cmpq   $0x0,-0x10(%rbp)
jne    1132 <ft_striteri+0x32>
jmp    1169 <ft_striteri+0x69>
jmp    1137 <ft_striteri+0x37>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1169 <ft_striteri+0x69>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <ft_striteri+0x37>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
test   %rsi,%rsi
je     1133 <ft_striteri+0x33>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
xor    %ebx,%ebx
mov    %r15,%rsi
nop
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %14, %9 ], [ %0, %6 ]
%11 = phi i32 [ %12, %9 ], [ 0, %6 ]
tail call void %1(i32 %11, i8* %10)
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die_perror(const char *msg) {
  perror(msg);
  die(0);
}


x86 assembly (clang, -O0):
<die_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
xor    %edi,%edi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die_perror>:
push   %rax
call   1040 <perror@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <die@plt>

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

LLVM IR (-O2):
define void @die_perror(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @die(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
void mpu_ll_set_region_rwx(uint32_t addr) { abort(); }


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

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

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

LLVM IR (-O2):
define void @mpu_ll_set_region_rwx(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct FormaGeometrica {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void disegnati_Triangolo(const struct FormaGeometrica *buttalo) {
  printf("disegno un triangolo\n");
}


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

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

LLVM IR (-O0):
%struct.FormaGeometrica = type { i32 }
@.str = [22 x i8] c"disegno un triangolo\0A\00"
define void @disegnati_Triangolo(%struct.FormaGeometrica* %0) {
%2 = alloca %struct.FormaGeometrica*
store %struct.FormaGeometrica* %0, %struct.FormaGeometrica** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.FormaGeometrica = type { i32 }
@str = [21 x i8] c"disegno un triangolo\00"
define void @disegnati_Triangolo(%struct.FormaGeometrica* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int INT_MIN;
int test4(int x) {
  int y = INT_MIN;
  return ~(x ^ y);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
xor    (%rcx),%eax
not    %eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @test4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @INT_MIN
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = xor i32 %5, %6
%8 = xor i32 %7, -1
ret i32 %8
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @test4(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = xor i32 %2, %0
%4 = xor i32 %3, -1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_least64_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_uint_least64_t(uint_least64_t *const dest) {
  (void)dest;
}


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_uint_least64_t(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void esock_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @esock_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
size_t get_shell_sl(size_t shell_idx) {
  static const size_t sl[] = {1, 2, 2, 3, 4};
  return sl[shell_idx];
}


x86 assembly (clang, -O0):
<get_shell_sl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xeed(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shell_sl>:
lea    0xef9(%rip),%rax
mov    (%rax,%rdi,8),%rax
ret

LLVM IR (-O0):
@get_shell_sl.sl = internal constant [5 x i64] [i64 1, i64 2, i64 2, i64 3, i64 4]
define i64 @get_shell_sl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = getelementptr inbounds [5 x i64], [5 x i64]* @get_shell_sl.sl, i64 0, i64 %3
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
@get_shell_sl.sl = internal unnamed_addr constant [5 x i64] [i64 1, i64 2, i64 2, i64 3, i64 4]
define i64 @get_shell_sl(i64 %0) {
%2 = getelementptr inbounds [5 x i64], [5 x i64]* @get_shell_sl.sl, i64 0, i64 %0
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void set_moter_voltage(int voltage) {
  printf("INFO: program is attacked but with protection!\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"INFO: program is attacked but with protection!\0A\00"
define void @set_moter_voltage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"INFO: program is attacked but with protection!\00"
define void @set_moter_voltage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int anetUnixGenericConnect(char *, char *, int /*<<< orphan*/);
int kr_net_unix_connect(char *err, char *path) {
  return anetUnixGenericConnect(err, path, 0);
}


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

x86 assembly (clang, -O2):
<kr_net_unix_connect>:
xor    %edx,%edx
jmp    1030 <anetUnixGenericConnect@plt>

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

LLVM IR (-O2):
define i32 @kr_net_unix_connect(i8* %0, i8* %1) {
%3 = tail call i32 @anetUnixGenericConnect(i8* %0, i8* %1, i32 0)
ret i32 %3
}
int fun_5() { return 5; }


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

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

LLVM IR (-O0):
define i32 @fun_5() {
ret i32 5
}

LLVM IR (-O2):
define i32 @fun_5() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ __print_str(char **);
int /*<<< orphan*/ __print_sw_title(char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    __print_sw_title(argv[0]);
    return -1;
  } else {
    __print_str(argv);
  }
  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)
cmpl   $0x2,-0x8(%rbp)
je     1158 <main+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <__print_sw_title@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <main+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <__print_str@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1132 <main+0x12>
mov    %rsi,%rdi
call   1030 <__print_str@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    (%rsi),%rdi
call   1040 <__print_sw_title@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @__print_sw_title(i8* %11)
store i32 -1, i32* %3
br label %17
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = call i32 @__print_str(i8** %14)
br label %16
16: ; preds = %13
store i32 0, i32* %3
br label %17
17: ; preds = %16, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @__print_sw_title(i8* %5)
br label %9
7: ; preds = %2
%8 = tail call i32 @__print_str(i8** %1)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ -1, %4 ], [ 0, %7 ]
ret i32 %10
}
/* Variables and functions */
double const sin(double const);
double necro_sinc(const double x) {
  if (x > -1.0E-5 && x < 1.0E-5)
    return (1.0);
  return sin(x) / x;
}


x86 assembly (clang, -O0):
<necro_sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1159 <necro_sinc+0x49>
movsd  0xecc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1159 <necro_sinc+0x49>
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116d <necro_sinc+0x5d>
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<necro_sinc>:
push   %rax
ucomisd 0xee7(%rip),%xmm0
jbe    1133 <necro_sinc+0x23>
movsd  0xeed(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1133 <necro_sinc+0x23>
movsd  0xed7(%rip),%xmm0
pop    %rax
ret
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @necro_sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, -1.000000e-05
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp olt double %7, 1.000000e-05
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %15
10: ; preds = %6, %1
%11 = load double, double* %3
%12 = call double @sin(double %11)
%13 = load double, double* %3
%14 = fdiv double %12, %13
store double %14, double* %2
br label %15
15: ; preds = %10, %9
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @necro_sinc(double %0) {
%2 = fcmp ogt double %0, -1.000000e-05
%3 = fcmp olt double %0, 1.000000e-05
%4 = and i1 %2, %3
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call double @sin(double %0)
%7 = fdiv double %6, %0
br label %8
8: ; preds = %1, %5
%9 = phi double [ %7, %5 ], [ 1.000000e+00, %1 ]
ret double %9
}
double calc_s(int rank_i, int rank_j) {
  if (rank_i < rank_j) {
    return 1.0;
  } else if (rank_i == rank_j) {
    return 0.5;
  } else {
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<calc_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1128 <calc_s+0x28>
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114e <calc_s+0x4e>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1146 <calc_s+0x46>
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114e <calc_s+0x4e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_s>:
cmp    %esi,%edi
je     110b <calc_s+0xb>
xorps  %xmm0,%xmm0
jl     1115 <calc_s+0x15>
jmp    111d <calc_s+0x1d>
movsd  0xeed(%rip),%xmm0
jge    111d <calc_s+0x1d>
movsd  0xeeb(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calc_s(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store double 1.000000e+00, double* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store double 5.000000e-01, double* %3
br label %16
15: ; preds = %10
store double 0.000000e+00, double* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @calc_s(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = icmp eq i32 %0, %1
%5 = select i1 %4, double 5.000000e-01, double 0.000000e+00
%6 = select i1 %3, double 1.000000e+00, double %5
ret double %6
}
int foo(unsigned int x) { return ((int)x < 0) || ((int)(-x) < 0); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1124 <foo+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void print_float(void *float_val) { printf("%f", *(float *)float_val); }


x86 assembly (clang, -O0):
<print_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_float>:
movss  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @print_float(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to float*
%5 = load float, float* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @print_float(i8* nocapture %0) {
%2 = bitcast i8* %0 to float*
%3 = load float, float* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}
float dot3_neon_hfp(float v0[3], float v1[3]) {}


x86 assembly (clang, -O0):
<dot3_neon_hfp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @dot3_neon_hfp(float* nocapture readnone %0, float* nocapture readnone %1) {
ret float undef
}