// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/msh2grd/msh2grd.cpp
// Function: main
int 
main(int argc, char **argv)
{
  // Parse program arguments
  if (!ParseArgs(argc, argv)) exit(-1);

  // Read mesh file
  R3Mesh *mesh = ReadMesh(mesh_name);
  if (!mesh) exit(-1);

  // Create grid from mesh
  R3Grid *grid = CreateGrid(mesh);
  if (!grid) exit(-1);

  // Write grid
  int status = WriteGrid(grid, grid_name);
  if (!status) exit(-1);

  // Return success
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rsi, %rbp
movl %edi, %r13d
movq 0xca80e(%rip), %rax     # 0xdac28
movq 0xca80f(%rip), %rcx     # 0xdac30
movq %rcx, 0x8(%rsp)
leaq 0x82c23(%rip), %r14     # 0x93050
movq %rax, 0x10(%rsp)
movl %r13d, %r12d
movq %rbp, %r15
cmpl $0x2, %r12d
jl 0x1055e
leaq 0x8(%r15), %rbp
leal -0x1(%r12), %r13d
movq (%rbp), %rbx
cmpb $0x2d, (%rbx)
jne 0x10526
cmpb $0x76, 0x1(%rbx)
jne 0x10468
cmpb $0x0, 0x2(%rbx)
je 0x1051a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe670
testl %eax, %eax
je 0x1050e
movq %rbx, %rdi
leaq 0x82bd0(%rip), %rsi     # 0x93055
callq 0xe670
testl %eax, %eax
je 0x104d4
movq %rbx, %rdi
leaq 0x82bc6(%rip), %rsi     # 0x9305e
callq 0xe670
testl %eax, %eax
je 0x104f2
movq %rbx, %rdi
leaq 0x82bc3(%rip), %rsi     # 0x9306e
callq 0xe670
testl %eax, %eax
jne 0x10b5f
addl $-0x2, %r12d
movq 0x10(%r15), %rdi
addq $0x10, %r15
callq 0xe730
movl %eax, 0xc9fdd(%rip)     # 0xda4ac
jmp 0x10438
addl $-0x2, %r12d
movq 0x10(%r15), %rdi
addq $0x10, %r15
callq 0xe5a0
movsd %xmm0, 0xc9fb3(%rip)    # 0xda4a0
jmp 0x10438
addl $-0x2, %r12d
movq 0x10(%r15), %rdi
addq $0x10, %r15
callq 0xe730
movl %eax, 0xc9f9f(%rip)     # 0xda4a8
jmp 0x10438
movb $0x1, 0xca727(%rip)     # 0xdac3c
jmp 0x10432
movb $0x1, 0xca717(%rip)     # 0xdac38
jmp 0x10432
movq 0x10(%rsp), %rax
testq %rax, %rax
jne 0x10541
movq %rbx, 0xca6f1(%rip)     # 0xdac28
movq %rbx, 0x10(%rsp)
jmp 0x10432
cmpq $0x0, 0x8(%rsp)
jne 0x10b5f
movq %rbx, 0xca6dc(%rip)     # 0xdac30
movq %rbx, 0x8(%rsp)
jmp 0x1042d
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0x10b74
cmpq $0x0, 0x8(%rsp)
je 0x10b74
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
callq 0x65dc2
movq %rbx, %rdi
callq 0x10bd8
movl $0x138, %edi            # imm = 0x138
callq 0xe450
movq %rax, %r14
movq %rax, %rdi
callq 0x10df4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x180(%rax)
testl %eax, %eax
je 0x10b84
cmpb $0x1, 0xca675(%rip)     # 0xdac38
jne 0x10631
leaq 0x82bd7(%rip), %rdi     # 0x931a3
callq 0xe720
leaq 0xa8(%rsp), %rdi
callq 0x65dfc
leaq 0x82ada(%rip), %rdi     # 0x930bf
movb $0x1, %al
callq 0xe070
movl 0x34(%r14), %esi
leaq 0x82adf(%rip), %rdi     # 0x930d6
xorl %eax, %eax
callq 0xe070
movl 0x24(%r14), %esi
leaq 0x82add(%rip), %rdi     # 0x930e6
xorl %eax, %eax
callq 0xe070
movl 0x14(%r14), %esi
leaq 0x82adb(%rip), %rdi     # 0x930f6
xorl %eax, %eax
callq 0xe070
movq 0xc9957(%rip), %rax     # 0xd9f80
movq (%rax), %rdi
callq 0xe540
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x65dc2
movq %rbx, %rdi
callq 0x10bd8
movl $0x250, %edi            # imm = 0x250
callq 0xe450
movq %rax, %r13
movq %r14, %rsi
addq $0xf8, %rsi
movsd 0xc9e3b(%rip), %xmm0    # 0xda4a0
movl 0xc9e3d(%rip), %edx     # 0xda4a8
movl 0xc9e3b(%rip), %ecx     # 0xda4ac
movq %rax, %rdi
xorl %r8d, %r8d
callq 0x2b712
movl 0x34(%r14), %eax
xorl %ebx, %ebx
testl %eax, %eax
je 0x106ea
cltq
cmpq %rax, %rbx
jge 0x106f3
movq 0x28(%r14), %rax
movq (%rax,%rbx,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq $0x18, %rsi
addq $0x18, %rdx
movq 0x18(%rax), %rcx
addq $0x18, %rcx
movq %r13, %rdi
movsd 0x82950(%rip), %xmm0    # 0x93008
xorl %r8d, %r8d
callq 0x10c22
incq %rbx
movl 0x34(%r14), %eax
jmp 0x10686
movq 0x8(%r14), %rax
movq (%rax,%rbx,8), %rsi
addq $0x18, %rsi
movq %r13, %rdi
movsd 0x82928(%rip), %xmm0    # 0x93008
xorl %edx, %edx
callq 0x10be0
incq %rbx
movslq 0x14(%r14), %rax
cmpq %rax, %rbx
jl 0x106c9
movsd 0x82915(%rip), %xmm0    # 0x93010
movsd 0x82905(%rip), %xmm2    # 0x93008
xorpd %xmm1, %xmm1
movq %r13, %rdi
callq 0x2d250
cmpb $0x1, 0xca526(%rip)     # 0xdac3c
jne 0x109bb
movq %r13, %rdi
callq 0x2cda0
movq %r13, %rdi
callq 0x2cb34
movsd 0x228(%r13), %xmm0
movq %r13, %rdi
callq 0x2ec64
movslq 0x24c(%r13), %r15
leaq (,%r15,4), %rax
testq %r15, %r15
pushq $-0x1
popq %rbx
cmovnsq %rax, %rbx
movq %rbx, %rdi
callq 0xe030
movq %rax, %rbp
movq %rbx, %rdi
callq 0xe030
movq %rax, %r12
xorl %ecx, %ecx
testl %r15d, %r15d
movl $0x0, %eax
cmovgl %r15d, %eax
cmpq %rcx, %rax
je 0x10789
andl $0x0, (%rbp,%rcx,4)
incq %rcx
jmp 0x1077a
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1079a
andl $0x0, (%r12,%rcx,4)
incq %rcx
jmp 0x1078b
movq %rbp, 0x18(%rsp)
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
movq %r13, 0x20(%rsp)
movq %r13, %rsi
callq 0x2bbaa
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2e8c4
xorl %r15d, %r15d
leaq 0x90(%rsp), %r13
leaq 0x78(%rsp), %rbp
movslq 0x34(%r14), %rax
cmpq %rax, %r15
jge 0x10904
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rbx
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x10db2
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x10db2
movsd %xmm0, 0x30(%rsp)
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x10db2
movsd %xmm0, 0x28(%rsp)
movsd 0x10(%rsp), %xmm0
minsd 0x827ec(%rip), %xmm0    # 0x93018
movsd %xmm0, 0x10(%rsp)
movsd 0xc9c66(%rip), %xmm0    # 0xda4a0
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11472
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10dd0
movsd 0x30(%rsp), %xmm0
minsd 0x10(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
minsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
minsd %xmm1, %xmm0
movq %rbp, %rdi
movq %rax, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x38a02
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x37e13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10dd0
leaq 0x48(%rsp), %rdi
movq %rax, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x38a02
movq %rbp, %rdi
movq %r13, %rsi
leaq 0x48(%rsp), %rdx
callq 0x3829d
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
movsd 0x82728(%rip), %xmm0    # 0x93008
xorl %edx, %edx
callq 0x10be0
movq %rbx, %rdi
movq %rbp, %rsi
movsd 0x8272b(%rip), %xmm0    # 0x93020
xorl %edx, %edx
callq 0x10be0
incq %r15
jmp 0x107d3
movq 0x20(%rsp), %r13
movl 0x24c(%r13), %esi
xorpd %xmm0, %xmm0
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x35204
testl %eax, %eax
movq 0x18(%rsp), %rbx
jle 0x1099e
movl 0x24c(%r13), %eax
movq 0x2d8(%rsp), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
cmpq %rdx, %rax
je 0x10966
movslq (%r12,%rdx,4), %rsi
testq %rsi, %rsi
js 0x10961
cvtsi2sdl (%rbx,%rsi,4), %xmm0
addsd (%rcx,%rdx,8), %xmm0
cvttsd2si %xmm0, %edi
movl %edi, (%rbx,%rsi,4)
incq %rdx
jmp 0x10942
xorl %ecx, %ecx
movapd 0x826c0(%rip), %xmm0    # 0x93030
cmpq %rcx, %rax
je 0x1099e
movslq (%r12,%rcx,4), %rdx
testq %rdx, %rdx
js 0x10999
cmpl $0x0, (%rbx,%rdx,4)
jns 0x10999
movq 0x230(%r13), %rdx
movsd (%rdx,%rcx,8), %xmm1
xorpd %xmm0, %xmm1
movlpd %xmm1, (%rdx,%rcx,8)
incq %rcx
jmp 0x10970
movq %r12, %rdi
callq 0xe5d0
movq %rbx, %rdi
callq 0xe5d0
leaq 0xa8(%rsp), %rdi
callq 0x2bc02
cmpb $0x1, 0xca276(%rip)     # 0xdac38
jne 0x10ac7
leaq 0x827e2(%rip), %rdi     # 0x931b1
callq 0xe720
leaq 0x38(%rsp), %rdi
callq 0x65dfc
leaq 0x826da(%rip), %rdi     # 0x930bf
movb $0x1, %al
callq 0xe070
movl 0x238(%r13), %esi
movl 0x23c(%r13), %edx
movl 0x240(%r13), %ecx
leaq 0x82701(%rip), %rdi     # 0x93109
xorl %eax, %eax
callq 0xe070
movsd 0x228(%r13), %xmm0
leaq 0x82703(%rip), %rdi     # 0x93122
movb $0x1, %al
callq 0xe070
movq %r13, %rdi
callq 0x2bdea
leaq 0x826fd(%rip), %rdi     # 0x93132
movl %eax, %esi
xorl %eax, %eax
callq 0xe070
movq %r13, %rdi
callq 0x10ca4
leaq 0x826f9(%rip), %rdi     # 0x93146
movb $0x1, %al
callq 0xe070
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2bd3a
movsd (%rbx), %xmm0
leaq 0x826e3(%rip), %rdi     # 0x93155
movb $0x1, %al
callq 0xe070
movsd 0x8(%rbx), %xmm0
leaq 0x826e0(%rip), %rdi     # 0x93165
movb $0x1, %al
callq 0xe070
movq %r13, %rdi
callq 0x2bd92
leaq 0x826da(%rip), %rdi     # 0x93175
movb $0x1, %al
callq 0xe070
movq %r13, %rdi
callq 0x10cce
leaq 0x826d3(%rip), %rdi     # 0x93184
movb $0x1, %al
callq 0xe070
movq 0xc94c1(%rip), %rax     # 0xd9f80
movq (%rax), %rdi
callq 0xe540
movq 0xca162(%rip), %rbx     # 0xdac30
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x65dc2
movq %r14, %rdi
callq 0x10bd8
movq %r13, %rdi
movq %rbx, %rsi
callq 0x33b88
movl %eax, %ebx
cmpb $0x1, 0xca13e(%rip)     # 0xdac38
jne 0x10b47
leaq 0x826bf(%rip), %rdi     # 0x931c2
callq 0xe720
leaq 0xa8(%rsp), %rdi
callq 0x65dfc
leaq 0x825a3(%rip), %rdi     # 0x930bf
movb $0x1, %al
callq 0xe070
leal (,%rbx,8), %esi
leaq 0x82662(%rip), %rdi     # 0x93193
xorl %eax, %eax
callq 0xe070
movq 0xc9441(%rip), %rax     # 0xd9f80
movq (%rax), %rdi
callq 0xe540
testl %ebx, %ebx
je 0x10b8d
xorl %eax, %eax
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x82518(%rip), %rdi     # 0x9307e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x681ca
pushq $0x1
jmp 0x10b8f
leaq 0x82520(%rip), %rdi     # 0x9309b
xorl %eax, %eax
callq 0x681ca
jmp 0x10b8d
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
pushq $-0x1
popq %rdi
callq 0xe570
jmp 0x10bc0
jmp 0x10bc0
movq %rax, %rbx
movl $0x250, %esi            # imm = 0x250
movq %r13, %rdi
jmp 0x10bb1
movq %rax, %rbx
movl $0x138, %esi            # imm = 0x138
movq %r14, %rdi
callq 0xe460
jmp 0x10bd0
jmp 0x10bc0
jmp 0x10bc0
jmp 0x10bc0
jmp 0x10bc0
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2bc02
movq %rbx, %rdi
callq 0xe810