// File: /workspace/github_c_makefile_star2_O2/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 0x2f67
movq 0x10(%rax), %rdi
callq 0xb220
movq 0x28(%rbx), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2f5e
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x51a1
movq 0x28(%rbx), %rsi
movq 0x8(%rbx), %rdi
callq 0x51a1
movq 0x8(%rbx), %rdi
pushq $0x18
popq %rsi
callq 0x518f
movq %rax, 0x28(%rbx)
andq $0x0, 0x8(%rax)
movl $0x13, (%rax)
movq %r14, %rdi
callq 0xb8a4
movq %rax, %r13
leaq 0x92f8(%rip), %r15      # 0xc28c
leaq 0x9315(%rip), %r12      # 0xc2b0
testq %r13, %r13
je 0x2fbc
movq %r13, %rdi
callq 0xb7e0
testq %rax, %rax
je 0x2fbc
movq %rax, %rdi
movq %r15, %rsi
callq 0x22e0
testl %eax, %eax
je 0x2fd1
movq %r13, %rdi
callq 0xb8a9
movq %rax, %r13
testq %rax, %rax
jne 0x2f9b
jmp 0x33a7
movq %r13, %rdi
callq 0xb5c4
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0x22e0
testl %eax, %eax
je 0x3226
movq %rbp, %rdi
leaq 0x92bc(%rip), %rsi      # 0xc2b5
callq 0x22e0
testl %eax, %eax
je 0x3251
movq %rbp, %rdi
leaq 0x92b0(%rip), %rsi      # 0xc2c0
callq 0x22e0
testl %eax, %eax
je 0x325d
movq %rbp, %rdi
leaq 0x92ae(%rip), %rsi      # 0xc2d5
callq 0x22e0
testl %eax, %eax
je 0x326c
movq %rbp, %rdi
leaq 0x92a0(%rip), %rsi      # 0xc2de
callq 0x22e0
testl %eax, %eax
je 0x327b
movq %rbp, %rdi
leaq 0x929c(%rip), %rsi      # 0xc2f1
callq 0x22e0
testl %eax, %eax
je 0x328a
movq %rbp, %rdi
leaq 0x928f(%rip), %rsi      # 0xc2fb
callq 0x22e0
testl %eax, %eax
je 0x3299
movq %rbp, %rdi
leaq 0x9285(%rip), %rsi      # 0xc308
callq 0x22e0
testl %eax, %eax
je 0x32a8
movq %rbp, %rdi
leaq 0x9282(%rip), %rsi      # 0xc31c
callq 0x22e0
testl %eax, %eax
je 0x32b7
movq %rbp, %rdi
leaq 0x9281(%rip), %rsi      # 0xc332
callq 0x22e0
testl %eax, %eax
je 0x32c6
movq %rbp, %rdi
leaq 0x9277(%rip), %rsi      # 0xc33f
callq 0x22e0
testl %eax, %eax
je 0x32d5
movq %rbp, %rdi
leaq 0x926b(%rip), %rsi      # 0xc34a
callq 0x22e0
testl %eax, %eax
je 0x32e4
movq %rbp, %rdi
leaq 0x9266(%rip), %rsi      # 0xc35c
callq 0x22e0
testl %eax, %eax
je 0x32f3
movq %rbp, %rdi
leaq 0x925b(%rip), %rsi      # 0xc368
callq 0x22e0
testl %eax, %eax
je 0x3302
movq %rbp, %rdi
leaq 0x9253(%rip), %rsi      # 0xc377
callq 0x22e0
testl %eax, %eax
je 0x3311
movq %rbp, %rdi
leaq 0x924d(%rip), %rsi      # 0xc388
callq 0x22e0
testl %eax, %eax
je 0x3320
movq %rbp, %rdi
leaq 0x924f(%rip), %rsi      # 0xc3a1
callq 0x22e0
testl %eax, %eax
je 0x332f
movq %rbp, %rdi
leaq 0x924c(%rip), %rsi      # 0xc3b5
callq 0x22e0
testl %eax, %eax
je 0x333e
movq %rbp, %rdi
leaq 0x9244(%rip), %rsi      # 0xc3c4
callq 0x22e0
testl %eax, %eax
je 0x334d
movq %rbp, %rdi
leaq 0x923c(%rip), %rsi      # 0xc3d3
callq 0x22e0
testl %eax, %eax
je 0x335c
movq %rbp, %rdi
leaq 0x9235(%rip), %rsi      # 0xc3e3
callq 0x22e0
testl %eax, %eax
je 0x336b
movq %rbp, %rdi
leaq 0x9232(%rip), %rsi      # 0xc3f7
callq 0x22e0
testl %eax, %eax
je 0x337a
movq %rbp, %rdi
leaq 0x9230(%rip), %rsi      # 0xc40c
callq 0x22e0
testl %eax, %eax
je 0x3389
movq %rbp, %rdi
leaq 0x9231(%rip), %rsi      # 0xc424
callq 0x22e0
testl %eax, %eax
je 0x3398
movq %rbp, %rdi
leaq 0x922e(%rip), %rsi      # 0xc438
callq 0x22e0
testl %eax, %eax
jne 0x2fbc
movq 0x28(%rbx), %rax
movl $0x17, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x323c
movq 0x8(%rbx), %rdi
callq 0x51a1
movq %r13, %rdi
callq 0xb8ae
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0x2fbc
movq 0x28(%rbx), %rax
andl $0x0, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x1, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x2, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x3, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x4, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x5, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x6, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x7, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x8, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x9, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xa, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xb, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xc, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xd, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xe, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0xf, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x10, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x11, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x12, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x13, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x14, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x15, (%rax)
jmp 0x2fbc
movq 0x28(%rbx), %rax
movl $0x16, (%rax)
jmp 0x2fbc
movq %r14, %rdi
callq 0xb0e4
movq 0x28(%rbx), %rcx
movq %rax, 0x10(%rcx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq