// File: /workspace/github_c_makefile_star2_O3/loversmile[P]sugarcrm/sugar_soapClient.c
// Function: soap_call_ns1__logout
SOAP_FMAC6 soap_call_ns1__logout(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *session, struct ns1__logoutResponse *_param_2)
{	struct ns1__logout soap_tmp_ns1__logout;
	if (!soap_endpoint)
		soap_endpoint = "http://192.168.124.27/crm/service/v4_1/soap.php";
	if (!soap_action)
		soap_action = "http://192.168.124.27/crm/service/v4_1/soap.php/logout";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__logout.session = session;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__logout(soap, &soap_tmp_ns1__logout);
	if (soap_begin_count(soap))
		return soap->error;
	if (soap->mode & SOAP_IO_LENGTH)
	{	if (soap_envelope_begin_out(soap)
		 || soap_putheader(soap)
		 || soap_body_begin_out(soap)
		 || soap_put_ns1__logout(soap, &soap_tmp_ns1__logout, "ns1:logout", NULL)
		 || soap_body_end_out(soap)
		 || soap_envelope_end_out(soap))
			 return soap->error;
	}
	if (soap_end_count(soap))
		return soap->error;
	if (soap_connect(soap, soap_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns1__logout(soap, &soap_tmp_ns1__logout, "ns1:logout", NULL)
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	if (!_param_2)
		return soap_closesock(soap);
	soap_default_ns1__logoutResponse(soap, _param_2);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	if (soap_recv_fault(soap, 1))
		return soap->error;
	soap_get_ns1__logoutResponse(soap, _param_2, "", "");
	if (soap->error)
		return soap_recv_fault(soap, 0);
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
movq %rdi, %rbx
testq %rsi, %rsi
leaq 0x1dc57(%rip), %r15     # 0x5186c
cmovneq %rsi, %r15
testq %rdx, %rdx
leaq 0x1dcd9(%rip), %r12     # 0x518fc
cmovneq %rdx, %r12
leaq 0x1dca4(%rip), %rax     # 0x518d2
movq %rax, 0x38(%rdi)
leaq 0x8(%rsp), %r13
movq %rcx, (%r13)
callq 0x413c8
movq %rbx, %rdi
callq 0x351c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26e2f
movq %rbx, %rdi
callq 0x3eaa8
testl %eax, %eax
je 0x33c73
movl 0x19214(%rbx), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testb $0x8, 0x4(%rbx)
jne 0x33d0e
movq %rbx, %rdi
callq 0x3ee14
testl %eax, %eax
jne 0x33c5f
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4928a
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x48be0
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x351e
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x48ff7
testl %eax, %eax
jne 0x33d01
leaq 0x1d404(%rip), %rdx     # 0x510ca
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x2cba8
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x4905e
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x48d15
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x4007f
testl %eax, %eax
je 0x33d81
movq %rbx, %rdi
callq 0x3baf5
jmp 0x33c65
movq %rbx, %rdi
callq 0x48be0
testl %eax, %eax
jne 0x33c5f
movq %rbx, %rdi
callq 0x351e
testl %eax, %eax
jne 0x33c5f
movq %rbx, %rdi
callq 0x48ff7
testl %eax, %eax
jne 0x33c5f
leaq 0x1d385(%rip), %rdx     # 0x510ca
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x2cba8
testl %eax, %eax
jne 0x33c5f
movq %rbx, %rdi
callq 0x4905e
testl %eax, %eax
jne 0x33c5f
movq %rbx, %rdi
callq 0x48d15
testl %eax, %eax
jne 0x33c5f
jmp 0x33c7d
testq %r14, %r14
je 0x33d01
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2cc4b
movq %rbx, %rdi
callq 0x48722
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x48e65
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x49101
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x49087
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a71f
testl %eax, %eax
jne 0x33c5f
leaq 0x1e941(%rip), %rcx     # 0x52732
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x2ccb9
cmpl $0x0, 0x19214(%rbx)
je 0x33e17
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a71f
jmp 0x33c65
movq %rbx, %rdi
callq 0x490d5
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x48fe2
testl %eax, %eax
jne 0x33d01
movq %rbx, %rdi
callq 0x406e7
testl %eax, %eax
jmp 0x33d01