// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/common/log.cc
// Function: scdc_log::init(char const*, _scdc_args_t*)
bool scdc_log::init(const char *conf, scdc_args_t *args)
{
  SCDC_TRACE("init: conf: '" << conf << "'");

  ostream *scdc_cout = 0;
  ostream *scdc_cerr = 0;

  if (!conf)
  {
    SCDC_FAIL("init: no config given");
    return false;
  }

  string c(conf);
  scdc_args xargs(*args);

  if (c == "log_handler")
  {
    scdc_log_handler_args_t outhandler, errhandler;

    if (!xargs.get<scdc_log_handler_args_t>(SCDC_ARGS_TYPE_LOG_HANDLER, &outhandler))
    {
      SCDC_FAIL("init: no output log handler given");
      return false;
    }

    if (!xargs.get<scdc_log_handler_args_t>(SCDC_ARGS_TYPE_LOG_HANDLER, &errhandler))
    {
      SCDC_FAIL("init: no error log handler given");
      return false;
    }

    scdc_cout = new ostream_log_handler(&outhandler);
    scdc_cerr = new ostream_log_handler(&errhandler);

  } else if (c == "log_FILE")
  {
    FILE *outfile = 0, *errfile = 0;

    if (!xargs.get<FILE *>(SCDC_ARGS_TYPE_OUT_STREAM, &outfile))
    {
      SCDC_FAIL("init: no output FILE given");
      return false;
    }

    if (!xargs.get<FILE *>(SCDC_ARGS_TYPE_OUT_STREAM, &errfile))
    {
      SCDC_FAIL("init: no error FILE given");
      return false;
    }

    scdc_cout = new ostream_FILE(outfile);
    scdc_cerr = new ostream_FILE(errfile);

  } else if (c == "log_filepath")
  {
    const char *filepath;

    if (!xargs.get<const char *>(SCDC_ARGS_TYPE_CSTR, &filepath))
    {
      SCDC_FAIL("init: no filepath given");
      return false;
    }

    scdc_cout = new ofstream((string(filepath) + ".out").c_str());
    scdc_cerr = new ofstream((string(filepath) + ".err").c_str());

  } else
  {
    SCDC_FAIL("init: unknown log type '" << c << "'");
    return false;
  }

  set_cout(scdc_cout);
  set_cerr(scdc_cerr);

  SCDC_TRACE("init: return");

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
testq %rsi, %rsi
je 0x316a1
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rsi, %rdi
callq 0xb200
leaq (%rax,%r15), %rdx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1be38
leaq 0x90(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
leaq 0x3a2bb(%rip), %rsi     # 0x6b864
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x31738
leaq 0x38c94(%rip), %rsi     # 0x6a254
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x317c9
leaq 0x3a30f(%rip), %rsi     # 0x6b8e8
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x318e0
leaq 0x5af7e(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x38b91(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3a21d(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3a2d8(%rip), %rsi     # 0x6b917
movl $0x18, %edx
movq %rbx, %rdi
callq 0xb5f0
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0xb5f0
movq %rax, %rbx
leaq 0x3ad6b(%rip), %rsi     # 0x6c3d3
movl $0x1, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
jmp 0x31a4c
leaq 0x5aec8(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31731
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x38adf(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3a16b(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3a15d(%rip), %rsi     # 0x6b84e
movl $0x15, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
jmp 0x31b9f
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x31866
movq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x11, %esi
callq *%rax
testq %rax, %rax
je 0x31866
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x31a54
movq 0x70(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movl $0x11, %esi
callq *%rax
testq %rax, %rax
je 0x31a54
movl $0x178, %edi            # imm = 0x178
callq 0xb500
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x322dc
movl $0x178, %edi            # imm = 0x178
callq 0xb500
movq %rax, %r15
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x322dc
addq $0x68, %r14
addq $0x68, %r15
jmp 0x31cca
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x31969
movq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x7, %esi
callq *%rax
testq %rax, %rax
je 0x31969
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x31ae1
movq 0x70(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movl $0x7, %esi
callq *%rax
testq %rax, %rax
je 0x31ae1
movl $0x170, %edi            # imm = 0x170
callq 0xb500
movq %rax, %r14
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x323b4
movl $0x170, %edi            # imm = 0x170
callq 0xb500
movq %rax, %r15
movq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x323b4
addq $0x60, %r14
addq $0x60, %r15
jmp 0x31cca
leaq 0x5ad03(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x38916(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39fa2(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39fb6(%rip), %rsi     # 0x6b870
movl $0x21, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
jmp 0x31ac9
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x319e3
movq 0x70(%rsp), %rdi
leaq 0x48(%rsp), %rdx
movl $0x4, %esi
callq *%rax
testq %rax, %rax
je 0x319e3
movl $0x200, %edi            # imm = 0x200
callq 0xb500
movq %rax, %r14
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1bd28
leaq 0x39fdd(%rip), %rsi     # 0x6b90d
leaq 0x28(%rsp), %rdi
callq 0xba60
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x31bb3
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x31bbb
leaq 0x5ac00(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x38813(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39e9f(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39ef6(%rip), %rsi     # 0x6b8b3
movl $0x1a, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
jmp 0x31b56
leaq 0x5ab86(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x38799(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39e25(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39ebe(%rip), %rsi     # 0x6b8f5
movl $0x17, %edx
movq %rbx, %rdi
callq 0xb5f0
movq %rbx, %rdi
callq 0xb250
movq (%r14), %rdi
jmp 0x31b73
leaq 0x5ab15(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x38728(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39db4(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39dea(%rip), %rsi     # 0x6b892
movl $0x20, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
jmp 0x31b69
leaq 0x5aa88(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x31b7c
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x3869b(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39d27(%rip), %rsi     # 0x6b848
movl $0x5, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x39d99(%rip), %rsi     # 0x6b8ce
movl $0x19, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x5aa00(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
leaq 0x70(%rsp), %rdi
callq 0x1b76c
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x31b9f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movl $0x10, %edx
callq 0xb590
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x31bfc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x38(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x31c17
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movl $0x200, %edi            # imm = 0x200
callq 0xb500
movq %rax, %r15
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1bd28
leaq 0x39cd3(%rip), %rsi     # 0x6b912
leaq 0x28(%rsp), %rdi
callq 0xba60
movq %r12, 0x8(%rsp)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x31c6c
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x31c77
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
movl $0x10, %edx
callq 0xb590
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x31cb3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x31cca
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31e5c
movb $0x1, %bpl
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31e94
jmp 0x31b7e
movq %rax, %rbx
movl $0x170, %esi            # imm = 0x170
jmp 0x31d49
movq %rax, %rbx
movl $0x170, %esi            # imm = 0x170
jmp 0x31d9c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x31d1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x31d1e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x31d3a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x31d3a
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
jmp 0x31d49
movq %rax, %rbx
movl $0x178, %esi            # imm = 0x178
movq %r15, %rdi
jmp 0x31d9f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x31d6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x31d6d
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31d97
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x31d97
movq %rax, %rbx
movl $0x178, %esi            # imm = 0x178
jmp 0x31d9c
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0xb510
jmp 0x31daf
jmp 0x31dac
jmp 0x31dac
jmp 0x31dac
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x1b76c
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x31dd0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0