#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*/ charstr(char *);
int /*<<< orphan*/ cmov(double, double, double);
int /*<<< orphan*/ color(int);
int /*<<< orphan*/ draw(double, double, double);
int /*<<< orphan*/ move(double, double, double);
void drawtetra() {
  move(-0.5, 0.866, -0.5);
  draw(-0.5, -0.866, -0.5);
  draw(1.0, 0.0, -0.5);
  draw(-0.5, 0.866, -0.5);
  draw(0.0, 0.0, 1.5);
  draw(-0.5, -0.866, -0.5);
  move(1.0, 0.0, -0.5);
  draw(0.0, 0.0, 1.5);
  color(7);
  cmov(-0.5, 0.866, -0.5);
  charstr("a");
  cmov(-0.5, -0.866, -0.5);
  charstr("b");
  cmov(1.0, 0.0, -0.5);
  charstr("c");
  cmov(0.0, 0.0, 1.5);
  charstr("d");
}


x86 assembly (clang, -O0):
<drawtetra>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeb4(%rip),%xmm2
movsd  0xebc(%rip),%xmm1
movaps %xmm2,%xmm0
call   1070 <move@plt>
movsd  0xe9c(%rip),%xmm2
movsd  0xe9c(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <draw@plt>
movsd  0xe7c(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe79(%rip),%xmm2
call   1030 <draw@plt>
movsd  0xe6c(%rip),%xmm2
movsd  0xe74(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <draw@plt>
xorps  %xmm1,%xmm1
movsd  0xe41(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <draw@plt>
movsd  0xe41(%rip),%xmm2
movsd  0xe41(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <draw@plt>
movsd  0xe21(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe1e(%rip),%xmm2
call   1070 <move@plt>
xorps  %xmm1,%xmm1
movsd  0xdfe(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <draw@plt>
mov    $0x7,%edi
call   1050 <color@plt>
movsd  0xdf4(%rip),%xmm2
movsd  0xdfc(%rip),%xmm1
movaps %xmm2,%xmm0
call   1040 <cmov@plt>
lea    0xdf5(%rip),%rdi
call   1060 <charstr@plt>
movsd  0xdd0(%rip),%xmm2
movsd  0xdd0(%rip),%xmm1
movaps %xmm2,%xmm0
call   1040 <cmov@plt>
lea    0xdd3(%rip),%rdi
call   1060 <charstr@plt>
movsd  0xda4(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xda1(%rip),%xmm2
call   1040 <cmov@plt>
lea    0xdb1(%rip),%rdi
call   1060 <charstr@plt>
xorps  %xmm1,%xmm1
movsd  0xd75(%rip),%xmm2
movaps %xmm1,%xmm0
call   1040 <cmov@plt>
lea    0xd94(%rip),%rdi
call   1060 <charstr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawtetra>:
push   %rax
movsd  0xea7(%rip),%xmm1
movsd  0xea7(%rip),%xmm0
movaps %xmm0,%xmm2
call   1070 <move@plt>
movsd  0xe9f(%rip),%xmm1
movsd  0xe8f(%rip),%xmm0
movaps %xmm0,%xmm2
call   1030 <draw@plt>
movsd  0xe8f(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe74(%rip),%xmm2
call   1030 <draw@plt>
movsd  0xe67(%rip),%xmm0
movsd  0xe57(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <draw@plt>
movsd  0xe67(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <draw@plt>
movsd  0xe3c(%rip),%xmm0
movsd  0xe3c(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <draw@plt>
xorps  %xmm1,%xmm1
movsd  0xe31(%rip),%xmm0
movsd  0xe19(%rip),%xmm2
call   1070 <move@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe1e(%rip),%xmm2
call   1030 <draw@plt>
mov    $0x7,%edi
call   1050 <color@plt>
movsd  0xdef(%rip),%xmm0
movsd  0xddf(%rip),%xmm1
movaps %xmm0,%xmm2
call   1040 <cmov@plt>
lea    0xdf8(%rip),%rdi
call   1060 <charstr@plt>
movsd  0xdcb(%rip),%xmm0
movsd  0xdcb(%rip),%xmm1
movaps %xmm0,%xmm2
call   1040 <cmov@plt>
lea    0xdd6(%rip),%rdi
call   1060 <charstr@plt>
xorps  %xmm1,%xmm1
movsd  0xdb4(%rip),%xmm0
movsd  0xd9c(%rip),%xmm2
call   1040 <cmov@plt>
lea    0xdb4(%rip),%rdi
call   1060 <charstr@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xd95(%rip),%xmm2
call   1040 <cmov@plt>
lea    0xd97(%rip),%rdi
pop    %rax
jmp    1060 <charstr@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [2 x i8] c"d\00"
define void @drawtetra() {
%1 = call i32 @move(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%2 = call i32 @draw(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%3 = call i32 @draw(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%4 = call i32 @draw(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%5 = call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%6 = call i32 @draw(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%7 = call i32 @move(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%8 = call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%9 = call i32 @color(i32 7)
%10 = call i32 @cmov(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%11 = call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @cmov(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%13 = call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @cmov(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%15 = call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @cmov(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%17 = call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [2 x i8] c"d\00"
define void @drawtetra() {
%1 = tail call i32 @move(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%2 = tail call i32 @draw(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%3 = tail call i32 @draw(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%4 = tail call i32 @draw(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%5 = tail call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%6 = tail call i32 @draw(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%7 = tail call i32 @move(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%8 = tail call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%9 = tail call i32 @color(i32 7)
%10 = tail call i32 @cmov(double -5.000000e-01, double 8.660000e-01, double -5.000000e-01)
%11 = tail call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @cmov(double -5.000000e-01, double -8.660000e-01, double -5.000000e-01)
%13 = tail call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 @cmov(double 1.000000e+00, double 0.000000e+00, double -5.000000e-01)
%15 = tail call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32 @cmov(double 0.000000e+00, double 0.000000e+00, double 1.500000e+00)
%17 = tail call i32 @charstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}