#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 _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int intcelcon_append_lifted_point(int n, int i, int *point) {
  int fail, k;
  double dblpoint[n];
  for (k = 0; k < n; k++)
    dblpoint[k] = (double)point[k];
  fail = _ada_use_c2phc4c(754, &i, &n, dblpoint, 0);
  return fail;
}


x86 assembly (clang, -O0):
<intcelcon_append_lifted_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1184 <intcelcon_append_lifted_point+0x74>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cvtsi2sdl (%rcx,%rdx,4),%xmm0
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1150 <intcelcon_append_lifted_point+0x40>
mov    -0x30(%rbp),%rcx
mov    $0x2f2,%edi
lea    -0x8(%rbp),%rsi
lea    -0x4(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcelcon_append_lifted_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0x4(%rbp)
mov    %edi,%r9d
mov    %rsp,%rcx
lea    0xf(,%r9,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
test   %edi,%edi
jle    11f6 <intcelcon_append_lifted_point+0xe6>
cmp    $0x4,%edi
jae    114a <intcelcon_append_lifted_point+0x3a>
xor    %esi,%esi
jmp    11e0 <intcelcon_append_lifted_point+0xd0>
mov    %r9d,%esi
and    $0xfffffffc,%esi
lea    -0x4(%rsi),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     1210 <intcelcon_append_lifted_point+0x100>
mov    %r8,%rax
and    $0xfffffffffffffffe,%rax
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvtdq2pd (%rdx,%rdi,4),%xmm0
cvtdq2pd 0x8(%rdx,%rdi,4),%xmm1
movaps %xmm0,(%rcx,%rdi,8)
movaps %xmm1,0x10(%rcx,%rdi,8)
cvtdq2pd 0x10(%rdx,%rdi,4),%xmm0
cvtdq2pd 0x18(%rdx,%rdi,4),%xmm1
movapd %xmm0,0x20(%rcx,%rdi,8)
movaps %xmm1,0x30(%rcx,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rax
jne    1180 <intcelcon_append_lifted_point+0x70>
test   $0x1,%r8b
je     11d0 <intcelcon_append_lifted_point+0xc0>
cvtdq2pd (%rdx,%rdi,4),%xmm0
cvtdq2pd 0x8(%rdx,%rdi,4),%xmm1
movapd %xmm0,(%rcx,%rdi,8)
movaps %xmm1,0x10(%rcx,%rdi,8)
cmp    %r9,%rsi
je     11f6 <intcelcon_append_lifted_point+0xe6>
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm0,%xmm0
cvtsi2sdl (%rdx,%rsi,4),%xmm0
movsd  %xmm0,(%rcx,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%r9
jne    11e0 <intcelcon_append_lifted_point+0xd0>
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x2f2,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %rbp,%rsp
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r8b
jne    11bb <intcelcon_append_lifted_point+0xab>
jmp    11d0 <intcelcon_append_lifted_point+0xc0>

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

LLVM IR (-O2):
define i32 @intcelcon_append_lifted_point(i32 %0, i32 %1, i32* nocapture %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = zext i32 %0 to i64
%7 = alloca double, i64 %6
%8 = icmp sgt i32 %0, 0
br i1 %8, label %9, label %79
9: ; preds = %3
%10 = icmp ult i32 %0, 4
br i1 %10, label %69, label %11
11: ; preds = %9
%12 = and i64 %6, 4294967292
%13 = add nsw i64 %12, -4
%14 = lshr exact i64 %13, 2
%15 = add nuw nsw i64 %14, 1
%16 = and i64 %15, 1
%17 = icmp eq i64 %13, 0
br i1 %17, label %51, label %18
18: ; preds = %11
%19 = and i64 %15, 9223372036854775806
br label %20
20: ; preds = %20, %18
%21 = phi i64 [ 0, %18 ], [ %48, %20 ]
%22 = phi i64 [ 0, %18 ], [ %49, %20 ]
%23 = getelementptr inbounds i32, i32* %2, i64 %21
%24 = bitcast i32* %23 to <2 x i32>*
%25 = load <2 x i32>, <2 x i32>* %24
%26 = getelementptr inbounds i32, i32* %23, i64 2
%27 = bitcast i32* %26 to <2 x i32>*
%28 = load <2 x i32>, <2 x i32>* %27
%29 = sitofp <2 x i32> %25 to <2 x double>
%30 = sitofp <2 x i32> %28 to <2 x double>
%31 = getelementptr inbounds double, double* %7, i64 %21
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> %29, <2 x double>* %32
%33 = getelementptr inbounds double, double* %31, i64 2
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> %30, <2 x double>* %34
%35 = or i64 %21, 4
%36 = getelementptr inbounds i32, i32* %2, i64 %35
%37 = bitcast i32* %36 to <2 x i32>*
%38 = load <2 x i32>, <2 x i32>* %37
%39 = getelementptr inbounds i32, i32* %36, i64 2
%40 = bitcast i32* %39 to <2 x i32>*
%41 = load <2 x i32>, <2 x i32>* %40
%42 = sitofp <2 x i32> %38 to <2 x double>
%43 = sitofp <2 x i32> %41 to <2 x double>
%44 = getelementptr inbounds double, double* %7, i64 %35
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> %42, <2 x double>* %45
%46 = getelementptr inbounds double, double* %44, i64 2
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %43, <2 x double>* %47
%48 = add nuw i64 %21, 8
%49 = add i64 %22, 2
%50 = icmp eq i64 %49, %19
br i1 %50, label %51, label %20
51: ; preds = %20, %11
%52 = phi i64 [ 0, %11 ], [ %48, %20 ]
%53 = icmp eq i64 %16, 0
br i1 %53, label %67, label %54
54: ; preds = %51
%55 = getelementptr inbounds i32, i32* %2, i64 %52
%56 = bitcast i32* %55 to <2 x i32>*
%57 = load <2 x i32>, <2 x i32>* %56
%58 = getelementptr inbounds i32, i32* %55, i64 2
%59 = bitcast i32* %58 to <2 x i32>*
%60 = load <2 x i32>, <2 x i32>* %59
%61 = sitofp <2 x i32> %57 to <2 x double>
%62 = sitofp <2 x i32> %60 to <2 x double>
%63 = getelementptr inbounds double, double* %7, i64 %52
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %61, <2 x double>* %64
%65 = getelementptr inbounds double, double* %63, i64 2
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> %62, <2 x double>* %66
br label %67
67: ; preds = %51, %54
%68 = icmp eq i64 %12, %6
br i1 %68, label %79, label %69
69: ; preds = %9, %67
%70 = phi i64 [ 0, %9 ], [ %12, %67 ]
br label %71
71: ; preds = %69, %71
%72 = phi i64 [ %77, %71 ], [ %70, %69 ]
%73 = getelementptr inbounds i32, i32* %2, i64 %72
%74 = load i32, i32* %73
%75 = sitofp i32 %74 to double
%76 = getelementptr inbounds double, double* %7, i64 %72
store double %75, double* %76
%77 = add nuw nsw i64 %72, 1
%78 = icmp eq i64 %77, %6
br i1 %78, label %79, label %71
79: ; preds = %71, %67, %3
%80 = call i32 @_ada_use_c2phc4c(i32 754, i32* %5, i32* %4, double* %7, i32 0)
ret i32 %80
}