void printi_pre(char *sign, double x, double prod) {
  char *v1 = fltstr(x), *v2 = fltstr(prod);
  printf("   |%s%s%s%s = %s%s%s\n", sign, "\e[35m", v1, "\e[0m", "\e[35m", v2,
         "\e[0m");
  free(v1), free(v2);
}


x86 assembly (clang, -O0):
<printi_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1050 <fltstr@plt>
cltq
mov    %rax,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1050 <fltstr@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r10
lea    0xe83(%rip),%rdi
lea    0xe93(%rip),%r9
lea    0xe92(%rip),%rax
mov    %r9,%rdx
mov    %rax,%r8
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printi_pre>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
mov    %rdi,%r14
mov    $0x1,%al
call   1050 <fltstr@plt>
movslq %eax,%r15
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <fltstr@plt>
movslq %eax,%rbx
lea    0xeba(%rip),%r8
lea    0xe96(%rip),%rdi
lea    0xea6(%rip),%rdx
mov    %r14,%rsi
mov    %r15,%rcx
mov    %rdx,%r9
xor    %eax,%eax
push   %r8
push   %rbx
call   1040 <printf@plt>
add    $0x10,%rsp
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [23 x i8] c" |%s%s%s%s = %s%s%s\0A\00"
@.str.1 = [6 x i8] c"\1B[35m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @printi_pre(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %5
%10 = call i32 (double, ...) bitcast (i32 (...)* @fltstr to i32 (double, ...)*)(double %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %7
%13 = load double, double* %6
%14 = call i32 (double, ...) bitcast (i32 (...)* @fltstr to i32 (double, ...)*)(double %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %8
%17 = load i8*, i8** %4
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = load i8*, i8** %7
%22 = load i8*, i8** %8
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c" |%s%s%s%s = %s%s%s\0A\00"
@.str.1 = [6 x i8] c"\1B[35m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @printi_pre(i8* %0, double %1, double %2) {
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @fltstr to i32 (double, ...)*)(double %1)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 (double, ...) bitcast (i32 (...)* @fltstr to i32 (double, ...)*)(double %2)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
tail call void @free(i8* %6)
tail call void @free(i8* %9)
ret void
}