// File: /workspace/github_c_makefile_star2_O1/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 0x2fb4
movq 0x10(%rax), %rdi
callq 0xb73c
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x2fa7
movq 0x8(%rbx), %rdi
callq 0x5293
movq 0x8(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x5293
movq 0x8(%rbx), %rdi
movl $0x18, %esi
callq 0x5281
movq %rax, 0x28(%rbx)
movq $0x0, 0x8(%rax)
movl $0x13, (%rax)
movq %r14, (%rsp)
movq %r14, %rdi
callq 0xbe02
movq %rax, %r12
leaq 0xa2a2(%rip), %r15      # 0xd28c
leaq 0xa2bf(%rip), %r13      # 0xd2b0
leaq 0xa2bd(%rip), %rbp      # 0xd2b5
testq %r12, %r12
je 0x3007
movq %r12, %rdi
callq 0xbd2b
jmp 0x3009
xorl %eax, %eax
testq %rax, %rax
je 0x301d
movq %rax, %rdi
movq %r15, %rsi
callq 0x22e0
testl %eax, %eax
je 0x3032
movq %r12, %rdi
callq 0xbe07
movq %rax, %r12
testq %rax, %rax
jne 0x2ff8
jmp 0x3407
movq %r12, %rdi
callq 0xbb0e
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0x22e0
testl %eax, %eax
je 0x3283
movq %r14, %rdi
movq %rbp, %rsi
callq 0x22e0
testl %eax, %eax
je 0x32ae
movq %r14, %rdi
leaq 0xa253(%rip), %rsi      # 0xd2c0
callq 0x22e0
testl %eax, %eax
je 0x32bd
movq %r14, %rdi
leaq 0xa251(%rip), %rsi      # 0xd2d5
callq 0x22e0
testl %eax, %eax
je 0x32cc
movq %r14, %rdi
leaq 0xa243(%rip), %rsi      # 0xd2de
callq 0x22e0
testl %eax, %eax
je 0x32db
movq %r14, %rdi
leaq 0xa23f(%rip), %rsi      # 0xd2f1
callq 0x22e0
testl %eax, %eax
je 0x32ea
movq %r14, %rdi
leaq 0xa232(%rip), %rsi      # 0xd2fb
callq 0x22e0
testl %eax, %eax
je 0x32f9
movq %r14, %rdi
leaq 0xa228(%rip), %rsi      # 0xd308
callq 0x22e0
testl %eax, %eax
je 0x3308
movq %r14, %rdi
leaq 0xa225(%rip), %rsi      # 0xd31c
callq 0x22e0
testl %eax, %eax
je 0x3317
movq %r14, %rdi
leaq 0xa224(%rip), %rsi      # 0xd332
callq 0x22e0
testl %eax, %eax
je 0x3326
movq %r14, %rdi
leaq 0xa21a(%rip), %rsi      # 0xd33f
callq 0x22e0
testl %eax, %eax
je 0x3335
movq %r14, %rdi
leaq 0xa20e(%rip), %rsi      # 0xd34a
callq 0x22e0
testl %eax, %eax
je 0x3344
movq %r14, %rdi
leaq 0xa209(%rip), %rsi      # 0xd35c
callq 0x22e0
testl %eax, %eax
je 0x3353
movq %r14, %rdi
leaq 0xa1fe(%rip), %rsi      # 0xd368
callq 0x22e0
testl %eax, %eax
je 0x3362
movq %r14, %rdi
leaq 0xa1f6(%rip), %rsi      # 0xd377
callq 0x22e0
testl %eax, %eax
je 0x3371
movq %r14, %rdi
leaq 0xa1f0(%rip), %rsi      # 0xd388
callq 0x22e0
testl %eax, %eax
je 0x3380
movq %r14, %rdi
leaq 0xa1f2(%rip), %rsi      # 0xd3a1
callq 0x22e0
testl %eax, %eax
je 0x338f
movq %r14, %rdi
leaq 0xa1ef(%rip), %rsi      # 0xd3b5
callq 0x22e0
testl %eax, %eax
je 0x339e
movq %r14, %rdi
leaq 0xa1e7(%rip), %rsi      # 0xd3c4
callq 0x22e0
testl %eax, %eax
je 0x33ad
movq %r14, %rdi
leaq 0xa1df(%rip), %rsi      # 0xd3d3
callq 0x22e0
testl %eax, %eax
je 0x33bc
movq %r14, %rdi
leaq 0xa1d8(%rip), %rsi      # 0xd3e3
callq 0x22e0
testl %eax, %eax
je 0x33cb
movq %r14, %rdi
leaq 0xa1d5(%rip), %rsi      # 0xd3f7
callq 0x22e0
testl %eax, %eax
je 0x33da
movq %r14, %rdi
leaq 0xa1d3(%rip), %rsi      # 0xd40c
callq 0x22e0
testl %eax, %eax
je 0x33e9
movq %r14, %rdi
leaq 0xa1d4(%rip), %rsi      # 0xd424
callq 0x22e0
testl %eax, %eax
je 0x33f8
movq %r14, %rdi
leaq 0xa1d1(%rip), %rsi      # 0xd438
callq 0x22e0
testl %eax, %eax
jne 0x301d
movq 0x28(%rbx), %rax
movl $0x17, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x3299
movq 0x8(%rbx), %rdi
callq 0x5293
movq %r12, %rdi
callq 0xbe0c
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x0, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x1, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x2, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x3, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x4, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x5, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x6, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x7, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x8, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x9, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xa, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xb, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xc, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xd, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xe, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0xf, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x10, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x11, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x12, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x13, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x14, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x15, (%rax)
jmp 0x301d
movq 0x28(%rbx), %rax
movl $0x16, (%rax)
jmp 0x301d
movq (%rsp), %rdi
callq 0xb5d5
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