// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_CalcPanTable
static void MV_CalcPanTable
   (
   void
   )

   {
   int   level;
   int   angle;
   int   distance;
   int   HalfAngle;
   int   ramp;

   HalfAngle = ( MV_NumPanPositions / 2 );

   for( distance = 0; distance <= MV_MaxVolume; distance++ )
      {
      level = ( 255 * ( MV_MaxVolume - distance ) ) / MV_MaxVolume;
      for( angle = 0; angle <= HalfAngle / 2; angle++ )
         {
         ramp = level - ( ( level * angle ) /
            ( MV_NumPanPositions / 4 ) );

         MV_PanTable[ angle ][ distance ].left = ramp;
         MV_PanTable[ HalfAngle - angle ][ distance ].left = ramp;
         MV_PanTable[ HalfAngle + angle ][ distance ].left = level;
         MV_PanTable[ MV_MaxPanPosition - angle ][ distance ].left = level;

         MV_PanTable[ angle ][ distance ].right = level;
         MV_PanTable[ HalfAngle - angle ][ distance ].right = level;
         MV_PanTable[ HalfAngle + angle ][ distance ].right = ramp;
         MV_PanTable[ MV_MaxPanPosition - angle ][ distance ].right = ramp;
         }
      }
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x10, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xd76d(%rip), %eax      # 0x15718
jg 0x8142
movl 0xd761(%rip), %eax      # 0x15718
subl -0xc(%rbp), %eax
imull $0xff, %eax, %eax
cltd
idivl 0xd751(%rip)            # 0x15718
movl %eax, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jg 0x8132
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
imull -0x8(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movb %al, %dl
movslq -0x8(%rbp), %rcx
leaq 0x15e02(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
movb %al, %dl
movl -0x10(%rbp), %eax
subl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15ddf(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx,2)
movl -0x4(%rbp), %eax
movb %al, %dl
movl -0x10(%rbp), %eax
addl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15dbc(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx,2)
movl -0x4(%rbp), %eax
movb %al, %dl
movl $0x1f, %eax
subl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15d97(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx,2)
movl -0x4(%rbp), %eax
movb %al, %dl
movslq -0x8(%rbp), %rcx
leaq 0x15d79(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx,2)
movl -0x4(%rbp), %eax
movb %al, %dl
movl -0x10(%rbp), %eax
subl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15d55(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx,2)
movl -0x14(%rbp), %eax
movb %al, %dl
movl -0x10(%rbp), %eax
addl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15d31(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx,2)
movl -0x14(%rbp), %eax
movb %al, %dl
movl $0x1f, %eax
subl -0x8(%rbp), %eax
movslq %eax, %rcx
leaq 0x15d0b(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx,2)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x7fd1
jmp 0x8134
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7fa2
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop