// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movswq -0x2(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0x2749f2(%rip), %rax    # 0x2805c0
movswl 0x22(%rax,%rcx,8), %eax
movl %eax, -0x6c(%rbp)
testl %eax, %eax
je 0xbc30
jmp 0xbbdc
movl -0x6c(%rbp), %eax
subl $0x1, %eax
je 0xbc3d
jmp 0xbbe6
movl -0x6c(%rbp), %eax
subl $0x6, %eax
je 0xbc4a
jmp 0xbbf0
movl -0x6c(%rbp), %eax
subl $0x7, %eax
je 0xbc57
jmp 0xbbfa
movl -0x6c(%rbp), %eax
subl $0x8, %eax
je 0xbc64
jmp 0xbc04
movl -0x6c(%rbp), %eax
subl $0x9, %eax
je 0xbc71
jmp 0xbc0e
movl -0x6c(%rbp), %eax
subl $0xe, %eax
je 0xbc7e
jmp 0xbc18
movl -0x6c(%rbp), %eax
subl $0x3e8, %eax            # imm = 0x3E8
je 0xbc8b
jmp 0xbc24
movl -0x6c(%rbp), %eax
subl $0x3eb, %eax            # imm = 0x3EB
je 0xbc98
jmp 0xbca5
leaq 0xa421d(%rip), %rax     # 0xafe54
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40c2(%rip), %rax     # 0xafd06
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40c5(%rip), %rax     # 0xafd16
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40c4(%rip), %rax     # 0xafd22
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40c1(%rip), %rax     # 0xafd2c
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40c3(%rip), %rax     # 0xafd3b
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa41d6(%rip), %rax     # 0xafe5b
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40b8(%rip), %rax     # 0xafd4a
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa40bd(%rip), %rax     # 0xafd5c
movq %rax, -0x68(%rbp)
jmp 0xbcb0
leaq 0xa41b8(%rip), %rax     # 0xafe64
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62d0
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62d0
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62d0
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62d0
movswq -0x2(%rbp), %rcx
leaq 0x3dd374(%rip), %rax    # 0x3e9070
movswl (%rax,%rcx,2), %eax
movl %eax, -0x8(%rbp)
cmpl $-0x1, -0x8(%rbp)
je 0xbea0
movslq -0x8(%rbp), %rcx
leaq 0x2adaf8(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %eax
cmpl $0x68, %eax
jne 0xbe30
movslq -0x8(%rbp), %rax
imulq $0x2c, %rax, %rcx
leaq 0x2adad5(%rip), %rax    # 0x2b9810
movswl 0x26(%rax,%rcx), %eax
addl $0xfffffc18, %eax       # imm = 0xFFFFFC18
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x78(%rbp)
subq $0x5, %rax
ja 0xbe2e
movq -0x78(%rbp), %rax
leaq 0xa33a8(%rip), %rcx     # 0xaf10c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x30(%rbp), %rdi
leaq 0xa40f6(%rip), %rsi     # 0xafe6e
callq 0x6690
jmp 0xbe2e
leaq -0x30(%rbp), %rdi
leaq 0xa40ea(%rip), %rsi     # 0xafe77
callq 0x6690
jmp 0xbe2e
movslq -0x8(%rbp), %rcx
leaq 0x2ada6e(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x28(%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0xbe2e
leaq -0x50(%rbp), %rdi
movslq -0x8(%rbp), %rcx
leaq 0x2ada4f(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1c(%rax), %edx
leaq 0xa40b0(%rip), %rsi     # 0xafe83
movb $0x0, %al
callq 0x6a30
jmp 0xbe2e
leaq -0x40(%rbp), %rdi
movslq -0x8(%rbp), %rcx
leaq 0x2ada25(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1c(%rax), %edx
leaq 0xa4086(%rip), %rsi     # 0xafe83
movb $0x0, %al
callq 0x6a30
jmp 0xbe2e
leaq -0x60(%rbp), %rdi
movslq -0x8(%rbp), %rcx
leaq 0x2ad9fb(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1c(%rax), %edx
leaq 0xa405c(%rip), %rsi     # 0xafe83
movb $0x0, %al
callq 0x6a30
jmp 0xbe89
movslq -0x8(%rbp), %rcx
leaq 0x2ad9d5(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x26(%rax), %eax
cmpl $0x3, %eax
jne 0xbe56
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbe87
movslq -0x8(%rbp), %rcx
leaq 0x2ad9af(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x26(%rax), %eax
cmpl $0x4, %eax
jne 0xbe7c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xbe85
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xbe87
jmp 0xbe89
movslq -0x8(%rbp), %rcx
leaq 0x3e71ec(%rip), %rax    # 0x3f3080
movswl (%rax,%rcx,2), %eax
movl %eax, -0x8(%rbp)
jmp 0xbd03
callq 0x28000
movswl -0x2(%rbp), %edx
movq -0x68(%rbp), %rcx
leaq 0xd5f7c(%rip), %rdi     # 0xe1e30
leaq 0xa3fd7(%rip), %rsi     # 0xafe92
movb $0x0, %al
callq 0x6a30
movl $0x8, %edi
movl $0x20, %esi
movl $0xb, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0xd5f53(%rip), %r8      # 0xe1e30
xorl %r9d, %r9d
callq 0x255b0
leaq -0x30(%rbp), %rsi
leaq 0xa3fc2(%rip), %rdi     # 0xafeb2
movl $0x2, %edx
movl $0x6, %ecx
movl $0xb, %r8d
callq 0x6de0
movl -0x10(%rbp), %esi
leaq 0xa3fb5(%rip), %rdi     # 0xafec4
movl $0x2, %edx
movl $0x7, %ecx
movl $0xb, %r8d
callq 0x6d70
leaq -0x50(%rbp), %rsi
leaq 0xa3fa7(%rip), %rdi     # 0xafed6
movl $0x2, %edx
movl $0x8, %ecx
movl $0xb, %r8d
callq 0x6de0
leaq -0x40(%rbp), %rsi
leaq 0xa3f99(%rip), %rdi     # 0xafee8
movl $0x2, %edx
movl $0x9, %ecx
movl $0xb, %r8d
callq 0x6de0
leaq -0x60(%rbp), %rsi
leaq 0xa3f8b(%rip), %rdi     # 0xafefa
movl $0x2, %edx
movl $0xa, %ecx
movl $0xb, %r8d
callq 0x6de0
movl -0x14(%rbp), %esi
leaq 0xa3f7e(%rip), %rdi     # 0xaff0c
movl $0x2, %edx
movl $0xb, %r8d
movl %r8d, %ecx
callq 0x6d70
movl -0x18(%rbp), %esi
leaq 0xa3f73(%rip), %rdi     # 0xaff1e
movl $0x2, %edx
movl $0xc, %ecx
movl $0xb, %r8d
callq 0x6d70
movl -0x1c(%rbp), %esi
leaq 0xa3f66(%rip), %rdi     # 0xaff30
movl $0x2, %edx
movl $0xd, %ecx
movl $0xb, %r8d
callq 0x6d70
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)