#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 */
double M_PI;
double atan2(float, float);
int /*<<< orphan*/ caja(float, float, float);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glTranslatef(float, float, float);
float modulo(float, float, float);
float sqrt(float);
void paralelepipedo(float x0, float y0, float z0, float x1, float y1, float z1,
                    float a, float b) {
  float m;
  m = modulo(x1 - x0, y1 - y0, z1 - z0);
  glPushMatrix();
  glTranslatef(x0, y0, z0);
  glRotatef(-180.0 * atan2((z1 - z0), (x1 - x0)) / M_PI, 0.0, 1.0, 0.0);
  glRotatef(180.0 *
                    atan2((y1 - y0),
                          sqrt((x1 - x0) * (x1 - x0) + (z1 - z0) * (z1 - z0))) /
                    M_PI -
                90,
            0.0, 0.0, 1.0);
  caja(a, m, b);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<paralelepipedo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  %xmm7,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
call   1050 <modulo@plt>
movss  %xmm0,-0x24(%rbp)
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1080 <glTranslatef@plt>
movss  -0x18(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
call   1040 <atan2@plt>
movaps %xmm0,%xmm1
movsd  0xe01(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x2dc6(%rip),%rax
divsd  (%rax),%xmm0
xorps  %xmm3,%xmm3
movsd  0xdcf(%rip),%xmm2
movaps %xmm3,%xmm1
call   10a0 <glRotatef@plt>
movss  -0x14(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  -0x18(%rbp),%xmm3
subss  -0xc(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
call   1040 <atan2@plt>
movaps %xmm0,%xmm1
movsd  0xd77(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x2d44(%rip),%rax
divsd  (%rax),%xmm0
movsd  0xd58(%rip),%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm2,%xmm2
movsd  0xd41(%rip),%xmm3
movaps %xmm2,%xmm1
call   10a0 <glRotatef@plt>
movss  -0x1c(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movss  -0x20(%rbp),%xmm2
call   1030 <caja@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paralelepipedo>:
push   %rbx
sub    $0x30,%rsp
movss  %xmm7,0x2c(%rsp)
movss  %xmm6,0x28(%rsp)
movaps %xmm2,%xmm6
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x18(%rsp)
movaps %xmm0,%xmm2
movss  %xmm0,0x1c(%rsp)
movaps %xmm3,%xmm0
subss  %xmm2,%xmm0
movss  %xmm0,0x10(%rsp)
subss  %xmm1,%xmm4
movaps %xmm5,%xmm2
subss  %xmm6,%xmm2
movss  %xmm2,0xc(%rsp)
movss  %xmm4,0x20(%rsp)
movaps %xmm4,%xmm1
call   1050 <modulo@plt>
movss  %xmm0,0x24(%rsp)
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movss  0x1c(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
call   1080 <glTranslatef@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1040 <atan2@plt>
mulsd  0xdee(%rip),%xmm0
mov    0x2dcf(%rip),%rbx
divsd  (%rbx),%xmm0
movsd  0xde3(%rip),%xmm2
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
call   10a0 <glRotatef@plt>
movss  0xc(%rsp),%xmm0
mulss  %xmm0,%xmm0
movss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
movaps %xmm1,%xmm0
jb     125c <paralelepipedo+0xdc>
xorps  %xmm1,%xmm1
sqrtss %xmm0,%xmm1
jmp    1264 <paralelepipedo+0xe4>
call   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movss  0x20(%rsp),%xmm0
call   1040 <atan2@plt>
mulsd  0xd99(%rip),%xmm0
divsd  (%rbx),%xmm0
addsd  0xd95(%rip),%xmm0
movsd  0xd7d(%rip),%xmm3
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10a0 <glRotatef@plt>
movss  0x28(%rsp),%xmm0
movss  0x24(%rsp),%xmm1
movss  0x2c(%rsp),%xmm2
call   1030 <caja@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
jmp    1060 <glPopMatrix@plt>

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define void @paralelepipedo(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7) {
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
store float %0, float* %9
store float %1, float* %10
store float %2, float* %11
store float %3, float* %12
store float %4, float* %13
store float %5, float* %14
store float %6, float* %15
store float %7, float* %16
%18 = load float, float* %12
%19 = load float, float* %9
%20 = fsub float %18, %19
%21 = load float, float* %13
%22 = load float, float* %10
%23 = fsub float %21, %22
%24 = load float, float* %14
%25 = load float, float* %11
%26 = fsub float %24, %25
%27 = call float @modulo(float %20, float %23, float %26)
store float %27, float* %17
%28 = call i32 (...) @glPushMatrix()
%29 = load float, float* %9
%30 = load float, float* %10
%31 = load float, float* %11
%32 = call i32 @glTranslatef(float %29, float %30, float %31)
%33 = load float, float* %14
%34 = load float, float* %11
%35 = fsub float %33, %34
%36 = load float, float* %12
%37 = load float, float* %9
%38 = fsub float %36, %37
%39 = call double @atan2(float %35, float %38)
%40 = fmul double -1.800000e+02, %39
%41 = load double, double* @M_PI
%42 = fdiv double %40, %41
%43 = call i32 @glRotatef(double %42, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%44 = load float, float* %13
%45 = load float, float* %10
%46 = fsub float %44, %45
%47 = load float, float* %12
%48 = load float, float* %9
%49 = fsub float %47, %48
%50 = load float, float* %12
%51 = load float, float* %9
%52 = fsub float %50, %51
%53 = load float, float* %14
%54 = load float, float* %11
%55 = fsub float %53, %54
%56 = load float, float* %14
%57 = load float, float* %11
%58 = fsub float %56, %57
%59 = fmul float %55, %58
%60 = call float @llvm.fmuladd.f32(float %49, float %52, float %59)
%61 = call float @sqrt(float %60)
%62 = call double @atan2(float %46, float %61)
%63 = fmul double 1.800000e+02, %62
%64 = load double, double* @M_PI
%65 = fdiv double %63, %64
%66 = fsub double %65, 9.000000e+01
%67 = call i32 @glRotatef(double %66, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%68 = load float, float* %15
%69 = load float, float* %17
%70 = load float, float* %16
%71 = call i32 @caja(float %68, float %69, float %70)
%72 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @paralelepipedo(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7) {
%9 = fsub float %3, %0
%10 = fsub float %4, %1
%11 = fsub float %5, %2
%12 = tail call float @modulo(float %9, float %10, float %11)
%13 = tail call i32 (...) @glPushMatrix()
%14 = tail call i32 @glTranslatef(float %0, float %1, float %2)
%15 = tail call double @atan2(float %11, float %9)
%16 = fmul double %15, -1.800000e+02
%17 = load double, double* @M_PI
%18 = fdiv double %16, %17
%19 = tail call i32 @glRotatef(double %18, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%20 = fmul float %11, %11
%21 = tail call float @llvm.fmuladd.f32(float %9, float %9, float %20)
%22 = tail call float @sqrt(float %21)
%23 = tail call double @atan2(float %10, float %22)
%24 = fmul double %23, 1.800000e+02
%25 = load double, double* @M_PI
%26 = fdiv double %24, %25
%27 = fadd double %26, -9.000000e+01
%28 = tail call i32 @glRotatef(double %27, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%29 = tail call i32 @caja(float %6, float %12, float %7)
%30 = tail call i32 (...) @glPopMatrix()
ret void
}