// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/do_linear.c
// Function: do_linear
int do_linear(char *argv)
{ mesh mesh1;
  WRITE_SPECIAL = NO;
  WRITE_UNIVERSAL = NO;
  WRITE_OBJ = NO;
  READ_SOLUTION = NO;

  /* initialize global datastructures: */
  mesh1=(mesh)malloc(sizeof(meshtype));
  mesh1->mesh_p = point_dll((point)NULL,NEW,0);
  mesh1->mesh_e = element_dll((element)NULL,NEW,0);
  mesh1->mesh_t = restraint_dll((restraint)NULL,NEW,0); mesh1->mesh_t->type=TRACTION;
  mesh1->mesh_d = restraint_dll((restraint)NULL,NEW,0); mesh1->mesh_d->type=DISPLACEMENT;

  /* parse the inputdeck: */
  parse(argv,mesh1); 
  scalemesh(mesh1);

  /* do the linear analysis: */
  linear3(mesh1); 

if (READ_SOLUTION==NO)
  { solve_gauss(main_E,main_f);
    if (WRITE_OBJ==NO)
    {
      printvector(main_f,"solution vector");
    } else
    {
      fprintf(stderr,"Solution vector is not exported because of .OBJ output");
    }
  }
  if (READ_SOLUTION==YES)
  { fprintf(stderr,"Parsing solution vector...\n"); 
    parse_solution(argv,main_f);
    fprintf(stderr,"Solution vector read.\n");
  }


  /* do the postprocessing: */
  post(mesh1,0); 

  /* kill the globals: */
  point_dll(mesh1->mesh_p,KILL,0);
  element_dll(mesh1->mesh_e,KILL,0);
  restraint_dll(mesh1->mesh_t,KILL,0);
  restraint_dll(mesh1->mesh_d,KILL,0);
  free(mesh1);

  delmatrix(main_E);
  delvector(main_f);  
  delvector(main_u);
   
  evaluate_level(FINISH,41);
  return (int)1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x1b1c8(%rip), %rax     # 0x1e3f8
movl $0x0, (%rax)
leaq 0x1b1bf(%rip), %rax     # 0x1e3fc
movl $0x0, (%rax)
leaq 0x1b1b6(%rip), %rax     # 0x1e400
movl $0x0, (%rax)
leaq 0x1b1ad(%rip), %rax     # 0x1e404
movl $0x0, (%rax)
movl $0x50, %edi
callq 0x10f0
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x175c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x14570
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
movl %eax, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x17a40
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x10(%rax)
xorl %eax, %eax
movl %eax, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x17a40
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movl $0x1, 0x10(%rax)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x9770
movq 0x8(%rsp), %rdi
callq 0x101b0
movq 0x8(%rsp), %rdi
callq 0x12810
leaq 0x1b0df(%rip), %rax     # 0x1e404
cmpl $0x0, (%rax)
jne 0x3381
leaq 0x1b0df(%rip), %rax     # 0x1e410
movq (%rax), %rdi
leaq 0x1b0dd(%rip), %rax     # 0x1e418
movq (%rax), %rsi
callq 0x2cd0
leaq 0x1b0b6(%rip), %rax     # 0x1e400
cmpl $0x0, (%rax)
jne 0x3367
leaq 0x1b0c2(%rip), %rax     # 0x1e418
movq (%rax), %rdi
leaq 0x15d6b(%rip), %rsi     # 0x190cb
callq 0x16620
jmp 0x337f
movq 0x1ac8a(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x15d63(%rip), %rsi     # 0x190db
movb $0x0, %al
callq 0x10d0
jmp 0x3381
leaq 0x1b07c(%rip), %rax     # 0x1e404
cmpl $0x1, (%rax)
jne 0x33d1
movq 0x1ac64(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x15d74(%rip), %rsi     # 0x19112
movb $0x0, %al
callq 0x10d0
movq 0x10(%rsp), %rdi
leaq 0x1b067(%rip), %rax     # 0x1e418
movq (%rax), %rsi
callq 0x9be0
movq 0x1ac38(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x15d64(%rip), %rsi     # 0x1912e
movb $0x0, %al
callq 0x10d0
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x82a0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x175c0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x14570
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x17a40
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x17a40
movq 0x8(%rsp), %rdi
callq 0x1030
leaq 0x1afcf(%rip), %rax     # 0x1e410
movq (%rax), %rdi
callq 0x15690
leaq 0x1afc8(%rip), %rax     # 0x1e418
movq (%rax), %rdi
callq 0x15780
leaq 0x1afc1(%rip), %rax     # 0x1e420
movq (%rax), %rdi
callq 0x15780
movl $0x4, %edi
movl $0x29, %esi
callq 0x15200
movl $0x1, %eax
addq $0x18, %rsp
retq