char *get_M(float f) {
  char *M = get_bits_float(f);
  if (is_normalized(f))
    M[0] = '1';
  else if (is_denormalized(f))
    M[0] = '0';
  else
    return '\0';
  M[1] = '.';
  int i;
  int index = 2;
  for (i = 8; i <= 31; i++) {
    M[index] = M[i];
    index++;
  }
  M[index] = '\0';
  return M;
}


x86 assembly (clang, -O0):
<get_M>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <get_bits_float@plt>
cltq
mov    %rax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <is_normalized@plt>
cmp    $0x0,%eax
je     1178 <get_M+0x48>
mov    -0x18(%rbp),%rax
movb   $0x31,(%rax)
jmp    11af <get_M+0x7f>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1050 <is_denormalized@plt>
cmp    $0x0,%eax
je     119d <get_M+0x6d>
mov    -0x18(%rbp),%rax
movb   $0x30,(%rax)
jmp    11aa <get_M+0x7a>
movq   $0x0,-0x8(%rbp)
jmp    1210 <get_M+0xe0>
jmp    11af <get_M+0x7f>
mov    -0x18(%rbp),%rax
movb   $0x2e,0x1(%rax)
movl   $0x2,-0x20(%rbp)
movl   $0x8,-0x1c(%rbp)
cmpl   $0x1f,-0x1c(%rbp)
jg     11fc <get_M+0xcc>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11c5 <get_M+0x95>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_M>:
push   %rbx
sub    $0x10,%rsp
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1030 <get_bits_float@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <is_normalized@plt>
mov    $0x31,%cl
test   %eax,%eax
jne    116e <get_M+0x3e>
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <is_denormalized@plt>
mov    $0x30,%cl
test   %eax,%eax
je     1191 <get_M+0x61>
movslq %ebx,%rax
mov    %cl,(%rax)
movb   $0x2e,0x1(%rax)
movups 0x8(%rax),%xmm0
mov    0x18(%rax),%rcx
mov    %rcx,0x12(%rax)
movups %xmm0,0x2(%rax)
movb   $0x0,0x1a(%rax)
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
jmp    118b <get_M+0x5b>

LLVM IR (-O0):
define i8* @get_M(float %0) {
%2 = alloca i8*
%3 = alloca float
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store float %0, float* %3
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = call i32 (double, ...) bitcast (i32 (...)* @get_bits_float to i32 (double, ...)*)(double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 (double, ...) bitcast (i32 (...)* @is_normalized to i32 (double, ...)*)(double %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %1
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 0
store i8 49, i8* %18
br label %29
19: ; preds = %1
%20 = load float, float* %3
%21 = fpext float %20 to double
%22 = call i32 (double, ...) bitcast (i32 (...)* @is_denormalized to i32 (double, ...)*)(double %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %19
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 0
store i8 48, i8* %26
br label %28
27: ; preds = %19
store i8* null, i8** %2
br label %56
28: ; preds = %24
br label %29
29: ; preds = %28, %16
%30 = load i8*, i8** %4
%31 = getelementptr inbounds i8, i8* %30, i64 1
store i8 46, i8* %31
store i32 2, i32* %6
store i32 8, i32* %5
br label %32
32: ; preds = %47, %29
%33 = load i32, i32* %5
%34 = icmp sle i32 %33, 31
br i1 %34, label %35, label %50
35: ; preds = %32
%36 = load i8*, i8** %4
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = load i8*, i8** %4
%42 = load i32, i32* %6
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
store i8 %40, i8* %44
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %47
47: ; preds = %35
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %32
50: ; preds = %32
%51 = load i8*, i8** %4
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
store i8 0, i8* %54
%55 = load i8*, i8** %4
store i8* %55, i8** %2
br label %56
56: ; preds = %50, %27
%57 = load i8*, i8** %2
ret i8* %57
}

LLVM IR (-O2):
define i8* @get_M(float %0) {
%2 = fpext float %0 to double
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @get_bits_float to i32 (double, ...)*)(double %2)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @is_normalized to i32 (double, ...)*)(double %2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = tail call i32 (double, ...) bitcast (i32 (...)* @is_denormalized to i32 (double, ...)*)(double %2)
%10 = icmp eq i32 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %8, %1
%12 = phi i8 [ 49, %1 ], [ 48, %8 ]
store i8 %12, i8* %5
%13 = getelementptr inbounds i8, i8* %5, i64 1
store i8 46, i8* %13
%14 = getelementptr i8, i8* %5, i64 2
%15 = getelementptr i8, i8* %5, i64 8
%16 = getelementptr inbounds i8, i8* %5, i64 26
store i8 0, i8* %16
br label %17
17: ; preds = %8, %11
%18 = phi i8* [ %5, %11 ], [ null, %8 ]
ret i8* %18
}