#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*/ memcpy(unsigned long *, float *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  float source;
  unsigned long data;
  char ch[34];
  source = (float)0.75;
  memcpy(&data, &source, 4);
  for (int i = 33; i >= 0; i--) {
    if (i == 11 || i == 1) {
      ch[i] = '-';
    } else {
      ch[i] = (data % 2) == 1 ? '1' : '0';
      data /= 2;
    }
  }
  printf("%s\n", ch);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movl   $0x21,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jl     11c3 <main+0xa3>
cmpl   $0xb,-0x44(%rbp)
je     1173 <main+0x53>
cmpl   $0x1,-0x44(%rbp)
jne    1181 <main+0x61>
movslq -0x44(%rbp),%rax
movb   $0x2d,-0x40(%rbp,%rax,1)
jmp    11b0 <main+0x90>
mov    -0x10(%rbp),%rdx
and    $0x1,%rdx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x1,%rdx
cmove  %ecx,%eax
mov    %al,%cl
movslq -0x44(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11b5 <main+0x95>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    1155 <main+0x35>
lea    -0x40(%rbp),%rsi
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movl   $0x3f400000,0xc(%rsp)
3f
mov    %rsp,%rdi
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    $0x21,%ecx
mov    (%rsp),%rsi
jmp    115e <main+0x3e>
nopl   0x0(%rax)
movb   $0x2d,0xf(%rsp,%rcx,1)
sub    $0x1,%rdx
mov    %rdx,%rcx
jb     11a4 <main+0x84>
cmp    $0xb,%ecx
je     1168 <main+0x48>
cmp    $0x1,%ecx
jne    1170 <main+0x50>
movb   $0x2d,0x10(%rsp,%rcx,1)
jmp    1183 <main+0x63>
nop
mov    %esi,%edx
and    $0x1,%dl
or     $0x30,%dl
mov    %dl,0x10(%rsp,%rcx,1)
shr    %rsi
mov    %rsi,(%rsp)
lea    -0x1(%rcx),%rdx
cmp    $0xb,%edx
je     1150 <main+0x30>
cmp    $0x1,%edx
je     1150 <main+0x30>
mov    %esi,%eax
and    $0x1,%al
or     $0x30,%al
mov    %al,0xf(%rsp,%rcx,1)
shr    %rsi
mov    %rsi,(%rsp)
jmp    1155 <main+0x35>
lea    0xe55(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i64
%4 = alloca [34 x i8]
%5 = alloca i32
store i32 0, i32* %1
store float 7.500000e-01, float* %2
%6 = call i32 @memcpy(i64* %3, float* %2, i32 4)
store i32 33, i32* %5
br label %7
7: ; preds = %33, %0
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %36
10: ; preds = %7
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 11
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %20
16: ; preds = %13, %10
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [34 x i8], [34 x i8]* %4, i64 0, i64 %18
store i8 45, i8* %19
br label %32
20: ; preds = %13
%21 = load i64, i64* %3
%22 = urem i64 %21, 2
%23 = icmp eq i64 %22, 1
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 49, i32 48
%26 = trunc i32 %25 to i8
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [34 x i8], [34 x i8]* %4, i64 0, i64 %28
store i8 %26, i8* %29
%30 = load i64, i64* %3
%31 = udiv i64 %30, 2
store i64 %31, i64* %3
br label %32
32: ; preds = %20, %16
br label %33
33: ; preds = %32
%34 = load i32, i32* %5
%35 = add nsw i32 %34, -1
store i32 %35, i32* %5
br label %7
36: ; preds = %7
%37 = getelementptr inbounds [34 x i8], [34 x i8]* %4, i64 0, i64 0
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %37)
%39 = load i32, i32* %1
ret i32 %39
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i64
%3 = alloca [34 x i8]
%4 = bitcast float* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 0
store float 7.500000e-01, float* %1
%7 = call i32 @memcpy(i64* %2, float* %1, i32 4)
%8 = load i64, i64* %2
br label %11
9: ; preds = %35
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
11: ; preds = %35, %0
%12 = phi i64 [ 33, %0 ], [ %37, %35 ]
%13 = phi i64 [ %8, %0 ], [ %36, %35 ]
%14 = trunc i64 %12 to i32
switch i32 %14, label %17 [
i32 11, label %15
i32 1, label %15
]
15: ; preds = %11, %11
%16 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 %12
store i8 45, i8* %16
br label %23
17: ; preds = %11
%18 = and i64 %13, 1
%19 = icmp eq i64 %18, 0
%20 = select i1 %19, i8 48, i8 49
%21 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 %12
store i8 %20, i8* %21
%22 = lshr i64 %13, 1
store i64 %22, i64* %2
br label %23
23: ; preds = %15, %17
%24 = phi i64 [ %13, %15 ], [ %22, %17 ]
%25 = add nsw i64 %12, -1
%26 = trunc i64 %25 to i32
switch i32 %26, label %29 [
i32 11, label %27
i32 1, label %27
]
27: ; preds = %23, %23
%28 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 %25
store i8 45, i8* %28
br label %35
29: ; preds = %23
%30 = and i64 %24, 1
%31 = icmp eq i64 %30, 0
%32 = select i1 %31, i8 48, i8 49
%33 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 %25
store i8 %32, i8* %33
%34 = lshr i64 %24, 1
store i64 %34, i64* %2
br label %35
35: ; preds = %29, %27
%36 = phi i64 [ %24, %27 ], [ %34, %29 ]
%37 = add nsw i64 %12, -2
%38 = icmp eq i64 %25, 0
br i1 %38, label %9, label %11
}