#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*/ printf(char *, char const *);
void print_qubo_format(void) {
  const char *quboFormat =
      "\n   A .qubo file contains data which describes an unconstrained\n"
      "quadratic binary optimization problem.  It is an ASCII file comprise"
      "d\nof four types of lines:\n\n"
      "1) Comments - defined by a \"c\" in column 1.  They may appear\n"
      "\tanywhere in the file, and are otherwise ignored.\n\n"
      "2) One program line, which starts with p in the first column.\n"
      "\tThe program line must be the first non-comment line in the file.\n"
      "\tThe program line has six required fields (separated by space(s)),\n"
      "\tas in this example:\n\n"
      "  p   qubo  topology   maxNodes   nNodes   nCouplers\n\n"
      "    where:\n"
      "  p          the problem line sentinel\n"
      "  qubo       identifies the file type\n"
      "  topology   a string which identifies the topology of the problem\n"
      "\t     and the specific problem type.  For an unconstrained problem,\n"
      "\t     target will be \"0\" or \"unconstrained.\"   Possible, for "
      "future\n"
      "\t     implementations, valid strings might include \"chimera128\"\n"
      "\t     or \"chimera512\" (among others).\n"
      "  maxNodes   number of nodes in the topology.\n"
      "  nNodes     number of nodes in the problem (nNodes <= maxNodes).\n"
      "\t     Each node has a unique number and must take a value in the\n"
      "\t     the range {0 - (maxNodes-1)}.  A duplicate node number is an\n"
      "\t     error.  The node numbers need not be in order, and they need\n"
      "\t     not be contiguous.\n"
      "  nCouplers  number of couplers in the problem.  Each coupler is a\n"
      "\t     unique connection between two different nodes.  The maximum\n"
      "\t     number of couplers is (nNodes)^2.  A duplicate coupler is\n"
      "\t     an error.\n\n"
      "3) nNodes clauses.  Each clause is made up of three numbers.  The\n"
      "\tnumbers are separated by one or more blanks.  The first two\n"
      "\tnumbers must be integers and are the number for this node\n"
      "\t(repeated).  The node number must be in {0 , (maxNodes-1)}.\n"
      "\tThe third value is the weight associated with the node, may be\n"
      "\tan integer or float, and can take on any positive or negative\n"
      "\tvalue, or zero.\n\n"
      "4) nCouplers clauses.  Each clause is made up of three numbers.  The\n"
      "\tnumbers are separated by one or more blanks.  The first two\n"
      "\tnumbers must be different integers and are the node numbers\n"
      "\tfor this coupler.  The two values (i and j) must have (i < j).\n"
      "\tEach number must be one of the nNodes valid node numbers (and\n"
      "\tthus in {0, (maxNodes-1)}).  The third value is the strength\n"
      "\tassociated with the coupler, may be an integer or float, and can\n"
      "\ttake on any positive or negative value, but not zero.  Every node\n"
      "\tmust connect with at least one other node (thus must have at least\n"
      "\tone coupler connected to it).\n\n"
      "Here is a simple QUBO file example for an unconstrained QUBO with 4\n"
      "nodes and 6 couplers.  This example is provided to illustrate the\n"
      "elements of a QUBO benchmark file, not to represent a real problem.\n"
      "\n\t\tc\n"
      "\t\tc  This is a sample .qubo file\n"
      "\t\tc  with 4 nodes and 6 couplers\n"
      "\t\tc\n"
      "\t\tp  qubo  0  4  4  6 \n"
      "\t\tc ------------------\n"
      "\t\t0  0   3.4\n"
      "\t\t1  1   4.5\n"
      "\t\t2  2   2.1\n"
      "\t\t3  3   -2.4\n"
      "\t\tc ------------------\n"
      "\t\t0  1   2.2\n"
      "\t\t0  2   3.4\n"
      "\t\t1  2   4.5\n"
      "\t\t0  3   -2\n"
      "\t\t1  3   4.5678\n"
      "\t\t2  3   -3.22\n\n";
  printf("%s", quboFormat);
  return;
}


x86 assembly (clang, -O0):
<print_qubo_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x1a6f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_qubo_format>:
lea    0x1a86(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [2973 x i8] c"\0A A .qubo file contains data which describes an unconstrained\0Aquadratic binary optimization problem. It is an ASCII file comprised\0Aof four types of lines:\0A\0A1) Comments - defined by a \22c\22 in column 1. They may appear\0A\09anywhere in the file, and are otherwise ignored.\0A\0A2) One program line, which starts with p in the first column.\0A\09The program line must be the first non-comment line in the file.\0A\09The program line has six required fields (separated by space(s)),\0A\09as in this example:\0A\0A p qubo topology maxNodes nNodes nCouplers\0A\0A where:\0A p the problem line sentinel\0A qubo identifies the file type\0A topology a string which identifies the topology of the problem\0A\09 and the specific problem type. For an unconstrained problem,\0A\09 target will be \220\22 or \22unconstrained.\22 Possible, for future\0A\09 implementations, valid strings might include \22chimera128\22\0A\09 or \22chimera512\22 (among others).\0A maxNodes number of nodes in the topology.\0A nNodes number of nodes in the problem (nNodes <= maxNodes).\0A\09 Each node has a unique number and must take a value in the\0A\09 the range {0 - (maxNodes-1)}. A duplicate node number is an\0A\09 error. The node numbers need not be in order, and they need\0A\09 not be contiguous.\0A nCouplers number of couplers in the problem. Each coupler is a\0A\09 unique connection between two different nodes. The maximum\0A\09 number of couplers is (nNodes)^2. A duplicate coupler is\0A\09 an error.\0A\0A3) nNodes clauses. Each clause is made up of three numbers. The\0A\09numbers are separated by one or more blanks. The first two\0A\09numbers must be integers and are the number for this node\0A\09(repeated). The node number must be in {0 , (maxNodes-1)}.\0A\09The third value is the weight associated with the node, may be\0A\09an integer or float, and can take on any positive or negative\0A\09value, or zero.\0A\0A4) nCouplers clauses. Each clause is made up of three numbers. The\0A\09numbers are separated by one or more blanks. The first two\0A\09numbers must be different integers and are the node numbers\0A\09for this coupler. The two values (i and j) must have (i < j).\0A\09Each number must be one of the nNodes valid node numbers (and\0A\09thus in {0, (maxNodes-1)}). The third value is the strength\0A\09associated with the coupler, may be an integer or float, and can\0A\09take on any positive or negative value, but not zero. Every node\0A\09must connect with at least one other node (thus must have at least\0A\09one coupler connected to it).\0A\0AHere is a simple QUBO file example for an unconstrained QUBO with 4\0Anodes and 6 couplers. This example is provided to illustrate the\0Aelements of a QUBO benchmark file, not to represent a real problem.\0A\0A\09\09c\0A\09\09c This is a sample .qubo file\0A\09\09c with 4 nodes and 6 couplers\0A\09\09c\0A\09\09p qubo 0 4 4 6 \0A\09\09c ------------------\0A\09\090 0 3.4\0A\09\091 1 4.5\0A\09\092 2 2.1\0A\09\093 3 -2.4\0A\09\09c ------------------\0A\09\090 1 2.2\0A\09\090 2 3.4\0A\09\091 2 4.5\0A\09\090 3 -2\0A\09\091 3 4.5678\0A\09\092 3 -3.22\0A\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @print_qubo_format() {
%1 = alloca i8*
store i8* getelementptr inbounds ([2973 x i8], [2973 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [2973 x i8] c"\0A A .qubo file contains data which describes an unconstrained\0Aquadratic binary optimization problem. It is an ASCII file comprised\0Aof four types of lines:\0A\0A1) Comments - defined by a \22c\22 in column 1. They may appear\0A\09anywhere in the file, and are otherwise ignored.\0A\0A2) One program line, which starts with p in the first column.\0A\09The program line must be the first non-comment line in the file.\0A\09The program line has six required fields (separated by space(s)),\0A\09as in this example:\0A\0A p qubo topology maxNodes nNodes nCouplers\0A\0A where:\0A p the problem line sentinel\0A qubo identifies the file type\0A topology a string which identifies the topology of the problem\0A\09 and the specific problem type. For an unconstrained problem,\0A\09 target will be \220\22 or \22unconstrained.\22 Possible, for future\0A\09 implementations, valid strings might include \22chimera128\22\0A\09 or \22chimera512\22 (among others).\0A maxNodes number of nodes in the topology.\0A nNodes number of nodes in the problem (nNodes <= maxNodes).\0A\09 Each node has a unique number and must take a value in the\0A\09 the range {0 - (maxNodes-1)}. A duplicate node number is an\0A\09 error. The node numbers need not be in order, and they need\0A\09 not be contiguous.\0A nCouplers number of couplers in the problem. Each coupler is a\0A\09 unique connection between two different nodes. The maximum\0A\09 number of couplers is (nNodes)^2. A duplicate coupler is\0A\09 an error.\0A\0A3) nNodes clauses. Each clause is made up of three numbers. The\0A\09numbers are separated by one or more blanks. The first two\0A\09numbers must be integers and are the number for this node\0A\09(repeated). The node number must be in {0 , (maxNodes-1)}.\0A\09The third value is the weight associated with the node, may be\0A\09an integer or float, and can take on any positive or negative\0A\09value, or zero.\0A\0A4) nCouplers clauses. Each clause is made up of three numbers. The\0A\09numbers are separated by one or more blanks. The first two\0A\09numbers must be different integers and are the node numbers\0A\09for this coupler. The two values (i and j) must have (i < j).\0A\09Each number must be one of the nNodes valid node numbers (and\0A\09thus in {0, (maxNodes-1)}). The third value is the strength\0A\09associated with the coupler, may be an integer or float, and can\0A\09take on any positive or negative value, but not zero. Every node\0A\09must connect with at least one other node (thus must have at least\0A\09one coupler connected to it).\0A\0AHere is a simple QUBO file example for an unconstrained QUBO with 4\0Anodes and 6 couplers. This example is provided to illustrate the\0Aelements of a QUBO benchmark file, not to represent a real problem.\0A\0A\09\09c\0A\09\09c This is a sample .qubo file\0A\09\09c with 4 nodes and 6 couplers\0A\09\09c\0A\09\09p qubo 0 4 4 6 \0A\09\09c ------------------\0A\09\090 0 3.4\0A\09\091 1 4.5\0A\09\092 2 2.1\0A\09\093 3 -2.4\0A\09\09c ------------------\0A\09\090 1 2.2\0A\09\090 2 3.4\0A\09\091 2 4.5\0A\09\090 3 -2\0A\09\091 3 4.5678\0A\09\092 3 -3.22\0A\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @print_qubo_format() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2973 x i8], [2973 x i8]* @.str, i64 0, i64 0))
ret void
}