#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*/ chgchar(int /*<<< orphan*/, double);
double get_fntsize();
int /*<<< orphan*/ get_ichar();
int /*<<< orphan*/ rmoveto(double, double);
int /*<<< orphan*/ show_text(char *);
void textsub(char *sub) {
  chgchar(get_ichar(), (int)(0.6 * get_fntsize()));
  rmoveto(0.0, -1.0 * get_fntsize() / 6.0);
  show_text(sub);
  chgchar(get_ichar(), get_fntsize());
}


x86 assembly (clang, -O0):
<textsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_ichar@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <get_fntsize@plt>
mov    -0x10(%rbp),%edi
movaps %xmm0,%xmm1
movsd  0xe95(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
call   1060 <chgchar@plt>
mov    $0x0,%al
call   1040 <get_fntsize@plt>
movsd  0xe6d(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe59(%rip),%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
call   1070 <rmoveto@plt>
mov    -0x8(%rbp),%rdi
call   1050 <show_text@plt>
mov    $0x0,%al
call   1030 <get_ichar@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <get_fntsize@plt>
mov    -0xc(%rbp),%edi
call   1060 <chgchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<textsub>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_ichar@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <get_fntsize@plt>
mulsd  0xe92(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
mov    %ebp,%edi
call   1060 <chgchar@plt>
xor    %eax,%eax
call   1040 <get_fntsize@plt>
movapd %xmm0,%xmm1
divsd  0xe78(%rip),%xmm1
xorpd  %xmm0,%xmm0
call   1070 <rmoveto@plt>
mov    %rbx,%rdi
call   1050 <show_text@plt>
xor    %eax,%eax
call   1030 <get_ichar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <get_fntsize@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <chgchar@plt>

LLVM IR (-O0):
define void @textsub(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @get_ichar()
%4 = call double (...) @get_fntsize()
%5 = fmul double 6.000000e-01, %4
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = call i32 @chgchar(i32 %3, double %7)
%9 = call double (...) @get_fntsize()
%10 = fmul double -1.000000e+00, %9
%11 = fdiv double %10, 6.000000e+00
%12 = call i32 @rmoveto(double 0.000000e+00, double %11)
%13 = load i8*, i8** %2
%14 = call i32 @show_text(i8* %13)
%15 = call i32 (...) @get_ichar()
%16 = call double (...) @get_fntsize()
%17 = call i32 @chgchar(i32 %15, double %16)
ret void
}

LLVM IR (-O2):
define void @textsub(i8* %0) {
%2 = tail call i32 (...) @get_ichar()
%3 = tail call double (...) @get_fntsize()
%4 = fmul double %3, 6.000000e-01
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
%7 = tail call i32 @chgchar(i32 %2, double %6)
%8 = tail call double (...) @get_fntsize()
%9 = fdiv double %8, -6.000000e+00
%10 = tail call i32 @rmoveto(double 0.000000e+00, double %9)
%11 = tail call i32 @show_text(i8* %0)
%12 = tail call i32 (...) @get_ichar()
%13 = tail call double (...) @get_fntsize()
%14 = tail call i32 @chgchar(i32 %12, double %13)
ret void
}