#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 *, double, unsigned int, char *);
scalar_t__ round(double);
int sin(double);
double strlen(char *);
int /*<<< orphan*/ usleep(int);
int main(int argc, char *argv[]) {
  double i;
  double meh;
  char *msg = "ayylmao";
  for (i = 0; true; i += 0.1) {
    meh = (50. * (sin(i) + 2)) - (50. - strlen(msg));
    printf("%"
           "3"
           "."
           "f"
           " |"
           ""
           " "
           "%"
           ""
           "*"
           "s"
           "\n",
           meh - strlen(msg), (unsigned)round(meh), msg);
    usleep(40000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rax
mov    %rax,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1188 <main+0x38>
jmp    124d <main+0xfd>
movsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movsd  0xe49(%rip),%xmm1
subsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe26(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1060 <round@plt>
movsd  -0x30(%rbp),%xmm0
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
lea    0xdf1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x9c40,%edi
call   1070 <usleep@plt>
movsd  0xdca(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1179 <main+0x29>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
xorpd  %xmm0,%xmm0
lea    0xeae(%rip),%rbx
lea    0xeaf(%rip),%r14
nopl   0x0(%rax)
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
add    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
call   1030 <strlen@plt>
movsd  0xe60(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
call   1030 <strlen@plt>
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
call   1060 <round@plt>
mov    %r14,%rdi
movsd  0x10(%rsp),%xmm0
mov    %eax,%esi
mov    %rbx,%rdx
call   1040 <printf@plt>
mov    $0x9c40,%edi
call   1070 <usleep@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xdff(%rip),%xmm0
jmp    1170 <main+0x20>

LLVM IR (-O0):
@.str = [8 x i8] c"ayylmao\00"
@.str.1 = [12 x i8] c"%3.f | %*s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %8
store double 0.000000e+00, double* %6
br label %9
9: ; preds = %30, %2
br i1 true, label %10, label %33
10: ; preds = %9
%11 = load double, double* %6
%12 = call i32 @sin(double %11)
%13 = add nsw i32 %12, 2
%14 = sitofp i32 %13 to double
%15 = load i8*, i8** %8
%16 = call double @strlen(i8* %15)
%17 = fsub double 5.000000e+01, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double 5.000000e+01, double %14, double %18)
store double %19, double* %7
%20 = load double, double* %7
%21 = load i8*, i8** %8
%22 = call double @strlen(i8* %21)
%23 = fsub double %20, %22
%24 = load double, double* %7
%25 = call i64 @round(double %24)
%26 = trunc i64 %25 to i32
%27 = load i8*, i8** %8
%28 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double %23, i32 %26, i8* %27)
%29 = call i32 @usleep(i32 40000)
br label %30
30: ; preds = %10
%31 = load double, double* %6
%32 = fadd double %31, 1.000000e-01
store double %32, double* %6
br label %9
33: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"ayylmao\00"
@.str.1 = [12 x i8] c"%3.f | %*s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi double [ 0.000000e+00, %2 ], [ %18, %3 ]
%5 = tail call i32 @sin(double %4)
%6 = add nsw i32 %5, 2
%7 = sitofp i32 %6 to double
%8 = tail call double @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = fsub double 5.000000e+01, %8
%10 = fneg double %9
%11 = tail call double @llvm.fmuladd.f64(double %7, double 5.000000e+01, double %10)
%12 = tail call double @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%13 = fsub double %11, %12
%14 = tail call i64 @round(double %11)
%15 = trunc i64 %14 to i32
%16 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double %13, i32 %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @usleep(i32 40000)
%18 = fadd double %4, 1.000000e-01
br label %3
}