#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 */
typedef int /*<<< orphan*/ f;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ print_bit(void *, int);
int /*<<< orphan*/ print_byte(void *, int);
int /*<<< orphan*/ printf(char *, int, int, ...);
int main(void) {
  printf("%d == %d\n", sizeof(float), sizeof(int));
  float f = 9.0f;
  int *pInt = (int *)(&f);
  print_byte((void *)&f, sizeof(f));
  print_bit((void *)&f, sizeof(f));
  printf("the float : %f, %f\n", f, *pInt);
  printf("the int   : %d, %d, %d\n", f, (int)f, *pInt);
  *pInt = 9;
  print_byte((void *)&f, sizeof(f));
  print_bit((void *)&f, sizeof(f));
  printf("the float : %f, %f\n", f, *pInt);
  printf("the int   : %d, %d\n", (int)f, *pInt);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x4,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1040 <printf@plt>
movss  0xea4(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
cvttss2si -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvttss2si -0x8(%rbp),%esi
cvttss2si -0x8(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movl   $0x9,(%rax)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
cvttss2si -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvttss2si -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
mov    $0x4,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x41100000,0x4(%rsp)
41
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
movss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%esi
movd   %xmm0,%edx
lea    0xe82(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%edx
movd   %xmm0,%ecx
lea    0xe77(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x9,0x4(%rsp)
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
movss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%esi
movd   %xmm0,%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%esi
movd   %xmm0,%edx
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d == %d\0A\00"
@.str.1 = [20 x i8] c"the float : %f, %f\0A\00"
@.str.2 = [24 x i8] c"the int : %d, %d, %d\0A\00"
@.str.3 = [20 x i8] c"the int : %d, %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4, i32 4)
store float 9.000000e+00, float* %2
%5 = bitcast float* %2 to i32*
store i32* %5, i32** %3
%6 = bitcast float* %2 to i8*
%7 = call i32 @print_byte(i8* %6, i32 4)
%8 = bitcast float* %2 to i8*
%9 = call i32 @print_bit(i8* %8, i32 4)
%10 = load float, float* %2
%11 = fptosi float %10 to i32
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %13)
%15 = load float, float* %2
%16 = fptosi float %15 to i32
%17 = load float, float* %2
%18 = fptosi float %17 to i32
%19 = load i32*, i32** %3
%20 = load i32, i32* %19
%21 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %18, i32 %20)
%22 = load i32*, i32** %3
store i32 9, i32* %22
%23 = bitcast float* %2 to i8*
%24 = call i32 @print_byte(i8* %23, i32 4)
%25 = bitcast float* %2 to i8*
%26 = call i32 @print_bit(i8* %25, i32 4)
%27 = load float, float* %2
%28 = fptosi float %27 to i32
%29 = load i32*, i32** %3
%30 = load i32, i32* %29
%31 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32 %30)
%32 = load float, float* %2
%33 = fptosi float %32 to i32
%34 = load i32*, i32** %3
%35 = load i32, i32* %34
%36 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %33, i32 %35)
%37 = load i32, i32* @EXIT_SUCCESS
ret i32 %37
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d == %d\0A\00"
@.str.1 = [20 x i8] c"the float : %f, %f\0A\00"
@.str.2 = [24 x i8] c"the int : %d, %d, %d\0A\00"
@.str.3 = [20 x i8] c"the int : %d, %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca float
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4, i32 4)
%3 = bitcast float* %1 to i8*
store float 9.000000e+00, float* %1
%4 = bitcast float* %1 to i32*
%5 = call i32 @print_byte(i8* %3, i32 4)
%6 = call i32 @print_bit(i8* %3, i32 4)
%7 = load float, float* %1
%8 = fptosi float %7 to i32
%9 = bitcast float %7 to i32
%10 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
%11 = load float, float* %1
%12 = fptosi float %11 to i32
%13 = bitcast float %11 to i32
%14 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 %12, i32 %13)
store i32 9, i32* %4
%15 = call i32 @print_byte(i8* %3, i32 4)
%16 = call i32 @print_bit(i8* %3, i32 4)
%17 = load float, float* %1
%18 = fptosi float %17 to i32
%19 = bitcast float %17 to i32
%20 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19)
%21 = load float, float* %1
%22 = fptosi float %21 to i32
%23 = bitcast float %21 to i32
%24 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %22, i32 %23)
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}