// File: /workspace/github_c_makefile_star2_O3/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 0x9ce20(%rip), %rsi     # 0xab95b
callq 0x40f0
testq %rax, %rax
je 0xed04
movq %rax, %r14
leaq 0x976d2(%rip), %r13     # 0xa6225
movl $0x30, %edi
movq %r13, %rsi
movl $0x6, %edx
callq 0x3a0e1
movq %rax, %rbx
leaq 0x4(%rax), %rcx
leaq 0x9b26e(%rip), %rsi     # 0xa9de1
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4070
movslq (%rbx), %rax
movslq 0x4(%rbx), %rcx
leaq (%rcx,%rax), %rbp
leaq (%rcx,%rax), %r15
incq %r15
movl $0x8, %esi
movq %r15, %rdi
movq %r13, %rdx
movl $0x8, %ecx
callq 0x3a1fc
movq %rax, 0x18(%rbx)
movslq 0x4(%rbx), %rdi
shlq $0x2, %rdi
movq %r13, %rsi
movl $0x9, %edx
callq 0x3a0e1
movq %rax, 0x28(%rbx)
movslq %ebp, %rdi
movl $0x4, %esi
movq %rdi, 0x10(%rsp)
movq %r13, %rdx
movl $0x9, %ecx
callq 0x3a1fc
movq %rax, 0x20(%rbx)
movl (%rbx), %ecx
testl %ecx, %ecx
jle 0xec2e
movq %r15, 0x8(%rsp)
leaq 0x9b08c(%rip), %r13     # 0xa9c80
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x18(%rbx), %rdx
addq %r12, %rdx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4070
movq 0x20(%rbx), %rax
movl $0x0, (%rax,%r15,4)
incq %r15
movslq (%rbx), %rcx
addq $0x8, %r12
cmpq %rcx, %r15
jl 0xebfa
movq 0x8(%rsp), %r15
cmpl %ebp, %ecx
jge 0xec6f
movslq %ecx, %rsi
leaq (,%rsi,4), %rdx
addq 0x28(%rbx), %rdx
movl %ecx, %ecx
leaq (%rax,%rsi,4), %rax
subq %rsi, %rbp
xorl %esi, %esi
movl $0x1, (%rax,%rsi,4)
movslq (%rbx), %rdi
shlq $0x2, %rdi
movq %rdx, %r8
subq %rdi, %r8
leal (%rcx,%rsi), %edi
movl %edi, (%r8,%rsi,4)
incq %rsi
cmpq %rsi, %rbp
jne 0xec4c
movl 0x4(%rbx), %edi
movl %r15d, %esi
callq 0x3d79d
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
testl %eax, %eax
jle 0xed17
leaq 0x9afef(%rip), %r12     # 0xa9c80
xorl %ebp, %ebp
movl (%rbx), %eax
testl %eax, %eax
jle 0xecc6
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %rdx
addq %r15, %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4070
incq %r13
movslq (%rbx), %rax
addq $0x8, %r15
cmpq %rax, %r13
jl 0xec9f
movq 0x10(%rbx), %rcx
movq (%rcx,%rbp,8), %rcx
addl %ebp, %eax
cltq
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, (%rcx,%rax,8)
movq 0x10(%rsp), %rax
leaq (%rcx,%rax,8), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4070
incq %rbp
movslq 0x8(%rbx), %rax
cmpq %rax, %rbp
jl 0xec93
jmp 0xed17
leaq 0x974ff(%rip), %rdi     # 0xa620a
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x4030
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq