#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*/ num;

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x4,%esi
movss  0xeb1(%rip),%xmm0
call   1040 <printf@plt>
movl   $0x9,-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>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movss  0xe43(%rip),%xmm0
movss  %xmm0,(%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>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xe23(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xe20(%rip),%rdi
call   1040 <printf@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
movss  0xeb8(%rip),%xmm0
mov    $0x4,%esi
call   1040 <printf@plt>
movl   $0x9,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
mov    0xc(%rsp),%esi
movd   %esi,%xmm0
lea    0xe86(%rip),%r14
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
movd   %esi,%xmm0
lea    0xe83(%rip),%r15
mov    %r15,%rdi
call   1040 <printf@plt>
movl   $0x41100000,0xc(%rsp)
41
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <print_byte@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <print_bit@plt>
mov    0xc(%rsp),%esi
movd   %esi,%xmm0
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
movd   %esi,%xmm0
mov    %r15,%rdi
call   1040 <printf@plt>
mov    0x2df0(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
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 = [20 x i8] c"the int : %d, %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float*
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4, float 4.000000e+00)
store i32 9, i32* %2
%5 = bitcast i32* %2 to float*
store float* %5, float** %3
%6 = bitcast i32* %2 to i8*
%7 = call i32 @print_byte(i8* %6, i32 4)
%8 = bitcast i32* %2 to i8*
%9 = call i32 @print_bit(i8* %8, i32 4)
%10 = load i32, i32* %2
%11 = load float*, float** %3
%12 = load float, float* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %10, float %12)
%14 = load i32, i32* %2
%15 = load float*, float** %3
%16 = load float, float* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %14, float %16)
%18 = load float*, float** %3
store float 9.000000e+00, float* %18
%19 = bitcast i32* %2 to i8*
%20 = call i32 @print_byte(i8* %19, i32 4)
%21 = bitcast i32* %2 to i8*
%22 = call i32 @print_bit(i8* %21, i32 4)
%23 = load i32, i32* %2
%24 = load float*, float** %3
%25 = load float, float* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %23, float %25)
%27 = load i32, i32* %2
%28 = load float*, float** %3
%29 = load float, float* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %27, float %29)
%31 = load i32, i32* @EXIT_SUCCESS
ret i32 %31
}

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