// File: /workspace/github_c_makefile_star2_O1/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, 0xd3091(%rip)     # 0xe1453
movl $0x0, 0xc0738(%rip)     # 0xceb04
leaq 0x31dd2d(%rip), %rax    # 0x32c100
cmpb $0x0, 0x1(%rax)
jne 0xe5f9
movl 0xd410c(%rip), %r15d    # 0xe24f0
leaq 0x794735(%rip), %r12    # 0x7a2b20
leaq 0xf986e(%rip), %r13     # 0x107c60
leaq 0xd4207(%rip), %rbp     # 0xe2600
leaq 0x109860(%rip), %r14    # 0x117c60
leaq 0xd4239(%rip), %rbx     # 0xe2640
leaq 0x54bf3a(%rip), %rax    # 0x55a348
movl (%rax), %eax
movl 0xd3072(%rip), %ecx     # 0xe1488
leal 0x3(%rcx), %edx
cmpl %edx, %eax
jl 0xe507
movl %r15d, 0x4(%rsp)
cmpl 0xd40c3(%rip), %r15d    # 0xe24f0
jl 0xe47c
leaq 0xd43da(%rip), %rdi     # 0xe2810
callq 0x19a20
leaq 0x7946ce(%rip), %rax    # 0x7a2b10
movl (%rax), %r15d
testl %r15d, %r15d
js 0xe45c
movswl %r15w, %edi
callq 0x1b0cd
movl %r15d, %eax
movl (%r12,%rax,4), %r15d
jmp 0xe445
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xa1d7
movl %r15d, 0xd2fe7(%rip)    # 0xe1454
movl $0x0, 0x4(%rsp)
movl %r15d, 0xd2fdc(%rip)    # 0xe1458
leaq 0x79468d(%rip), %rax    # 0x7a2b10
movl (%rax), %esi
testl %esi, %esi
leaq 0xe17d2(%rip), %r9      # 0xefc60
leaq 0xd40bb(%rip), %r10     # 0xe2550
leaq 0xe97c4(%rip), %r11     # 0xf7c60
leaq 0xd40fd(%rip), %r15     # 0xe25a0
js 0xe4f0
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 0xe4b4
callq 0xd1ba
callq 0xd2b2
movl 0x4(%rsp), %r15d
incl %r15d
jmp 0xe407
subl %ecx, %eax
movswl 0xd2f4e(%rip), %edi     # 0xe145e
imull $0x5555, %eax, %esi     # imm = 0x5555
callq 0xb563
movslq 0xc049a(%rip), %rax     # 0xce9bc
leaq 0x31dbd7(%rip), %rdx    # 0x32c100
cmpb $0x0, (%rdx,%rax)
jle 0xe55d
movb $0x0, (%rdx,%rax)
movswq 0xd2f23(%rip), %rax     # 0xe145e
movzwl (%r12,%rax,4), %eax
movw %ax, 0xd2f17(%rip)      # 0xe145e
testw %ax, %ax
jns 0xe55d
leaq 0x7945bd(%rip), %rax    # 0x7a2b10
movzwl (%rax), %eax
movw %ax, 0xd2f01(%rip)      # 0xe145e
movslq 0xc0454(%rip), %rax     # 0xce9b8
cmpb $0x0, (%rdx,%rax)
jle 0xe5ef
movb $0x0, (%rdx,%rax)
movswq 0xd2ee4(%rip), %rax     # 0xe145e
leaq 0xd433f(%rip), %rsi     # 0xe28c0
movb (%rax,%rsi), %cl
incb %cl
cmpb $0x4, %cl
movzbl %cl, %ecx
movl $0x1, %edi
cmovgel %edi, %ecx
movb %cl, (%rax,%rsi)
cmpb $0x2, %cl
jne 0xe5cc
leaq 0x5a78a9(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
decl %edx
leaq 0x5a78a2(%rip), %rax    # 0x5b5e50
movl (%rax), %eax
decl %eax
movb 0xd2e9a(%rip), %cl      # 0xe1452
sarl %cl, %eax
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %ecx
callq 0x44922
leaq 0x31db34(%rip), %rdx    # 0x32c100
movswq 0xd2e8a(%rip), %rax     # 0xe145e
leaq 0xd42e5(%rip), %rcx     # 0xe28c0
cmpb $0x3, (%rax,%rcx)
jne 0xe5ef
xorl %eax, %eax
callq 0x14903
leaq 0x31db11(%rip), %rdx    # 0x32c100
cmpb $0x0, 0x1(%rdx)
je 0xe407
callq 0x1c1e3
callq 0x5a860
callq 0x7f095
callq 0x7f057
callq 0x36925
callq 0x1c152
callq 0x32d19
callq 0xa5d7
xorl %edi, %edi
callq 0x8950