#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 sin(double const);
void modele_coriolis(const double q[2], const double qdot[2], double N[2 * 2]) {
  double s2;
  s2 = sin(q[1]);
  N[0] = -2 * 5 * 1 * 1 * s2 * qdot[1];
  N[1] = -5 * 1 * 1 * s2 * qdot[1];
  N[2] = 5 * 1 * 1 * qdot[0];
  N[3] = 0.0;
}


x86 assembly (clang, -O0):
<modele_coriolis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xed1(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xeab(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe80(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modele_coriolis>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
movsd  0x8(%rdi),%xmm0
call   1030 <sin@plt>
movsd  0xed4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x8(%r14),%xmm1
movsd  %xmm1,(%rbx)
mulsd  0xec6(%rip),%xmm0
mulsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  (%r14),%xmm0
mulsd  0xeb6(%rip),%xmm0
movsd  %xmm0,0x10(%rbx)
movq   $0x0,0x18(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @modele_coriolis(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
%11 = call double @sin(double %10)
store double %11, double* %7
%12 = load double, double* %7
%13 = fmul double -1.000000e+01, %12
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = load double*, double** %6
%19 = getelementptr inbounds double, double* %18, i64 0
store double %17, double* %19
%20 = load double, double* %7
%21 = fmul double -5.000000e+00, %20
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fmul double %21, %24
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 1
store double %25, double* %27
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = fmul double 5.000000e+00, %30
%32 = load double*, double** %6
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
%34 = load double*, double** %6
%35 = getelementptr inbounds double, double* %34, i64 3
store double 0.000000e+00, double* %35
ret void
}

LLVM IR (-O2):
define void @modele_coriolis(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = tail call double @sin(double %5)
%7 = fmul double %6, -1.000000e+01
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fmul double %7, %9
store double %10, double* %2
%11 = fmul double %6, -5.000000e+00
%12 = load double, double* %8
%13 = fmul double %11, %12
%14 = getelementptr inbounds double, double* %2, i64 1
store double %13, double* %14
%15 = load double, double* %1
%16 = fmul double %15, 5.000000e+00
%17 = getelementptr inbounds double, double* %2, i64 2
store double %16, double* %17
%18 = getelementptr inbounds double, double* %2, i64 3
store double 0.000000e+00, double* %18
ret void
}