// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Logger.cpp
// Function: SightLogger::SightLogger(Observer*, WorldState*)
SightLogger::SightLogger(Observer *observer, WorldState *world_state) {
  Assert(observer && world_state);

  mpObserver = observer;
  mpWorldState = world_state;

  mHeader = "ULG4\n";
  mHeaderReady = false;
  mHeaderLogged = false;
  mLoggedPlayerTypeCount = 0;

  mServerPlayMode = SPM_Null;
  mServerPlayMode_dirty = true;
  mLeftScore = 0;
  mRightScore = 0;
  mLeftPenTaken = 0;
  mRightPenTaken = 0;
  mTeamState_dirty = true;

  char file_name[256];
  sprintf(file_name, "%s/%s-%d-sight.log",
          PlayerParam::instance().logDir().c_str(),
          PlayerParam::instance().teamName().c_str(), mpObserver->SelfUnum());
  os.open(file_name);
  if (!os.good()) {
    PRINT_ERROR("open sight log file error");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x140(%rbp)
movq %rdi, %rax
movq %rax, -0x148(%rbp)
callq 0xaa30
movq -0x140(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
movq %rdi, -0x138(%rbp)
callq 0x8eb70
jmp 0x58a5d
movq -0x148(%rbp), %rdi
addq $0x228, %rdi            # imm = 0x228
movq %rdi, -0x150(%rbp)
callq 0x8eb70
jmp 0x58a79
movq -0x148(%rbp), %rdi
addq $0x260, %rdi            # imm = 0x260
movq %rdi, -0x170(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x280, %rdi            # imm = 0x280
movq %rdi, -0x168(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movq %rdi, -0x160(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x2c0, %rdi            # imm = 0x2C0
movq %rdi, -0x158(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x2f0, %rdi            # imm = 0x2F0
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
xorl %edx, %edx
callq 0x13c70
jmp 0x58afd
movq -0x148(%rbp), %rdi
addq $0x308, %rdi            # imm = 0x308
movq %rdi, -0x180(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x328, %rdi            # imm = 0x328
movq %rdi, -0x178(%rbp)
callq 0xa820
movq -0x148(%rbp), %rdi
addq $0x358, %rdi            # imm = 0x358
callq 0x5bbb0
jmp 0x58b46
movq -0x148(%rbp), %rdi
addq $0x3b0, %rdi            # imm = 0x3B0
callq 0x5bbb0
jmp 0x58b5b
movq -0x148(%rbp), %rdi
addq $0x408, %rdi            # imm = 0x408
movq %rdi, -0x198(%rbp)
callq 0x5bbd0
movq -0x148(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rdi, -0x190(%rbp)
callq 0x5bbf0
movq -0x148(%rbp), %rdi
addq $0x438, %rdi            # imm = 0x438
movq %rdi, -0x188(%rbp)
callq 0x5bc10
movq -0x148(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, 0x250(%rdi)
movq -0x18(%rbp), %rax
movq %rax, 0x258(%rdi)
addq $0x260, %rdi            # imm = 0x260
leaq 0x69d50(%rip), %rsi     # 0xc2924
callq 0xa810
jmp 0x58bdb
movq -0x148(%rbp), %rax
movb $0x0, 0x2e4(%rax)
movb $0x0, 0x2e5(%rax)
movl $0x0, 0x2e0(%rax)
movl $0x0, 0x2e8(%rax)
movb $0x1, 0x2ec(%rax)
movl $0x0, 0x2f8(%rax)
movl $0x0, 0x2fc(%rax)
movl $0x0, 0x300(%rax)
movl $0x0, 0x304(%rax)
movb $0x1, 0x348(%rax)
leaq -0x130(%rbp), %rax
movq %rax, -0x1a8(%rbp)
callq 0x798a0
movq %rax, -0x1a0(%rbp)
jmp 0x58c56
movq -0x1a0(%rbp), %rdi
callq 0x35b80
movq %rax, -0x1b0(%rbp)
jmp 0x58c6b
movq -0x1b0(%rbp), %rdi
callq 0xa240
movq %rax, -0x1c0(%rbp)
callq 0x798a0
movq %rax, -0x1b8(%rbp)
jmp 0x58c8c
movq -0x1b8(%rbp), %rdi
callq 0x11db0
movq %rax, -0x1c8(%rbp)
jmp 0x58ca1
movq -0x1c8(%rbp), %rdi
callq 0xa240
movq %rax, %rcx
movq -0x148(%rbp), %rax
movq %rcx, -0x1d8(%rbp)
movq 0x250(%rax), %rdi
callq 0x11dd0
movq %rax, -0x1d0(%rbp)
jmp 0x58cd3
movq -0x1d8(%rbp), %rcx
movq -0x1c0(%rbp), %rdx
movq -0x1a8(%rbp), %rdi
movq -0x1d0(%rbp), %rax
movl (%rax), %r8d
leaq 0x69c31(%rip), %rsi     # 0xc292a
xorl %eax, %eax
callq 0xa130
movq -0x148(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movl $0x10, %edx
callq 0xa090
jmp 0x58d1a
movq -0x148(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xaa20
movb %al, -0x1d9(%rbp)
jmp 0x58d38
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x58e5f
jmp 0x58d48
jmp 0x58d4a
movq 0xa529f(%rip), %rdi     # 0xfdff0
leaq 0x69be5(%rip), %rsi     # 0xc293d
callq 0xa5a0
movq %rax, -0x1e8(%rbp)
jmp 0x58d66
movq -0x1e8(%rbp), %rdi
leaq 0x6c4dd(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, -0x1f0(%rbp)
jmp 0x58d82
movq -0x1f0(%rbp), %rdi
movl $0x44, %esi
callq 0xaa40
movq %rax, -0x1f8(%rbp)
jmp 0x58d9c
movq -0x1f8(%rbp), %rdi
leaq 0x6a7b5(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, -0x200(%rbp)
jmp 0x58db8
movq -0x200(%rbp), %rdi
leaq 0x69b89(%rip), %rsi     # 0xc294f
callq 0xa5a0
movq %rax, -0x208(%rbp)
jmp 0x58dd4
movq -0x208(%rbp), %rdi
movq 0xa51ce(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x58de9
jmp 0x58deb
jmp 0x58ded
jmp 0x58e5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x58ec8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x58ebc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x58e80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x58e68
movq -0x188(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x5bc30
movq -0x190(%rbp), %rdi
callq 0x5bc90
movq -0x198(%rbp), %rdi
callq 0x5bcf0
jmp 0x58e68
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x178(%rbp), %rdi
callq 0xa370
movq -0x180(%rbp), %rdi
callq 0xa370
movq -0x158(%rbp), %rdi
callq 0xa370
movq -0x160(%rbp), %rdi
callq 0xa370
movq -0x168(%rbp), %rdi
callq 0xa370
movq -0x170(%rbp), %rdi
callq 0xa370
movq -0x150(%rbp), %rdi
callq 0x8eb90
movq -0x138(%rbp), %rdi
callq 0x8eb90
movq -0x140(%rbp), %rdi
callq 0xa8c0
movq -0x20(%rbp), %rdi
callq 0xaa60
nopl (%rax)