// File: /workspace/github_c_makefile_star2_O1/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 0x99db9(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0xeca2
movq %rax, %r14
leaq 0x94737(%rip), %r13     # 0xa3225
movl $0x30, %edi
movq %r13, %rsi
movl $0x6, %edx
callq 0x390f5
movq %rax, %rbx
leaq 0x4(%rax), %rcx
leaq 0x98263(%rip), %rsi     # 0xa6d71
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 0x39210
movq %rax, 0x18(%rbx)
movslq 0x4(%rbx), %rdi
shlq $0x2, %rdi
movq %r13, %rsi
movl $0x9, %edx
callq 0x390f5
movq %rax, 0x28(%rbx)
movslq %ebp, %rdi
movl $0x4, %esi
movq %rdi, 0x10(%rsp)
movq %r13, %rdx
movl $0x9, %ecx
callq 0x39210
movq %rax, 0x20(%rbx)
movl (%rbx), %eax
testl %eax, %eax
jle 0xebc9
movq %r15, 0x8(%rsp)
leaq 0x98081(%rip), %r13     # 0xa6c10
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), %rax
addq $0x8, %r12
cmpq %rax, %r15
jl 0xeb95
movq 0x8(%rsp), %r15
cmpl %ebp, %eax
jge 0xec0d
movslq %eax, %rsi
movl %eax, %eax
leaq (,%rsi,4), %rcx
movq 0x28(%rbx), %rdx
addq %rcx, %rdx
addq 0x20(%rbx), %rcx
subq %rsi, %rbp
xorl %esi, %esi
movl $0x1, (%rcx,%rsi,4)
movslq (%rbx), %rdi
shlq $0x2, %rdi
movq %rdx, %r8
subq %rdi, %r8
leal (%rax,%rsi), %edi
movl %edi, (%r8,%rsi,4)
incq %rsi
cmpq %rsi, %rbp
jne 0xebea
movl 0x4(%rbx), %edi
movl %r15d, %esi
callq 0x3c6e5
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
testl %eax, %eax
jle 0xecb5
leaq 0x97fe1(%rip), %r12     # 0xa6c10
xorl %ebp, %ebp
movl (%rbx), %eax
testl %eax, %eax
jle 0xec64
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 0xec3d
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 0xec31
jmp 0xecb5
leaq 0x94561(%rip), %rdi     # 0xa320a
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