#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 sweep_define_parameters_symbolically(int nq, int nv, int np, int nc,
                                         char *pars) {
  int k, fail = 0;
  int nqvp[4];
  int idx[np];
  double *c;
  nqvp[0] = nq;
  nqvp[1] = nv;
  nqvp[2] = np;
  nqvp[3] = nc;
  for (k = 0; k < np; k++)
    idx[k] = (int)pars[k];
  fail = _ada_use_c2phc4c(611, nqvp, idx, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_define_parameters_symbolically>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a6 <sweep_define_parameters_symbolically+0x96>
mov    -0x50(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%edx
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1175 <sweep_define_parameters_symbolically+0x65>
mov    -0x50(%rbp),%rdx
lea    -0x30(%rbp),%rsi
mov    -0x48(%rbp),%rcx
mov    $0x263,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x38(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_define_parameters_symbolically>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r9d
mov    %rsp,%r14
mov    %edx,%ebx
mov    %rsp,%rdx
lea    0xf(,%rbx,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,%rsp
mov    %edi,-0x20(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %r9d,-0x18(%rbp)
mov    %ecx,-0x14(%rbp)
test   %r9d,%r9d
jle    1251 <sweep_define_parameters_symbolically+0x141>
cmp    $0x8,%r9d
jae    115b <sweep_define_parameters_symbolically+0x4b>
xor    %eax,%eax
jmp    1240 <sweep_define_parameters_symbolically+0x130>
mov    %ebx,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rcx
mov    %rcx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rcx,%rcx
je     126e <sweep_define_parameters_symbolically+0x15e>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movd   (%r8,%rcx,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0x4(%r8,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
psrad  $0x18,%xmm1
movdqa %xmm0,(%rdx,%rcx,4)
movdqa %xmm1,0x10(%rdx,%rcx,4)
movd   0x8(%r8,%rcx,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0xc(%r8,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
psrad  $0x18,%xmm1
movdqa %xmm0,0x20(%rdx,%rcx,4)
movdqa %xmm1,0x30(%rdx,%rcx,4)
add    $0x10,%rcx
add    $0xfffffffffffffffe,%rdi
jne    1190 <sweep_define_parameters_symbolically+0x80>
test   $0x1,%sil
je     1238 <sweep_define_parameters_symbolically+0x128>
movd   (%r8,%rcx,1),%xmm0
movd   0x4(%r8,%rcx,1),%xmm1
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
psrad  $0x18,%xmm0
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm1
movdqa %xmm0,(%rdx,%rcx,4)
movdqa %xmm1,0x10(%rdx,%rcx,4)
cmp    %rbx,%rax
je     1251 <sweep_define_parameters_symbolically+0x141>
nopl   (%rax)
movsbl (%r8,%rax,1),%ecx
mov    %ecx,(%rdx,%rax,4)
add    $0x1,%rax
cmp    %rax,%rbx
jne    1240 <sweep_define_parameters_symbolically+0x130>
lea    -0x20(%rbp),%rsi
mov    $0x263,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %r14,%rsp
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%sil
jne    1206 <sweep_define_parameters_symbolically+0xf6>
jmp    1238 <sweep_define_parameters_symbolically+0x128>

LLVM IR (-O0):
define i32 @sweep_define_parameters_symbolically(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca [4 x i32]
%14 = alloca i8*
%15 = alloca i64
%16 = alloca double*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
store i32 0, i32* %12
%17 = load i32, i32* %8
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %14
%20 = alloca i32, i64 %18
store i64 %18, i64* %15
%21 = load i32, i32* %6
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
store i32 %21, i32* %22
%23 = load i32, i32* %7
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 1
store i32 %23, i32* %24
%25 = load i32, i32* %8
%26 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 2
store i32 %25, i32* %26
%27 = load i32, i32* %9
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 3
store i32 %27, i32* %28
store i32 0, i32* %11
br label %29
29: ; preds = %43, %5
%30 = load i32, i32* %11
%31 = load i32, i32* %8
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %46
33: ; preds = %29
%34 = load i8*, i8** %10
%35 = load i32, i32* %11
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %20, i64 %41
store i32 %39, i32* %42
br label %43
43: ; preds = %33
%44 = load i32, i32* %11
%45 = add nsw i32 %44, 1
store i32 %45, i32* %11
br label %29
46: ; preds = %29
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%48 = load double*, double** %16
%49 = call i32 @_ada_use_c2phc4c(i32 611, i32* %47, i32* %20, double* %48, i32 0)
store i32 %49, i32* %12
%50 = load i32, i32* %12
%51 = load i8*, i8** %14
ret i32 %50
}

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