#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*/ strcpy(char *, char *);
void errclb_(int n, int m, double factr, double *l, double *u, int *nbd,
             char *task, int *info, int *k) {
  int i;
  if (n <= 0) {
    strcpy(task, "ERROR: N .LE. 0");
  }
  if (m <= 0) {
    strcpy(task, "ERROR: M .LE. 0");
  }
  if (factr < 0.) {
    strcpy(task, "ERROR: FACTR .LT. 0");
  }
  for (i = 0; i < n; ++i) {
    if (nbd[i] < 0 || nbd[i] > 3) {
      strcpy(task, "ERROR: INVALID NBD");
      *info = -6;
      *k = i + 1;
    }
    if (nbd[i] == 2) {
      if (l[i] > u[i]) {
        strcpy(task, "ERROR: NO FEASIBLE SOLUTION");
        *info = -7;
        *k = i + 1;
      }
    }
  }
}


x86 assembly (clang, -O0):
<errclb_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1155 <errclb_+0x45>
mov    -0x30(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <strcpy@plt>
cmpl   $0x0,-0x8(%rbp)
jg     116f <errclb_+0x5f>
mov    -0x30(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1030 <strcpy@plt>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    118d <errclb_+0x7d>
mov    -0x30(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    125a <errclb_+0x14a>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jl     11c4 <errclb_+0xb4>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jle    11ea <errclb_+0xda>
mov    -0x30(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x10(%rbp),%rax
movl   $0xfffffffa,(%rax)
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
jne    1247 <errclb_+0x137>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1242 <errclb_+0x132>
mov    -0x30(%rbp),%rdi
lea    0xe20(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x10(%rbp),%rax
movl   $0xfffffff9,(%rax)
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1247 <errclb_+0x137>
jmp    124c <errclb_+0x13c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1194 <errclb_+0x84>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errclb_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r14
mov    %r8,%rbx
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %esi,%ebp
mov    %edi,%r15d
test   %edi,%edi
jle    1202 <errclb_+0xf2>
test   %ebp,%ebp
jle    1223 <errclb_+0x113>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    115c <errclb_+0x4c>
lea    0xecc(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
test   %r15d,%r15d
jle    11f3 <errclb_+0xe3>
mov    0x58(%rsp),%rbp
mov    0x50(%rsp),%r13
mov    %r15d,%r15d
xor    %r12d,%r12d
jmp    1189 <errclb_+0x79>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
cmp    %r12,%r15
je     11f3 <errclb_+0xe3>
mov    (%rbx,%r12,4),%eax
cmp    $0x4,%eax
jb     11b5 <errclb_+0xa5>
mov    %r14,%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0xfffffffa,0x0(%r13)
ff
lea    0x1(%r12),%eax
mov    %eax,0x0(%rbp)
mov    (%rbx,%r12,4),%eax
cmp    $0x2,%eax
jne    1180 <errclb_+0x70>
mov    0x8(%rsp),%rax
movsd  (%rax,%r12,8),%xmm0
mov    0x10(%rsp),%rax
ucomisd (%rax,%r12,8),%xmm0
jbe    1180 <errclb_+0x70>
mov    %r14,%rdi
lea    0xe6b(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0xfffffff9,0x0(%r13)
ff
lea    0x1(%r12),%eax
mov    %eax,0x0(%rbp)
jmp    1180 <errclb_+0x70>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdf7(%rip),%rsi
mov    %r14,%rdi
movsd  %xmm0,(%rsp)
call   1030 <strcpy@plt>
movsd  (%rsp),%xmm0
test   %ebp,%ebp
jg     1143 <errclb_+0x33>
lea    0xde6(%rip),%rsi
mov    %r14,%rdi
movsd  %xmm0,(%rsp)
call   1030 <strcpy@plt>
movsd  (%rsp),%xmm0
jmp    1143 <errclb_+0x33>

LLVM IR (-O0):
@.str = [16 x i8] c"ERROR: N .LE. 0\00"
@.str.1 = [16 x i8] c"ERROR: M .LE. 0\00"
@.str.2 = [20 x i8] c"ERROR: FACTR .LT. 0\00"
@.str.3 = [19 x i8] c"ERROR: INVALID NBD\00"
@.str.4 = [28 x i8] c"ERROR: NO FEASIBLE SOLUTION\00"
define void @errclb_(i32 %0, i32 %1, double %2, double* %3, double* %4, i32* %5, i8* %6, i32* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store double %2, double* %12
store double* %3, double** %13
store double* %4, double** %14
store i32* %5, i32** %15
store i8* %6, i8** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%20 = load i32, i32* %10
%21 = icmp sle i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %9
%23 = load i8*, i8** %16
%24 = call i32 @strcpy(i8* %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %25
25: ; preds = %22, %9
%26 = load i32, i32* %11
%27 = icmp sle i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i8*, i8** %16
%30 = call i32 @strcpy(i8* %29, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %28, %25
%32 = load double, double* %12
%33 = fcmp olt double %32, 0.000000e+00
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load i8*, i8** %16
%36 = call i32 @strcpy(i8* %35, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %37
37: ; preds = %34, %31
store i32 0, i32* %19
br label %38
38: ; preds = %91, %37
%39 = load i32, i32* %19
%40 = load i32, i32* %10
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %94
42: ; preds = %38
%43 = load i32*, i32** %15
%44 = load i32, i32* %19
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %43, i64 %45
%47 = load i32, i32* %46
%48 = icmp slt i32 %47, 0
br i1 %48, label %56, label %49
49: ; preds = %42
%50 = load i32*, i32** %15
%51 = load i32, i32* %19
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %50, i64 %52
%54 = load i32, i32* %53
%55 = icmp sgt i32 %54, 3
br i1 %55, label %56, label %63
56: ; preds = %49, %42
%57 = load i8*, i8** %16
%58 = call i32 @strcpy(i8* %57, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%59 = load i32*, i32** %17
store i32 -6, i32* %59
%60 = load i32, i32* %19
%61 = add nsw i32 %60, 1
%62 = load i32*, i32** %18
store i32 %61, i32* %62
br label %63
63: ; preds = %56, %49
%64 = load i32*, i32** %15
%65 = load i32, i32* %19
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %64, i64 %66
%68 = load i32, i32* %67
%69 = icmp eq i32 %68, 2
br i1 %69, label %70, label %90
70: ; preds = %63
%71 = load double*, double** %13
%72 = load i32, i32* %19
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %71, i64 %73
%75 = load double, double* %74
%76 = load double*, double** %14
%77 = load i32, i32* %19
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = fcmp ogt double %75, %80
br i1 %81, label %82, label %89
82: ; preds = %70
%83 = load i8*, i8** %16
%84 = call i32 @strcpy(i8* %83, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%85 = load i32*, i32** %17
store i32 -7, i32* %85
%86 = load i32, i32* %19
%87 = add nsw i32 %86, 1
%88 = load i32*, i32** %18
store i32 %87, i32* %88
br label %89
89: ; preds = %82, %70
br label %90
90: ; preds = %89, %63
br label %91
91: ; preds = %90
%92 = load i32, i32* %19
%93 = add nsw i32 %92, 1
store i32 %93, i32* %19
br label %38
94: ; preds = %38
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"ERROR: N .LE. 0\00"
@.str.1 = [16 x i8] c"ERROR: M .LE. 0\00"
@.str.2 = [20 x i8] c"ERROR: FACTR .LT. 0\00"
@.str.3 = [19 x i8] c"ERROR: INVALID NBD\00"
@.str.4 = [28 x i8] c"ERROR: NO FEASIBLE SOLUTION\00"
define void @errclb_(i32 %0, i32 %1, double %2, double* nocapture %3, double* nocapture %4, i32* nocapture %5, i8* %6, i32* nocapture writeonly %7, i32* nocapture writeonly %8) {
%10 = icmp slt i32 %0, 1
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = icmp slt i32 %1, 1
br i1 %14, label %15, label %17
15: ; preds = %13
%16 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
%18 = fcmp olt double %2, 0.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = icmp sgt i32 %0, 0
br i1 %22, label %23, label %51
23: ; preds = %21
%24 = zext i32 %0 to i64
br label %25
25: ; preds = %23, %48
%26 = phi i64 [ 0, %23 ], [ %49, %48 ]
%27 = getelementptr inbounds i32, i32* %5, i64 %26
%28 = load i32, i32* %27
%29 = icmp ugt i32 %28, 3
br i1 %29, label %30, label %35
30: ; preds = %25
%31 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
store i32 -6, i32* %7
%32 = trunc i64 %26 to i32
%33 = add i32 %32, 1
store i32 %33, i32* %8
%34 = load i32, i32* %27
br label %35
35: ; preds = %25, %30
%36 = phi i32 [ %28, %25 ], [ %34, %30 ]
%37 = icmp eq i32 %36, 2
br i1 %37, label %38, label %48
38: ; preds = %35
%39 = getelementptr inbounds double, double* %3, i64 %26
%40 = load double, double* %39
%41 = getelementptr inbounds double, double* %4, i64 %26
%42 = load double, double* %41
%43 = fcmp ogt double %40, %42
br i1 %43, label %44, label %48
44: ; preds = %38
%45 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
store i32 -7, i32* %7
%46 = trunc i64 %26 to i32
%47 = add i32 %46, 1
store i32 %47, i32* %8
br label %48
48: ; preds = %35, %44, %38
%49 = add nuw nsw i64 %26, 1
%50 = icmp eq i64 %49, %24
br i1 %50, label %51, label %25
51: ; preds = %48, %21
ret void
}