#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*/ printf(char *, char);
int /*<<< orphan*/ putchar(char);
void print_heart(void) {
  float y, x, z, f;
  for (y = 1.5f; y > -1.1f; y -= 0.1f) {
    for (x = -1.5f; x < 1.5f; x += 0.05f) {
      z = x * x + y * y - 1;
      f = z * z * z - x * x * y * y * y;
      printf("\e[5;31m"
             "%c"
             "\e[0m",
             f <= 0.0f ? ".:-=+*GH4"[(int)(f * -8.0f)] : ' ');
    }
    putchar('\n');
  }
  return;
}


x86 assembly (clang, -O0):
<print_heart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1268 <print_heart+0x148>
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xea0(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1243 <print_heart+0x123>
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe82(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     120d <print_heart+0xed>
movss  0xe26(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%eax
movslq %eax,%rcx
lea    0xe29(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x14(%rbp)
jmp    121a <print_heart+0xfa>
mov    $0x20,%eax
mov    %eax,-0x14(%rbp)
jmp    121a <print_heart+0xfa>
mov    -0x14(%rbp),%eax
lea    0xdf8(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
movss  0xde4(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1158 <print_heart+0x38>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  -0x4(%rbp),%xmm0
movss  0xdb2(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1135 <print_heart+0x15>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_heart>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movss  0xed1(%rip),%xmm0
lea    0xeea(%rip),%rbx
lea    0xef1(%rip),%r14
jmp    1165 <print_heart+0x45>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0xc(%rsp),%xmm0
addss  0xebc(%rip),%xmm0
ucomiss 0xeb9(%rip),%xmm0
jbe    120a <print_heart+0xea>
movss  %xmm0,0xc(%rsp)
mulss  %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xe87(%rip),%xmm0
jmp    11a9 <print_heart+0x89>
nop
movsbl %al,%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x14(%rsp),%xmm1
addss  0xe77(%rip),%xmm1
movss  0xe5f(%rip),%xmm0
ucomiss %xmm1,%xmm0
movaps %xmm1,%xmm0
jbe    1140 <print_heart+0x20>
movaps %xmm0,%xmm1
movss  %xmm0,0x14(%rsp)
mulss  %xmm0,%xmm1
movss  0xc(%rsp),%xmm3
movaps %xmm3,%xmm2
mulss  %xmm1,%xmm2
addss  0x10(%rsp),%xmm1
addss  0xe37(%rip),%xmm1
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm3,%xmm2
mulss  %xmm3,%xmm2
mulss  %xmm1,%xmm0
subss  %xmm2,%xmm0
mov    $0x20,%al
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jb     1180 <print_heart+0x60>
mulss  0xe12(%rip),%xmm0
cvttss2si %xmm0,%eax
cltq
movzbl (%rax,%r14,1),%eax
jmp    1180 <print_heart+0x60>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\1B[5;31m%c\1B[0m\00"
@.str.1 = [10 x i8] c".:-=+*GH4\00"
define void @print_heart() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float 1.500000e+00, float* %1
br label %5
5: ; preds = %55, %0
%6 = load float, float* %1
%7 = fcmp ogt float %6, 0xBFF19999A0000000
br i1 %7, label %8, label %58
8: ; preds = %5
store float -1.500000e+00, float* %2
br label %9
9: ; preds = %50, %8
%10 = load float, float* %2
%11 = fcmp olt float %10, 1.500000e+00
br i1 %11, label %12, label %53
12: ; preds = %9
%13 = load float, float* %2
%14 = load float, float* %2
%15 = load float, float* %1
%16 = load float, float* %1
%17 = fmul float %15, %16
%18 = call float @llvm.fmuladd.f32(float %13, float %14, float %17)
%19 = fsub float %18, 1.000000e+00
store float %19, float* %3
%20 = load float, float* %3
%21 = load float, float* %3
%22 = fmul float %20, %21
%23 = load float, float* %3
%24 = load float, float* %2
%25 = load float, float* %2
%26 = fmul float %24, %25
%27 = load float, float* %1
%28 = fmul float %26, %27
%29 = load float, float* %1
%30 = fmul float %28, %29
%31 = load float, float* %1
%32 = fmul float %30, %31
%33 = fneg float %32
%34 = call float @llvm.fmuladd.f32(float %22, float %23, float %33)
store float %34, float* %4
%35 = load float, float* %4
%36 = fcmp ole float %35, 0.000000e+00
br i1 %36, label %37, label %45
37: ; preds = %12
%38 = load float, float* %4
%39 = fmul float %38, -8.000000e+00
%40 = fptosi float %39 to i32
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10 x i8], [10 x i8]* @.str.1, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
br label %46
45: ; preds = %12
br label %46
46: ; preds = %45, %37
%47 = phi i32 [ %44, %37 ], [ 32, %45 ]
%48 = trunc i32 %47 to i8
%49 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %48)
br label %50
50: ; preds = %46
%51 = load float, float* %2
%52 = fadd float %51, 0x3FA99999A0000000
store float %52, float* %2
br label %9
53: ; preds = %9
%54 = call i32 @putchar(i8 signext 10)
br label %55
55: ; preds = %53
%56 = load float, float* %1
%57 = fsub float %56, 0x3FB99999A0000000
store float %57, float* %1
br label %5
58: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"\1B[5;31m%c\1B[0m\00"
@.str.1 = [10 x i8] c".:-=+*GH4\00"
define void @print_heart() {
br label %1
1: ; preds = %0, %27
%2 = phi float [ 1.500000e+00, %0 ], [ %29, %27 ]
%3 = fmul float %2, %2
br label %4
4: ; preds = %1, %22
%5 = phi float [ -1.500000e+00, %1 ], [ %25, %22 ]
%6 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %3)
%7 = fadd float %6, -1.000000e+00
%8 = fmul float %7, %7
%9 = fneg float %5
%10 = fmul float %5, %9
%11 = fmul float %2, %10
%12 = fmul float %2, %11
%13 = fmul float %2, %12
%14 = tail call float @llvm.fmuladd.f32(float %8, float %7, float %13)
%15 = fcmp ugt float %14, 0.000000e+00
br i1 %15, label %22, label %16
16: ; preds = %4
%17 = fmul float %14, -8.000000e+00
%18 = fptosi float %17 to i32
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i8], [10 x i8]* @.str.1, i64 0, i64 %19
%21 = load i8, i8* %20
br label %22
22: ; preds = %4, %16
%23 = phi i8 [ %21, %16 ], [ 32, %4 ]
%24 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %23)
%25 = fadd float %5, 0x3FA99999A0000000
%26 = fcmp olt float %25, 1.500000e+00
br i1 %26, label %4, label %27
27: ; preds = %22
%28 = tail call i32 @putchar(i8 signext 10)
%29 = fadd float %2, 0xBFB99999A0000000
%30 = fcmp ogt float %29, 0xBFF19999A0000000
br i1 %30, label %1, label %31
31: ; preds = %27
ret void
}