#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 atof(char *);
void readEquationCmd(double eqCoef[], char **in, size_t degree) {
  for (int i = degree; i >= 0; i--)
    eqCoef[i] = atof(in[degree - i + 1]);
}


x86 assembly (clang, -O0):
<readEquationCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1169 <readEquationCmd+0x59>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
sub    %rdx,%rcx
mov    0x8(%rax,%rcx,8),%rdi
call   1030 <atof@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <readEquationCmd+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readEquationCmd>:
push   %r15
push   %r14
push   %rbx
test   $0x80000000,%edx
jne    114c <readEquationCmd+0x3c>
mov    %edx,%ebx
lea    (%rdi,%rbx,8),%r14
neg    %rbx
lea    (%rsi,%rdx,8),%r15
add    $0x8,%r15
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%r14)
add    $0x1,%rbx
add    $0xfffffffffffffff8,%r14
cmp    $0x1,%rbx
jne    1130 <readEquationCmd+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @readEquationCmd(double* %0, i8** %1, i64 %2) {
%4 = alloca double*
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
store double* %0, double** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = trunc i64 %8 to i32
store i32 %9, i32* %7
br label %10
10: ; preds = %27, %3
%11 = load i32, i32* %7
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %30
13: ; preds = %10
%14 = load i8**, i8*** %5
%15 = load i64, i64* %6
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = sub i64 %15, %17
%19 = add i64 %18, 1
%20 = getelementptr inbounds i8*, i8** %14, i64 %19
%21 = load i8*, i8** %20
%22 = call double @atof(i8* %21)
%23 = load double*, double** %4
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
store double %22, double* %26
br label %27
27: ; preds = %13
%28 = load i32, i32* %7
%29 = add nsw i32 %28, -1
store i32 %29, i32* %7
br label %10
30: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @readEquationCmd(double* nocapture writeonly %0, i8** nocapture %1, i64 %2) {
%4 = and i64 %2, 2147483648
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = add nuw i64 %2, 1
%8 = and i64 %2, 4294967295
br label %10
9: ; preds = %10, %3
ret void
10: ; preds = %6, %10
%11 = phi i64 [ %8, %6 ], [ %17, %10 ]
%12 = sub i64 %7, %11
%13 = getelementptr inbounds i8*, i8** %1, i64 %12
%14 = load i8*, i8** %13
%15 = tail call double @atof(i8* %14)
%16 = getelementptr inbounds double, double* %0, i64 %11
store double %15, double* %16
%17 = add nsw i64 %11, -1
%18 = icmp eq i64 %11, 0
br i1 %18, label %9, label %10
}