LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/examples/custom_stream.c
// Function: custom_stream_new
static GtNodeStream* custom_stream_new(void)
{
  GtNodeStream *ns = gt_node_stream_create(custom_stream_class(), false);
  CustomStream *cs = custom_stream_cast(ns);
  cs->emitted_standard_gene = false;
  return ns;
}

// Assembly:
subq $0x18, %rsp
callq 0x4900
movq %rax, %rdi
xorl %esi, %esi
callq 0x1ed40
movq %rax, 0x10(%rsp)
callq 0x4900
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x1f2b0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/examples/custom_stream.c
// Function: custom_stream_next
static int custom_stream_next(GtNodeStream *ns, GtGenomeNode **gn,
                              GT_UNUSED GtError *err)
{
  CustomStream *cs = custom_stream_cast(ns);
  gt_error_check(err);
  if (!cs->emitted_standard_gene) {
    *gn = gt_feature_node_new_standard_gene();
    cs->emitted_standard_gene = true;
  }
  else
    *gn = NULL;
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
callq 0x4900
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1f2b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x49aa
movq 0x10(%rsp), %rdi
callq 0x4bb0
testb $0x1, %al
jne 0x4972
jmp 0x49aa
movq 0x9765f(%rip), %rax     # 0x9bfd8
movq (%rax), %rdi
leaq 0x77690(%rip), %rsi     # 0x7c013
leaq 0x777b2(%rip), %rdx     # 0x7c13c
leaq 0x777c9(%rip), %rcx     # 0x7c15a
leaq 0x777d5(%rip), %r8      # 0x7c16d
movl $0x19, %r9d
movb $0x0, %al
callq 0x4450
callq 0x4150
jmp 0x49ac
movq 0x8(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x49d2
callq 0x165f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movb $0x1, 0x10(%rax)
jmp 0x49de
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/stevenmherring[P]DNS/rw-trie.c
// Function: cleanup_handler
void cleanup_handler(void * arg){
  int rv;
  rv = pthread_mutex_unlock(&lock);
  assert(rv == 0);
  rv = pthread_rwlock_unlock(&rwlock);
  assert(rv == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x4df5(%rip), %rdi      # 0x6138
callq 0x1130
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x1353
jmp 0x1372
leaq 0x2caa(%rip), %rdi      # 0x4004
leaq 0x2cab(%rip), %rsi      # 0x400c
movl $0x20, %edx
leaq 0x2ca9(%rip), %rcx      # 0x4016
callq 0x10c0
leaq 0x4de7(%rip), %rdi      # 0x6160
callq 0x1150
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x1389
jmp 0x13a8
leaq 0x2c74(%rip), %rdi      # 0x4004
leaq 0x2c75(%rip), %rsi      # 0x400c
movl $0x22, %edx
leaq 0x2c73(%rip), %rcx      # 0x4016
callq 0x10c0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stevenmherring[P]DNS/rw-trie.c
// Function: search
int search(const char *string, size_t strlen, int32_t *ip4_address) {
  struct trie_node *found;
  int rv, result;
  pthread_cleanup_push(cleanup_handler,&lock);

  // Skip strings of length 0
  if (strlen == 0)
  return 0;

  // obtain the lock
  rv = pthread_rwlock_rdlock(&rwlock);
  assert(rv == 0);
  found = _search(root, string, strlen);

  if (found && ip4_address)
  *ip4_address = found->ip4_address;

  result = (found != NULL);

  // Return the lock
  pthread_cleanup_pop(1);
  assert(rv == 0);

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x42e(%rip), %rax      # 0x1330
movq %rax, -0xa8(%rbp)
leaq 0x49cc(%rip), %rax      # 0x6138
movq %rax, -0xb0(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0x11f0
movl %eax, -0xb4(%rbp)
movslq -0xb4(%rbp), %rax
cmpq $0x0, %rax
je 0x17b0
movq -0xa8(%rbp), %rax
movq -0xb0(%rbp), %rdi
callq *%rax
leaq -0xa0(%rbp), %rdi
callq 0x1160
leaq -0xa0(%rbp), %rdi
callq 0x11c0
cmpq $0x0, -0x18(%rbp)
jne 0x17cf
movl $0x0, -0x4(%rbp)
jmp 0x1895
leaq 0x498a(%rip), %rdi      # 0x6160
callq 0x10e0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x17e6
jmp 0x1805
leaq 0x2817(%rip), %rdi      # 0x4004
leaq 0x2818(%rip), %rsi      # 0x400c
movl $0x8c, %edx
leaq 0x2968(%rip), %rcx      # 0x4168
callq 0x10c0
movq 0x4994(%rip), %rdi      # 0x61a0
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1580
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1838
cmpq $0x0, -0x20(%rbp)
je 0x1838
movq -0x28(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
jmp 0x184a
jmp 0x184c
leaq -0xa0(%rbp), %rdi
callq 0x10b0
movq -0xa8(%rbp), %rax
movq -0xb0(%rbp), %rdi
callq *%rax
cmpl $0x0, -0x2c(%rbp)
jne 0x1870
jmp 0x188f
leaq 0x278d(%rip), %rdi      # 0x4004
leaq 0x278e(%rip), %rsi      # 0x400c
movl $0x96, %edx
leaq 0x28de(%rip), %rcx      # 0x4168
callq 0x10c0
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stevenmherring[P]DNS/rw-trie.c
// Function: delete
int delete(const char *string, size_t strlen) {
            int result = 0;
            // Skip strings of length 0
            if (strlen != 0) {
              int rv;
              // Obtain the lock
              pthread_cleanup_push(cleanup_handler,&lock);
              pthread_rwlock_wrlock(&rwlock);
              //assert(rv == 0);
              // Attempt to delete the node.
              result = (NULL != _delete(root, string, strlen));

              // if squatting is allowed and a key was deleted.
              if (allow_squatting && result) {
                printf("Thread: %lu Node deleted, broadcasting %s\n", (long) pthread_self(), string);
                rv = pthread_cond_broadcast(&cv);
                // Check to see if the broadcasr was successful
                assert(rv == 0);
              }

              // Unlock
              //rv = pthread_mutex_unlock(&lock);
              //assert(rv == 0);
              pthread_cleanup_pop(1);
            }
            return result;
          }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x256b
jmp 0x2457
leaq -0x112e(%rip), %rax     # 0x1330
movq %rax, -0x88(%rbp)
leaq 0x3ccc(%rip), %rax      # 0x6138
movq %rax, -0x90(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x11f0
movl %eax, -0x94(%rbp)
movslq -0x94(%rbp), %rax
cmpq $0x0, %rax
je 0x24aa
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rdi
callq *%rax
leaq -0x80(%rbp), %rdi
callq 0x1160
leaq -0x80(%rbp), %rdi
callq 0x11c0
leaq 0x3ca6(%rip), %rdi      # 0x6160
callq 0x1080
movq 0x3cda(%rip), %rdi      # 0x61a0
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x2150
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
leaq 0x3cf3(%rip), %rax      # 0x61e0
cmpl $0x0, (%rax)
je 0x254a
cmpl $0x0, -0x14(%rbp)
je 0x254a
callq 0x1180
movq %rax, %rsi
movq -0x8(%rbp), %rdx
leaq 0x1e99(%rip), %rdi      # 0x43a4
movb $0x0, %al
callq 0x10a0
leaq 0x3c97(%rip), %rdi      # 0x61b0
callq 0x1070
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x2529
jmp 0x2548
leaq 0x1ad4(%rip), %rdi      # 0x4004
leaq 0x1ad5(%rip), %rsi      # 0x400c
movl $0x1ac, %edx            # imm = 0x1AC
leaq 0x1e8c(%rip), %rcx      # 0x43cf
callq 0x10c0
jmp 0x254a
jmp 0x254c
jmp 0x254e
jmp 0x2550
leaq -0x80(%rbp), %rdi
callq 0x10b0
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rdi
callq *%rax
jmp 0x256b
movl -0x14(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stevenmherring[P]DNS/rw-trie.c
// Function: print
void print() {
            int rv;
            // Obtain the lock
            rv = pthread_mutex_lock(&lock);
            assert(rv == 0);

            printf("Root is at %p\n", root);
            /* Do a simple depth-first search */
            if (root)
            _print(root,0,0);

            // Unlock
            rv = pthread_mutex_unlock(&lock);
            assert(rv == 0);
          }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x3a59(%rip), %rdi      # 0x6138
callq 0x1220
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x26ef
jmp 0x270e
leaq 0x190e(%rip), %rdi      # 0x4004
leaq 0x190f(%rip), %rsi      # 0x400c
movl $0x1d6, %edx            # imm = 0x1D6
leaq 0x1ded(%rip), %rcx      # 0x44f6
callq 0x10c0
movq 0x3a8b(%rip), %rsi      # 0x61a0
leaq 0x1de7(%rip), %rdi      # 0x4503
movb $0x0, %al
callq 0x10a0
cmpq $0x0, 0x3a75(%rip)      # 0x61a0
je 0x273d
movq 0x3a6c(%rip), %rdi      # 0x61a0
xorl %edx, %edx
movl %edx, %esi
callq 0x2580
leaq 0x39f4(%rip), %rdi      # 0x6138
callq 0x1130
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x2754
jmp 0x2773
leaq 0x18a9(%rip), %rdi      # 0x4004
leaq 0x18aa(%rip), %rsi      # 0x400c
movl $0x1df, %edx            # imm = 0x1DF
leaq 0x1d88(%rip), %rcx      # 0x44f6
callq 0x10c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: set_speed
int set_speed(int fd, struct termios *ti, int speed)
{
	if (cfsetospeed(ti, uart_speed(speed)) < 0)
		return -errno;

	if (cfsetispeed(ti, uart_speed(speed)) < 0)
		return -errno;

	if (tcsetattr(fd, TCSANOW, ti) < 0)
		return -errno;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
callq 0x2490
movq -0x20(%rbp), %rdi
movl %eax, %esi
callq 0x2080
cmpl $0x0, %eax
jge 0x2423
callq 0x2040
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x247f
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %edi
callq 0x2490
movq -0x28(%rbp), %rdi
movl %eax, %esi
callq 0x2210
cmpl $0x0, %eax
jge 0x2454
callq 0x2040
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x247f
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x21e0
cmpl $0x0, %eax
jge 0x2478
callq 0x2040
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x247f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: read_hci_event
int read_hci_event(int fd, unsigned char* buf, int size) 
{
	int remain, r;
	int count = 0;

	if (size <= 0)
		return -1;

	/* The first byte identifies the packet type. For HCI event packets, it
	 * should be 0x04, so we read until we get to the 0x04. */
	while (1) {
		r = read(fd, buf, 1);
		if (r <= 0)
			return -1;
		if (buf[0] == 0x04)
			break;
	}
	count++;

	/* The next two bytes are the event code and parameter total length. */
	while (count < 3) {
		r = read(fd, buf + count, 3 - count);
		if (r <= 0)
			return -1;
		count += r;
	}

	/* Now we read the parameters. */
	if (buf[2] < (size - 3)) 
		remain = buf[2];
	else 
		remain = size - 3;

	while ((count - 3) < remain) {
		r = read(fd, buf + count, remain - (count - 3));
		if (r <= 0)
			return -1;
		count += r;
	}

	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x26ab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27a9
jmp 0x26ad
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x2110
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x26d3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27a9
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x4, %eax
jne 0x26e1
jmp 0x26e3
jmp 0x26ad
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0x2730
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movl $0x3, %eax
subl -0x20(%rbp), %eax
movslq %eax, %rdx
callq 0x2110
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x2725
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27a9
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x26ec
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
movl -0x14(%rbp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x274f
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x18(%rbp)
jmp 0x2758
movl -0x14(%rbp), %eax
subl $0x3, %eax
movl %eax, -0x18(%rbp)
jmp 0x275a
movl -0x20(%rbp), %eax
subl $0x3, %eax
cmpl -0x18(%rbp), %eax
jge 0x27a3
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movl -0x18(%rbp), %eax
movl -0x20(%rbp), %ecx
subl $0x3, %ecx
subl %ecx, %eax
movslq %eax, %rdx
callq 0x2110
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x2798
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27a9
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x275a
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: usage
static void usage(void)
{
	printf("hciattach - HCI UART driver initialization utility\n");
	printf("Usage:\n");
	printf("\thciattach [-n] [-p] [-b] [-r] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
	printf("\thciattach -l\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7df9(%rip), %rdi      # 0xb244
movb $0x0, %al
callq 0x20c0
leaq 0x7e1f(%rip), %rdi      # 0xb278
movb $0x0, %al
callq 0x20c0
leaq 0x7e19(%rip), %rdi      # 0xb280
movb $0x0, %al
callq 0x20c0
leaq 0x7e7c(%rip), %rdi      # 0xb2f1
movb $0x0, %al
callq 0x20c0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: get_by_id
static struct uart_t * get_by_id(int m_id, int p_id)
{
	int i;
	for (i = 0; uart[i].type; i++) {
		if (uart[i].m_id == m_id && uart[i].p_id == p_id)
			return &uart[i];
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0xcce4(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3502
movslq -0x14(%rbp), %rcx
leaq 0xcccc(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x34f5
movslq -0x14(%rbp), %rcx
leaq 0xccb2(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0x34f5
movslq -0x14(%rbp), %rcx
leaq 0xcc98(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x350a
jmp 0x34f7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3491
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: get_by_type
static struct uart_t * get_by_type(char *type)
{
	int i;
	for (i = 0; uart[i].type; i++) {
		if (!strcmp(uart[i].type, type))
			return &uart[i];
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0xcc52(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3583
movslq -0x14(%rbp), %rcx
leaq 0xcc3a(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2130
cmpl $0x0, %eax
jne 0x3576
movslq -0x14(%rbp), %rcx
leaq 0xcc17(%rip), %rax      # 0x10180
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x358b
jmp 0x3578
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3523
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: sig_term
static void sig_term(int sig)
{
	switch (sig) {
	case SIGINT:
		printf("sig int.\n");
		break;
	case SIGTERM:
		printf("sig term.\n");
		break;
	}
	__io_canceled = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
subl $0x2, %eax
je 0x3892
jmp 0x3888
movl -0x8(%rbp), %eax
subl $0xf, %eax
je 0x38a2
jmp 0x38b0
leaq 0x7b21(%rip), %rdi      # 0xb3ba
movb $0x0, %al
callq 0x20c0
jmp 0x38b0
leaq 0x7b1b(%rip), %rdi      # 0xb3c4
movb $0x0, %al
callq 0x20c0
movl $0x1, 0xcd7a(%rip)      # 0x10634
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: bcsp_tshy_sig_alarm
static void bcsp_tshy_sig_alarm(int sig)
{
	unsigned char bcsp_sync_pkt[10] = {0xc0,0x00,0x41,0x00,0xbe,0xda,0xdc,0xed,0xed,0xc0};
	static int retries = 0;

	if (retries < bcsp_max_retries) {
		retries++;
		if (write(serial_fd, &bcsp_sync_pkt, 10) < 0)
			return;
		alarm(1);
		return;
	}

	tcflush(serial_fd, TCIOFLUSH);
	fprintf(stderr, "BCSP initialization timed out\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq 0x778a(%rip), %rax      # 0xb07c
movq %rax, -0xe(%rbp)
movw 0x7787(%rip), %ax       # 0xb084
movw %ax, -0x6(%rbp)
movl 0xcd35(%rip), %eax      # 0x1063c
cmpl 0xc9b3(%rip), %eax      # 0x102c0
jge 0x3946
movl 0xcd27(%rip), %eax      # 0x1063c
addl $0x1, %eax
movl %eax, 0xcd1e(%rip)      # 0x1063c
movl 0xcd14(%rip), %edi      # 0x10638
leaq -0xe(%rbp), %rsi
movl $0xa, %edx
callq 0x2070
cmpq $0x0, %rax
jge 0x393a
jmp 0x3978
movl $0x1, %edi
callq 0x20f0
jmp 0x3978
movl 0xccec(%rip), %edi      # 0x10638
movl $0x2, %esi
callq 0x20a0
movq 0xc69b(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x7849(%rip), %rsi      # 0xb1b0
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: read_check
static int read_check(int fd, void *buf, int count)
{
	int res;

	do {
		res = read(fd, buf, count);
		if (res != -1) {
			buf += res; 
			count -= res;
		}
	} while (count && (errno == 0 || errno == EINTR));

	if (count)
		return -1;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2110
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
je 0x39c7
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x39c9
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x19(%rbp)
je 0x39fa
callq 0x2040
movq %rax, %rcx
movb $0x1, %al
cmpl $0x0, (%rcx)
movb %al, -0x1a(%rbp)
je 0x39f4
callq 0x2040
cmpl $0x4, (%rax)
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x3992
cmpl $0x0, -0x14(%rbp)
je 0x3a10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3a17
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach.c
// Function: bcsp_tconf_sig_alarm
static void bcsp_tconf_sig_alarm(int sig)
{
	unsigned char bcsp_conf_pkt[10] = {0xc0,0x00,0x41,0x00,0xbe,0xad,0xef,0xac,0xed,0xc0};
	static int retries = 0;

	if (retries < bcsp_max_retries){
		retries++;
		if (write(serial_fd, &bcsp_conf_pkt, 10) < 0)
			return;
		alarm(1);
		return;
	}

	tcflush(serial_fd, TCIOFLUSH);
	fprintf(stderr, "BCSP initialization timed out\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq 0x7654(%rip), %rax      # 0xb086
movq %rax, -0xe(%rbp)
movw 0x7651(%rip), %ax       # 0xb08e
movw %ax, -0x6(%rbp)
movl 0xcbf9(%rip), %eax      # 0x10640
cmpl 0xc873(%rip), %eax      # 0x102c0
jge 0x3a86
movl 0xcbeb(%rip), %eax      # 0x10640
addl $0x1, %eax
movl %eax, 0xcbe2(%rip)      # 0x10640
movl 0xcbd4(%rip), %edi      # 0x10638
leaq -0xe(%rbp), %rsi
movl $0xa, %edx
callq 0x2070
cmpq $0x0, %rax
jge 0x3a7a
jmp 0x3ab8
movl $0x1, %edi
callq 0x20f0
jmp 0x3ab8
movl 0xcbac(%rip), %edi      # 0x10638
movl $0x2, %esi
callq 0x20a0
movq 0xc55b(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x7709(%rip), %rsi      # 0xb1b0
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: util_hexdump
void util_hexdump(const uint8_t *buf, size_t len)
{
	static const char hexdigits[] = "0123456789abcdef";
	char str[16 * 3];
	size_t i;

	if (!buf || !len)
		return;

	for (i = 0; i < len; i++) {
		str[((i % 16) * 3)] = hexdigits[buf[i] >> 4];
		str[((i % 16) * 3) + 1] = hexdigits[buf[i] & 0xf];
		str[((i % 16) * 3) + 2] = ' ';
		if ((i + 1) % 16 == 0) {
			str[16 * 3 - 1] = '\0';
			RS_INFO("%s", str);
		}
	}

	if (i % 16 > 0) {
		str[(i % 16) * 3 - 1] = '\0';
		RS_INFO("%s", str);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3ade
cmpq $0x0, -0x10(%rbp)
jne 0x3ae3
jmp 0x3bf8
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x3bb0
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x790e(%rip), %rax      # 0xb420
movb (%rax,%rcx), %cl
movq -0x48(%rbp), %rax
andq $0xf, %rax
imulq $0x3, %rax, %rax
movb %cl, -0x40(%rbp,%rax)
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x78e2(%rip), %rax      # 0xb420
movb (%rax,%rcx), %cl
movq -0x48(%rbp), %rax
andq $0xf, %rax
imulq $0x3, %rax, %rax
movb %cl, -0x3f(%rbp,%rax)
movq -0x48(%rbp), %rax
andq $0xf, %rax
imulq $0x3, %rax, %rax
movb $0x20, -0x3e(%rbp,%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
andq $0xf, %rax
cmpq $0x0, %rax
jne 0x3b9d
movb $0x0, -0x11(%rbp)
movq 0xc479(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq -0x40(%rbp), %rcx
leaq 0x79f4(%rip), %rsi      # 0xb581
leaq 0x79f5(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x3b9d
jmp 0x3b9f
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3aeb
movq -0x48(%rbp), %rax
andq $0xf, %rax
cmpq $0x0, %rax
jbe 0x3bf8
movq -0x48(%rbp), %rax
andq $0xf, %rax
imulq $0x3, %rax, %rax
subq $0x1, %rax
movb $0x0, -0x40(%rbp,%rax)
movq 0xc41e(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq -0x40(%rbp), %rcx
leaq 0x7999(%rip), %rsi      # 0xb581
leaq 0x799a(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x3bf8
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: get_patch_entry
struct patch_info *get_patch_entry(struct btrtl_info *btrtl)
{
	struct patch_info *n = NULL;

	if (btrtl->proto == HCI_UART_3WIRE)
		n = patch_table;
	else
		n = h4_patch_table;
	for (; n->lmp_subver; n++) {
		if ((n->match_flags & RTL_FW_MATCH_CHIP_TYPE) &&
		    n->chip_type != btrtl->chip_type)
			continue;
		if ((n->match_flags & RTL_FW_MATCH_HCI_VER) &&
		    n->hci_ver != btrtl->hci_ver)
			continue;
		if ((n->match_flags & RTL_FW_MATCH_HCI_REV) &&
		    n->hci_rev != btrtl->hci_rev)
			continue;
		if (n->lmp_subver != btrtl->lmp_subver)
			continue;

		break;
	}

	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x98(%rax)
jne 0x3c2a
leaq 0xc6dc(%rip), %rax      # 0x10300
movq %rax, -0x10(%rbp)
jmp 0x3c35
leaq 0xc8af(%rip), %rax      # 0x104e0
movq %rax, -0x10(%rbp)
jmp 0x3c37
movq -0x10(%rbp), %rax
cmpw $0x0, 0x6(%rax)
je 0x3cdb
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3c6a
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x34(%rcx), %ecx
cmpl %ecx, %eax
je 0x3c6a
jmp 0x3cca
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3c8e
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x2e(%rcx), %ecx
cmpl %ecx, %eax
je 0x3c8e
jmp 0x3cca
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3cb2
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
movzwl 0x2c(%rcx), %ecx
cmpl %ecx, %eax
je 0x3cb2
jmp 0x3cca
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %eax
movq -0x8(%rbp), %rcx
movzwl 0x2a(%rcx), %ecx
cmpl %ecx, %eax
je 0x3cc8
jmp 0x3cca
jmp 0x3cdb
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x10(%rbp)
jmp 0x3c37
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: os_read
int os_read(int fd, uint8_t * buff, int len)
{
	int n;
	int i;
	int try = 0;

	i = 0;
	n = 0;
	while (n < len) {
		i = read(fd, buff + n, len - n);
		if (i > 0)
			n += i;
		else if (i == 0) {
			RS_DBG("read nothing.");
			continue;
		} else {
			RS_ERR("read error, %s\n", strerror(errno));
			try++;
			if (try > READ_TRY_MAX) {
				RS_ERR("read reaches max try number.\n");
				return -1;
			}
			continue;
		}
	}

	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3e05
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x18(%rbp), %rax
addq %rax, %rsi
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movslq %eax, %rdx
callq 0x2110
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x3d56
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3e00
cmpl $0x0, -0x1c(%rbp)
jne 0x3d8a
jmp 0x3d5e
cmpb $0x0, 0xc56b(%rip)      # 0x102d0
je 0x3d86
movq 0xc28a(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x7823(%rip), %rsi      # 0xb59b
leaq 0x780a(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x3d88
jmp 0x3d17
jmp 0x3d8c
movq 0xc265(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2290
movq -0x28(%rbp), %rdi
movq %rax, %rcx
leaq 0x77fa(%rip), %rsi      # 0xb5ae
leaq 0x77ce(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x6, -0x20(%rbp)
jle 0x3dfb
jmp 0x3dd3
movq 0xc21e(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x77e5(%rip), %rsi      # 0xb5c9
leaq 0x779e(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3e0b
jmp 0x3d17
jmp 0x3d17
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: hci_dump_evt
void hci_dump_evt(uint8_t * buf, uint16_t len)
{
	int n;
	int i;

	if (!buf || !len) {
		RS_ERR("Invalid parameters %p, %u.\n", buf, len);
		return;
	}

	n = 0;
	for (i = 0; i < len; i++) {
		n += sprintf(hci_dump_buf + n, "%02x ", buf[i]);
		if ((i + 1) % 16 == 0) {
			RS_DBG(" %s\n", hci_dump_buf);
			n = 0;
		}
	}

	if (i % 16)
		RS_DBG(" %s\n", hci_dump_buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3e41
cmpw $0x0, -0xa(%rbp)
jne 0x3e70
jmp 0x3e43
movq 0xc1ae(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq -0x8(%rbp), %rcx
movzwl -0xa(%rbp), %r8d
leaq 0x7795(%rip), %rsi      # 0xb5f2
leaq 0x7725(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x3f5d
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3f18
movslq -0x10(%rbp), %rax
leaq 0xc7b8(%rip), %rdi      # 0x10650
addq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x776b(%rip), %rsi      # 0xb619
movb $0x0, %al
callq 0x2270
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x3f08
jmp 0x3ed0
cmpb $0x0, 0xc3f9(%rip)      # 0x102d0
je 0x3eff
movq 0xc118(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x7735(%rip), %rsi      # 0xb61f
leaq 0x7698(%rip), %rdx      # 0xb589
leaq 0xc758(%rip), %rcx      # 0x10650
movb $0x0, %al
callq 0x2150
jmp 0x3f01
movl $0x0, -0x10(%rbp)
jmp 0x3f0a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3e7e
movl -0x14(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x3f5d
jmp 0x3f2a
cmpb $0x0, 0xc39f(%rip)      # 0x102d0
je 0x3f59
movq 0xc0be(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x76db(%rip), %rsi      # 0xb61f
leaq 0x763e(%rip), %rdx      # 0xb589
leaq 0xc6fe(%rip), %rcx      # 0x10650
movb $0x0, %al
callq 0x2150
jmp 0x3f5b
jmp 0x3f5d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: bachk
int bachk(const char *str)
{
	if (!str)
		return -1;

	if (strlen(str) != 17)
		return -1;

	while (*str) {
		if (!isxdigit(*str++))
			return -1;

		if (!isxdigit(*str++))
			return -1;

		if (*str == 0)
			break;

		if (*str++ != ':')
			return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4b0f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bdb
movq -0x10(%rbp), %rdi
callq 0x2090
cmpq $0x11, %rax
je 0x4b2a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bdb
jmp 0x4b2c
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4bd4
callq 0x22c0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x4b6d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bdb
callq 0x22c0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x4ba1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bdb
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4baf
jmp 0x4bd4
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x4bcf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bdb
jmp 0x4b2c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: config_file_proc
static void config_file_proc(const char *path)
{
	int fd;
	uint8_t buff[256];
	int result;

	fd = open(path, O_RDONLY);
	if (fd == -1) {
		RS_INFO("Couldnt open extra config %s, %s", path, strerror(errno));
		return;
	}

	result = read(fd, buff, sizeof(buff));
	if (result == -1) {
		RS_ERR("Couldnt read %s, %s", path, strerror(errno));
		close(fd);
		return;
	} else if (result == 0) {
		RS_ERR("File is empty");
		close(fd);
		return;
	}

	config_proc(buff, result);

	close(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x21f0
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x523a
jmp 0x51e7
movq 0xae0a(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x128(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2290
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rcx
movq %rax, %r8
leaq 0x70ce(%rip), %rsi      # 0xc2f5
leaq 0x635b(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x5307
movl -0xc(%rbp), %edi
leaq -0x110(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x2110
movl %eax, -0x114(%rbp)
cmpl $-0x1, -0x114(%rbp)
jne 0x52b7
jmp 0x525f
movq 0xad92(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x138(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x130(%rbp)
callq 0x2040
movl (%rax), %edi
callq 0x2290
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rcx
movq %rax, %r8
leaq 0x707c(%rip), %rsi      # 0xc31b
leaq 0x62e3(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl -0xc(%rbp), %edi
callq 0x2100
jmp 0x5307
cmpl $0x0, -0x114(%rbp)
jne 0x52eb
jmp 0x52c2
movq 0xad2f(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x7067(%rip), %rsi      # 0xc33a
leaq 0x62af(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl -0xc(%rbp), %edi
callq 0x2100
jmp 0x5307
jmp 0x52ed
leaq -0x110(%rbp), %rdi
movl -0x114(%rbp), %esi
callq 0x8070
movl -0xc(%rbp), %edi
callq 0x2100
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: xtalset_supported
static inline int xtalset_supported(void)
{
	struct patch_info *pent = rtk_hw_cfg.patch_ent;

	/* Only support rtl8723ds, rtl8822bs and rtl8821cs xtal config */
	if (pent->chip_type != CHIP_8723DS &&
	    pent->chip_type != CHIP_8822BS &&
	    pent->chip_type != CHIP_8821CS)
		return 0;

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb445(%rip), %rax      # 0x10760
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x71, %eax
je 0x534f
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x70, %eax
je 0x534f
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x72, %eax
je 0x534f
movl $0x0, -0x4(%rbp)
jmp 0x5356
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: h5_tinit_sig_alarm
static void h5_tinit_sig_alarm(int sig)
{
	static int retries = 0;
	if (retries < rtk_hw_cfg.h5_max_retries) {
		retries++;
		if (rtk_hw_cfg.host_last_cmd) {
			int len =
			    write(rtk_hw_cfg.serial_fd,
				  rtk_hw_cfg.host_last_cmd->data,
				  rtk_hw_cfg.host_last_cmd->data_len);
			RS_DBG("3-wire change baudrate re send:%d, len:%d",
			       retries, len);
			alarm(1);
			return;
		} else {
			RS_DBG
			    ("3-wire init timeout without last command stored\n");
		}
	}

	tcflush(rtk_hw_cfg.serial_fd, TCIOFLUSH);
	RS_ERR("H5 init process timed out");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0xc27f(%rip), %eax      # 0x11780
cmpl 0xb1f9(%rip), %eax      # 0x10700
jge 0x55bf
movl 0xc26d(%rip), %eax      # 0x11780
addl $0x1, %eax
movl %eax, 0xc264(%rip)      # 0x11780
cmpq $0x0, 0xb1cc(%rip)      # 0x106f0
je 0x558f
movl 0xb1e4(%rip), %edi      # 0x10710
movq 0xb1bd(%rip), %rsi      # 0x106f0
addq $0x8, %rsi
movq 0xb1b2(%rip), %rax      # 0x106f0
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movl %eax, -0x8(%rbp)
cmpb $0x0, 0xad7e(%rip)      # 0x102d0
je 0x557d
movq 0xaa9d(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movl 0xc21c(%rip), %ecx      # 0x11780
movl -0x8(%rbp), %r8d
leaq 0x6e4c(%rip), %rsi      # 0xc3bb
leaq 0x6013(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x557f
movl $0x1, %edi
callq 0x20f0
addq $0x10, %rsp
popq %rbp
retq
jmp 0x5591
cmpb $0x0, 0xad38(%rip)      # 0x102d0
je 0x55b9
movq 0xaa57(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6e3f(%rip), %rsi      # 0xc3ea
leaq 0x5fd7(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x55bb
jmp 0x55bd
jmp 0x55bf
movl 0xb14b(%rip), %edi      # 0x10710
movl $0x2, %esi
callq 0x20a0
movq 0xaa22(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6e40(%rip), %rsi      # 0xc420
leaq 0x5fa2(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: read_check_rtk
static int read_check_rtk(int fd, void *buf, int count)
{
	int res;
	do {
		res = read(fd, buf, count);
		if (res != -1) {
			buf = (RT_U8 *) buf + res;
			count -= res;
			return res;
		}
	} while (count && (errno == 0 || errno == EINTR));
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2110
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
je 0x589d
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x58dd
jmp 0x589f
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x19(%rbp)
je 0x58d0
callq 0x2040
movq %rax, %rcx
movb $0x1, %al
cmpl $0x0, (%rcx)
movb %al, -0x1a(%rbp)
je 0x58ca
callq 0x2040
cmpl $0x4, (%rax)
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x5862
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: h5_tsync_sig_alarm
static void h5_tsync_sig_alarm(int sig)
{
	unsigned char h5sync[2] = { 0x01, 0x7E };
	static int retries = 0;
	struct itimerval value;

	if (retries < rtk_hw_cfg.h5_max_retries) {
		retries++;
		struct sk_buff *nskb =
		    h5_prepare_pkt(&rtk_hw_cfg, h5sync, sizeof(h5sync),
				   H5_LINK_CTL_PKT);
		int len =
		    write(rtk_hw_cfg.serial_fd, nskb->data, nskb->data_len);
		RS_DBG("3-wire sync pattern resend : %d, len: %d\n", retries,
		       len);

		skb_free(nskb);
		//gordon add 2013-6-7 retry per 250ms
		value.it_value.tv_sec = 0;
		value.it_value.tv_usec = 250000;
		value.it_interval.tv_sec = 0;
		value.it_interval.tv_usec = 250000;
		setitimer(ITIMER_REAL, &value, NULL);
		//gordon end

		return;
	}

	tcflush(rtk_hw_cfg.serial_fd, TCIOFLUSH);
	RS_ERR("H5 sync timed out\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movw 0x5508(%rip), %ax       # 0xb57a
movw %ax, -0x6(%rbp)
movl 0xb708(%rip), %eax      # 0x11784
cmpl 0xa67e(%rip), %eax      # 0x10700
jge 0x6146
movl 0xb6f6(%rip), %eax      # 0x11784
addl $0x1, %eax
movl %eax, 0xb6ed(%rip)      # 0x11784
leaq -0x6(%rbp), %rsi
leaq 0xa62e(%rip), %rdi      # 0x106d0
movl $0x2, %edx
movl $0xf, %ecx
callq 0x5600
movq %rax, -0x30(%rbp)
movl 0xa655(%rip), %edi      # 0x10710
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movl %eax, -0x34(%rbp)
cmpb $0x0, 0xa1f5(%rip)      # 0x102d0
je 0x6106
movq 0x9f14(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movl 0xb697(%rip), %ecx      # 0x11784
movl -0x34(%rbp), %r8d
leaq 0x6869(%rip), %rsi      # 0xc961
leaq 0x548a(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x6108
movq -0x30(%rbp), %rdi
callq 0x66c0
movq $0x0, -0x18(%rbp)
movq $0x3d090, -0x10(%rbp)   # imm = 0x3D090
movq $0x0, -0x28(%rbp)
movq $0x3d090, -0x20(%rbp)   # imm = 0x3D090
xorl %edi, %edi
leaq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x21b0
addq $0x40, %rsp
popq %rbp
retq
movl 0xa5c4(%rip), %edi      # 0x10710
movl $0x2, %esi
callq 0x20a0
movq 0x9e9b(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6829(%rip), %rsi      # 0xc990
leaq 0x541b(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
nop
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: h5_tconf_sig_alarm
static void h5_tconf_sig_alarm(int sig)
{
	unsigned char h5conf[3] = { 0x03, 0xFC, 0x14 };
	static int retries = 0;
	struct itimerval value;

	if (retries < rtk_hw_cfg.h5_max_retries) {
		retries++;
		struct sk_buff *nskb =
		    h5_prepare_pkt(&rtk_hw_cfg, h5conf, 3, H5_LINK_CTL_PKT);
		int len =
		    write(rtk_hw_cfg.serial_fd, nskb->data, nskb->data_len);
		RS_DBG("3-wire config pattern resend : %d , len: %d", retries,
		       len);
		skb_free(nskb);

		//gordon add 2013-6-7 retry per 250ms
		value.it_value.tv_sec = 0;
		value.it_value.tv_usec = 250000;
		value.it_interval.tv_sec = 0;
		value.it_interval.tv_usec = 250000;
		setitimer(ITIMER_REAL, &value, NULL);

		return;
	}

	tcflush(rtk_hw_cfg.serial_fd, TCIOFLUSH);
	RS_ERR("H5 config timed out\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movw 0x53ea(%rip), %ax       # 0xb57c
movw %ax, -0x7(%rbp)
movb 0x53e2(%rip), %al       # 0xb57e
movb %al, -0x5(%rbp)
movl 0xb5e3(%rip), %eax      # 0x11788
cmpl 0xa555(%rip), %eax      # 0x10700
jge 0x626f
movl 0xb5d1(%rip), %eax      # 0x11788
addl $0x1, %eax
movl %eax, 0xb5c8(%rip)      # 0x11788
leaq -0x7(%rbp), %rsi
leaq 0xa505(%rip), %rdi      # 0x106d0
movl $0x3, %edx
movl $0xf, %ecx
callq 0x5600
movq %rax, -0x30(%rbp)
movl 0xa52c(%rip), %edi      # 0x10710
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movl %eax, -0x34(%rbp)
cmpb $0x0, 0xa0cc(%rip)      # 0x102d0
je 0x622f
movq 0x9deb(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movl 0xb572(%rip), %ecx      # 0x11788
movl -0x34(%rbp), %r8d
leaq 0x678d(%rip), %rsi      # 0xc9ae
leaq 0x5361(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x6231
movq -0x30(%rbp), %rdi
callq 0x66c0
movq $0x0, -0x18(%rbp)
movq $0x3d090, -0x10(%rbp)   # imm = 0x3D090
movq $0x0, -0x28(%rbp)
movq $0x3d090, -0x20(%rbp)   # imm = 0x3D090
xorl %edi, %edi
leaq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x21b0
addq $0x40, %rsp
popq %rbp
retq
movl 0xa49b(%rip), %edi      # 0x10710
movl $0x2, %esi
callq 0x20a0
movq 0x9d72(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x674f(%rip), %rsi      # 0xc9df
leaq 0x52f2(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: rtk_send_pure_ack_down
static void rtk_send_pure_ack_down(int fd)
{
	struct sk_buff *nskb = h5_prepare_pkt(&rtk_hw_cfg, NULL, 0, H5_ACK_PKT);
	write(fd, nskb->data, nskb->data_len);
	skb_free(nskb);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0xa40e(%rip), %rdi      # 0x106d0
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x5600
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x66c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: rtk_get_chip_type
void rtk_get_chip_type(int dd)
{
	unsigned char bytes[READ_DATA_SIZE];
	int retlen;
	struct sigaction sa;
	/* 0xB000A094 */
	unsigned char cmd_buff[] = {0x61, 0xfc,
		0x05, 0x00, 0x94, 0xa0, 0x00, 0xb0};
	struct sk_buff *nskb;
	struct btrtl_info *btrtl = &rtk_hw_cfg;

	nskb = h5_prepare_pkt(btrtl, cmd_buff, sizeof(cmd_buff),
			HCI_COMMAND_PKT);
	if (btrtl->host_last_cmd){
		skb_free(btrtl->host_last_cmd);
		btrtl->host_last_cmd = NULL;
	}

	btrtl->host_last_cmd = nskb;

	write(dd, nskb->data, nskb->data_len);
	RS_INFO("RTK send HCI_VENDOR_READ_CHIP_TYPE_Command\n");

	alarm(0);
	memset(&sa, 0, sizeof(sa));
	sa.sa_flags = SA_NOCLDSTOP;
	sa.sa_handler = rtk_get_chip_type_timeout;
	sigaction(SIGALRM, &sa, NULL);

	alarm(3);
	while (btrtl->chip_type_cmd_state != event_received) {
		if ((retlen = read_check_rtk(dd, &bytes, READ_DATA_SIZE)) == -1) {
			perror("rtk get chip type: read fail");
			return;
		}
		h5_recv(btrtl, &bytes, retlen);
	}
	alarm(0);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl %edi, -0x4(%rbp)
movq 0x6d1b(%rip), %rax      # 0xd270
movq %rax, -0xc8(%rbp)
leaq 0xa16d(%rip), %rax      # 0x106d0
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x8, %edx
movl $0x1, %ecx
callq 0x5600
movq %rax, -0xd0(%rbp)
movq -0xd8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x65bb
movq -0xd8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x66c0
movq -0xd8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0xd0(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x4(%rbp), %edi
movq -0xd0(%rbp), %rsi
addq $0x8, %rsi
movq -0xd0(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movq 0x9a05(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x56c0(%rip), %rsi      # 0xbcbd
leaq 0x4f85(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
xorl %edi, %edi
callq 0x20f0
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x20d0
movl $0x1, -0x38(%rbp)
leaq 0xad(%rip), %rax        # 0x66e0
movq %rax, -0xc0(%rbp)
movl $0xe, %edi
leaq -0xc0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movl $0x3, %edi
callq 0x20f0
movq -0xd8(%rbp), %rax
cmpl $0x2, 0x88(%rax)
je 0x66a5
movl -0x4(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x5850
movl %eax, -0x24(%rbp)
cmpl $-0x1, %eax
jne 0x6690
leaq 0x5665(%rip), %rdi      # 0xbcee
callq 0x2220
jmp 0x66ac
movq -0xd8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq -0x20(%rbp), %rsi
callq 0x58f0
jmp 0x6659
xorl %edi, %edi
callq 0x20f0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/seuscq[P]rtk_hciattach/hciattach_rtk.c
// Function: rtk_get_chip_type_timeout
static void rtk_get_chip_type_timeout(int sig)
{
	static int retries = 0;
	int len = 0;
	struct btrtl_info *btrtl = &rtk_hw_cfg;

	RS_INFO("RTK get HCI_VENDOR_READ_RTK_CHIP_TYPE_Command\n");
	if (retries < btrtl->h5_max_retries) {
		RS_DBG("rtk get chip type timerout, retry:%d\n", retries);
		if (btrtl->host_last_cmd) {
			len = write(btrtl->serial_fd,
				    btrtl->host_last_cmd->data,
				    btrtl->host_last_cmd->data_len);
		}
		retries++;
		alarm(3);
		return;
	}
	tcflush(btrtl->serial_fd, TCIOFLUSH);
	RS_ERR("rtk get chip type cmd complete event timed out\n");
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
leaq 0x9fd7(%rip), %rax      # 0x106d0
movq %rax, -0x10(%rbp)
movq 0x98f4(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x62f1(%rip), %rsi      # 0xc9ff
leaq 0x4e74(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl 0xb06a(%rip), %eax      # 0x1178c
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x67b3
jmp 0x6731
cmpb $0x0, 0x9b98(%rip)      # 0x102d0
je 0x675f
movq 0x98b7(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movl 0xb042(%rip), %ecx      # 0x1178c
leaq 0x62e2(%rip), %rsi      # 0xca33
leaq 0x4e31(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
jmp 0x6761
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6794
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
callq 0x2070
movl %eax, -0x8(%rbp)
movl 0xaff2(%rip), %eax      # 0x1178c
addl $0x1, %eax
movl %eax, 0xafe9(%rip)      # 0x1178c
movl $0x3, %edi
callq 0x20f0
addq $0x10, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
movl $0x2, %esi
callq 0x20a0
movq 0x982d(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6289(%rip), %rsi      # 0xca5e
leaq 0x4dad(%rip), %rdx      # 0xb589
movb $0x0, %al
callq 0x2150
movl $0x1, %edi
callq 0x2280
nopl (%rax)