#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 */
struct msscene {
  int dummy;
};

/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ plane_command(char *, double, double, double, double, double,
                                 double);
int /*<<< orphan*/ set_error1(char *);
int parse_plane(struct msscene *ms, int n_words, char words[16][64]) {
  double x, y, z, xn, yn, zn;
  if (n_words != 8) {
    set_error1("invalid plane command");
    return (0);
  }
  x = atof(words[2]);
  y = atof(words[3]);
  z = atof(words[4]);
  xn = atof(words[5]);
  yn = atof(words[6]);
  zn = atof(words[7]);
  plane_command(words[1], x, y, z, xn, yn, zn);
  return (1);
}


x86 assembly (clang, -O0):
<parse_plane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x8,-0x14(%rbp)
je     1165 <parse_plane+0x35>
lea    0xeac(%rip),%rdi
call   1050 <set_error1@plt>
movl   $0x0,-0x4(%rbp)
jmp    1215 <parse_plane+0xe5>
mov    -0x20(%rbp),%rdi
add    $0x80,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
add    $0xc0,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x100,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x140,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x180,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1c0,%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x40,%rdi
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
call   1030 <plane_command@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_plane>:
push   %rbx
sub    $0x30,%rsp
cmp    $0x8,%esi
jne    11db <parse_plane+0xab>
mov    %rdx,%rbx
lea    0x80(%rdx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x28(%rsp)
lea    0xc0(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x20(%rsp)
lea    0x100(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x18(%rsp)
lea    0x140(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x180(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x8(%rsp)
lea    0x1c0(%rbx),%rdi
call   1040 <atof@plt>
movaps %xmm0,%xmm5
add    $0x40,%rbx
mov    %rbx,%rdi
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm4
call   1030 <plane_command@plt>
mov    $0x1,%eax
jmp    11e9 <parse_plane+0xb9>
lea    0xe1e(%rip),%rdi
call   1050 <set_error1@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.msscene = type { i32 }
@.str = [22 x i8] c"invalid plane command\00"
define i32 @parse_plane(%struct.msscene* %0, i32 %1, [64 x i8]* %2) {
%4 = alloca i32
%5 = alloca %struct.msscene*
%6 = alloca i32
%7 = alloca [64 x i8]*
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store %struct.msscene* %0, %struct.msscene** %5
store i32 %1, i32* %6
store [64 x i8]* %2, [64 x i8]** %7
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 8
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = call i32 @set_error1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %53
18: ; preds = %3
%19 = load [64 x i8]*, [64 x i8]** %7
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %19, i64 2
%21 = getelementptr inbounds [64 x i8], [64 x i8]* %20, i64 0, i64 0
%22 = call double @atof(i8* %21)
store double %22, double* %8
%23 = load [64 x i8]*, [64 x i8]** %7
%24 = getelementptr inbounds [64 x i8], [64 x i8]* %23, i64 3
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %24, i64 0, i64 0
%26 = call double @atof(i8* %25)
store double %26, double* %9
%27 = load [64 x i8]*, [64 x i8]** %7
%28 = getelementptr inbounds [64 x i8], [64 x i8]* %27, i64 4
%29 = getelementptr inbounds [64 x i8], [64 x i8]* %28, i64 0, i64 0
%30 = call double @atof(i8* %29)
store double %30, double* %10
%31 = load [64 x i8]*, [64 x i8]** %7
%32 = getelementptr inbounds [64 x i8], [64 x i8]* %31, i64 5
%33 = getelementptr inbounds [64 x i8], [64 x i8]* %32, i64 0, i64 0
%34 = call double @atof(i8* %33)
store double %34, double* %11
%35 = load [64 x i8]*, [64 x i8]** %7
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %35, i64 6
%37 = getelementptr inbounds [64 x i8], [64 x i8]* %36, i64 0, i64 0
%38 = call double @atof(i8* %37)
store double %38, double* %12
%39 = load [64 x i8]*, [64 x i8]** %7
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %39, i64 7
%41 = getelementptr inbounds [64 x i8], [64 x i8]* %40, i64 0, i64 0
%42 = call double @atof(i8* %41)
store double %42, double* %13
%43 = load [64 x i8]*, [64 x i8]** %7
%44 = getelementptr inbounds [64 x i8], [64 x i8]* %43, i64 1
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %44, i64 0, i64 0
%46 = load double, double* %8
%47 = load double, double* %9
%48 = load double, double* %10
%49 = load double, double* %11
%50 = load double, double* %12
%51 = load double, double* %13
%52 = call i32 @plane_command(i8* %45, double %46, double %47, double %48, double %49, double %50, double %51)
store i32 1, i32* %4
br label %53
53: ; preds = %18, %16
%54 = load i32, i32* %4
ret i32 %54
}

LLVM IR (-O2):
%struct.msscene = type { i32 }
@.str = [22 x i8] c"invalid plane command\00"
define i32 @parse_plane(%struct.msscene* nocapture readnone %0, i32 %1, [64 x i8]* %2) {
%4 = icmp eq i32 %1, 8
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @set_error1(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %22
7: ; preds = %3
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 2, i64 0
%9 = tail call double @atof(i8* %8)
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 3, i64 0
%11 = tail call double @atof(i8* %10)
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 4, i64 0
%13 = tail call double @atof(i8* %12)
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 5, i64 0
%15 = tail call double @atof(i8* %14)
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 6, i64 0
%17 = tail call double @atof(i8* %16)
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 7, i64 0
%19 = tail call double @atof(i8* %18)
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 1, i64 0
%21 = tail call i32 @plane_command(i8* %20, double %9, double %11, double %13, double %15, double %17, double %19)
br label %22
22: ; preds = %7, %5
%23 = phi i32 [ 0, %5 ], [ 1, %7 ]
ret i32 %23
}