// File: /workspace/github_c_makefile_star2_O3/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: parse
void parse(char *name, mesh theMesh)
/* This is the main parse function. This function is called somewhere from
 * the mainline. It reads the inputdeck, identified with the filename 'name'.
 * All database dlls are filled (elements,points(nodes), tractions and disps
 */
{ FILE *fp;
  static char theKeyword[80];
  element elm;
  if ( (fp=fopen(name,"r"))==(FILE *)NULL ) evaluate_level(RED,50);
  evaluate_level(GREEN,51);

  /* do something when a keyword is encountered: */
  while (!feof(fp))
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"NODES"))         read_points(fp,theMesh); else
    if (!strcmp(theKeyword,"ELEMENTS"))      read_elements(fp,theMesh); else
    if (!strcmp(theKeyword,"TRACTIONS"))     read_tractions(fp,theMesh); else
    if (!strcmp(theKeyword,"DISPLACEMENTS")) read_displacements(fp,theMesh); else
    if (!strcmp(theKeyword,"MATERIAL"))      read_material(fp); else
    if (!strcmp(theKeyword,"WRITE_UNIVERSAL")) write_universal_req(); else
    if (!strcmp(theKeyword,"WRITE_SPECIAL")) write_special_req(); else
    if (!strcmp(theKeyword,"WRITE_OBJ"))     write_obj_req(); else
    if (!strcmp(theKeyword,"LARGE_DISPLACEMENTS")) large_displacements_req(); else
    if (!strcmp(theKeyword,"CNODES"))        skip_C_nodes(fp); else
    if (!strcmp(theKeyword,"SOLUTION"))	     skip_solutionvector(fp); else
    if (!strcmp(theKeyword,"END"))           break; else
    evaluate_level(YELLOW,53);
  }

  if ((WRITE_SPECIAL==NO)&&(WRITE_UNIVERSAL==NO)&&(WRITE_OBJ==NO))
  { evaluate_level(YELLOW,68);
  }

  if ( (modulus_of_elasticity==0.0) || (poissons_ratio==0.0) )
  { evaluate_level(YELLOW,63);
    modulus_of_elasticity=210000.0;
    poissons_ratio=0.29;
  }


/* evaluate_level(GREEN,60); */
fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0x9154(%rip), %rsi      # 0xfca2
callq 0x1160
movq %rax, %rbx
testq %rax, %rax
jne 0x6b6a
movl $0x2, %edi
movl $0x32, %esi
callq 0xb980
xorl %edi, %edi
movl $0x33, %esi
callq 0xb980
movq %rbx, %rdi
callq 0x1110
testl %eax, %eax
je 0x6c24
leaq 0xe89b(%rip), %rax      # 0x15428
cmpl $0x0, (%rax)
jne 0x6bb9
leaq 0xe893(%rip), %rax      # 0x1542c
cmpl $0x0, (%rax)
jne 0x6bb9
leaq 0xe88b(%rip), %rax      # 0x15430
cmpl $0x0, (%rax)
jne 0x6bb9
movl $0x1, %edi
movl $0x44, %esi
callq 0xb980
leaq 0xe848(%rip), %r14      # 0x15408
movsd (%r14), %xmm1
pxor %xmm0, %xmm0
ucomisd %xmm0, %xmm1
leaq 0xe83c(%rip), %r15      # 0x15410
jne 0x6bd8
jnp 0x6be5
movsd (%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x6c0e
jp 0x6c0e
movl $0x1, %edi
movl $0x3f, %esi
callq 0xb980
movabsq $0x4109a28000000000, %rax # imm = 0x4109A28000000000
movq %rax, (%r14)
movabsq $0x3fd28f5c28f5c28f, %rax # imm = 0x3FD28F5C28F5C28F
movq %rax, (%r15)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
movabsq $0x4e4f495443415254, %r12 # imm = 0x4E4F495443415254
leaq 0xea5b(%rip), %r15      # 0x15690
movl $0x45444f4e, %r13d      # imm = 0x45444F4E
movabsq $0x53544e454d454c45, %rbp # imm = 0x53544E454D454C45
leaq 0x120afcff(%r12), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64fc
movl 0xea2e(%rip), %eax      # 0x15690
xorl %r13d, %eax
movzwl 0xea28(%rip), %ecx      # 0x15694
xorl $0x53, %ecx
orl %eax, %ecx
je 0x6e0b
movq 0xea12(%rip), %rax      # 0x15690
xorq %rbp, %rax
movzbl 0xea10(%rip), %ecx      # 0x15698
orq %rax, %rcx
je 0x6e18
movq 0xe9f8(%rip), %rax      # 0x15690
xorq %r12, %rax
movzwl 0xe9f6(%rip), %ecx      # 0x15698
xorq $0x53, %rcx
orq %rax, %rcx
je 0x6e25
movq 0xe9da(%rip), %rax      # 0x15690
movabsq $0x4543414c50534944, %rcx # imm = 0x4543414C50534944
xorq %rcx, %rax
movq 0xe9cc(%rip), %rcx      # 0x15696
movabsq $0x53544e454d4543, %rdx # imm = 0x53544E454D4543
xorq %rdx, %rcx
orq %rax, %rcx
je 0x6e32
movq 0xe9a9(%rip), %rax      # 0x15690
movabsq $0x4c4149524554414d, %rcx # imm = 0x4C4149524554414D
xorq %rcx, %rax
movzbl 0xe99d(%rip), %ecx      # 0x15698
orq %rax, %rcx
je 0x6e5a
movdqa 0xe984(%rip), %xmm0     # 0x15690
pcmpeqb 0x81fc(%rip), %xmm0     # 0xef10
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x6e64
movq 0xe966(%rip), %rax      # 0x15690
movabsq $0x50535f4554495257, %rcx # imm = 0x50535F4554495257
xorq %rcx, %rax
movq 0xe958(%rip), %rcx      # 0x15696
movabsq $0x4c414943455053, %rdx # imm = 0x4C414943455053
xorq %rdx, %rcx
orq %rax, %rcx
je 0x6e7c
movq 0xe935(%rip), %rax      # 0x15690
movabsq $0x424f5f4554495257, %rcx # imm = 0x424F5F4554495257
xorq %rcx, %rax
movzwl 0xe929(%rip), %ecx      # 0x15698
xorq $0x4a, %rcx
orq %rax, %rcx
je 0x6e9f
movd 0xe91c(%rip), %xmm0     # 0x156a0
pcmpeqb 0x8194(%rip), %xmm0     # 0xef20
movdqa 0xe8fc(%rip), %xmm1     # 0x15690
pcmpeqb 0x8194(%rip), %xmm1     # 0xef30
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x6ec9
movl 0xe8db(%rip), %eax      # 0x15690
movl $0x444f4e43, %ecx       # imm = 0x444F4E43
xorl %ecx, %eax
movl 0xe8d1(%rip), %ecx      # 0x15693
movl $0x534544, %edx         # imm = 0x534544
xorl %edx, %ecx
orl %eax, %ecx
je 0x6ee7
movq 0xe8b8(%rip), %rax      # 0x15690
xorq (%rsp), %rax
movzbl 0xe8b5(%rip), %ecx      # 0x15698
orq %rax, %rcx
je 0x6ef4
cmpl $0x444e45, 0xe89a(%rip) # imm = 0x444E45
je 0x6b86
movl $0x1, %edi
movl $0x35, %esi
jmp 0x6edd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6599
jmp 0x6e45
movq %rbx, %rdi
movq %r14, %rsi
callq 0x69db
jmp 0x6e45
movq 0x18(%r14), %rdi
movl $0x0, 0x10(%rdi)
jmp 0x6e3d
movq 0x10(%r14), %rdi
movl $0x1, 0x10(%rdi)
movq %rbx, %rsi
callq 0xcd64
movq %rbx, %rdi
callq 0x1110
testl %eax, %eax
je 0x6c51
jmp 0x6b86
movq %rbx, %rdi
callq 0x6a5c
jmp 0x6e45
leaq 0xe5c1(%rip), %rax      # 0x1542c
movl $0x1, (%rax)
xorl %eax, %eax
leaq 0xe5ae(%rip), %rcx      # 0x15428
jmp 0x6e92
leaq 0xe5a5(%rip), %rax      # 0x15428
movl $0x1, (%rax)
xorl %eax, %eax
leaq 0xe59a(%rip), %rcx      # 0x1542c
movl %eax, (%rcx)
leaq 0xe595(%rip), %rcx      # 0x15430
movl %eax, (%rcx)
jmp 0x6e45
xorl %eax, %eax
leaq 0xe580(%rip), %rcx      # 0x15428
movl %eax, (%rcx)
leaq 0xe57b(%rip), %rcx      # 0x1542c
movl %eax, (%rcx)
leaq 0xe576(%rip), %rax      # 0x15430
movl $0x1, (%rax)
xorl %edi, %edi
movl $0x41, %esi
jmp 0x6edd
leaq 0xe568(%rip), %rax      # 0x15438
movl $0x1, (%rax)
xorl %edi, %edi
movl $0x45, %esi
callq 0xb980
jmp 0x6e45
movq %rbx, %rdi
callq 0x67d8
jmp 0x6e45
movq %rbx, %rdi
callq 0x6696
jmp 0x6e45