LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_parse
static int
vl_file_meta_parse (VlFileMeta * self, char const * optarg)
{
  vl_size q ;
  self->active = 1 ;

  if (optarg) {
    int protocol ;
    char const * arg = vl_string_parse_protocol (optarg, &protocol) ;

    /* parse the (optional) protocol part */
    switch (protocol) {
    case VL_PROT_UNKNOWN :
      return VL_ERR_BAD_ARG  ;

    case VL_PROT_ASCII  :
    case VL_PROT_BINARY :
      self->protocol = protocol ;
      break ;

    case VL_PROT_NONE :
      break ;
    }

    if (vl_string_length (arg) > 0) {
      q = vl_string_copy
        (self->pattern, sizeof (self->pattern), arg) ;

      if (q >= sizeof(self->pattern)) {
        return VL_ERR_OVERFLOW ;
      }
    }

  }
  return VL_ERR_OK ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, (%rdi)
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x23da
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x11a0
movq %rax, %r15
movl (%r12), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x23a5
movl %eax, 0x404(%r14)
jmp 0x23ae
cmpl $-0x1, %eax
jne 0x23ae
pushq $0x3
jmp 0x23d9
movq %r15, %rdi
callq 0x10f0
testq %rax, %rax
je 0x23da
addq $0x4, %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %r15, %rdx
callq 0x1200
cmpq $0x400, %rax            # imm = 0x400
jb 0x23da
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/generic-driver.h
// Function: vl_file_meta_open
static int
vl_file_meta_open (VlFileMeta * self, char const * basename, char const * mode)
{
  vl_size q ;

  if (! self->active) {
    return VL_ERR_OK ;
  }

  q = vl_string_replace_wildcard (self->name,
                                  sizeof(self->name),
                                  self -> pattern,
                                  '%', '\0',
                                  basename) ;

  if (q >= sizeof(self->name)) {
    return vl_set_last_error (VL_ERR_OVERFLOW, NULL) ;
  }

  if (self->active) {
    self->file = fopen (self->name, mode) ;
    if (! self->file) {
      return vl_set_last_error(VL_ERR_IO, NULL) ;
    }
  }
  return 0 ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x2450
movq %rsi, %r9
movq %rdi, %rbx
leaq 0x408(%rdi), %r14
leaq 0x4(%rdi), %rdx
pushq $0x25
popq %rcx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x1190
cmpq $0x3ff, %rax            # imm = 0x3FF
jbe 0x2430
pushq $0x1
popq %rdi
xorl %esi, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
cmpl $0x0, (%rbx)
je 0x2450
leaq 0x2a74(%rip), %rsi      # 0x4eb0
movq %r14, %rdi
callq 0x11c0
movq %rax, 0x808(%rbx)
testq %rax, %rax
je 0x245a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x4
jmp 0x241f
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/xmppsh.c
// Function: version_handler
int version_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
{
	xmpp_stanza_t *reply, *query, *name, *version, *text;
	char *ns;
	xmpp_ctx_t *ctx = (xmpp_ctx_t*)userdata;
	printf("Received version request from %s\n", xmpp_stanza_get_attribute(stanza, "from"));
	
	reply = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(reply, "iq");
	xmpp_stanza_set_type(reply, "result");
	xmpp_stanza_set_id(reply, xmpp_stanza_get_id(stanza));
	xmpp_stanza_set_attribute(reply, "to", xmpp_stanza_get_attribute(stanza, "from"));
	
	query = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(query, "query");
    ns = xmpp_stanza_get_ns(xmpp_stanza_get_children(stanza));
    if (ns) {
        xmpp_stanza_set_ns(query, ns);
    }

	name = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(name, "name");
	xmpp_stanza_add_child(query, name);
	
	text = xmpp_stanza_new(ctx);
	xmpp_stanza_set_text(text, "XMPPsh");
	xmpp_stanza_add_child(name, text);
	
	version = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(version, "version");
	xmpp_stanza_add_child(query, version);
	
	text = xmpp_stanza_new(ctx);
	xmpp_stanza_set_text(text, "1.0");
	xmpp_stanza_add_child(version, text);
	
	xmpp_stanza_add_child(reply, query);

	xmpp_send(conn, reply);
	xmpp_stanza_release(reply);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x9db3(%rip), %r12      # 0xc33a
movq %rsi, %rdi
movq %r12, %rsi
callq 0xb9a4
leaq 0x9a6b(%rip), %rdi      # 0xc004
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq %r15, %rdi
callq 0xb0b4
movq %rax, %r14
leaq 0x9a71(%rip), %rsi      # 0xc026
movq %rax, %rdi
callq 0xb57d
leaq 0x9a65(%rip), %rsi      # 0xc029
movq %r14, %rdi
callq 0xb995
movq %r13, %rdi
callq 0xb7c2
movq %r14, %rdi
movq %rax, %rsi
callq 0xb986
movq %r13, %rdi
movq %r12, %rsi
callq 0xb9a4
leaq 0x9a3f(%rip), %rsi      # 0xc030
movq %r14, %rdi
movq %rax, %rdx
callq 0xb666
movq %r15, %rdi
callq 0xb0b4
movq %rax, %r12
leaq 0x9a25(%rip), %rsi      # 0xc033
movq %rax, %rdi
callq 0xb57d
movq %r13, %rdi
callq 0xb8a4
movq %rax, %rdi
callq 0xb7e0
testq %rax, %rax
je 0x2636
movq %r12, %rdi
movq %rax, %rsi
callq 0xb6d6
movq %r15, %rdi
callq 0xb0b4
movq %rax, %r13
leaq 0x9ecd(%rip), %rsi      # 0xc515
movq %rax, %rdi
callq 0xb57d
movq %r12, %rdi
movq %r13, %rsi
callq 0xb6e5
movq %r15, %rdi
callq 0xb0b4
movq %rax, %rbp
leaq 0x99cc(%rip), %rsi      # 0xc039
movq %rax, %rdi
callq 0xb711
movq %r13, %rdi
movq %rbp, %rsi
callq 0xb6e5
movq %r15, %rdi
callq 0xb0b4
movq %rax, %r13
leaq 0x9d9e(%rip), %rsi      # 0xc430
movq %rax, %rdi
callq 0xb57d
movq %r12, %rdi
movq %r13, %rsi
callq 0xb6e5
movq %r15, %rdi
callq 0xb0b4
movq %rax, %r15
leaq 0x9989(%rip), %rsi      # 0xc040
movq %rax, %rdi
callq 0xb711
movq %r13, %rdi
movq %r15, %rsi
callq 0xb6e5
movq %r14, %rdi
movq %r12, %rsi
callq 0xb6e5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5084
movq %r14, %rdi
callq 0xb220
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/xmppsh.c
// Function: ping_handler
int ping_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
{
	//printf("get the ping\n");
	xmpp_stanza_t *reply;
	xmpp_ctx_t *ctx = (xmpp_ctx_t*)userdata;

	reply = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(reply, "iq");
	xmpp_stanza_set_type(reply, "result");
	xmpp_stanza_set_id(reply, xmpp_stanza_get_id(stanza));
	xmpp_stanza_set_attribute(reply, "to", xmpp_stanza_get_attribute(stanza, "from"));

	xmpp_send(conn, reply);
	xmpp_stanza_release(reply);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xb0b4
movq %rax, %r14
leaq 0x990f(%rip), %rsi      # 0xc026
movq %rax, %rdi
callq 0xb57d
leaq 0x9903(%rip), %rsi      # 0xc029
movq %r14, %rdi
callq 0xb995
movq %r15, %rdi
callq 0xb7c2
movq %r14, %rdi
movq %rax, %rsi
callq 0xb986
leaq 0x9bf2(%rip), %rsi      # 0xc33a
movq %r15, %rdi
callq 0xb9a4
leaq 0x98d9(%rip), %rsi      # 0xc030
movq %r14, %rdi
movq %rax, %rdx
callq 0xb666
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5084
movq %r14, %rdi
callq 0xb220
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/xmppsh.c
// Function: conn_handler
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status, 
		  const int error, xmpp_stream_error_t * const stream_error,
		  void * const userdata)
{
    xmpp_ctx_t *ctx = (xmpp_ctx_t *)userdata;

    if (status == XMPP_CONN_CONNECT) {
	xmpp_stanza_t* pres;
	fprintf(stderr, "DEBUG: connected\n");
	xmpp_handler_add(conn,version_handler, "jabber:iq:version", "iq", NULL, ctx);
	xmpp_handler_add(conn,message_handler, NULL, "message", NULL, ctx);
	xmpp_handler_add(conn,ping_handler, "urn:xmpp:ping", "iq", NULL, ctx);
	
	/* Send initial <presence/> so that we appear online to contacts */
	pres = xmpp_stanza_new(ctx);
	xmpp_stanza_set_name(pres, "presence");
	xmpp_send(conn, pres);
	xmpp_stanza_release(pres);
    }
    else {
	fprintf(stderr, "DEBUG: disconnected\n");
	xmpp_stop(ctx);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq 0xe460(%rip), %rax      # 0x10fe8
movq (%rax), %rcx
testl %esi, %esi
jne 0x2c3d
movq %rdi, %r14
leaq 0x955a(%rip), %rdi      # 0xc0f7
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
callq 0x23e0
leaq -0x643(%rip), %rsi      # 0x256c
leaq 0x9553(%rip), %rdx      # 0xc109
leaq 0x9469(%rip), %r15      # 0xc026
movq %r14, %rdi
movq %r15, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x6188
leaq -0x457(%rip), %rsi      # 0x277e
leaq 0x94bd(%rip), %rcx      # 0xc099
movq %r14, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x6188
leaq -0x4f9(%rip), %rsi      # 0x26fa
leaq 0x9521(%rip), %rdx      # 0xc11b
movq %r14, %rdi
movq %r15, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x6188
movq %rbx, %rdi
callq 0xb0b4
movq %rax, %rbx
leaq 0x950c(%rip), %rsi      # 0xc129
movq %rax, %rdi
callq 0xb57d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5084
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb220
leaq 0x94ee(%rip), %rdi      # 0xc132
pushq $0x14
popq %rsi
pushq $0x1
popq %rdx
callq 0x23e0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5ad5
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: auth_handle_open
void auth_handle_open(xmpp_conn_t * const conn)
{
    /* reset all timed handlers */
    handler_reset_timed(conn, 0);

    /* setup handler for stream:error */
    handler_add(conn, _handle_error,
		NULL, "stream:error", NULL, NULL);

    /* setup handlers for incoming <stream:features> */
    handler_add(conn, _handle_features,
		NULL, "stream:features", NULL, NULL);
    handler_add_timed(conn, _handle_missing_features,
		      FEATURES_TIMEOUT, NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5e89
leaq 0x4c(%rip), %rsi        # 0x2f1e
leaq 0x9396(%rip), %rcx      # 0xc26f
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x62ff
leaq 0x4d9(%rip), %rsi       # 0x33c9
leaq 0x9385(%rip), %rcx      # 0xc27c
movq %rbx, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x62ff
leaq 0x605(%rip), %rsi       # 0x3513
movl $0x3a98, %edx           # imm = 0x3A98
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
jmp 0x608f
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_features
static int _handle_features(xmpp_conn_t * const conn,
			    xmpp_stanza_t * const stanza,
			    void * const userdata)
{
    xmpp_stanza_t *child, *mech;
    char *text;

    /* remove the handler that detects missing stream:features */
    xmpp_timed_handler_delete(conn, _handle_missing_features);

    /* check for TLS */
    if (!conn->secured) {
        child = xmpp_stanza_get_child_by_name(stanza, "starttls");
        if (child && (strcmp(xmpp_stanza_get_ns(child), XMPP_NS_TLS) == 0))
            conn->tls_support = 1;
    }

    /* check for SASL */
    child = xmpp_stanza_get_child_by_name(stanza, "mechanisms");
    if (child && (strcmp(xmpp_stanza_get_ns(child), XMPP_NS_SASL) == 0)) {
	for (mech = xmpp_stanza_get_children(child); mech; 
	     mech = xmpp_stanza_get_next(mech)) {
	    if (strcmp(xmpp_stanza_get_name(mech), "mechanism") == 0) {
		text = xmpp_stanza_get_text(mech);
		if (strcasecmp(text, "PLAIN") == 0)
		    conn->sasl_support |= SASL_MASK_PLAIN;
		else if (strcasecmp(text, "DIGEST-MD5") == 0)
		    conn->sasl_support |= SASL_MASK_DIGESTMD5;
		else if (strcasecmp(text, "ANONYMOUS") == 0)
		    conn->sasl_support |= SASL_MASK_ANONYMOUS;

		xmpp_free(conn->ctx, text);
	    }
	}
    }

    _auth(conn);
 
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x132(%rip), %rsi       # 0x3513
callq 0x5e3e
cmpl $0x0, 0x4c(%rbx)
je 0x3437
leaq 0x9082(%rip), %rsi      # 0xc475
movq %r14, %rdi
callq 0xb81c
testq %rax, %rax
je 0x341e
movq %rax, %r14
movq %rax, %rdi
callq 0xb7e0
leaq 0x906e(%rip), %rsi      # 0xc480
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
je 0x3472
movq %rbx, %rdi
callq 0x353c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x900e(%rip), %rsi      # 0xc44c
movq %r14, %rdi
callq 0xb81c
testq %rax, %rax
je 0x33ec
movq %rax, %rdi
callq 0xb7e0
leaq 0x8ffb(%rip), %rsi      # 0xc455
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x33ec
movl $0x1, 0x40(%rbx)
jmp 0x33ec
movq %r14, %rdi
callq 0xb8a4
movq %rax, %r12
leaq 0x901d(%rip), %r14      # 0xc4a1
leaq 0x9020(%rip), %r15      # 0xc4ab
pushq $0x1
popq %r13
testq %r12, %r12
je 0x341e
movq %r12, %rdi
callq 0xb5c4
movq %rax, %rdi
movq %r14, %rsi
callq 0x22e0
testl %eax, %eax
jne 0x3503
movq %r12, %rdi
callq 0xb8ae
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x22d0
movl %r13d, %ecx
testl %eax, %eax
je 0x34f4
movq %rbp, %rdi
leaq 0x8fdf(%rip), %rsi      # 0xc4b1
callq 0x22d0
pushq $0x2
popq %rcx
testl %eax, %eax
je 0x34f4
movq %rbp, %rdi
leaq 0x8fd4(%rip), %rsi      # 0xc4bc
callq 0x22d0
pushq $0x4
popq %rcx
testl %eax, %eax
jne 0x34f7
orl %ecx, 0x48(%rbx)
movq 0x8(%rbx), %rdi
movq %rbp, %rsi
callq 0x51a1
movq %r12, %rdi
callq 0xb8a9
movq %rax, %r12
jmp 0x348f
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_proceedtls_default
static int _handle_proceedtls_default(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    char *name;
    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp", 
	"handle proceedtls called for %s", name);

    if (strcmp(name, "proceed") == 0) {
        xmpp_debug(conn->ctx, "xmpp", "proceeding with TLS");

	conn->tls = tls_new(conn->ctx, conn->sock);

	if (!tls_start(conn->tls))
	{
	    xmpp_debug(conn->ctx, "xmpp", "Couldn't start TLS! error %d", tls_error(conn->tls));
	    tls_free(conn->tls);
	    conn->tls = NULL;
	    conn->tls_failed = 1;
	
	    /* failed tls spoils the connection, so disconnect */
	    xmpp_disconnect(conn);
	}
	else
	{
            conn->secured = 1;
            conn_prepare_reset(conn, auth_handle_open);

	    conn_open_stream(conn);
	}
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb5c4
movq %rax, %r14
movq 0x8(%rbx), %rdi
leaq 0x859e(%rip), %rsi      # 0xc049
leaq 0x8a96(%rip), %rdx      # 0xc548
movq %rax, %rcx
xorl %eax, %eax
callq 0x544e
leaq 0x8aa5(%rip), %rsi      # 0xc568
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x3b6c
movq 0x8(%rbx), %rdi
leaq 0x856b(%rip), %rsi      # 0xc049
leaq 0x8a8b(%rip), %rdx      # 0xc570
xorl %eax, %eax
callq 0x544e
movq 0x8(%rbx), %rdi
movl 0x30(%rbx), %esi
callq 0xbaa8
movq %rax, 0x38(%rbx)
movq %rax, %rdi
callq 0xbb6c
testl %eax, %eax
je 0x3b28
movl $0x1, 0x4c(%rbx)
leaq -0xc56(%rip), %rsi      # 0x2ec0
movq %rbx, %rdi
callq 0x4900
movq %rbx, %rdi
callq 0x50ea
jmp 0x3b6c
movq 0x8(%rbx), %r14
movq 0x38(%rbx), %rdi
callq 0xbaa4
leaq 0x850d(%rip), %rsi      # 0xc049
leaq 0x8a41(%rip), %rdx      # 0xc584
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x544e
movq 0x38(%rbx), %rdi
callq 0xbb46
andq $0x0, 0x38(%rbx)
movl $0x1, 0x44(%rbx)
movq %rbx, %rdi
callq 0x4e1e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: make_sasl_auth
static xmpp_stanza_t *_make_sasl_auth(xmpp_conn_t * const conn,
				 const char * const mechanism)
{
    xmpp_stanza_t *auth;

    /* build auth stanza */
    auth = xmpp_stanza_new(conn->ctx);
    if (auth) {
	xmpp_stanza_set_name(auth, "auth");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	xmpp_stanza_set_attribute(auth, "mechanism", mechanism);
    }
    
    return auth;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x8(%rdi), %rdi
callq 0xb0b4
movq %rax, %r14
testq %rax, %rax
je 0x3bbe
leaq 0x8977(%rip), %rsi      # 0xc50c
movq %r14, %rdi
callq 0xb57d
leaq 0x88dc(%rip), %rsi      # 0xc480
movq %r14, %rdi
callq 0xb6d6
leaq 0x88ee(%rip), %rsi      # 0xc4a1
movq %r14, %rdi
movq %rbx, %rdx
callq 0xb666
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_sasl_result
static int _handle_sasl_result(xmpp_conn_t * const conn,
			       xmpp_stanza_t * const stanza,
			       void * const userdata)
{
    char *name;

    name = xmpp_stanza_get_name(stanza);

    /* the server should send a <success> or <failure> stanza */
    if (strcmp(name, "failure") == 0) {
	xmpp_debug(conn->ctx, "xmpp", "SASL %s auth failed", 
		   (char *)userdata);
	
	/* fall back to next auth method */
	_auth(conn);
    } else if (strcmp(name, "success") == 0) {
	/* SASL PLAIN auth successful, we need to restart the stream */
	xmpp_debug(conn->ctx, "xmpp", "SASL %s auth successful", 
		   (char *)userdata);

	/* reset parser */
	conn_prepare_reset(conn, _handle_open_sasl);

	/* send stream tag */
	conn_open_stream(conn);
    } else {
	/* got unexpected reply */
	xmpp_error(conn->ctx, "xmpp", "Got unexpected reply to SASL %s"\
		   "authentication.", (char *)userdata);
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb5c4
movq %rax, %r15
leaq 0x89bb(%rip), %rsi      # 0xc5a1
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
je 0x3c2b
leaq 0x89c4(%rip), %rsi      # 0xc5bd
movq %r15, %rdi
callq 0x22e0
movq 0x8(%rbx), %rdi
leaq 0x843d(%rip), %rsi      # 0xc049
testl %eax, %eax
je 0x3c51
leaq 0x89c6(%rip), %rdx      # 0xc5dd
movq %r14, %rcx
xorl %eax, %eax
callq 0x52aa
movq %rbx, %rdi
callq 0x4e1e
jmp 0x3c79
movq 0x8(%rbx), %rdi
leaq 0x8413(%rip), %rsi      # 0xc049
leaq 0x896c(%rip), %rdx      # 0xc5a9
movq %r14, %rcx
xorl %eax, %eax
callq 0x544e
movq %rbx, %rdi
callq 0x353c
jmp 0x3c79
leaq 0x896d(%rip), %rdx      # 0xc5c5
movq %r14, %rcx
xorl %eax, %eax
callq 0x544e
leaq 0x27b(%rip), %rsi       # 0x3ee4
movq %rbx, %rdi
callq 0x4900
movq %rbx, %rdi
callq 0x50ea
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_digestmd5_challenge
static int _handle_digestmd5_challenge(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    char *text;
    char *response;
    xmpp_stanza_t *auth, *authdata;
    char *name;

    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp",\
	"handle digest-md5 (challenge) called for %s", name);

    if (strcmp(name, "challenge") == 0) {
	text = xmpp_stanza_get_text(stanza);
	response = sasl_digest_md5(conn->ctx, text, conn->jid, conn->pass);
	if (!response) {
	    disconnect_mem_error(conn);
	    return 0;
	}
	xmpp_free(conn->ctx, text);

	auth = xmpp_stanza_new(conn->ctx);
	if (!auth) {
	    disconnect_mem_error(conn);
	    return 0;
	}	
	xmpp_stanza_set_name(auth, "response");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	
	authdata = xmpp_stanza_new(conn->ctx);
	if (!authdata) {
	    disconnect_mem_error(conn);
	    return 0;
	}

	xmpp_stanza_set_text(authdata, response);
	xmpp_free(conn->ctx, response);

	xmpp_stanza_add_child(auth, authdata);
	xmpp_stanza_release(authdata);

	handler_add(conn, _handle_digestmd5_rspauth, 
		    XMPP_NS_SASL, NULL, NULL, NULL);

	xmpp_send(conn, auth);
	xmpp_stanza_release(auth);

    } else {
	return _handle_sasl_result(conn, stanza, "DIGEST-MD5");
    }

    /* remove ourselves */
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb5c4
movq %rax, %r15
movq 0x8(%rbx), %rdi
leaq 0x83a4(%rip), %rsi      # 0xc049
leaq 0x8b42(%rip), %rdx      # 0xc7ee
movq %rax, %rcx
xorl %eax, %eax
callq 0x544e
leaq 0x9124(%rip), %rsi      # 0xcde1
movq %r15, %rdi
callq 0x22e0
testl %eax, %eax
je 0x3ce0
leaq 0x87e1(%rip), %rdx      # 0xc4b1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3bc9
jmp 0x3dc3
movq %r14, %rdi
callq 0xb8ae
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x78(%rbx), %rdx
movq 0x80(%rbx), %rcx
movq %rax, %rsi
callq 0x7847
testq %rax, %rax
je 0x3dbb
movq %rax, %r15
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x51a1
movq 0x8(%rbx), %rdi
callq 0xb0b4
testq %rax, %rax
je 0x3dbb
movq %rax, %r14
leaq 0x8ae4(%rip), %rsi      # 0xc81a
movq %rax, %rdi
callq 0xb57d
leaq 0x873b(%rip), %rsi      # 0xc480
movq %r14, %rdi
callq 0xb6d6
movq 0x8(%rbx), %rdi
callq 0xb0b4
testq %rax, %rax
je 0x3dbb
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xb711
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x51a1
movq %r14, %rdi
movq %r12, %rsi
callq 0xb6e5
movq %r12, %rdi
callq 0xb220
leaq 0x701(%rip), %rsi       # 0x4490
leaq 0x86ea(%rip), %rdx      # 0xc480
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x62ff
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5084
movq %r14, %rdi
callq 0xb220
jmp 0x3dc3
movq %rbx, %rdi
callq 0xbd7a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_legacy
static int _handle_legacy(xmpp_conn_t * const conn,
			  xmpp_stanza_t * const stanza,
			  void * const userdata)
{
    char *type, *name;

    /* delete missing handler */
    xmpp_timed_handler_delete(conn, _handle_missing_legacy);

    /* server responded to legacy auth request */
    type = xmpp_stanza_get_type(stanza);
    name = xmpp_stanza_get_name(stanza);
    if (!type || strcmp(name, "iq") != 0) {
	xmpp_error(conn->ctx, "xmpp", "Server sent us an unexpected response "\
		   "to legacy authentication request.");
	xmpp_disconnect(conn);
    } else if (strcmp(type, "error") == 0) {
	/* legacy client auth failed, no more fallbacks */
	xmpp_error(conn->ctx, "xmpp", "Legacy client authentication failed.");
	xmpp_disconnect(conn);
    } else if (strcmp(type, "result") == 0) {
	/* auth succeeded */
	xmpp_debug(conn->ctx, "xmpp", "Legacy auth succeeded.");

	conn->authenticated = 1;
	conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
    } else {
	xmpp_error(conn->ctx, "xmpp", "Server sent us a legacy authentication "\
		   "response with a bad type.");
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xd8(%rip), %rsi        # 0x3ebb
callq 0x5e3e
movq %r15, %rdi
callq 0xb7fe
movq %rax, %r14
movq %r15, %rdi
callq 0xb5c4
testq %r14, %r14
je 0x3e11
cmpb $0x69, (%rax)
jne 0x3e11
cmpb $0x71, 0x1(%rax)
jne 0x3e11
cmpb $0x0, 0x2(%rax)
je 0x3e3a
movq 0x8(%rbx), %rdi
leaq 0x822d(%rip), %rsi      # 0xc049
leaq 0x8a2a(%rip), %rdx      # 0xc84d
xorl %eax, %eax
callq 0x52aa
movq %rbx, %rdi
callq 0x4e1e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8dff(%rip), %rsi      # 0xcc40
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
je 0x3e74
leaq 0x81d5(%rip), %rsi      # 0xc029
movq %r14, %rdi
callq 0x22e0
movq 0x8(%rbx), %rdi
leaq 0x81e2(%rip), %rsi      # 0xc049
testl %eax, %eax
je 0x3e88
leaq 0x8a5f(%rip), %rdx      # 0xc8d1
jmp 0x3e23
movq 0x8(%rbx), %rdi
leaq 0x81ca(%rip), %rsi      # 0xc049
leaq 0x8a0f(%rip), %rdx      # 0xc895
jmp 0x3e23
leaq 0x8a2b(%rip), %rdx      # 0xc8ba
xorl %eax, %eax
callq 0x544e
movl $0x1, 0xd8(%rbx)
movq 0xe8(%rbx), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *0xe0(%rbx)
jmp 0x3e32
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_session
static int _handle_session(xmpp_conn_t * const conn,
			   xmpp_stanza_t * const stanza,
			   void * const userdata)
{
    char *type;

    /* delete missing session handler */
    xmpp_timed_handler_delete(conn, _handle_missing_session);

    /* server has replied to the session request */
    type = xmpp_stanza_get_type(stanza);
    if (type && strcmp(type, "error") == 0) {
	xmpp_error(conn->ctx, "xmpp", "Session establishment failed.");
	xmpp_disconnect(conn);
    } else if (type && strcmp(type, "result") == 0) {
	xmpp_debug(conn->ctx, "xmpp", "Session establishment successful.");

	conn->authenticated = 1;
	
	/* call connection handler */
	conn->conn_handler(conn, XMPP_CONN_CONNECT, 0, NULL, conn->userdata);
    } else {
	xmpp_error(conn->ctx, "xmpp", "Server sent malformed session reply.");
	xmpp_disconnect(conn);
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb5(%rip), %rsi        # 0x4467
callq 0x5e3e
movq %r14, %rdi
callq 0xb7fe
testq %rax, %rax
je 0x43ed
movq %rax, %r14
leaq 0x8872(%rip), %rsi      # 0xcc40
movq %rax, %rdi
callq 0x22e0
testl %eax, %eax
je 0x4401
leaq 0x7c48(%rip), %rsi      # 0xc029
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
je 0x442c
movq 0x8(%rbx), %rdi
leaq 0x7c51(%rip), %rsi      # 0xc049
leaq 0x8340(%rip), %rdx      # 0xc73f
jmp 0x4413
movq 0x8(%rbx), %rdi
leaq 0x7c3d(%rip), %rsi      # 0xc049
leaq 0x82ec(%rip), %rdx      # 0xc6ff
xorl %eax, %eax
callq 0x52aa
movq %rbx, %rdi
callq 0x4e1e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rdi
leaq 0x7c12(%rip), %rsi      # 0xc049
leaq 0x82df(%rip), %rdx      # 0xc71d
xorl %eax, %eax
callq 0x544e
movl $0x1, 0xd8(%rbx)
movq 0xe8(%rbx), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *0xe0(%rbx)
jmp 0x4422
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_digestmd5_rspauth
static int _handle_digestmd5_rspauth(xmpp_conn_t * const conn,
			      xmpp_stanza_t * const stanza,
			      void * const userdata)
{
    xmpp_stanza_t *auth;
    char *name;

    name = xmpp_stanza_get_name(stanza);
    xmpp_debug(conn->ctx, "xmpp",
	"handle digest-md5 (rspauth) called for %s", name);


    if (strcmp(name, "challenge") == 0) {
	/* assume it's an rspauth response */
	auth = xmpp_stanza_new(conn->ctx);
	if (!auth) {
	    disconnect_mem_error(conn);
	    return 0;
	}	
	xmpp_stanza_set_name(auth, "response");
	xmpp_stanza_set_ns(auth, XMPP_NS_SASL);
	xmpp_send(conn, auth);
	xmpp_stanza_release(auth);
    } else {
	return _handle_sasl_result(conn, stanza, "DIGEST-MD5");
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xb5c4
movq %rax, %r15
movq 0x8(%rbx), %rdi
leaq 0x7b96(%rip), %rsi      # 0xc049
leaq 0x8369(%rip), %rdx      # 0xc823
xorl %ebp, %ebp
movq %rax, %rcx
xorl %eax, %eax
callq 0x544e
leaq 0x8914(%rip), %rsi      # 0xcde1
movq %r15, %rdi
callq 0x22e0
testl %eax, %eax
je 0x44ed
leaq 0x7fd1(%rip), %rdx      # 0xc4b1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3bc9
jmp 0x453c
movq 0x8(%rbx), %rdi
callq 0xb0b4
testq %rax, %rax
je 0x4534
movq %rax, %r14
leaq 0x8315(%rip), %rsi      # 0xc81a
movq %rax, %rdi
callq 0xb57d
leaq 0x7f6c(%rip), %rsi      # 0xc480
movq %r14, %rdi
callq 0xb6d6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5084
movq %r14, %rdi
callq 0xb220
pushq $0x1
popq %rbp
jmp 0x453c
movq %rbx, %rdi
callq 0xbd7a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: handle_stream_start
static void _handle_stream_start(char *name, char **attrs, 
                                 void * const userdata)
{
    xmpp_conn_t *conn = (xmpp_conn_t *)userdata;
    char *id;

    if (strcmp(name, "stream:stream") != 0) {
        printf("name = %s\n", name);
        xmpp_error(conn->ctx, "conn", "Server did not open valid stream.");
        conn_disconnect(conn);
    } else {
        _log_open_tag(conn, attrs);
        
        if (conn->stream_id) xmpp_free(conn->ctx, conn->stream_id);

        id = _get_stream_attribute(attrs, "id");
        if (id)
            conn->stream_id = xmpp_strdup(conn->ctx, id);

        if (!conn->stream_id) {
            xmpp_error(conn->ctx, "conn", "Memory allocation failed.");
            conn_disconnect(conn);
        }
    }
    
    /* call stream open handler */
    conn->open_handler(conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x84b4(%rip), %rsi      # 0xcbc6
callq 0x22e0
testl %eax, %eax
je 0x4752
leaq 0x845c(%rip), %rdi      # 0xcb7e
movq %r15, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x8(%rbx), %rdi
leaq 0x8364(%rip), %rsi      # 0xca9b
leaq 0x844b(%rip), %rdx      # 0xcb89
xorl %eax, %eax
callq 0x52aa
movq %rbx, %rdi
callq 0x4da8
jmp 0x484a
testq %r14, %r14
je 0x47d3
leaq 0x8467(%rip), %rdx      # 0xcbc5
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0xa4fd
movslq %eax, %r12
leaq 0x8(%r14), %r13
leaq 0x8459(%rip), %r15      # 0xcbd4
movq -0x8(%r13), %rcx
movl $0x1000, %esi           # imm = 0x1000
subq %r12, %rsi
leaq (%rsp,%r12), %rdi
testq %rcx, %rcx
je 0x47a9
movq (%r13), %r8
movq %r15, %rdx
xorl %eax, %eax
callq 0xa4fd
cltq
addq %rax, %r12
addq $0x10, %r13
jmp 0x477b
leaq 0x835d(%rip), %rdx      # 0xcb0d
xorl %eax, %eax
callq 0xa4fd
movq 0x8(%rbx), %rdi
leaq 0x7887(%rip), %rsi      # 0xc049
leaq 0x8414(%rip), %rdx      # 0xcbdd
movq %rsp, %rcx
xorl %eax, %eax
callq 0x544e
movq 0x90(%rbx), %rsi
testq %rsi, %rsi
je 0x47e8
movq 0x8(%rbx), %rdi
callq 0x51a1
testq %r14, %r14
je 0x483e
xorl %eax, %eax
movq (%r14,%rax,8), %rdx
testq %rdx, %rdx
je 0x483e
movzbl (%rdx), %ecx
subl $0x69, %ecx
jne 0x480d
movzbl 0x1(%rdx), %ecx
subl $0x64, %ecx
jne 0x480d
movzbl 0x2(%rdx), %ecx
negl %ecx
testl %ecx, %ecx
je 0x4819
addq $0x2, %rax
jmp 0x47ef
movl %eax, %eax
shlq $0x3, %rax
orq $0x8, %rax
movq (%r14,%rax), %rsi
testq %rsi, %rsi
je 0x483e
movq 0x8(%rbx), %rdi
callq 0xbcd4
movq %rax, 0x90(%rbx)
jmp 0x4845
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x4864
movq %rbx, %rdi
callq *0xd0(%rbx)
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x822c(%rip), %rsi      # 0xca9b
leaq 0x8335(%rip), %rdx      # 0xcbab
jmp 0x473e
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: handle_stream_stanza
static void _handle_stream_stanza(xmpp_stanza_t *stanza,
                                  void * const userdata)
{
    xmpp_conn_t *conn = (xmpp_conn_t *)userdata;
    char *buf;
    size_t len;

    if (xmpp_stanza_to_text(stanza, &buf, &len) == 0) {
        xmpp_debug(conn->ctx, "xmpp", "RECV: %s", buf);
        xmpp_free(conn->ctx, buf);
    }

    handler_fire_stanza(conn, stanza);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xb2a2
testl %eax, %eax
jne 0x48ed
movq 0x8(%r14), %rdi
movq 0x8(%rsp), %rcx
leaq 0x7778(%rip), %rsi      # 0xc049
leaq 0x8305(%rip), %rdx      # 0xcbdd
xorl %eax, %eax
callq 0x544e
movq 0x8(%r14), %rdi
movq 0x8(%rsp), %rsi
callq 0x51a1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5b00
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: conn_disconnect
void conn_disconnect(xmpp_conn_t * const conn) 
{
    xmpp_debug(conn->ctx, "xmpp", "Closing socket.");
    conn->state = XMPP_STATE_DISCONNECTED;
    if (conn->tls) {
	tls_stop(conn->tls);
	tls_free(conn->tls);
	conn->tls = NULL;
    }
    sock_close(conn->sock);

    /* fire off connection handler */
    conn->conn_handler(conn, XMPP_CONN_DISCONNECT, conn->error,
		       conn->stream_error, conn->userdata);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x7292(%rip), %rsi      # 0xc049
leaq 0x7c9f(%rip), %rdx      # 0xca5d
xorl %eax, %eax
callq 0x544e
andl $0x0, 0x14(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4de5
callq 0xbc29
movq 0x38(%rbx), %rdi
callq 0xbb46
andq $0x0, 0x38(%rbx)
movl 0x30(%rbx), %edi
callq 0xa82b
movq 0xe0(%rbx), %rax
movl 0x20(%rbx), %edx
movq 0x28(%rbx), %rcx
movq 0xe8(%rbx), %r8
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: xmpp_send_raw_string
void xmpp_send_raw_string(xmpp_conn_t * const conn, 
			  const char * const fmt, ...)
{
    va_list ap;
    size_t len;
    char buf[1024]; /* small buffer for common case */
    char *bigbuf;

    va_start(ap, fmt);
    len = xmpp_vsnprintf(buf, 1024, fmt, ap);
    va_end(ap);

    if (len >= 1024) {
	/* we need more space for this data, so we allocate a big 
	 * enough buffer and print to that */
	len++; /* account for trailing \0 */
	bigbuf = xmpp_alloc(conn->ctx, len);
	if (!bigbuf) {
	    xmpp_debug(conn->ctx, "xmpp", "Could not allocate memory for send_raw_string");
	    return;
	}
	va_start(ap, fmt);
	xmpp_vsnprintf(bigbuf, len, fmt, ap);
	va_end(ap);

	xmpp_debug(conn->ctx, "conn", "SENT: %s", bigbuf);

	/* len - 1 so we don't send trailing \0 */
	xmpp_send_raw(conn, bigbuf, len - 1);

	xmpp_free(conn->ctx, bigbuf);
    } else {
	xmpp_debug(conn->ctx, "conn", "SENT: %s", buf);

	xmpp_send_raw(conn, buf, len);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %rbp
movq %rdx, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
movq %r8, 0x20(%rbp)
movq %r9, 0x28(%rbp)
testb %al, %al
je 0x4eb9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x510(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rbp, 0x10(%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x970c
movslq %eax, %r14
cmpl $0x400, %r14d           # imm = 0x400
jb 0x4f80
leaq 0x1(%r14), %r13
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x518f
testq %rax, %rax
je 0x4fb4
movq %rax, %r12
movq %rsp, %rcx
movq %rbp, 0x10(%rcx)
leaq 0x510(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x970c
movq 0x8(%rbx), %rdi
leaq 0x7b48(%rip), %rsi      # 0xca9b
leaq 0x7b46(%rip), %rdx      # 0xcaa0
movq %r12, %rcx
xorl %eax, %eax
callq 0x544e
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x4fdf
movq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x51a1
jmp 0x4fcd
movq 0x8(%rbx), %rdi
leaq 0x7b10(%rip), %rsi      # 0xca9b
leaq 0x7b0e(%rip), %rdx      # 0xcaa0
leaq 0xd0(%rsp), %r15
movq %r15, %rcx
xorl %eax, %eax
callq 0x544e
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4fdf
jmp 0x4fcd
movq 0x8(%rbx), %rdi
leaq 0x708a(%rip), %rsi      # 0xc049
leaq 0x7aa7(%rip), %rdx      # 0xca6d
xorl %eax, %eax
callq 0x544e
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: xmpp_send_raw
void xmpp_send_raw(xmpp_conn_t * const conn,
		   const char * const data, const size_t len)
{
    xmpp_send_queue_t *item;

    if (conn->state != XMPP_STATE_CONNECTED) return;

    /* create send queue item for queue */
    item = xmpp_alloc(conn->ctx, sizeof(xmpp_send_queue_t));
    if (!item) return;

    item->data = xmpp_alloc(conn->ctx, len);
    if (!item->data) {
	xmpp_free(conn->ctx, item);
	return;
    }
    memcpy(item->data, data, len);
    item->len = len;
    item->next = NULL;
    item->written = 0;

    /* add item to the send queue */
    if (!conn->send_queue_tail) {
	/* first item, set head and tail */
	conn->send_queue_head = item;
	conn->send_queue_tail = item;
    } else {
	/* add to the tail */
	conn->send_queue_tail->next = item;
	conn->send_queue_tail = item;
    }
    conn->send_queue_len++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, 0x14(%rdi)
jne 0x5061
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
pushq $0x20
popq %rsi
callq 0x518f
testq %rax, %rax
je 0x5061
movq %rax, %r15
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x518f
movq %rax, (%r15)
testq %rax, %rax
je 0x506d
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2050
movq %r14, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq 0xb0(%rbx), %rax
leaq 0x18(%rax), %rcx
leaq 0xa8(%rbx), %rdx
testq %rax, %rax
cmoveq %rdx, %rcx
movq %r15, (%rcx)
movq %r15, 0xb0(%rbx)
incl 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x51a1
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/conn.c
// Function: xmpp_send
void xmpp_send(xmpp_conn_t * const conn,
	       xmpp_stanza_t * const stanza)
{
    char *buf;
    size_t len;
    int ret;

    if (conn->state == XMPP_STATE_CONNECTED) {
	if ((ret = xmpp_stanza_to_text(stanza, &buf, &len)) == 0) {
	    xmpp_send_raw(conn, buf, len);
	    xmpp_debug(conn->ctx, "conn", "SENT: %s", buf);
	    xmpp_free(conn->ctx, buf);
	}
    }
}

// Assembly:
cmpl $0x2, 0x14(%rdi)
jne 0x50e9
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rax
leaq 0x8(%rsp), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0xb2a2
testl %eax, %eax
jne 0x50e4
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x4fdf
movq 0x8(%rbx), %rdi
movq (%rsp), %rcx
leaq 0x79d2(%rip), %rsi      # 0xca9b
leaq 0x79d0(%rip), %rdx      # 0xcaa0
xorl %eax, %eax
callq 0x544e
movq 0x8(%rbx), %rdi
movq (%rsp), %rsi
callq 0x51a1
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/ctx.c
// Function: xmpp_log
void xmpp_log(const xmpp_ctx_t * const ctx,
	      const xmpp_log_level_t level,
	      const char * const area,
	      const char * const fmt,
	      va_list ap)
{
    int oldret, ret;
    char smbuf[1024];
    char *buf;
    va_list copy;

    buf = smbuf;
    va_copy(copy, ap);
    ret = xmpp_vsnprintf(buf, 1023, fmt, ap);
    if (ret > 1023) {
	buf = (char *)xmpp_alloc(ctx, ret + 1);
	if (!buf) {
	    buf = NULL;
	    xmpp_error(ctx, "log", "Failed allocating memory for log message.");
            va_end(copy);
	    return;
	}
	oldret = ret;
	ret = xmpp_vsnprintf(buf, ret + 1, fmt, copy);
	if (ret > oldret) {
	    xmpp_error(ctx, "log", "Unexpected error");
	    return;
	}
    } else {
        va_end(copy);
    }

    if (ctx->log->handler)
        ctx->log->handler(ctx->log->userdata, level, area, buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%r8), %rax
movq %rax, 0x20(%rsp)
movups (%r8), %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %r15
movl $0x3ff, %esi            # imm = 0x3FF
movq %r15, %rdi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x970c
cmpl $0x400, %eax            # imm = 0x400
jl 0x5264
movl %eax, %r13d
movq %r14, 0x8(%rsp)
leal 0x1(%r13), %r14d
movq (%rbx), %rax
movq 0x18(%rax), %rsi
movq %r14, %rdi
callq *(%rax)
testq %rax, %rax
je 0x5280
movq %rax, %r15
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x970c
cmpl %r13d, %eax
movq 0x8(%rsp), %r14
jle 0x5264
leaq 0x79ac(%rip), %rsi      # 0xcc07
leaq 0x79d3(%rip), %rdx      # 0xcc35
jmp 0x528e
movq 0x8(%rbx), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0x5298
movq 0x8(%rcx), %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
callq *%rax
jmp 0x5298
leaq 0x7980(%rip), %rsi      # 0xcc07
leaq 0x797d(%rip), %rdx      # 0xcc0b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x52aa
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/ctx.c
// Function: xmpp_ctx_new
xmpp_ctx_t *xmpp_ctx_new(const xmpp_mem_t * const mem, 
			 const xmpp_log_t * const log)
{
    xmpp_ctx_t *ctx = NULL;

    if (mem == NULL)
	ctx = xmpp_default_mem.alloc(sizeof(xmpp_ctx_t), NULL);
    else
	ctx = mem->alloc(sizeof(xmpp_ctx_t), mem->userdata);

    if (ctx != NULL) {
	if (mem != NULL) 
	    ctx->mem = mem;
	else 
	    ctx->mem = &xmpp_default_mem;

	if (log == NULL)
	    ctx->log = &xmpp_default_log;
	else
	    ctx->log = log;

	ctx->connlist = NULL;
	ctx->loop_status = XMPP_LOOP_NOTSTARTED;
    }

    return ctx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x54f4
movq 0x18(%r14), %rsi
pushq $0x20
popq %rdi
callq *(%r14)
jmp 0x54ff
pushq $0x20
popq %rdi
xorl %esi, %esi
callq *0xbd49(%rip)           # 0x11248
testq %rax, %rax
je 0x5530
testq %r14, %r14
leaq 0xbd3a(%rip), %rcx      # 0x11248
cmovneq %r14, %rcx
movq %rcx, (%rax)
testq %rbx, %rbx
leaq 0xbdb9(%rip), %rcx      # 0x112d8
cmovneq %rbx, %rcx
movq %rcx, 0x8(%rax)
andq $0x0, 0x18(%rax)
andl $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/event.c
// Function: xmpp_run
void xmpp_run(xmpp_ctx_t *ctx)
{
    if (ctx->loop_status != XMPP_LOOP_NOTSTARTED) return;

    ctx->loop_status = XMPP_LOOP_RUNNING;
    while (ctx->loop_status == XMPP_LOOP_RUNNING) {
	xmpp_run_once(ctx, DEFAULT_TIMEOUT);
    }

    xmpp_debug(ctx, "event", "Event loop completed.");
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
je 0x5a8c
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x10(%rdi)
pushq $0x1
popq %rax
pushq $0x1
popq %r14
cmpl $0x1, %eax
jne 0x5ab6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5554
movl 0x10(%rbx), %eax
jmp 0x5aa1
leaq 0x72a2(%rip), %rsi      # 0xcd5f
leaq 0x72a1(%rip), %rdx      # 0xcd65
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x544e
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/handler.c
// Function: handler_fire_timed
uint64_t handler_fire_timed(xmpp_ctx_t * const ctx)
{
    xmpp_connlist_t *connitem;
    xmpp_handlist_t *handitem, *temp;
    int ret, fired;
    uint64_t elapsed, min;

    min = (uint64_t)(-1);

    connitem = ctx->connlist;
    while (connitem) {
	if (connitem->conn->state != XMPP_STATE_CONNECTED) {
	    connitem = connitem->next;
	    continue;
	}
	
	/* enable all handlers that were added */
	for (handitem = connitem->conn->timed_handlers; handitem;
	     handitem = handitem->next)
	    handitem->enabled = 1;

	handitem = connitem->conn->timed_handlers;
	while (handitem) {
	    /* skip newly added handlers */
	    if (!handitem->enabled) {
		handitem = handitem->next;
		continue;
	    }

	    /* only fire user handlers after authentication */
	    if (handitem->user_handler && !connitem->conn->authenticated) {
		handitem = handitem->next;
		continue;
	    }

	    fired = 0;
	    elapsed = time_elapsed(handitem->last_stamp, time_stamp());
	    if (elapsed >= handitem->period) {
		/* fire! */
		fired = 1;
		handitem->last_stamp = time_stamp();
		ret = ((xmpp_timed_handler)handitem->handler)(connitem->conn, handitem->userdata);
	    } else if (min > (handitem->period - elapsed))
		min = handitem->period - elapsed;
		
	    temp = handitem;
	    handitem = handitem->next;

	    /* delete handler if it returned false */
	    if (fired && !ret)
		xmpp_timed_handler_delete(connitem->conn, temp->handler);
	}

	connitem = connitem->next;
    }

    return min;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rbx
pushq $-0x1
popq %r14
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x5e2f
movq (%rbx), %r12
cmpl $0x2, 0x14(%r12)
je 0x5d84
addq $0x8, %rbx
jmp 0x5d67
addq $0xf0, %r12
movq %r12, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x5da3
movl $0x1, 0x18(%rax)
addq $0x20, %rax
jmp 0x5d8e
movq (%r12), %r15
movq %r15, %r12
testq %r12, %r12
je 0x5d7e
cmpl $0x0, 0x18(%r12)
je 0x5dca
cmpl $0x0, (%r12)
je 0x5dd1
movq (%rbx), %rax
cmpl $0x0, 0xd8(%rax)
jne 0x5dd1
movq 0x20(%r12), %r12
jmp 0x5daa
movq 0x30(%r12), %r15
callq 0xbd43
movq %r15, %rdi
movq %rax, %rsi
callq 0xbd73
movq 0x28(%r12), %rcx
subq %rax, %rcx
ja 0x5e1f
callq 0xbd43
movq %rax, 0x30(%r12)
movq (%rbx), %rdi
movq 0x10(%r12), %rsi
callq *0x8(%r12)
movq 0x20(%r12), %r15
testl %eax, %eax
jne 0x5da7
movq (%rbx), %rdi
movq 0x8(%r12), %rsi
callq 0x5e3e
jmp 0x5da7
cmpq %rcx, %r14
cmovaeq %rcx, %r14
addq $0x20, %r12
jmp 0x5da3
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/handler.c
// Function: handler_reset_timed
void handler_reset_timed(xmpp_conn_t *conn, int user_only)
{
    xmpp_handlist_t *handitem;

    handitem = conn->timed_handlers;
    while (handitem) {
	if ((user_only && handitem->user_handler) || !user_only)
	    handitem->last_stamp = time_stamp();
	
	handitem = handitem->next;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0xf0, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x5eba
testl %ebx, %ebx
je 0x5eab
cmpl $0x0, (%r14)
je 0x5eb4
callq 0xbd43
movq %rax, 0x30(%r14)
addq $0x20, %r14
jmp 0x5e99
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/handler.c
// Function: xmpp_id_handler_delete
void xmpp_id_handler_delete(xmpp_conn_t * const conn,
			    xmpp_handler handler,
			    const char * const id)
{
    xmpp_handlist_t *item, *prev;

    prev = NULL;
    item = (xmpp_handlist_t *)hash_get(conn->id_handlers, id);
    if (!item) return;

    while (item) {
	if (item->handler == (void *)handler)
	    break;

	prev = item;
	item = item->next;
    }

    if (item) {
	if (prev)
	    prev->next = item->next;
	else {
	    hash_drop(conn->id_handlers, id);
	    hash_add(conn->id_handlers, id, item->next);
	}
	xmpp_free(conn->ctx, item->id);
	xmpp_free(conn->ctx, item);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0xf8(%rdi), %rdi
movq %rdx, %rsi
callq 0x657f
testq %rax, %rax
je 0x5f00
xorl %ecx, %ecx
testq %rax, %rax
je 0x5f00
movq %rax, %r15
cmpq %r12, 0x8(%rax)
je 0x5f0c
movq 0x20(%r15), %rax
movq %r15, %rcx
jmp 0x5ee9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testq %rcx, %rcx
je 0x5f1b
movq 0x20(%r15), %rax
movq %rax, 0x20(%rcx)
jmp 0x5f3d
movq 0xf8(%rbx), %rdi
movq %r14, %rsi
callq 0x64d9
movq 0xf8(%rbx), %rdi
movq 0x20(%r15), %rdx
movq %r14, %rsi
callq 0x641a
movq 0x8(%rbx), %rdi
movq 0x28(%r15), %rsi
callq 0x51a1
movq 0x8(%rbx), %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x51a1
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/src/handler.c
// Function: xmpp_handler_delete
void xmpp_handler_delete(xmpp_conn_t * const conn,
			 xmpp_handler handler)
{
    xmpp_handlist_t *prev, *item;

    if (!conn->handlers) return;

    prev = NULL;
    item = conn->handlers;
    while (item) {
	if (item->handler == (void *)handler)
	    break;
	
	prev = item;
	item = item->next;
    }

    if (item) {
	if (prev)
	    prev->next = item->next;
	else
	    conn->handlers = item->next;

	if (item->ns) xmpp_free(conn->ctx, item->ns);
	if (item->name) xmpp_free(conn->ctx, item->name);
	if (item->type) xmpp_free(conn->ctx, item->type);
	xmpp_free(conn->ctx, item);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x100(%rdi), %r14
testq %r14, %r14
je 0x5f91
movq %rdi, %rbx
leaq 0x100(%rdi), %rax
xorl %ecx, %ecx
testq %r14, %r14
je 0x5f91
cmpq %rsi, 0x8(%r14)
je 0x5f99
movq %r14, %rcx
movq 0x20(%r14), %r14
jmp 0x5f7d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x20(%rcx), %rdx
testq %rcx, %rcx
cmoveq %rax, %rdx
movq 0x20(%r14), %rax
movq %rax, (%rdx)
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x5fbd
movq 0x8(%rbx), %rdi
callq 0x51a1
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x5fcf
movq 0x8(%rbx), %rdi
callq 0x51a1
movq 0x38(%r14), %rsi
testq %rsi, %rsi
je 0x5fe1
movq 0x8(%rbx), %rdi
callq 0x51a1
movq 0x8(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x51a1