// File: st0ne[P]XReflectorPlus/dxrfd.cpp
// Function: print_links_screen()
static void print_links_screen()
{
   char buf[256];
   struct tm tm;

   inbound_type::iterator inbound_pos;
   inbound *inbound_ptr;

   a_user_list_type::iterator pos;
   struct a_user *a_user_ptr;
   short int i, j;
   char from_mod = ' ';

   for (pos = a_user_list.begin(); pos != a_user_list.end(); pos++)
   {
      a_user_ptr = (struct a_user *)pos->second;
      for (i = 0; i < 5; i++)
      {
         for (j = 0; j < 4; j++)
         {
            if (a_user_ptr->rpt_mods[i][j] != '\0')
            {
               if (i == 0)
                  from_mod = 'A';
               else
               if (i == 1)
                  from_mod = 'B';
               else
               if (i == 2)
                  from_mod = 'C';
               else
               if (i == 3)
                  from_mod = 'D';
               else
               if (i == 4)
                  from_mod = 'E';

               localtime_r(&(a_user_ptr->link_time[i][j]),&tm);
               snprintf(buf, 255, "%c,%s,%c,%s,%02d%02d%02d,%02d:%02d:%02d\n",
                        from_mod,
                        a_user_ptr->call,
                        a_user_ptr->rpt_mods[i][j],
                        pos->first.c_str(),
                        tm.tm_mon+1,tm.tm_mday,tm.tm_year % 100,
                        tm.tm_hour,tm.tm_min,tm.tm_sec);

               sendto(cmd_sock, buf, strlen(buf),
                      0, (struct sockaddr *)&fromCmd,
                      sizeof(struct sockaddr_in));
            }
         }
      }
   }

   for (inbound_pos = inbound_list.begin(); inbound_pos != inbound_list.end(); inbound_pos++)
   {
      inbound_ptr = (inbound *)inbound_pos->second;
      for (i = 0; i < 5; i++)
      {
         if (inbound_ptr->links[i] != ' ')
         {
            if (i == 0)
               from_mod = 'A';
            else
            if (i == 1)
               from_mod = 'B';
            else
            if (i == 2)
               from_mod = 'C';
            else
            if (i == 3)
               from_mod = 'D';
            else
               from_mod = 'E';

            localtime_r(&(inbound_ptr->connect_time), &tm);
            snprintf(buf, 255, "%c,%s,%c,%s,%02d%02d%02d,%02d:%02d:%02d\n",
                  from_mod,
                  inbound_ptr->call,
                  inbound_ptr->links[i],
                  inbound_pos->first.c_str(),
                  tm.tm_mon+1,tm.tm_mday,tm.tm_year % 100,
                  tm.tm_hour,tm.tm_min,tm.tm_sec);

            sendto(cmd_sock, buf, strlen(buf),
                   0, (struct sockaddr *)&fromCmd,
                   sizeof(struct sockaddr_in));
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
leaq -0x160(%rbp), %rdi
callq 0x10840
leaq -0x170(%rbp), %rdi
callq 0x13d50
movb $0x20, -0x17d(%rbp)
leaq 0x10378(%rip), %rdi     # 0x1f380
callq 0x13d70
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq 0x10357(%rip), %rdi     # 0x1f380
callq 0x13dd0
movq %rax, -0x190(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x13da0
testb $0x1, %al
jne 0xf051
jmp 0xf2f5
leaq -0x170(%rbp), %rdi
callq 0x13e00
movq 0x20(%rax), %rax
movq %rax, -0x178(%rbp)
movw $0x0, -0x17a(%rbp)
movswl -0x17a(%rbp), %eax
cmpl $0x5, %eax
jge 0xf2d9
movw $0x0, -0x17c(%rbp)
movswl -0x17c(%rbp), %eax
cmpl $0x4, %eax
jge 0xf2c0
movq -0x178(%rbp), %rax
addq $0x18, %rax
movswq -0x17a(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movswq -0x17c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xf2a7
movswl -0x17a(%rbp), %eax
cmpl $0x0, %eax
jne 0xf0de
movb $0x41, -0x17d(%rbp)
jmp 0xf138
movswl -0x17a(%rbp), %eax
cmpl $0x1, %eax
jne 0xf0f3
movb $0x42, -0x17d(%rbp)
jmp 0xf136
movswl -0x17a(%rbp), %eax
cmpl $0x2, %eax
jne 0xf108
movb $0x43, -0x17d(%rbp)
jmp 0xf134
movswl -0x17a(%rbp), %eax
cmpl $0x3, %eax
jne 0xf11d
movb $0x44, -0x17d(%rbp)
jmp 0xf132
movswl -0x17a(%rbp), %eax
cmpl $0x4, %eax
jne 0xf130
movb $0x45, -0x17d(%rbp)
jmp 0xf132
jmp 0xf134
jmp 0xf136
jmp 0xf138
movq -0x178(%rbp), %rdi
addq $0x30, %rdi
movswq -0x17a(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movswq -0x17c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
leaq -0x158(%rbp), %rsi
callq 0x3190
leaq -0x120(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movsbl -0x17d(%rbp), %eax
movl %eax, -0x1cc(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x178(%rbp), %rax
addq $0x18, %rax
movswq -0x17a(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movswq -0x17c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x1c0(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x13e00
movq %rax, %rdi
callq 0x3140
movq -0x1d8(%rbp), %rdi
movl -0x1cc(%rbp), %ecx
movq -0x1c8(%rbp), %r8
movl -0x1c0(%rbp), %r9d
movq %rax, %r12
movl -0x148(%rbp), %r15d
addl $0x1, %r15d
movl -0x14c(%rbp), %r14d
movl -0x144(%rbp), %eax
movl $0x64, %esi
cltd
idivl %esi
movl %edx, %ebx
movl -0x150(%rbp), %r11d
movl -0x154(%rbp), %r10d
movl -0x158(%rbp), %eax
movl $0xff, %esi
leaq 0x8409(%rip), %rdx      # 0x1763f
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x34c0
movl 0x10079(%rip), %eax     # 0x1f2dc
movl %eax, -0x1bc(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3150
movl -0x1bc(%rbp), %edi
movq -0x1b8(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq 0x13dd4(%rip), %r8      # 0x23070
movl $0x10, %r9d
callq 0x3080
jmp 0xf2a9
movw -0x17c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x17c(%rbp)
jmp 0xf08a
jmp 0xf2c2
movw -0x17a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x17a(%rbp)
jmp 0xf071
jmp 0xf2db
leaq -0x170(%rbp), %rdi
xorl %esi, %esi
callq 0x13e20
movq %rax, -0x198(%rbp)
jmp 0xf022
leaq 0x10054(%rip), %rdi     # 0x1f350
callq 0x10860
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq 0x10033(%rip), %rdi     # 0x1f350
callq 0x108c0
movq %rax, -0x1a8(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x10890
testb $0x1, %al
jne 0xf345
jmp 0xf567
leaq -0x160(%rbp), %rdi
callq 0x108f0
movq 0x20(%rax), %rax
movq %rax, -0x168(%rbp)
movw $0x0, -0x17a(%rbp)
movswl -0x17a(%rbp), %eax
cmpl $0x5, %eax
jge 0xf54b
movq -0x168(%rbp), %rax
movswq -0x17a(%rbp), %rcx
movsbl 0x2c(%rax,%rcx), %eax
cmpl $0x20, %eax
je 0xf532
movswl -0x17a(%rbp), %eax
cmpl $0x0, %eax
jne 0xf3a7
movb $0x41, -0x17d(%rbp)
jmp 0xf3f3
movswl -0x17a(%rbp), %eax
cmpl $0x1, %eax
jne 0xf3bc
movb $0x42, -0x17d(%rbp)
jmp 0xf3f1
movswl -0x17a(%rbp), %eax
cmpl $0x2, %eax
jne 0xf3d1
movb $0x43, -0x17d(%rbp)
jmp 0xf3ef
movswl -0x17a(%rbp), %eax
cmpl $0x3, %eax
jne 0xf3e6
movb $0x44, -0x17d(%rbp)
jmp 0xf3ed
movb $0x45, -0x17d(%rbp)
jmp 0xf3ef
jmp 0xf3f1
jmp 0xf3f3
movq -0x168(%rbp), %rdi
addq $0x10, %rdi
leaq -0x158(%rbp), %rsi
callq 0x3190
leaq -0x120(%rbp), %rax
movq %rax, -0x200(%rbp)
movsbl -0x17d(%rbp), %eax
movl %eax, -0x1f4(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x168(%rbp), %rax
movswq -0x17a(%rbp), %rcx
movsbl 0x2c(%rax,%rcx), %eax
movl %eax, -0x1e8(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x108f0
movq %rax, %rdi
callq 0x3140
movq -0x200(%rbp), %rdi
movl -0x1f4(%rbp), %ecx
movq -0x1f0(%rbp), %r8
movl -0x1e8(%rbp), %r9d
movq %rax, %r12
movl -0x148(%rbp), %r15d
addl $0x1, %r15d
movl -0x14c(%rbp), %r14d
movl -0x144(%rbp), %eax
movl $0x64, %esi
cltd
idivl %esi
movl %edx, %ebx
movl -0x150(%rbp), %r11d
movl -0x154(%rbp), %r10d
movl -0x158(%rbp), %eax
movl $0xff, %esi
leaq 0x817e(%rip), %rdx      # 0x1763f
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x34c0
movl 0xfdee(%rip), %eax      # 0x1f2dc
movl %eax, -0x1e4(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3150
movl -0x1e4(%rbp), %edi
movq -0x1e0(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq 0x13b49(%rip), %r8      # 0x23070
movl $0x10, %r9d
callq 0x3080
jmp 0xf534
movw -0x17a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x17a(%rbp)
jmp 0xf365
jmp 0xf54d
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x10910
movq %rax, -0x1b0(%rbp)
jmp 0xf316
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)