xunge/DecIR huggingface dataset:
void my_swap(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

x86 assembly (clang, -O2):
<my_swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @my_swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @my_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_abs_epi8(int /*<<< orphan*/);
__m256i __attribute__((__target__("avx2"))) mm256_abs_epi8_wrap(__m256i a) {
  return _mm256_abs_epi8(a);
}


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

x86 assembly (clang, -O2):
<mm256_abs_epi8_wrap>:
jmp    1030 <_mm256_abs_epi8@plt>

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

LLVM IR (-O2):
define i32 @mm256_abs_epi8_wrap(i32 %0) {
%2 = tail call i32 @_mm256_abs_epi8(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ lookahead_litteral(char *);
int read_litteral(char *);
int parse_pipe_operator() {
  if (!lookahead_litteral("||"))
    return read_litteral("|");
  return 0;
}


x86 assembly (clang, -O0):
<parse_pipe_operator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <lookahead_litteral@plt>
cmp    $0x0,%eax
jne    1151 <parse_pipe_operator+0x31>
lea    0xebd(%rip),%rdi
call   1030 <read_litteral@plt>
mov    %eax,-0x4(%rbp)
jmp    1158 <parse_pipe_operator+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_pipe_operator>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <lookahead_litteral@plt>
test   %eax,%eax
je     1135 <parse_pipe_operator+0x15>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec5(%rip),%rdi
pop    %rax
jmp    1030 <read_litteral@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"||\00"
@.str.1 = [2 x i8] c"|\00"
define i32 @parse_pipe_operator() {
%1 = alloca i32
%2 = call i32 @lookahead_litteral(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @read_litteral(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 %5, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"||\00"
@.str.1 = [2 x i8] c"|\00"
define i32 @parse_pipe_operator() {
%1 = tail call i32 @lookahead_litteral(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @read_litteral(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ sysv_signal(int /*<<< orphan*/, int /*<<< orphan*/);
void ignore_signals() { (void)sysv_signal(SIGINT, SIG_IGN); }


x86 assembly (clang, -O0):
<ignore_signals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
call   1030 <sysv_signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_signals>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sysv_signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
define void @ignore_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @sysv_signal(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
define void @ignore_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @sysv_signal(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ exp2l(long double);
double cents2interv(double cents) {
  return (double)exp2l((long double)cents / (long double)1200.0);
}


x86 assembly (clang, -O0):
<cents2interv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
flds   0xeda(%rip)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <exp2l@plt>
cvtsi2sd %rax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cents2interv>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
fdivs  0xedc(%rip)
fstpt  (%rsp)
call   1030 <exp2l@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @cents2interv(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fpext double %3 to x86_fp80
%5 = fdiv x86_fp80 %4, 0xK40099600000000000000
%6 = call i64 @exp2l(x86_fp80 %5)
%7 = sitofp i64 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @cents2interv(double %0) {
%2 = fpext double %0 to x86_fp80
%3 = fdiv x86_fp80 %2, 0xK40099600000000000000
%4 = tail call i64 @exp2l(x86_fp80 %3)
%5 = sitofp i64 %4 to double
ret double %5
}
int test3_i(int *x) { return 42; }


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

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

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

LLVM IR (-O2):
define i32 @test3_i(i32* nocapture readnone %0) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  while (1) {
    int x = __VERIFIER_nondet_int();
    if (x == 0) {
      __VERIFIER_assert(x == 0);
    } else if (x == 2) {
      __VERIFIER_assert(x == 2);
    } else {
      __VERIFIER_assert(x != 1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1159 <main+0x39>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
jmp    118f <main+0x6f>
cmpl   $0x2,-0x8(%rbp)
jne    1179 <main+0x59>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
jmp    118a <main+0x6a>
cmpl   $0x1,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
jmp    118f <main+0x6f>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
jmp    1135 <main+0x15>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x1,%edi
test   $0xfffffffd,%eax
je     1130 <main+0x10>
xor    %edi,%edi
cmp    $0x1,%eax
setne  %dil
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %26
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @__VERIFIER_assert(i32 %10)
br label %26
12: ; preds = %3
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 2
%18 = zext i1 %17 to i32
%19 = call i32 @__VERIFIER_assert(i32 %18)
br label %25
20: ; preds = %12
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 1
%23 = zext i1 %22 to i32
%24 = call i32 @__VERIFIER_assert(i32 %23)
br label %25
25: ; preds = %20, %15
br label %26
26: ; preds = %25, %7
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %6
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
switch i32 %2, label %3 [
i32 0, label %6
i32 2, label %6
]
3: ; preds = %1
%4 = icmp ne i32 %2, 1
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %1, %1, %3
%7 = phi i32 [ %5, %3 ], [ 1, %1 ], [ 1, %1 ]
%8 = tail call i32 @__VERIFIER_assert(i32 %7)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f13(unsigned int a, unsigned int b) {
  if (a <= 4)
    if ((a / b) == 5)
      link_error();
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x4,-0x4(%rbp)
ja     1145 <f13+0x35>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x5,%eax
jne    1140 <f13+0x30>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1145 <f13+0x35>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f13(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 = icmp ule i32 %5, 4
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = udiv i32 %8, %9
%11 = icmp eq i32 %10, 5
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 (...) @link_error()
br label %14
14: ; preds = %12, %7
br label %15
15: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @f13(i32 %0, i32 %1) {
ret void
}
int fits_bits(int x, int n) {
  int count = (sizeof(int) << 3) - n;
  int leftright = (x << count) >> count;
  return x == leftright;
}


x86 assembly (clang, -O0):
<fits_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
mov    $0x20,%eax
sub    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fits_bits>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%edx
shl    %cl,%edx
sar    %cl,%edx
xor    %eax,%eax
cmp    %edi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @fits_bits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = sub i64 32, %8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = shl i32 %11, %12
%14 = load i32, i32* %5
%15 = ashr i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %3
%17 = load i32, i32* %6
%18 = icmp eq i32 %16, %17
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @fits_bits(i32 %0, i32 %1) {
%3 = sub i32 32, %1
%4 = shl i32 %0, %3
%5 = ashr i32 %4, %3
%6 = icmp eq i32 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct geometry_struct {
  int dummy;
};

/* Variables and functions */
int mesh_A_within_B(struct geometry_struct *, struct geometry_struct *);
int mesh_within_mesh(struct geometry_struct *geometry_child,
                     struct geometry_struct *geometry_parent) {
  return mesh_A_within_B(geometry_child, geometry_parent);
}


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

x86 assembly (clang, -O2):
<mesh_within_mesh>:
jmp    1030 <mesh_A_within_B@plt>

LLVM IR (-O0):
%struct.geometry_struct = type { i32 }
define i32 @mesh_within_mesh(%struct.geometry_struct* %0, %struct.geometry_struct* %1) {
%3 = alloca %struct.geometry_struct*
%4 = alloca %struct.geometry_struct*
store %struct.geometry_struct* %0, %struct.geometry_struct** %3
store %struct.geometry_struct* %1, %struct.geometry_struct** %4
%5 = load %struct.geometry_struct*, %struct.geometry_struct** %3
%6 = load %struct.geometry_struct*, %struct.geometry_struct** %4
%7 = call i32 @mesh_A_within_B(%struct.geometry_struct* %5, %struct.geometry_struct* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.geometry_struct = type { i32 }
define i32 @mesh_within_mesh(%struct.geometry_struct* %0, %struct.geometry_struct* %1) {
%3 = tail call i32 @mesh_A_within_B(%struct.geometry_struct* %0, %struct.geometry_struct* %1)
ret i32 %3
}
/* Variables and functions */
int smbw_chdir(char *);
int chdir(char *name) { return smbw_chdir(name); }


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

x86 assembly (clang, -O2):
<chdir>:
jmp    1030 <smbw_chdir@plt>

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

LLVM IR (-O2):
define i32 @chdir(i8* %0) {
%2 = tail call i32 @smbw_chdir(i8* %0)
ret i32 %2
}
__attribute__((no, noclone)) unsigned __int128 t110_1sub(unsigned char x,
                                                         unsigned char y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t110_1sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
mov    %eax,%edx
movzbl -0x12(%rbp),%eax
xor    %ecx,%ecx
sub    %rax,%rdx
sbb    %rcx,%rcx
setb   %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    114e <t110_1sub+0x3e>
jmp    1155 <t110_1sub+0x45>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t110_1sub>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
mov    %esi,%eax
xor    %ebx,%ebx
sub    %rax,%r14
sbb    %rbx,%rbx
jae    112a <t110_1sub+0x1a>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t110_1sub(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i128
%4 = alloca i8
%5 = alloca i8
%6 = alloca i128
store i8 %0, i8* %4
store i8 %1, i8* %5
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = zext i8 %7 to i128
%10 = zext i8 %8 to i128
%11 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %9, i128 %10)
%12 = extractvalue { i128, i1 } %11, 1
%13 = extractvalue { i128, i1 } %11, 0
store i128 %13, i128* %6
br i1 %12, label %14, label %16
14: ; preds = %2
%15 = call i32 (...) @bar()
br label %16
16: ; preds = %14, %2
%17 = load i128, i128* %6
store i128 %17, i128* %3
%18 = bitcast i128* %3 to { i64, i64 }*
%19 = load { i64, i64 }, { i64, i64 }* %18
ret { i64, i64 } %19
}

LLVM IR (-O2):
define { i64, i64 } @t110_1sub(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i128
%4 = zext i8 %1 to i128
%5 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %3, i128 %4)
%6 = extractvalue { i128, i1 } %5, 1
%7 = extractvalue { i128, i1 } %5, 0
br i1 %6, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (...) @bar()
br label %10
10: ; preds = %8, %2
%11 = trunc i128 %7 to i64
%12 = lshr i128 %7, 64
%13 = trunc i128 %12 to i64
%14 = insertvalue { i64, i64 } poison, i64 %11, 0
%15 = insertvalue { i64, i64 } %14, i64 %13, 1
ret { i64, i64 } %15
}
void *i1cp(void *key) {
  int *newkey = malloc(sizeof(int));
  newkey[0] = ((int *)key)[0];
  return newkey;
}


x86 assembly (clang, -O0):
<i1cp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i1cp>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    (%rbx),%ecx
mov    %ecx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @i1cp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i8* @malloc(i64 4)
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32*, i32** %3
%13 = bitcast i32* %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @i1cp(i8* nocapture %0) {
%2 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%3 = bitcast i8* %2 to i32*
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ MainMenu();
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("**********************************************************");
  puts("* Welcome to the LeddarOne Serial Demonstration Program! *");
  puts("**********************************************************");
  MainMenu();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <MainMenu@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <MainMenu@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [59 x i8] c"**********************************************************\00"
@.str.1 = [59 x i8] c"* Welcome to the LeddarOne Serial Demonstration Program! *\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @MainMenu()
ret i32 0
}

LLVM IR (-O2):
@.str = [59 x i8] c"**********************************************************\00"
@.str.1 = [59 x i8] c"* Welcome to the LeddarOne Serial Demonstration Program! *\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @MainMenu()
ret i32 0
}
void free_mat2D_int(int **mat2D_int, int x) {
  unsigned int i;
  for (i = 0; i < x; ++i)
    free(mat2D_int[i]);
  free(mat2D_int);
}


x86 assembly (clang, -O0):
<free_mat2D_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1150 <free_mat2D_int+0x40>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_mat2D_int+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @free_mat2D_int(i32** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
void f4() {
  extern int g10;
  extern int g10;
}


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

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

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

LLVM IR (-O2):
define void @f4() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ dec();
int /*<<< orphan*/ inc();
void *thr1(void *arg) {
  int r = __VERIFIER_nondet_int();
  if (r) {
    inc();
  } else {
    dec();
  }
  return 0;
}


x86 assembly (clang, -O0):
<thr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115c <thr1+0x2c>
mov    $0x0,%al
call   1050 <inc@plt>
jmp    1163 <thr1+0x33>
mov    $0x0,%al
call   1030 <dec@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr1>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1145 <thr1+0x15>
xor    %eax,%eax
call   1050 <inc@plt>
jmp    114c <thr1+0x1c>
xor    %eax,%eax
call   1030 <dec@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thr1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @inc()
br label %11
9: ; preds = %1
%10 = call i32 (...) @dec()
br label %11
11: ; preds = %9, %7
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thr1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @inc()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @dec()
br label %8
8: ; preds = %6, %4
ret i8* null
}
/* Variables and functions */
unsigned char VIM_HAPI_InitVc05x();
unsigned char V5H_Init_568(void) { return (VIM_HAPI_InitVc05x()); }


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

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

LLVM IR (-O0):
define zeroext i8 @V5H_Init_568() {
%1 = call zeroext i8 (...) @VIM_HAPI_InitVc05x()
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @V5H_Init_568() {
%1 = tail call zeroext i8 (...) @VIM_HAPI_InitVc05x()
ret i8 %1
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_link_two(struct Node *, struct Node *);
void list_link_three(struct Node *_1, struct Node *_2, struct Node *_3) {
  list_link_two(_1, _2);
  list_link_two(_2, _3);
}


x86 assembly (clang, -O0):
<list_link_three>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <list_link_two@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <list_link_two@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_link_three>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <list_link_two@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <list_link_two@plt>

LLVM IR (-O0):
%struct.Node = type { i32 }
define void @list_link_three(%struct.Node* %0, %struct.Node* %1, %struct.Node* %2) {
%4 = alloca %struct.Node*
%5 = alloca %struct.Node*
%6 = alloca %struct.Node*
store %struct.Node* %0, %struct.Node** %4
store %struct.Node* %1, %struct.Node** %5
store %struct.Node* %2, %struct.Node** %6
%7 = load %struct.Node*, %struct.Node** %4
%8 = load %struct.Node*, %struct.Node** %5
%9 = call i32 @list_link_two(%struct.Node* %7, %struct.Node* %8)
%10 = load %struct.Node*, %struct.Node** %5
%11 = load %struct.Node*, %struct.Node** %6
%12 = call i32 @list_link_two(%struct.Node* %10, %struct.Node* %11)
ret void
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @list_link_three(%struct.Node* %0, %struct.Node* %1, %struct.Node* %2) {
%4 = tail call i32 @list_link_two(%struct.Node* %0, %struct.Node* %1)
%5 = tail call i32 @list_link_two(%struct.Node* %1, %struct.Node* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ max_f(float, float);
float min_f(int /*<<< orphan*/, float);
float clamp_f(float val, float min, float max) {
  return min_f(max_f(val, min), max);
}


x86 assembly (clang, -O0):
<clamp_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <max_f@plt>
mov    %eax,%edi
movss  -0xc(%rbp),%xmm0
call   1030 <min_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_f>:
push   %rax
movss  %xmm2,0x4(%rsp)
call   1040 <max_f@plt>
mov    %eax,%edi
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <min_f@plt>

LLVM IR (-O0):
define float @clamp_f(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = call i32 @max_f(float %7, float %8)
%10 = load float, float* %6
%11 = call float @min_f(i32 %9, float %10)
ret float %11
}

LLVM IR (-O2):
define float @clamp_f(float %0, float %1, float %2) {
%4 = tail call i32 @max_f(float %0, float %1)
%5 = tail call float @min_f(i32 %4, float %2)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int TestCFlags(char *m) {
  strcpy(m, "CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file.");
  return 0;
  return 1;
}


x86 assembly (clang, -O0):
<TestCFlags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestCFlags>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file.\00"
define i32 @TestCFlags(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [56 x i8] c"CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file.\00"
define i32 @TestCFlags(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct sbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sbuf_addf(struct sbuf *, char *, int);
int /*<<< orphan*/ sbuf_addstr(struct sbuf *, char *);
void desc_count(struct sbuf *s, int n) {
  if (n == 1) {
    sbuf_addstr(s, "an ");
  } else {
    sbuf_addf(s, "%d ", n);
  }
}


x86 assembly (clang, -O0):
<desc_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    114e <desc_count+0x2e>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <sbuf_addstr@plt>
jmp    1161 <desc_count+0x41>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xea8(%rip),%rsi
call   1040 <sbuf_addf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<desc_count>:
cmp    $0x1,%esi
jne    1131 <desc_count+0x11>
lea    0xed4(%rip),%rsi
jmp    1030 <sbuf_addstr@plt>
mov    %esi,%edx
lea    0xeca(%rip),%rsi
jmp    1040 <sbuf_addf@plt>

LLVM IR (-O0):
%struct.sbuf = type { i32 }
@.str = [4 x i8] c"an \00"
@.str.1 = [4 x i8] c"%d \00"
define void @desc_count(%struct.sbuf* %0, i32 %1) {
%3 = alloca %struct.sbuf*
%4 = alloca i32
store %struct.sbuf* %0, %struct.sbuf** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.sbuf*, %struct.sbuf** %3
%9 = call i32 @sbuf_addstr(%struct.sbuf* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %14
10: ; preds = %2
%11 = load %struct.sbuf*, %struct.sbuf** %3
%12 = load i32, i32* %4
%13 = call i32 @sbuf_addf(%struct.sbuf* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
%struct.sbuf = type { i32 }
@.str = [4 x i8] c"an \00"
@.str.1 = [4 x i8] c"%d \00"
define void @desc_count(%struct.sbuf* %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @sbuf_addstr(%struct.sbuf* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 @sbuf_addf(%struct.sbuf* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ sleep(int);
int main(void) {
  switch (fork()) {
  case -1:
    exit(EXIT_FAILURE);
  case 0:
    sleep(2);
    return 0;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1050 <fork@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0xffffffff,%eax
je     1169 <main+0x39>
jmp    1159 <main+0x29>
mov    -0x8(%rbp),%eax
test   %eax,%eax
je     1177 <main+0x47>
jmp    118d <main+0x5d>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
movl   $0x0,-0x4(%rbp)
jmp    1194 <main+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1156 <main+0x26>
mov    $0x1,%ebx
cmp    $0xffffffff,%eax
jne    1160 <main+0x30>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fork()
switch i32 %2, label %8 [
i32 -1, label %3
i32 0, label %6
]
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = call i32 @sleep(i32 2)
store i32 0, i32* %1
br label %9
8: ; preds = %0
store i32 1, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %7 [
i32 -1, label %2
i32 0, label %5
]
2: ; preds = %0
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
5: ; preds = %0
%6 = tail call i32 @sleep(i32 2)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ 0, %5 ], [ 1, %0 ]
ret i32 %8
}
unsigned int sigutils_abi_version(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @sigutils_abi_version() {
ret i32 1
}
/* Variables and functions */
int strcpy(char *dst, char *src) {
  char *ct, *cs;
  ct = dst;
  cs = src;
  while (*ct++ = *cs++)
    ;
  return (0);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     114b <strcpy+0x4b>
jmp    111c <strcpy+0x1c>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
br label %9
9: ; preds = %16, %2
%10 = load i8*, i8** %6
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %6
%12 = load i8, i8* %10
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %5
store i8 %12, i8* %13
%15 = icmp ne i8 %12, 0
br i1 %15, label %16, label %17
16: ; preds = %9
br label %9
17: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 0
}
int test_imm_71int32_reg(int val) { return ((val) & (0x71 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_71int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x71,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_71int32_reg>:
test   $0x71,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_71int32_reg(i32 %0) {
%2 = and i32 %0, 113
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ScrollPlayfieldIfNeededExt(int /*<<< orphan*/);
void ScrollPlayfieldIfNeeded() { ScrollPlayfieldIfNeededExt(0); }


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

x86 assembly (clang, -O2):
<ScrollPlayfieldIfNeeded>:
xor    %edi,%edi
jmp    1030 <ScrollPlayfieldIfNeededExt@plt>

LLVM IR (-O0):
define void @ScrollPlayfieldIfNeeded() {
%1 = call i32 @ScrollPlayfieldIfNeededExt(i32 0)
ret void
}

LLVM IR (-O2):
define void @ScrollPlayfieldIfNeeded() {
%1 = tail call i32 @ScrollPlayfieldIfNeededExt(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_uimatrix(uint **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m[nrl] + ncl - 0));
  free((char *)(m + nrl - 0));
}


x86 assembly (clang, -O0):
<free_uimatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_uimatrix>:
push   %rbx
lea    (%rdi,%rsi,8),%rbx
lea    0x0(,%rcx,4),%rax
add    (%rdi,%rsi,8),%rax
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_uimatrix(i32** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i32**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32** %0, i32*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i32**, i32*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds i32*, i32** %11, i64 %12
%14 = load i32*, i32** %13
%15 = load i64, i64* %9
%16 = getelementptr inbounds i32, i32* %14, i64 %15
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = bitcast i32* %17 to i8*
%19 = call i32 @free(i8* %18)
%20 = load i32**, i32*** %6
%21 = load i64, i64* %7
%22 = getelementptr inbounds i32*, i32** %20, i64 %21
%23 = getelementptr inbounds i32*, i32** %22, i64 0
%24 = bitcast i32** %23 to i8*
%25 = call i32 @free(i8* %24)
ret void
}

LLVM IR (-O2):
define void @free_uimatrix(i32** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds i32*, i32** %0, i64 %1
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 %3
%9 = bitcast i32* %8 to i8*
%10 = tail call i32 @free(i8* %9)
%11 = bitcast i32** %6 to i8*
%12 = tail call i32 @free(i8* %11)
ret void
}
/* Variables and functions */
long f(int, int);
long g(int);
long int n(int year, int month, int day) {
  return 1461L * f(year, month) / 4 + 153L * g(month) / 5 + day;
}


x86 assembly (clang, -O0):
<n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <f@plt>
imul   $0x5b5,%rax,%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
imul   $0x99,%rax,%rax
mov    $0x5,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
call   1030 <f@plt>
imul   $0x5b5,%rax,%rax
lea    0x3(%rax),%rbx
test   %rax,%rax
cmovns %rax,%rbx
sar    $0x2,%rbx
mov    %ebp,%edi
call   1040 <g@plt>
imul   $0x99,%rax,%rax
movabs $0x6666666666666667,%rcx
66 66 66
imul   %rcx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    %rdx
add    %rdx,%rcx
movslq %r14d,%rax
add    %rbx,%rax
add    %rcx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @n(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i64 @f(i32 %7, i32 %8)
%10 = mul nsw i64 1461, %9
%11 = sdiv i64 %10, 4
%12 = load i32, i32* %5
%13 = call i64 @g(i32 %12)
%14 = mul nsw i64 153, %13
%15 = sdiv i64 %14, 5
%16 = add nsw i64 %11, %15
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = add nsw i64 %16, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @n(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @f(i32 %0, i32 %1)
%5 = mul nsw i64 %4, 1461
%6 = sdiv i64 %5, 4
%7 = tail call i64 @g(i32 %1)
%8 = mul nsw i64 %7, 153
%9 = sdiv i64 %8, 5
%10 = sext i32 %2 to i64
%11 = add nsw i64 %6, %10
%12 = add nsw i64 %11, %9
ret i64 %12
}
pr_if(quest) char *quest;
{
  pr_text_with_conversions(quest);
  printf("fprint( outfile, \"{\");");
}


x86 assembly (clang, -O0):
<pr_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <pr_text_with_conversions@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_if>:
push   %rax
xor    %eax,%eax
call   1030 <pr_text_with_conversions@plt>
lea    0xed1(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"fprint( outfile, \22{\22);\00"
define i32 @pr_if(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @pr_text_with_conversions to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [23 x i8] c"fprint( outfile, \22{\22);\00"
define i32 @pr_if(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @pr_text_with_conversions to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
int get_XLeaveWindowEvent_y(void *_p) {
  return (int)((XLeaveWindowEvent *)_p)->y;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XLeaveWindowEvent_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XLeaveWindowEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _mm_stream_si64(long long *, long long);
void test_mm_stream_si64(long long *A, long long B) { _mm_stream_si64(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_stream_si64>:
jmp    1030 <_mm_stream_si64@plt>

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

LLVM IR (-O2):
define void @test_mm_stream_si64(i64* %0, i64 %1) {
%3 = tail call i32 @_mm_stream_si64(i64* %0, i64 %1)
ret void
}
/* Variables and functions */
scalar_t__ posix_fadvise;
int main(int argc, char **argv) {
  void *p;
  (void)argc;
  (void)argv;
  p = (void *)(posix_fadvise);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecf(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@posix_fadvise = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* @posix_fadvise
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
ret i32 0
}

LLVM IR (-O2):
@posix_fadvise = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
main(argc, argv) int argc;
char *argv[];
{
  clear();
  console();
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @clear()
%6 = call i32 (...) @console()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @clear()
%4 = tail call i32 (...) @console()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Serial_write_byte(char);
void print_char(char c) { Serial_write_byte(c); }


x86 assembly (clang, -O0):
<print_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <Serial_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char>:
jmp    1030 <Serial_write_byte@plt>

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

LLVM IR (-O2):
define void @print_char(i8 signext %0) {
%2 = tail call i32 @Serial_write_byte(i8 signext %0)
ret void
}