// File: /workspace/github_c_makefile_star2_O3/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, 0xd6095(%rip)     # 0xe4453
movl $0x0, 0xc373c(%rip)     # 0xd1b04
leaq 0x320d51(%rip), %rax    # 0x32f120
cmpb $0x0, 0x1(%rax)
jne 0xe5ed
movl 0xd7110(%rip), %r15d    # 0xe54f0
leaq 0x797759(%rip), %r12    # 0x7a5b40
leaq 0xfc872(%rip), %r13     # 0x10ac60
leaq 0xd720b(%rip), %rbp     # 0xe5600
leaq 0x10c864(%rip), %r14    # 0x11ac60
leaq 0xd723d(%rip), %rbx     # 0xe5640
leaq 0x54ef5e(%rip), %rax    # 0x55d368
movl (%rax), %eax
movl 0xd6076(%rip), %ecx     # 0xe4488
leal 0x3(%rcx), %edx
cmpl %edx, %eax
jl 0xe503
movl %r15d, 0x4(%rsp)
cmpl 0xd70c7(%rip), %r15d    # 0xe54f0
jl 0xe478
leaq 0xd73de(%rip), %rdi     # 0xe5810
callq 0x19b14
leaq 0x7976f2(%rip), %rax    # 0x7a5b30
movl (%rax), %r15d
testl %r15d, %r15d
js 0xe458
movswl %r15w, %edi
callq 0x1b1e5
movl %r15d, %eax
movl (%r12,%rax,4), %r15d
jmp 0xe441
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xa1f7
movl %r15d, 0xd5feb(%rip)    # 0xe4454
movl $0x0, 0x4(%rsp)
movl %r15d, 0xd5fe0(%rip)    # 0xe4458
leaq 0x7976b1(%rip), %rax    # 0x7a5b30
movl (%rax), %esi
testl %esi, %esi
leaq 0xe47d6(%rip), %r9      # 0xf2c60
leaq 0xd70bf(%rip), %r10     # 0xe5550
leaq 0xec7c8(%rip), %r11     # 0xfac60
leaq 0xd7101(%rip), %r15     # 0xe55a0
js 0xe4ec
movslq 0x4(%rsp), %rax
leaq (%rax,%rax), %rcx
shlq $0x2, %rax
xorl %edx, %edx
leaq (%rcx,%rdx), %rdi
movb (%r9,%rdi), %dil
movl %esi, %esi
movb %dil, (%rsi,%r10)
leaq (%rax,%rdx,2), %rdi
movzwl (%r11,%rdi), %r8d
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
movl (%r12,%rsi,4), %esi
testl %esi, %esi
jns 0xe4b0
callq 0xd199
callq 0xd296
movl 0x4(%rsp), %r15d
incl %r15d
jmp 0xe403
subl %ecx, %eax
movswl 0xd5f52(%rip), %edi     # 0xe445e
imull $0x5555, %eax, %esi     # imm = 0x5555
callq 0xb541
movslq 0xc349e(%rip), %rax     # 0xd19bc
leaq 0x320bfb(%rip), %rdx    # 0x32f120
cmpb $0x0, (%rdx,%rax)
jle 0xe559
movb $0x0, (%rdx,%rax)
movswq 0xd5f27(%rip), %rax     # 0xe445e
movzwl (%r12,%rax,4), %eax
movw %ax, 0xd5f1b(%rip)      # 0xe445e
testw %ax, %ax
jns 0xe559
leaq 0x7975e1(%rip), %rax    # 0x7a5b30
movzwl (%rax), %eax
movw %ax, 0xd5f05(%rip)      # 0xe445e
movslq 0xc3458(%rip), %rax     # 0xd19b8
cmpb $0x0, (%rdx,%rax)
leaq 0xd7355(%rip), %rsi     # 0xe58c0
jle 0xe5e3
movb $0x0, (%rdx,%rax)
movswq 0xd5ee5(%rip), %rcx     # 0xe445e
movb (%rcx,%rsi), %al
incb %al
movb %al, (%rcx,%rsi)
cmpb $0x4, %al
jl 0xe58b
movb $0x1, (%rcx,%rsi)
jmp 0xe5e3
cmpb $0x2, %al
jne 0xe5d1
leaq 0x5aa8d6(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
decl %edx
leaq 0x5aa8cf(%rip), %rax    # 0x5b8e70
movl (%rax), %eax
decl %eax
movb 0xd5ea7(%rip), %cl      # 0xe4452
sarl %cl, %eax
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %ecx
callq 0x4624e
leaq 0x320b61(%rip), %rdx    # 0x32f120
movswq 0xd5e97(%rip), %rax     # 0xe445e
leaq 0xd72f2(%rip), %rcx     # 0xe58c0
movb (%rax,%rcx), %al
cmpb $0x3, %al
jne 0xe5e3
xorl %eax, %eax
callq 0x14983
leaq 0x320b3d(%rip), %rdx    # 0x32f120
cmpb $0x0, 0x1(%rdx)
je 0xe403
callq 0x1c362
callq 0x5da43
callq 0x81ca5
callq 0x81c67
callq 0x37bfa
callq 0x1c2d1
callq 0x34053
callq 0xa5e7
xorl %edi, %edi
callq 0x8950