// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xd406f(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x14166
movq -0x10(%rbp), %rsi
leaq 0xced38(%rip), %rdi     # 0xe2e8a
movb $0x0, %al
callq 0x4030
movq $0x0, -0x8(%rbp)
jmp 0x143c9
movl $0x30, %edi
leaq 0xced33(%rip), %rsi     # 0xe2ea5
movl $0x6, %edx
callq 0x52d70
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x30(%rbp), %rcx
addq $0x4, %rcx
leaq 0xd2792(%rip), %rsi     # 0xe6929
movb $0x0, %al
callq 0x4070
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
addl 0x4(%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
leaq 0xcece2(%rip), %rdx     # 0xe2ea5
movl $0x8, %ecx
callq 0x52f40
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movslq 0x4(%rax), %rdi
shlq $0x2, %rdi
leaq 0xcecba(%rip), %rsi     # 0xe2ea5
movl $0x9, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movslq -0x1c(%rbp), %rdi
movl $0x4, %esi
leaq 0xcec95(%rip), %rdx     # 0xe2ea5
movl $0x9, %ecx
callq 0x52f40
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1427a
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdx
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0xd2573(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1422c
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x142c3
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl -0x14(%rbp), %edx
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rsi
subl (%rsi), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x14283
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %edi
movl -0x1c(%rbp), %esi
addl $0x1, %esi
callq 0x57fc0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x143c1
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1435d
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0xd247d(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1431a
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsd 0xcdc97(%rip), %xmm0    # 0xe2018
movsd %xmm0, (%rax,%rcx,8)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movslq -0x1c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0xd241c(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x14303
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)