// File: /workspace/github_c_makefile_star2_O3/liuhaotian[P]xmppsh/libstrophe/src/auth.c
// Function: handle_error
static int _handle_error(xmpp_conn_t * const conn,
			 xmpp_stanza_t * const stanza,
			 void * const userdata)
{
    xmpp_stanza_t *child;
    char *name;

    /* free old stream error if it's still there */
    if (conn->stream_error) {
	xmpp_stanza_release(conn->stream_error->stanza);
	if (conn->stream_error->text) 
	    xmpp_free(conn->ctx, conn->stream_error->text);
	xmpp_free(conn->ctx, conn->stream_error);
    }

    /* create stream error structure */
    conn->stream_error = (xmpp_stream_error_t *)xmpp_alloc(conn->ctx, sizeof(xmpp_stream_error_t));

	conn->stream_error->text = NULL;
	conn->stream_error->type = XMPP_SE_UNDEFINED_CONDITION;

    if (conn->stream_error) {
	child = xmpp_stanza_get_children(stanza);
	do {
	    char *ns = NULL;

	    if (child) {
		ns = xmpp_stanza_get_ns(child);
	    }

	    if (ns && strcmp(ns, XMPP_NS_STREAMS_IETF) == 0) {
		name = xmpp_stanza_get_name(child);
		if (strcmp(name, "text") == 0) {
		    if (conn->stream_error->text)
			xmpp_free(conn->ctx, conn->stream_error->text);
		    conn->stream_error->text = xmpp_stanza_get_text(child);
		} else if (strcmp(name, "bad-format") == 0)
		    conn->stream_error->type = XMPP_SE_BAD_FORMAT;
		else if (strcmp(name, "bad-namespace-prefix") == 0)
		    conn->stream_error->type = XMPP_SE_BAD_NS_PREFIX;
		else if (strcmp(name, "conflict") == 0)
		    conn->stream_error->type = XMPP_SE_CONFLICT;
		else if (strcmp(name, "connection-timeout") == 0)
		    conn->stream_error->type = XMPP_SE_CONN_TIMEOUT;
		else if (strcmp(name, "host-gone") == 0)
		    conn->stream_error->type = XMPP_SE_HOST_GONE;
		else if (strcmp(name, "host-unknown") == 0)
		    conn->stream_error->type = XMPP_SE_HOST_UNKNOWN;
		else if (strcmp(name, "improper-addressing") == 0)
		    conn->stream_error->type = XMPP_SE_IMPROPER_ADDR;
		else if (strcmp(name, "internal-server-error") == 0)
		    conn->stream_error->type = XMPP_SE_INTERNAL_SERVER_ERROR;
		else if (strcmp(name, "invalid-from") == 0)
		    conn->stream_error->type = XMPP_SE_INVALID_FROM;
		else if (strcmp(name, "invalid-id") == 0)
		    conn->stream_error->type = XMPP_SE_INVALID_ID;
		else if (strcmp(name, "invalid-namespace") == 0)
		    conn->stream_error->type = XMPP_SE_INVALID_NS;
		else if (strcmp(name, "invalid-xml") == 0)
		    conn->stream_error->type = XMPP_SE_INVALID_XML;
		else if (strcmp(name, "not-authorized") == 0)
		    conn->stream_error->type = XMPP_SE_NOT_AUTHORIZED;
		else if (strcmp(name, "policy-violation") == 0)
		    conn->stream_error->type = XMPP_SE_POLICY_VIOLATION;
		else if (strcmp(name, "remote-connection-failed") == 0)
		    conn->stream_error->type = XMPP_SE_REMOTE_CONN_FAILED;
		else if (strcmp(name, "resource-constraint") == 0)
		    conn->stream_error->type = XMPP_SE_RESOURCE_CONSTRAINT;
		else if (strcmp(name, "restricted-xml") == 0)
		    conn->stream_error->type = XMPP_SE_RESTRICTED_XML;
		else if (strcmp(name, "see-other-host") == 0)
		    conn->stream_error->type = XMPP_SE_SEE_OTHER_HOST;
		else if (strcmp(name, "system-shutdown") == 0)
		    conn->stream_error->type = XMPP_SE_SYSTEM_SHUTDOWN;
		else if (strcmp(name, "undefined-condition") == 0)
		    conn->stream_error->type = XMPP_SE_UNDEFINED_CONDITION;
		else if (strcmp(name, "unsupported-encoding") == 0)
		    conn->stream_error->type = XMPP_SE_UNSUPPORTED_ENCODING;
		else if (strcmp(name, "unsupported-stanza-type") == 0)
		    conn->stream_error->type = XMPP_SE_UNSUPPORTED_STANZA_TYPE;
		else if (strcmp(name, "unsupported-version") == 0)
		    conn->stream_error->type = XMPP_SE_UNSUPPORTED_VERSION;
		else if (strcmp(name, "xml-not-well-formed") == 0)
		    conn->stream_error->type = XMPP_SE_XML_NOT_WELL_FORMED;
	    }
	} while ((child = xmpp_stanza_get_next(child)));

	conn->stream_error->stanza = xmpp_stanza_clone(stanza);
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2fa3
movq 0x10(%rax), %rdi
callq 0xb5a8
movq 0x28(%rbx), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2f9a
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x5263
movq 0x28(%rbx), %rsi
movq 0x8(%rbx), %rdi
callq 0x5263
movq 0x8(%rbx), %rdi
movl $0x18, %esi
callq 0x5251
movq %rax, 0x28(%rbx)
movq $0x0, 0x8(%rax)
movl $0x13, (%rax)
movq %r14, %rdi
callq 0xbc72
movq %rax, %r13
leaq 0xa2b7(%rip), %r15      # 0xd28c
leaq 0xa2d4(%rip), %r12      # 0xd2b0
testq %r13, %r13
je 0x2ffd
movq %r13, %rdi
callq 0xbb97
testq %rax, %rax
je 0x2ffd
movq %rax, %rdi
movq %r15, %rsi
callq 0x22e0
testl %eax, %eax
je 0x3012
movq %r13, %rdi
callq 0xbc77
movq %rax, %r13
testq %rax, %rax
jne 0x2fdc
jmp 0x33eb
movq %r13, %rdi
callq 0xb97a
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x22e0
testl %eax, %eax
je 0x3267
movq %rbp, %rdi
leaq 0xa27b(%rip), %rsi      # 0xd2b5
callq 0x22e0
testl %eax, %eax
je 0x3292
movq %rbp, %rdi
leaq 0xa26f(%rip), %rsi      # 0xd2c0
callq 0x22e0
testl %eax, %eax
je 0x32a1
movq %rbp, %rdi
leaq 0xa26d(%rip), %rsi      # 0xd2d5
callq 0x22e0
testl %eax, %eax
je 0x32b0
movq %rbp, %rdi
leaq 0xa25f(%rip), %rsi      # 0xd2de
callq 0x22e0
testl %eax, %eax
je 0x32bf
movq %rbp, %rdi
leaq 0xa25b(%rip), %rsi      # 0xd2f1
callq 0x22e0
testl %eax, %eax
je 0x32ce
movq %rbp, %rdi
leaq 0xa24e(%rip), %rsi      # 0xd2fb
callq 0x22e0
testl %eax, %eax
je 0x32dd
movq %rbp, %rdi
leaq 0xa244(%rip), %rsi      # 0xd308
callq 0x22e0
testl %eax, %eax
je 0x32ec
movq %rbp, %rdi
leaq 0xa241(%rip), %rsi      # 0xd31c
callq 0x22e0
testl %eax, %eax
je 0x32fb
movq %rbp, %rdi
leaq 0xa240(%rip), %rsi      # 0xd332
callq 0x22e0
testl %eax, %eax
je 0x330a
movq %rbp, %rdi
leaq 0xa236(%rip), %rsi      # 0xd33f
callq 0x22e0
testl %eax, %eax
je 0x3319
movq %rbp, %rdi
leaq 0xa22a(%rip), %rsi      # 0xd34a
callq 0x22e0
testl %eax, %eax
je 0x3328
movq %rbp, %rdi
leaq 0xa225(%rip), %rsi      # 0xd35c
callq 0x22e0
testl %eax, %eax
je 0x3337
movq %rbp, %rdi
leaq 0xa21a(%rip), %rsi      # 0xd368
callq 0x22e0
testl %eax, %eax
je 0x3346
movq %rbp, %rdi
leaq 0xa212(%rip), %rsi      # 0xd377
callq 0x22e0
testl %eax, %eax
je 0x3355
movq %rbp, %rdi
leaq 0xa20c(%rip), %rsi      # 0xd388
callq 0x22e0
testl %eax, %eax
je 0x3364
movq %rbp, %rdi
leaq 0xa20e(%rip), %rsi      # 0xd3a1
callq 0x22e0
testl %eax, %eax
je 0x3373
movq %rbp, %rdi
leaq 0xa20b(%rip), %rsi      # 0xd3b5
callq 0x22e0
testl %eax, %eax
je 0x3382
movq %rbp, %rdi
leaq 0xa203(%rip), %rsi      # 0xd3c4
callq 0x22e0
testl %eax, %eax
je 0x3391
movq %rbp, %rdi
leaq 0xa1fb(%rip), %rsi      # 0xd3d3
callq 0x22e0
testl %eax, %eax
je 0x33a0
movq %rbp, %rdi
leaq 0xa1f4(%rip), %rsi      # 0xd3e3
callq 0x22e0
testl %eax, %eax
je 0x33af
movq %rbp, %rdi
leaq 0xa1f1(%rip), %rsi      # 0xd3f7
callq 0x22e0
testl %eax, %eax
je 0x33be
movq %rbp, %rdi
leaq 0xa1ef(%rip), %rsi      # 0xd40c
callq 0x22e0
testl %eax, %eax
je 0x33cd
movq %rbp, %rdi
leaq 0xa1f0(%rip), %rsi      # 0xd424
callq 0x22e0
testl %eax, %eax
je 0x33dc
movq %rbp, %rdi
leaq 0xa1ed(%rip), %rsi      # 0xd438
callq 0x22e0
testl %eax, %eax
jne 0x2ffd
movq 0x28(%rbx), %rax
movl $0x17, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x327d
movq 0x8(%rbx), %rdi
callq 0x5263
movq %r13, %rdi
callq 0xbc7c
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x0, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x1, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x2, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x3, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x4, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x5, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x6, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x7, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x8, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x9, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xa, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xb, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xc, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xd, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xe, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0xf, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x10, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x11, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x12, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x13, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x14, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x15, (%rax)
jmp 0x2ffd
movq 0x28(%rbx), %rax
movl $0x16, (%rax)
jmp 0x2ffd
movq %r14, %rdi
callq 0xb441
movq 0x28(%rbx), %rcx
movq %rax, 0x10(%rcx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq