#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*/ sla_djcal_(int *, double *, int *, int *);
void slaDjcal(int ndp, double djm, int iymdf[4], int *j) {
  int NDP;
  double DJM;
  int IYMDF[4];
  int J;
  int i;
  NDP = ndp;
  DJM = djm;
  sla_djcal_(&NDP, &DJM, (int *)IYMDF, &J);
  for (i = 0; i < 4; i++)
    iymdf[i] = IYMDF[i];
  *j = J;
}


x86 assembly (clang, -O0):
<slaDjcal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    -0x40(%rbp),%rdx
lea    -0x24(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x44(%rbp),%rcx
call   1030 <sla_djcal_@plt>
movl   $0x0,-0x48(%rbp)
cmpl   $0x4,-0x48(%rbp)
jge    117f <slaDjcal+0x6f>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1154 <slaDjcal+0x44>
mov    -0x44(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaDjcal>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,0x4(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <sla_djcal_@plt>
movaps 0x10(%rsp),%xmm0
movups %xmm0,(%rbx)
mov    (%rsp),%eax
mov    %eax,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @slaDjcal(i32 %0, double %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca double
%11 = alloca [4 x i32]
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%14 = load i32, i32* %5
store i32 %14, i32* %9
%15 = load double, double* %6
store double %15, double* %10
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%17 = call i32 @sla_djcal_(i32* %9, double* %10, i32* %16, i32* %12)
store i32 0, i32* %13
br label %18
18: ; preds = %30, %4
%19 = load i32, i32* %13
%20 = icmp slt i32 %19, 4
br i1 %20, label %21, label %33
21: ; preds = %18
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = load i32*, i32** %7
%27 = load i32, i32* %13
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %26, i64 %28
store i32 %25, i32* %29
br label %30
30: ; preds = %21
%31 = load i32, i32* %13
%32 = add nsw i32 %31, 1
store i32 %32, i32* %13
br label %18
33: ; preds = %18
%34 = load i32, i32* %12
%35 = load i32*, i32** %8
store i32 %34, i32* %35
ret void
}

LLVM IR (-O2):
define void @slaDjcal(i32 %0, double %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = bitcast i32* %2 to i8*
%6 = alloca i32
%7 = alloca double
%8 = alloca [4 x i32]
%9 = bitcast [4 x i32]* %8 to i8*
%10 = alloca i32
%11 = bitcast i32* %6 to i8*
%12 = bitcast double* %7 to i8*
%13 = bitcast i32* %10 to i8*
store i32 %0, i32* %6
store double %1, double* %7
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%15 = call i32 @sla_djcal_(i32* %6, double* %7, i32* %14, i32* %10)
%16 = load i32, i32* %10
store i32 %16, i32* %3
ret void
}