// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekgame.c
// Function: playback
void
playback()
{
     int i, j, k;

     ready2send = 0;
     recstat = 0; i = reccnt;
     while (keystatus[1] == 0)
     {
          while (totalclock >= lockclock+TICSPERFRAME)
          {
               if (i >= reccnt)
               {
                    prepareboard(boardfilename);
                    for(i=connecthead;i>=0;i=connectpoint2[i])
                         initplayersprite((short)i);
                    resettiming(); ototalclock = 0; gotlastpacketclock = 0;
                    i = 0;
               }

               k = 0;
               for(j=connecthead;j>=0;j=connectpoint2[j])
               {
                    fsyncvel[j] = recsyncvel[i][k];
                    fsyncsvel[j] = recsyncsvel[i][k];
                    fsyncangvel[j] = recsyncangvel[i][k];
                    fsyncbits[j] = recsyncbits[i][k];
                    k++;
               }
               movethings(); domovethings();
               i++;
          }
          drawscreen(screenpeek,(totalclock-lockclock)*(65536/TICSPERFRAME));

          if (keystatus[keys[15]] > 0)
          {
               keystatus[keys[15]] = 0;

               screenpeek = connectpoint2[screenpeek];
               if (screenpeek < 0) screenpeek = connecthead;
          }
          if (keystatus[keys[14]] > 0)
          {
               keystatus[keys[14]] = 0;
               dimensionmode[screenpeek]++;
               if (dimensionmode[screenpeek] > 3) dimensionmode[screenpeek] = 1;
               if (dimensionmode[screenpeek] == 2) setview(0L,0L,xdim-1,(ydim-1)>>detailmode);
               if (dimensionmode[screenpeek] == 3) setup3dscreen();
          }
     }

     musicoff();

     uninitmultiplayers();
     uninittimer();
     uninitinput();
     uninitengine();
     uninitsb();
     uninitgroupfile();
     cduninit();
     exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x0, 0xccf95(%rip)     # 0xda453
andl $0x0, 0xba63f(%rip)     # 0xc7b04
movl 0xce024(%rip), %r15d    # 0xdb4f0
leaq 0x317c4d(%rip), %rdx    # 0x325120
leaq 0x78e666(%rip), %r12    # 0x79bb40
leaq 0xf377f(%rip), %r13     # 0x100c60
leaq 0xce118(%rip), %rbp     # 0xdb600
leaq 0x103771(%rip), %r14    # 0x110c60
leaq 0xce14a(%rip), %rbx     # 0xdb640
cmpb $0x0, 0x1(%rdx)
jne 0xd6e8
movl %r15d, %esi
leaq 0x545e5e(%rip), %rax    # 0x553368
movl (%rax), %eax
movl 0xccf76(%rip), %ecx     # 0xda488
leal 0x3(%rcx), %edx
cmpl %edx, %eax
jl 0xd5f5
cmpl 0xcdfcd(%rip), %esi     # 0xdb4f0
jl 0xd569
leaq 0xce2e4(%rip), %rdi     # 0xdb810
callq 0x18550
leaq 0x78e5f8(%rip), %r15    # 0x79bb30
movslq (%r15), %r15
testq %r15, %r15
js 0xd552
movswl %r15w, %edi
callq 0x19ac0
shlq $0x2, %r15
addq %r12, %r15
jmp 0xd538
xorl %eax, %eax
callq 0x95e2
xorl %esi, %esi
andl $0x0, 0xccef2(%rip)     # 0xda454
andl $0x0, 0xcceef(%rip)     # 0xda458
movl %esi, 0x4(%rsp)
movslq %esi, %rax
leaq (%rax,%rax), %rcx
shlq $0x2, %rax
xorl %edx, %edx
leaq 0x78e5af(%rip), %rsi    # 0x79bb30
leaq 0xdb6d8(%rip), %r9      # 0xe8c60
leaq 0xcdfc1(%rip), %r10     # 0xdb550
leaq 0xe36ca(%rip), %r11     # 0xf0c60
movslq (%rsi), %rsi
testq %rsi, %rsi
js 0xd5e0
leaq (%rcx,%rdx), %rdi
movb (%r9,%rdi), %dil
movb %dil, (%rsi,%r10)
leaq (%rax,%rdx,2), %rdi
movzwl (%r11,%rdi), %r8d
leaq 0xcdfe6(%rip), %r15     # 0xdb5a0
movw %r8w, (%r15,%rsi,2)
movzwl (%r13,%rdi), %r8d
movw %r8w, (%rbp,%rsi,2)
movzwl (%r14,%rdi), %edi
movw %di, (%rbx,%rsi,2)
incq %rdx
shlq $0x2, %rsi
addq %r12, %rsi
jmp 0xd596
callq 0xc3d8
callq 0xc4c6
movl 0x4(%rsp), %esi
incl %esi
jmp 0xd503
movl %esi, %r15d
movswl 0xcce5f(%rip), %edi     # 0xda45e
subl %ecx, %eax
imull $0x5555, %eax, %esi     # imm = 0x5555
callq 0xa81a
movslq 0xba3a9(%rip), %rax     # 0xc79bc
leaq 0x317b06(%rip), %rdx    # 0x325120
cmpb $0x0, (%rdx,%rax)
jle 0xd64e
movb $0x0, (%rdx,%rax)
movswq 0xcce32(%rip), %rax     # 0xda45e
movzwl (%r12,%rax,4), %eax
movw %ax, 0xcce26(%rip)      # 0xda45e
testw %ax, %ax
jns 0xd64e
leaq 0x78e4ec(%rip), %rax    # 0x79bb30
movzwl (%rax), %eax
movw %ax, 0xcce10(%rip)      # 0xda45e
movslq 0xba363(%rip), %rax     # 0xc79b8
cmpb $0x0, (%rdx,%rax)
leaq 0xce260(%rip), %rsi     # 0xdb8c0
jle 0xd4f6
movb $0x0, (%rdx,%rax)
movswq 0xccdec(%rip), %rcx     # 0xda45e
movb (%rcx,%rsi), %al
incb %al
movb %al, (%rcx,%rsi)
cmpb $0x4, %al
jl 0xd687
movb $0x1, (%rcx,%rsi)
jmp 0xd4f6
cmpb $0x2, %al
jne 0xd6cd
leaq 0x5a17da(%rip), %rax    # 0x5aee6c
movl (%rax), %edx
decl %edx
leaq 0x5a17d3(%rip), %rax    # 0x5aee70
movl (%rax), %eax
decl %eax
movb 0xccdab(%rip), %cl      # 0xda452
sarl %cl, %eax
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %ecx
callq 0x41e1e
leaq 0xce205(%rip), %rcx     # 0xdb8c0
leaq 0x317a5e(%rip), %rdx    # 0x325120
movswq 0xccd94(%rip), %rax     # 0xda45e
movb (%rax,%rcx), %al
cmpb $0x3, %al
jne 0xd4f6
xorl %eax, %eax
callq 0x134f8
leaq 0x317a3d(%rip), %rdx    # 0x325120
jmp 0xd4f6
callq 0x1ab1c
callq 0x53db1
callq 0x74d8e
callq 0x74d5c
callq 0x339df
callq 0x1aa8f
callq 0x3024b
callq 0x99a7
xorl %edi, %edi
callq 0x8950