// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/convex.c
// Function: read_linear_program
Linearprogramptr read_linear_program(char* filename)
{
 int i, j, totalvariables;
 FILE* infile;
 Linearprogramptr program;
 infile = fopen(filename, "r");
 if (!infile)
  {
   printf(m1274, filename);
   return NULL;  
  }
 program = safemalloc(sizeof(Linearprogram), "read_linear_program", 6);
 fscanf(infile, "%d%d", &(program->variablecount), &(program->constraintcount));
 totalvariables = program->variablecount + program->constraintcount;
 program->objectives = safecalloc(totalvariables + 1, sizeof(double), "read_linear_program", 8);
 program->basic = safemalloc(program->constraintcount * sizeof(int), "read_linear_program", 9);
 program->isbasic = safecalloc(totalvariables, sizeof(BOOLEAN), "read_linear_program", 9);
 for (i = 0; i < program->variablecount; i++)
  {
   fscanf(infile, "%lf", &(program->objectives[i]));
   program->isbasic[i] = BOOLEAN_FALSE;
  }
 for (i = program->variablecount; i < totalvariables; i++)
  {
   program->isbasic[i] = BOOLEAN_TRUE;
   program->basic[i - program->variablecount] = i;
  }
 program->constraints = matrix_alloc(program->constraintcount, totalvariables + 1);
 for (i = 0; i < program->constraints.row; i++)
  {
   for (j = 0; j < program->variablecount; j++)
     fscanf(infile, "%lf", &(program->constraints.values[i][j]));
   program->constraints.values[i][program->variablecount + i] = 1.0;
   fscanf(infile, "%lf", &(program->constraints.values[i][totalvariables]));
  }
 return program;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
leaq 0x8d765(%rip), %rsi     # 0x9b87f
callq 0x40f0
testq %rax, %rax
je 0xe29b
movq %rax, %rbx
leaq 0x880f3(%rip), %r13     # 0x96225
pushq $0x30
popq %rdi
pushq $0x6
popq %rdx
movq %r13, %rsi
callq 0x34f59
movq %rax, %r14
leaq 0x4(%rax), %rcx
leaq 0x8bbbb(%rip), %rsi     # 0x99d09
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4070
movslq (%r14), %rax
movslq 0x4(%r14), %rcx
leaq (%rcx,%rax), %r15
leaq (%rcx,%rax), %rdi
incq %rdi
pushq $0x8
popq %rsi
pushq $0x8
popq %rcx
movq %rdi, 0x8(%rsp)
movq %r13, %rdx
callq 0x35067
movq %rax, 0x18(%r14)
movslq 0x4(%r14), %rdi
shlq $0x2, %rdi
pushq $0x9
popq %rbp
movq %r13, %rsi
movl %ebp, %edx
callq 0x34f59
movq %rax, 0x28(%r14)
movslq %r15d, %r15
pushq $0x4
popq %rsi
movq %r15, %rdi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x35067
movq %rax, 0x20(%r14)
leaq 0x8b9ed(%rip), %r13     # 0x99ba8
xorl %ebp, %ebp
xorl %r12d, %r12d
movslq (%r14), %rcx
cmpq %rcx, %r12
jge 0xe209
movq 0x18(%r14), %rdx
addq %rbp, %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4070
movq 0x20(%r14), %rax
andl $0x0, (%rax,%r12,4)
incq %r12
addq $0x8, %rbp
jmp 0xe1c0
movl $0x1, (%rax,%rcx,4)
movq 0x28(%r14), %rdx
movslq (%r14), %rsi
shlq $0x2, %rsi
subq %rsi, %rdx
movl %ecx, (%rdx,%rcx,4)
incq %rcx
cmpq %r15, %rcx
jl 0xe1ee
movl 0x4(%r14), %edi
movq 0x8(%rsp), %rsi
callq 0x380d3
movq %rax, 0x8(%r14)
movq %rdx, 0x10(%r14)
leaq 0x8b97d(%rip), %r12     # 0x99ba8
xorl %ebp, %ebp
movq %r15, 0x10(%rsp)
cltq
cmpq %rax, %rbp
jge 0xe2af
xorl %r13d, %r13d
xorl %r15d, %r15d
movslq (%r14), %rax
movq 0x10(%r14), %rcx
movq (%rcx,%rbp,8), %rdx
cmpq %rax, %r15
jge 0xe268
addq %r13, %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4070
incq %r15
addq $0x8, %r13
jmp 0xe23f
movslq %ebp, %rcx
addq %rcx, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rdx,%rax,8)
movq 0x10(%rsp), %r15
leaq (%rdx,%r15,8), %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4070
incq %rbp
movl 0x8(%r14), %eax
jmp 0xe232
leaq 0x87f68(%rip), %rdi     # 0x9620a
xorl %r14d, %r14d
movq %r15, %rsi
xorl %eax, %eax
callq 0x4030
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq