// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/bstub.c
// Function: ExtShowSectorData
void ExtShowSectorData(short sectnum)   //F5
{
    int  i,effect;
    int  delay=0,rotating=0,switches=0,totsprites=0;
    char lighting[16],flooreffect[16],walleffect[16],ceileffect[16];
    char *secttype;

     switch (sector[sectnum].lotag) {
     case 0:
          secttype="NORMAL";
          break;
     case 1:
          secttype="ACTIVATE SECTOR";
          break;
     case 6:
          secttype="RISING DOOR";
          break;
     case 7:
          secttype="DROP DOOR";
          break;
     case 8:
          secttype="HOR SPLIT DOOR";
          break;
     case 9:
          secttype="VER SPLIT DOOR";
          break;
     case 14:
          secttype="ROTATING";
          break;
     case 1000:
          secttype="PLATFORM ELEVATOR";
          break;
     case 1003:
          secttype="BOX ELEVATOR";
          break;
     default:
          secttype="UNDEFINED";
          break;
     }
     memset(lighting,0,sizeof(lighting));
     memset(flooreffect,0,sizeof(flooreffect));
     memset(ceileffect,0,sizeof(ceileffect));
     memset(walleffect,0,sizeof(walleffect));
     i=headspritesect[sectnum];
     while (i != -1) {
          if (sprite[i].picnum == 104) {
               effect=sprite[i].lotag-1000;
               switch (effect) {
               case PULSELIGHT:
                    strcat(lighting,"Pulsing ");
                    break;
               case FLICKERLIGHT:
                    strcat(lighting,"Flickering ");
                    break;
               case DELAYEFFECT:
                    delay=sprite[i].hitag;
                    break;
               case WPANNING:
                    sprintf(walleffect,"Panning (A=%d)",sprite[i].ang);
                    break;
               case FPANNING:
                    sprintf(flooreffect,"Panning (A=%d)",sprite[i].ang);
                    break;
               case CPANNING:
                    sprintf(ceileffect,"Panning (A=%d)",sprite[i].ang);
                    break;
               }
          }
          else if (sprite[i].lotag == 3) {
               rotating++;
          }
          else if (sprite[i].lotag == 4) {
               switches++;
          }
          else {
               totsprites++;
          }
          i=nextspritesect[i];
     }
     clearmidstatbar16();
     sprintf(tempbuf,"Effects for Sector %d (type=%s)",sectnum,secttype);
     printext16(1*8,4*8,11,-1,tempbuf,0);
     PrintStatusStr("Lighting Effect =",lighting,2,6,11);
     PrintStatus("Tic Delay       =",delay,2,7,11);
     PrintStatusStr("Wall Effects    =",walleffect,2,8,11);
     PrintStatusStr("Floor Effects   =",flooreffect,2,9,11);
     PrintStatusStr("Ceiling Effects =",ceileffect,2,10,11);
     PrintStatus("Rotating Sprites=",rotating,2,11,11);
     PrintStatus("Switches        =",switches,2,12,11);
     PrintStatus("Total Sprites   =",totsprites,2,13,11);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movslq %edi, %r12
imulq $0x28, %r12, %rax
leaq 0x232ed2(%rip), %rcx    # 0x23ca60
movzwl 0x22(%rcx,%rax), %eax
cmpq $0xe, %rax
ja 0x9bb2
leaq 0x5e5f0(%rip), %rcx     # 0x68190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5f344(%rip), %rax     # 0x68ef4
jmp 0x9c0f
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x9c08
cmpl $0x3eb, %eax            # imm = 0x3EB
jne 0x9bc9
leaq 0x5f255(%rip), %rax     # 0x68e1c
jmp 0x9c0f
leaq 0x5f334(%rip), %rax     # 0x68f04
jmp 0x9c0f
leaq 0x5f209(%rip), %rax     # 0x68de2
jmp 0x9c0f
leaq 0x5f1f4(%rip), %rax     # 0x68dd6
jmp 0x9c0f
leaq 0x5f1db(%rip), %rax     # 0x68dc6
jmp 0x9c0f
leaq 0x5f307(%rip), %rax     # 0x68efb
jmp 0x9c0f
leaq 0x5f1fe(%rip), %rax     # 0x68dfb
jmp 0x9c0f
leaq 0x5f1e6(%rip), %rax     # 0x68dec
jmp 0x9c0f
leaq 0x5f1fb(%rip), %rax     # 0x68e0a
movq %rax, (%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x50(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
movq %r12, 0x28(%rsp)
addq %r12, %r12
addq 0x8237b(%rip), %r12     # 0x8bfc0
leaq 0x26c064(%rip), %r13    # 0x275cb0
leaq 0x5e579(%rip), %r15     # 0x681cc
leaq 0x3a58c6(%rip), %rbx    # 0x3af520
movl $0x0, 0x8(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
movswq (%r12), %r12
cmpq $-0x1, %r12
je 0x9d4a
imulq $0x2c, %r12, %rax
cmpw $0x68, 0xe(%r13,%rax)
movzwl 0x26(%r13,%rax), %ecx
jne 0x9ccc
addl $0xfffffc18, %ecx       # imm = 0xFFFFFC18
cmpl $0x5, %ecx
ja 0x9d3f
addq %r13, %rax
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
leaq 0x10(%rsp), %rdi
callq 0x6420
movabsq $0x20676e69736c7550, %rcx # imm = 0x20676E69736C7550
movq %rcx, 0x10(%rsp,%rax)
movb $0x0, 0x18(%rsp,%rax)
jmp 0x9d3f
cmpl $0x4, %ecx
je 0x9cdb
cmpl $0x3, %ecx
jne 0x9cdf
incl %r14d
jmp 0x9d3f
incl %ebp
jmp 0x9d3f
incl 0xc(%rsp)
jmp 0x9d3f
movswl 0x1c(%rax), %edx
leaq 0x50(%rsp), %rdi
jmp 0x9d31
movswl 0x28(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x9d3f
movswl 0x1c(%rax), %edx
leaq 0x40(%rsp), %rdi
jmp 0x9d31
leaq 0x10(%rsp), %rdi
callq 0x6420
movabsq $0x6972656b63696c46, %rcx # imm = 0x6972656B63696C46
movq %rcx, 0x10(%rsp,%rax)
movl $0x20676e, 0x18(%rsp,%rax) # imm = 0x20676E
jmp 0x9d3f
movswl 0x1c(%rax), %edx
leaq 0x30(%rsp), %rdi
leaq 0x5f1eb(%rip), %rsi     # 0x68f23
xorl %eax, %eax
callq 0x6b00
addq %r12, %r12
addq %rbx, %r12
jmp 0x9c6f
callq 0x1906e
movswl 0x28(%rsp), %edx
leaq 0x94985(%rip), %r13     # 0x9e6e0
leaq 0x5f1d0(%rip), %rsi     # 0x68f32
movq %r13, %rdi
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x6b00
pushq $0x8
popq %r12
pushq $0x20
popq %rsi
pushq $0xb
popq %r15
pushq $-0x1
popq %rcx
movl %r12d, %edi
movl %r15d, %edx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x176c0
leaq 0x5f1bc(%rip), %rdi     # 0x68f52
leaq 0x10(%rsp), %rsi
pushq $0x2
popq %r13
pushq $0x6
popq %rcx
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e8e
leaq 0x5f1b0(%rip), %rdi     # 0x68f64
pushq $0x7
popq %rcx
movl 0x8(%rsp), %esi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e3c
leaq 0x5f1a9(%rip), %rdi     # 0x68f76
leaq 0x40(%rsp), %rsi
movl %r13d, %edx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x6e8e
leaq 0x5f1a1(%rip), %rdi     # 0x68f88
leaq 0x50(%rsp), %rsi
pushq $0x9
popq %rcx
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e8e
leaq 0x5f199(%rip), %rdi     # 0x68f9a
leaq 0x30(%rsp), %rsi
pushq $0xa
popq %rcx
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e8e
leaq 0x5f191(%rip), %rdi     # 0x68fac
movl %r14d, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl %r15d, %r8d
callq 0x6e3c
leaq 0x5f18b(%rip), %rdi     # 0x68fbe
pushq $0xc
popq %rcx
movl %ebp, %esi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e3c
leaq 0x5f186(%rip), %rdi     # 0x68fd0
pushq $0xd
popq %rcx
movl 0xc(%rsp), %esi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x6e3c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq