// File: /workspace/github_c_makefile_star2_O2/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 0x9389(%rip), %rsi      # 0xec72
callq 0x1150
movq %rax, %rbx
testq %rax, %rax
jne 0x5901
pushq $0x2
popq %rdi
pushq $0x32
popq %rsi
callq 0xb0f8
pushq $0x33
popq %rsi
xorl %edi, %edi
callq 0xb0f8
leaq 0xed6e(%rip), %r15      # 0x14680
leaq 0x8613(%rip), %r12      # 0xdf2c
pushq $0x6
popq %r13
pushq $0x9
popq %rbp
movq %rbx, %rdi
callq 0x1100
testl %eax, %eax
jne 0x5b2e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1140
testl %eax, %eax
je 0x5a7a
movq %r15, %rdi
leaq 0x9c11(%rip), %rsi      # 0xf56c
movq %rbp, %rdx
callq 0x1140
testl %eax, %eax
je 0x5a8a
movq %r15, %rdi
leaq 0x9bd7(%rip), %rsi      # 0xf54c
pushq $0xa
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5a9a
movq %r15, %rdi
leaq 0x9bcb(%rip), %rsi      # 0xf55a
pushq $0xe
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5aaa
movq %r15, %rdi
leaq 0x8589(%rip), %rsi      # 0xdf32
movq %rbp, %rdx
callq 0x1140
testl %eax, %eax
je 0x5aba
movdqa 0xecbf(%rip), %xmm0     # 0x14680
pcmpeqb 0x8537(%rip), %xmm0     # 0xdf00
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x5ac7
movq %r15, %rdi
leaq 0x8569(%rip), %rsi      # 0xdf4b
pushq $0xe
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5ada
movq %r15, %rdi
leaq 0x855d(%rip), %rsi      # 0xdf59
pushq $0xa
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5b00
movq %r15, %rdi
leaq 0x854d(%rip), %rsi      # 0xdf63
pushq $0x14
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5b0a
movq %r15, %rdi
leaq 0x84fb(%rip), %rsi      # 0xdf2b
pushq $0x7
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5b14
movq %r15, %rdi
leaq 0x84d4(%rip), %rsi      # 0xdf1e
movq %rbp, %rdx
callq 0x1140
testl %eax, %eax
je 0x5b21
cmpl $0x444e45, 0xec1c(%rip) # imm = 0x444E45
je 0x5b2e
pushq $0x1
popq %rdi
pushq $0x35
popq %rsi
callq 0xb0f8
jmp 0x5920
movq %rbx, %rdi
movq %r14, %rsi
callq 0x540d
jmp 0x5920
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5781
jmp 0x5920
movq %rbx, %rdi
movq %r14, %rsi
callq 0x57d2
jmp 0x5920
movq %rbx, %rdi
movq %r14, %rsi
callq 0x57e5
jmp 0x5920
movq %rbx, %rdi
callq 0x57fb
jmp 0x5920
leaq 0xe94a(%rip), %rax      # 0x14418
andl $0x0, (%rax)
leaq 0xe944(%rip), %rax      # 0x1441c
jmp 0x5aeb
leaq 0xe93b(%rip), %rax      # 0x1441c
andl $0x0, (%rax)
leaq 0xe92d(%rip), %rax      # 0x14418
movl $0x1, (%rax)
leaq 0xe928(%rip), %rax      # 0x14420
andl $0x0, (%rax)
jmp 0x5920
callq 0x5892
jmp 0x5920
callq 0x58bd
jmp 0x5920
movq %rbx, %rdi
callq 0x55dc
jmp 0x5920
movq %rbx, %rdi
callq 0x54e1
jmp 0x5920
leaq 0xe8e3(%rip), %rax      # 0x14418
cmpl $0x0, (%rax)
jne 0x5b5d
leaq 0xe8db(%rip), %rax      # 0x1441c
cmpl $0x0, (%rax)
jne 0x5b5d
leaq 0xe8d3(%rip), %rax      # 0x14420
cmpl $0x0, (%rax)
jne 0x5b5d
pushq $0x1
popq %rdi
pushq $0x44
popq %rsi
callq 0xb0f8
leaq 0xe894(%rip), %r14      # 0x143f8
movsd (%r14), %xmm1
pxor %xmm0, %xmm0
ucomisd %xmm0, %xmm1
leaq 0xe888(%rip), %r15      # 0x14400
jne 0x5b7c
jnp 0x5b89
movsd (%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x5bae
jp 0x5bae
pushq $0x1
popq %rdi
pushq $0x3f
popq %rsi
callq 0xb0f8
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