#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 textsup(char *sup) {
  chgchar(get_ichar(), (int)(0.6 * get_fntsize()));
  rmoveto(0.0, 0.5 * get_fntsize());
  show_text(sup);
  chgchar(get_ichar(), get_fntsize());
}


x86 assembly (clang, -O0):
<textsup>:
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  0xe8d(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
call   1060 <chgchar@plt>
mov    $0x0,%al
call   1040 <get_fntsize@plt>
movsd  0xe65(%rip),%xmm1
mulsd  %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):
<textsup>:
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
mulsd  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 @textsup(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 5.000000e-01, %9
%11 = call i32 @rmoveto(double 0.000000e+00, double %10)
%12 = load i8*, i8** %2
%13 = call i32 @show_text(i8* %12)
%14 = call i32 (...) @get_ichar()
%15 = call double (...) @get_fntsize()
%16 = call i32 @chgchar(i32 %14, double %15)
ret void
}

LLVM IR (-O2):
define void @textsup(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 = fmul double %8, 5.000000e-01
%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
}