void ShowCircularText(r, str) double r;
char *str;
{
  double i, inc, x, y;
  double a;
  inc = 360.0 / (double)strlen(str);
  for (i = 0; i < 360.0; i += inc) {
    x = r * cos(i * 3.1415926535 / 180.0);
    y = r * sin(i * 3.1415926535 / 180.0);
    move2(x, y);
    a = (90 + i);
    htextang(a);
    hdrawchar(*str++);
  }
}


x86 assembly (clang, -O0):
<ShowCircularText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
movq   %rax,%xmm1
movaps 0xe9a(%rip),%xmm0
punpckldq %xmm0,%xmm1
movapd 0xe9e(%rip),%xmm0
subpd  %xmm0,%xmm1
movaps %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe57(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe3e(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    129b <ShowCircularText+0x13b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe39(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe24(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe00(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xdeb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    $0x2,%al
call   1070 <move2@plt>
movsd  0xdb0(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    $0x1,%al
call   1060 <htextang@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <hdrawchar@plt>
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11ba <ShowCircularText+0x5a>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowCircularText>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x10(%rsp)
call   1040 <strlen@plt>
movq   %rax,%xmm0
punpckldq 0xe80(%rip),%xmm0
subpd  0xe88(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe84(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
mulsd  0xe6a(%rip),%xmm0
divsd  0xe6a(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
call   1080 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
mov    $0x2,%al
call   1070 <move2@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xe2b(%rip),%xmm0
mov    $0x1,%al
call   1060 <htextang@plt>
movsbl (%rbx),%edi
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <hdrawchar@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xde4(%rip),%xmm0
ucomisd 0x8(%rsp),%xmm0
movsd  0x8(%rsp),%xmm0
ja     11b0 <ShowCircularText+0x50>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ShowCircularText(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %3
store i8* %1, i8** %4
%10 = load i8*, i8** %4
%11 = call i64 @strlen(i8* %10)
%12 = uitofp i64 %11 to double
%13 = fdiv double 3.600000e+02, %12
store double %13, double* %6
store double 0.000000e+00, double* %5
br label %14
14: ; preds = %42, %2
%15 = load double, double* %5
%16 = fcmp olt double %15, 3.600000e+02
br i1 %16, label %17, label %46
17: ; preds = %14
%18 = load double, double* %3
%19 = load double, double* %5
%20 = fmul double %19, 0x400921FB54411744
%21 = fdiv double %20, 1.800000e+02
%22 = call double @cos(double %21)
%23 = fmul double %18, %22
store double %23, double* %7
%24 = load double, double* %3
%25 = load double, double* %5
%26 = fmul double %25, 0x400921FB54411744
%27 = fdiv double %26, 1.800000e+02
%28 = call double @sin(double %27)
%29 = fmul double %24, %28
store double %29, double* %8
%30 = load double, double* %7
%31 = load double, double* %8
%32 = call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double %30, double %31)
%33 = load double, double* %5
%34 = fadd double 9.000000e+01, %33
store double %34, double* %9
%35 = load double, double* %9
%36 = call i32 (double, ...) bitcast (i32 (...)* @htextang to i32 (double, ...)*)(double %35)
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %4
%39 = load i8, i8* %37
%40 = sext i8 %39 to i32
%41 = call i32 (i32, ...) bitcast (i32 (...)* @hdrawchar to i32 (i32, ...)*)(i32 %40)
br label %42
42: ; preds = %17
%43 = load double, double* %6
%44 = load double, double* %5
%45 = fadd double %44, %43
store double %45, double* %5
br label %14
46: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @ShowCircularText(double %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = uitofp i64 %3 to double
%5 = fdiv double 3.600000e+02, %4
br label %6
6: ; preds = %2, %6
%7 = phi i8* [ %1, %2 ], [ %18, %6 ]
%8 = phi double [ 0.000000e+00, %2 ], [ %22, %6 ]
%9 = fmul double %8, 0x400921FB54411744
%10 = fdiv double %9, 1.800000e+02
%11 = tail call double @cos(double %10)
%12 = fmul double %11, %0
%13 = tail call double @sin(double %10)
%14 = fmul double %13, %0
%15 = tail call i32 (double, double, ...) bitcast (i32 (...)* @move2 to i32 (double, double, ...)*)(double %12, double %14)
%16 = fadd double %8, 9.000000e+01
%17 = tail call i32 (double, ...) bitcast (i32 (...)* @htextang to i32 (double, ...)*)(double %16)
%18 = getelementptr inbounds i8, i8* %7, i64 1
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = tail call i32 (i32, ...) bitcast (i32 (...)* @hdrawchar to i32 (i32, ...)*)(i32 %20)
%22 = fadd double %5, %8
%23 = fcmp olt double %22, 3.600000e+02
br i1 %23, label %6, label %24
24: ; preds = %6
ret void
}