#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assertEq(int, int);
int /*<<< orphan*/ assertEqc(char, char);
int /*<<< orphan*/ assertEqf(float, double);
int /*<<< orphan*/ endTest();
int main() {
  int a, b, c;
  float x, y, z;
  char j, k, l;
  a = (int)100;
  b = (int)100.0;
  c = (int)'d';
  assertEq(a, 100);
  assertEq(b, 100);
  assertEq(c, 100);
  x = (float)100.0;
  y = (float)100;
  z = (float)'d';
  assertEqf(x, 100.0);
  assertEqf(y, 100.0);
  assertEqf(z, 100.0);
  j = (char)'d';
  k = (char)100;
  l = (char)100.0;
  assertEqc(j, 'd');
  assertEqc(k, 'd');
  assertEqc(l, 'd');
  int one = (int)&b - (int)&a;
  int c2 = *(int *)((int)&a + 2);
  assertEq(one, 1);
  assertEq(c2, 100);
  endTest();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x64,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x64,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0x8(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0xc(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
movss  0xe7c(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe6f(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe62(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movsd  0xe48(%rip),%xmm1
call   1060 <assertEqf@plt>
movss  -0x14(%rbp),%xmm0
movsd  0xe36(%rip),%xmm1
call   1060 <assertEqf@plt>
movss  -0x18(%rbp),%xmm0
movsd  0xe24(%rip),%xmm1
call   1060 <assertEqf@plt>
movb   $0x64,-0x19(%rbp)
movb   $0x64,-0x1a(%rbp)
movb   $0x64,-0x1b(%rbp)
mov    $0x64,%esi
movsbl -0x19(%rbp),%edi
call   1040 <assertEqc@plt>
mov    $0x64,%esi
movsbl -0x1a(%rbp),%edi
call   1040 <assertEqc@plt>
mov    $0x64,%esi
movsbl -0x1b(%rbp),%edi
call   1040 <assertEqc@plt>
lea    -0x8(%rbp),%rax
lea    -0x4(%rbp),%rcx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
lea    -0x4(%rbp),%rax
add    $0x2,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%edi
mov    $0x1,%esi
call   1050 <assertEq@plt>
mov    -0x24(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x0,%al
call   1030 <endTest@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x64,0xc(%rsp)
movl   $0x64,0x8(%rsp)
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
movss  0xe76(%rip),%xmm0
movsd  0xe76(%rip),%xmm1
call   1060 <assertEqf@plt>
movss  0xe61(%rip),%xmm0
movsd  0xe61(%rip),%xmm1
call   1060 <assertEqf@plt>
movss  0xe4c(%rip),%xmm0
movsd  0xe4c(%rip),%xmm1
call   1060 <assertEqf@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1040 <assertEqc@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1040 <assertEqc@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1040 <assertEqc@plt>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rax
sub    %eax,%edi
cltq
mov    0x2(%rax),%ebx
mov    $0x1,%esi
call   1050 <assertEq@plt>
mov    %ebx,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
xor    %eax,%eax
call   1030 <endTest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
store i32 100, i32* %1
store i32 100, i32* %2
store i32 100, i32* %3
%12 = load i32, i32* %1
%13 = call i32 @assertEq(i32 %12, i32 100)
%14 = load i32, i32* %2
%15 = call i32 @assertEq(i32 %14, i32 100)
%16 = load i32, i32* %3
%17 = call i32 @assertEq(i32 %16, i32 100)
store float 1.000000e+02, float* %4
store float 1.000000e+02, float* %5
store float 1.000000e+02, float* %6
%18 = load float, float* %4
%19 = call i32 @assertEqf(float %18, double 1.000000e+02)
%20 = load float, float* %5
%21 = call i32 @assertEqf(float %20, double 1.000000e+02)
%22 = load float, float* %6
%23 = call i32 @assertEqf(float %22, double 1.000000e+02)
store i8 100, i8* %7
store i8 100, i8* %8
store i8 100, i8* %9
%24 = load i8, i8* %7
%25 = call i32 @assertEqc(i8 signext %24, i8 signext 100)
%26 = load i8, i8* %8
%27 = call i32 @assertEqc(i8 signext %26, i8 signext 100)
%28 = load i8, i8* %9
%29 = call i32 @assertEqc(i8 signext %28, i8 signext 100)
%30 = ptrtoint i32* %2 to i32
%31 = ptrtoint i32* %1 to i32
%32 = sub nsw i32 %30, %31
store i32 %32, i32* %10
%33 = ptrtoint i32* %1 to i32
%34 = add nsw i32 %33, 2
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i32*
%37 = load i32, i32* %36
store i32 %37, i32* %11
%38 = load i32, i32* %10
%39 = call i32 @assertEq(i32 %38, i32 1)
%40 = load i32, i32* %11
%41 = call i32 @assertEq(i32 %40, i32 100)
%42 = call i32 (...) @endTest()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 100, i32* %1
store i32 100, i32* %2
%5 = tail call i32 @assertEq(i32 100, i32 100)
%6 = tail call i32 @assertEq(i32 100, i32 100)
%7 = tail call i32 @assertEq(i32 100, i32 100)
%8 = tail call i32 @assertEqf(float 1.000000e+02, double 1.000000e+02)
%9 = tail call i32 @assertEqf(float 1.000000e+02, double 1.000000e+02)
%10 = tail call i32 @assertEqf(float 1.000000e+02, double 1.000000e+02)
%11 = tail call i32 @assertEqc(i8 signext 100, i8 signext 100)
%12 = tail call i32 @assertEqc(i8 signext 100, i8 signext 100)
%13 = tail call i32 @assertEqc(i8 signext 100, i8 signext 100)
%14 = ptrtoint i32* %2 to i64
%15 = trunc i64 %14 to i32
%16 = ptrtoint i32* %1 to i64
%17 = trunc i64 %16 to i32
%18 = sub nsw i32 %15, %17
%19 = shl i64 %16, 32
%20 = ashr exact i64 %19, 32
%21 = or i64 %20, 2
%22 = inttoptr i64 %21 to i32*
%23 = load i32, i32* %22
%24 = call i32 @assertEq(i32 %18, i32 1)
%25 = call i32 @assertEq(i32 %23, i32 100)
%26 = call i32 (...) @endTest()
ret i32 0
}