// File: /workspace/github_c_makefile_star2_O0/bloomsource[P]dns_update/util.c
// Function: write_log_hex
int write_log_hex( char* buf, int buflen )
{
  FILE *fp;
  int i,g,k;
  unsigned char *abuf,*hbuf;


  if ( ( fp = fopen(log_file,"a+")) == NULL) return(-1);

  hbuf = (unsigned char *)buf;
  abuf = (unsigned char *)buf;
  fprintf( fp, "  *** hex message(begin) ***\n" );
  fprintf( fp, "-----------|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|------------------\n" );
  for( i = 0, g = buflen/16; i < g; i++ )
  {
    fprintf( fp, "M(%6.6d)=< ", i*16 );
    for( k = 0; k < 16; k ++) fprintf( fp, "%02x ", *hbuf++ );
        fprintf( fp, "> " );
    for( k = 0; k < 16; k++, abuf++)
        fprintf( fp, "%c", (*abuf>32) ? ((*abuf<128) ? *abuf : '*') : '.');
    fprintf( fp, "\n" );
  }
  if( (i = buflen%16) > 0)
  {
    fprintf( fp, "M(%6.6d)=< ", buflen-buflen%16 );
    for( k = 0; k < i;  k++) fprintf( fp, "%02x ", *hbuf++);
    for( k = i; k < 16; k++) fprintf( fp, "   ");
        fprintf( fp, "> ");
    for( k = 0; k < i; k++, abuf++)
        fprintf( fp, "%c",(*abuf>32) ? ((*abuf<128) ? *abuf : '*') : '.');
    fprintf( fp, "\n");
  }
  fprintf( fp, "-----------|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|------------------\n");
  fprintf( fp, "  *** hex message(end) ***\n");
  fflush( fp );
  fclose( fp );
  return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0xacea(%rip), %rdi      # 0x145e0
leaq 0x3c02(%rip), %rsi      # 0xd4ff
callq 0x2260
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9918
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c04
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x3bcf(%rip), %rsi      # 0xd502
movb $0x0, %al
callq 0x21b0
movq -0x20(%rbp), %rdi
leaq 0x3bdb(%rip), %rsi      # 0xd520
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x9a76
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
shll $0x4, %edx
leaq 0x3bf2(%rip), %rsi      # 0xd570
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x2c(%rbp)
cmpl $0x10, -0x2c(%rbp)
jge 0x99c1
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movzbl (%rax), %edx
leaq 0x3bcd(%rip), %rsi      # 0xd57c
movb $0x0, %al
callq 0x21b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x998c
movq -0x20(%rbp), %rdi
leaq 0x3bb6(%rip), %rsi      # 0xd582
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x2c(%rbp)
cmpl $0x10, -0x2c(%rbp)
jge 0x9a56
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jle 0x9a20
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x9a0e
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x9a18
movl $0x2a, %eax
movl %eax, -0x4c(%rbp)
jmp 0x9a18
movl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x9a2a
movl $0x2e, %eax
movl %eax, -0x50(%rbp)
jmp 0x9a2a
movq -0x48(%rbp), %rdi
movl -0x50(%rbp), %edx
leaq 0x3b4d(%rip), %rsi      # 0xd585
movb $0x0, %al
callq 0x21b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x99da
movq -0x20(%rbp), %rdi
leaq 0x37b9(%rip), %rsi      # 0xd21a
movb $0x0, %al
callq 0x21b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9961
movl -0x14(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, -0x24(%rbp)
cmpl $0x0, %edx
jle 0x9bc7
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x14(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0x54(%rbp), %edx
subl %eax, %edx
leaq 0x3ac0(%rip), %rsi      # 0xd570
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x9af5
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movzbl (%rax), %edx
leaq 0x3a99(%rip), %rsi      # 0xd57c
movb $0x0, %al
callq 0x21b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9abe
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x10, -0x2c(%rbp)
jge 0x9b1e
movq -0x20(%rbp), %rdi
leaq 0x3a7c(%rip), %rsi      # 0xd588
movb $0x0, %al
callq 0x21b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9afb
movq -0x20(%rbp), %rdi
leaq 0x3a59(%rip), %rsi      # 0xd582
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x9bb5
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jle 0x9b7f
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x9b6d
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x9b77
movl $0x2a, %eax
movl %eax, -0x64(%rbp)
jmp 0x9b77
movl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
jmp 0x9b89
movl $0x2e, %eax
movl %eax, -0x68(%rbp)
jmp 0x9b89
movq -0x60(%rbp), %rdi
movl -0x68(%rbp), %edx
leaq 0x39ee(%rip), %rsi      # 0xd585
movb $0x0, %al
callq 0x21b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x9b37
movq -0x20(%rbp), %rdi
leaq 0x365a(%rip), %rsi      # 0xd21a
movb $0x0, %al
callq 0x21b0
movq -0x20(%rbp), %rdi
leaq 0x394e(%rip), %rsi      # 0xd520
movb $0x0, %al
callq 0x21b0
movq -0x20(%rbp), %rdi
leaq 0x39a8(%rip), %rsi      # 0xd58c
movb $0x0, %al
callq 0x21b0
movq -0x20(%rbp), %rdi
callq 0x21f0
movq -0x20(%rbp), %rdi
callq 0x20d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)