#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*/ endonion();
int /*<<< orphan*/ endxlate();
int /*<<< orphan*/ onion();
int /*<<< orphan*/ square(double, int, int);
int /*<<< orphan*/ xlate(double, int, int /*<<< orphan*/);
void renderchar(double x, double y, char *c[]) {
  int i;
  double maxx;
  double px, py;
  char *p;
  onion();
  py = 5 * 7;
  px = 0;
  xlate(x, y, 0);
  for (i = 0; c[i] != NULL; i++) {
    px = 0;
    for (p = c[i]; *p; p++) {
      xlate(px, py - (5), 0);
      xlate(0, -5 / 2.0 + 1, 0);
      square(2.15 * 0.25, 1, 1);
      endxlate();
      if (*p == '#')
        square(2.15 * 0.5, 5 * 0.6, 1);
      endxlate();
      px += 2.15;
    }
    py -= 5;
  }
  endxlate();
  endonion();
}


x86 assembly (clang, -O0):
<renderchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    $0x0,%al
call   1040 <onion@plt>
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si -0x10(%rbp),%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1292 <renderchar+0x142>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmpb   $0x0,(%rax)
je     126e <renderchar+0x11e>
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xe24(%rip),%xmm2
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
xorps  %xmm0,%xmm0
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0xe06(%rip),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <square@plt>
mov    $0x0,%al
call   1060 <endxlate@plt>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1244 <renderchar+0xf4>
movsd  0xde3(%rip),%xmm0
mov    $0x3,%edi
mov    $0x1,%esi
call   1050 <square@plt>
mov    $0x0,%al
call   1060 <endxlate@plt>
movsd  0xdcd(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    11c5 <renderchar+0x75>
movsd  -0x38(%rbp),%xmm0
movsd  0xd8d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    119a <renderchar+0x4a>
mov    $0x0,%al
call   1060 <endxlate@plt>
mov    $0x0,%al
call   1070 <endonion@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderchar>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1040 <onion@plt>
cvttsd2si 0x8(%rsp),%edi
movsd  0x10(%rsp),%xmm0
xor    %esi,%esi
call   1030 <xlate@plt>
mov    (%r14),%rbx
test   %rbx,%rbx
je     126a <renderchar+0x11a>
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %r15d,%r15d
jmp    11c2 <renderchar+0x72>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%r14,%r15,8),%rbx
add    $0x1,%r15
test   %rbx,%rbx
je     126a <renderchar+0x11a>
cmpb   $0x0,(%rbx)
movsd  0x8(%rsp),%xmm0
addsd  0xe35(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
je     11b0 <renderchar+0x60>
cvttsd2si 0x8(%rsp),%ebp
add    $0x1,%rbx
xorpd  %xmm0,%xmm0
jmp    120e <renderchar+0xbe>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <endxlate@plt>
movsd  0x10(%rsp),%xmm0
addsd  0xe1b(%rip),%xmm0
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
je     11b0 <renderchar+0x60>
movsd  %xmm0,0x10(%rsp)
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
xorpd  %xmm0,%xmm0
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0xddb(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <square@plt>
xor    %eax,%eax
call   1060 <endxlate@plt>
cmpb   $0x23,-0x1(%rbx)
jne    11f0 <renderchar+0xa0>
movsd  0xdbf(%rip),%xmm0
mov    $0x3,%edi
mov    $0x1,%esi
call   1050 <square@plt>
jmp    11f0 <renderchar+0xa0>
xor    %eax,%eax
call   1060 <endxlate@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <endonion@plt>

LLVM IR (-O0):
define void @renderchar(double %0, double %1, i8** %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i8**
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i8*
store double %0, double* %4
store double %1, double* %5
store i8** %2, i8*** %6
%12 = call i32 (...) @onion()
store double 3.500000e+01, double* %10
store double 0.000000e+00, double* %9
%13 = load double, double* %4
%14 = load double, double* %5
%15 = fptosi double %14 to i32
%16 = call i32 @xlate(double %13, i32 %15, i32 0)
store i32 0, i32* %7
br label %17
17: ; preds = %59, %3
%18 = load i8**, i8*** %6
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = icmp ne i8* %22, null
br i1 %23, label %24, label %62
24: ; preds = %17
store double 0.000000e+00, double* %9
%25 = load i8**, i8*** %6
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
store i8* %29, i8** %11
br label %30
30: ; preds = %53, %24
%31 = load i8*, i8** %11
%32 = load i8, i8* %31
%33 = icmp ne i8 %32, 0
br i1 %33, label %34, label %56
34: ; preds = %30
%35 = load double, double* %9
%36 = load double, double* %10
%37 = fsub double %36, 5.000000e+00
%38 = fptosi double %37 to i32
%39 = call i32 @xlate(double %35, i32 %38, i32 0)
%40 = call i32 @xlate(double 0.000000e+00, i32 -1, i32 0)
%41 = call i32 @square(double 5.375000e-01, i32 1, i32 1)
%42 = call i32 (...) @endxlate()
%43 = load i8*, i8** %11
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 35
br i1 %46, label %47, label %49
47: ; preds = %34
%48 = call i32 @square(double 1.075000e+00, i32 3, i32 1)
br label %49
49: ; preds = %47, %34
%50 = call i32 (...) @endxlate()
%51 = load double, double* %9
%52 = fadd double %51, 2.150000e+00
store double %52, double* %9
br label %53
53: ; preds = %49
%54 = load i8*, i8** %11
%55 = getelementptr inbounds i8, i8* %54, i32 1
store i8* %55, i8** %11
br label %30
56: ; preds = %30
%57 = load double, double* %10
%58 = fsub double %57, 5.000000e+00
store double %58, double* %10
br label %59
59: ; preds = %56
%60 = load i32, i32* %7
%61 = add nsw i32 %60, 1
store i32 %61, i32* %7
br label %17
62: ; preds = %17
%63 = call i32 (...) @endxlate()
%64 = call i32 (...) @endonion()
ret void
}

LLVM IR (-O2):
define void @renderchar(double %0, double %1, i8** nocapture %2) {
%4 = tail call i32 (...) @onion()
%5 = fptosi double %1 to i32
%6 = tail call i32 @xlate(double %0, i32 %5, i32 0)
%7 = load i8*, i8** %2
%8 = icmp eq i8* %7, null
br i1 %8, label %40, label %9
9: ; preds = %3, %35
%10 = phi i64 [ %36, %35 ], [ 0, %3 ]
%11 = phi i8* [ %38, %35 ], [ %7, %3 ]
%12 = phi double [ %15, %35 ], [ 3.500000e+01, %3 ]
%13 = load i8, i8* %11
%14 = icmp eq i8 %13, 0
%15 = fadd double %12, -5.000000e+00
br i1 %14, label %35, label %16
16: ; preds = %9
%17 = fptosi double %15 to i32
br label %18
18: ; preds = %16, %29
%19 = phi i8* [ %11, %16 ], [ %32, %29 ]
%20 = phi double [ 0.000000e+00, %16 ], [ %31, %29 ]
%21 = tail call i32 @xlate(double %20, i32 %17, i32 0)
%22 = tail call i32 @xlate(double 0.000000e+00, i32 -1, i32 0)
%23 = tail call i32 @square(double 5.375000e-01, i32 1, i32 1)
%24 = tail call i32 (...) @endxlate()
%25 = load i8, i8* %19
%26 = icmp eq i8 %25, 35
br i1 %26, label %27, label %29
27: ; preds = %18
%28 = tail call i32 @square(double 1.075000e+00, i32 3, i32 1)
br label %29
29: ; preds = %27, %18
%30 = tail call i32 (...) @endxlate()
%31 = fadd double %20, 2.150000e+00
%32 = getelementptr inbounds i8, i8* %19, i64 1
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 0
br i1 %34, label %35, label %18
35: ; preds = %29, %9
%36 = add nuw i64 %10, 1
%37 = getelementptr inbounds i8*, i8** %2, i64 %36
%38 = load i8*, i8** %37
%39 = icmp eq i8* %38, null
br i1 %39, label %40, label %9
40: ; preds = %35, %3
%41 = tail call i32 (...) @endxlate()
%42 = tail call i32 (...) @endonion()
ret void
}