#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*/ onion();
int /*<<< orphan*/ renderchar(double, double, char **);
void renderstring(double x, double y, char **s[]) {
  int i;
  onion();
  renderchar(x, y, s[0]);
  x += 2.15;
  for (i = 1; s[i] != NULL; i++) {
    renderchar(x, y, s[i]);
    x += 2.15 * 8;
  }
  endonion();
}


x86 assembly (clang, -O0):
<renderstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <onion@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1040 <renderchar@plt>
movsd  0xe95(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     11ca <renderstring+0x9a>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <renderchar@plt>
movsd  0xe56(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    117c <renderstring+0x4c>
mov    $0x0,%al
call   1050 <endonion@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderstring>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <onion@plt>
mov    (%rbx),%rdi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <renderchar@plt>
movsd  (%rsp),%xmm0
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     11ae <renderstring+0x7e>
addsd  0xe8d(%rip),%xmm0
add    $0x10,%rbx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <renderchar@plt>
movsd  (%rsp),%xmm0
addsd  0xe66(%rip),%xmm0
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1180 <renderstring+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1050 <endonion@plt>

LLVM IR (-O0):
define void @renderstring(double %0, double %1, i8*** %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i8***
%7 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i8*** %2, i8**** %6
%8 = call i32 (...) @onion()
%9 = load double, double* %4
%10 = load double, double* %5
%11 = load i8***, i8**** %6
%12 = getelementptr inbounds i8**, i8*** %11, i64 0
%13 = load i8**, i8*** %12
%14 = call i32 @renderchar(double %9, double %10, i8** %13)
%15 = load double, double* %4
%16 = fadd double %15, 2.150000e+00
store double %16, double* %4
store i32 1, i32* %7
br label %17
17: ; preds = %35, %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 %38
24: ; preds = %17
%25 = load double, double* %4
%26 = load double, double* %5
%27 = load i8***, i8**** %6
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8**, i8*** %27, i64 %29
%31 = load i8**, i8*** %30
%32 = call i32 @renderchar(double %25, double %26, i8** %31)
%33 = load double, double* %4
%34 = fadd double %33, 1.720000e+01
store double %34, double* %4
br label %35
35: ; preds = %24
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
br label %17
38: ; preds = %17
%39 = call i32 (...) @endonion()
ret void
}

LLVM IR (-O2):
define void @renderstring(double %0, double %1, i8*** nocapture %2) {
%4 = tail call i32 (...) @onion()
%5 = load i8**, i8*** %2
%6 = tail call i32 @renderchar(double %0, double %1, i8** %5)
%7 = getelementptr inbounds i8**, i8*** %2, i64 1
%8 = load i8**, i8*** %7
%9 = icmp eq i8** %8, null
br i1 %9, label %22, label %10
10: ; preds = %3
%11 = fadd double %0, 2.150000e+00
br label %12
12: ; preds = %10, %12
%13 = phi i64 [ 1, %10 ], [ %18, %12 ]
%14 = phi i8** [ %8, %10 ], [ %20, %12 ]
%15 = phi double [ %11, %10 ], [ %17, %12 ]
%16 = tail call i32 @renderchar(double %15, double %1, i8** %14)
%17 = fadd double %15, 1.720000e+01
%18 = add nuw i64 %13, 1
%19 = getelementptr inbounds i8**, i8*** %2, i64 %18
%20 = load i8**, i8*** %19
%21 = icmp eq i8** %20, null
br i1 %21, label %22, label %12
22: ; preds = %12, %3
%23 = tail call i32 (...) @endonion()
ret void
}