// File: /workspace/github_c_makefile_star2_O3/hkshenSmart[P]ONVIF-discovery_cs/soapC.c
// Function: soap_out_wsa__EndpointReferenceType
SOAP_FMAC4 soap_out_wsa__EndpointReferenceType(struct soap *soap, const char *tag, int id, const struct wsa__EndpointReferenceType *a, const char *type)
{
	const char *soap_tmp_PortType = a->PortType ? soap_QName2s(soap, *a->PortType) : NULL;
	if (a->__anyAttribute)
		soap_set_attr(soap, "-anyAttribute", a->__anyAttribute, 1);
	if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_wsa__EndpointReferenceType), type))
		return soap->error;
	if (a->Address)
	{	if (soap_out_string(soap, "wsa:Address", -1, &a->Address, ""))
			return soap->error;
	}
	else if (soap_element_nil(soap, "wsa:Address"))
		return soap->error;
	if (soap_out_PointerTowsa__ReferencePropertiesType(soap, "wsa:ReferenceProperties", -1, &a->ReferenceProperties, ""))
		return soap->error;
	if (soap_out_PointerTowsa__ReferenceParametersType(soap, "wsa:ReferenceParameters", -1, &a->ReferenceParameters, ""))
		return soap->error;
	if (soap_out__QName(soap, "wsa:PortType", -1, (char*const*)&soap_tmp_PortType, ""))
		return soap->error;
	if (soap_out_PointerTowsa__ServiceNameType(soap, "wsa:ServiceName", -1, &a->ServiceName, ""))
		return soap->error;
	if (a->__any)
	{	int i;
		for (i = 0; i < a->__size; i++)
			soap_outliteral(soap, "-any", a->__any + i, NULL);
	}
	return soap_element_end_out(soap, tag);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0xa91e
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1f7e7
jmp 0xa920
xorl %eax, %eax
movq %rax, (%rsp)
movq 0x38(%r15), %rdx
testq %rdx, %rdx
je 0xa941
leaq 0x1af70(%rip), %rsi     # 0x258a4
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x1b1a4
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
movl $0x7, %ecx
callq 0x1817e
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movq %r12, %rcx
callq 0x186a5
testl %eax, %eax
jne 0xaa3f
cmpq $0x0, (%r15)
je 0xa997
leaq 0x1afbb(%rip), %rsi     # 0x25933
leaq 0x1bc6f(%rip), %r8      # 0x265ee
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rcx
movl $0x4, %r9d
callq 0x1fcff
jmp 0xa9a6
leaq 0x1af95(%rip), %rsi     # 0x25933
movq %rbx, %rdi
callq 0x1bcb1
testl %eax, %eax
jne 0xaa3f
leaq 0x8(%r15), %rcx
leaq 0x1af86(%rip), %rsi     # 0x2593f
leaq 0x1bc2e(%rip), %r8      # 0x265ee
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xb318
testl %eax, %eax
jne 0xaa3f
leaq 0x10(%r15), %rcx
leaq 0x1af7b(%rip), %rsi     # 0x25957
leaq 0x1bc0b(%rip), %r8      # 0x265ee
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xb2b9
testl %eax, %eax
jne 0xaa3f
leaq 0x1af74(%rip), %rsi     # 0x2596f
leaq 0x1bbec(%rip), %r8      # 0x265ee
movq %rsp, %rcx
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x5, %r9d
callq 0x1fcff
testl %eax, %eax
jne 0xaa3f
leaq 0x20(%r15), %rcx
leaq 0x1af55(%rip), %rsi     # 0x2597c
leaq 0x1bbc0(%rip), %r8      # 0x265ee
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xb208
testl %eax, %eax
je 0xaa54
movl 0x1f274(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x30(%r15)
je 0xaa92
cmpl $0x0, 0x28(%r15)
jle 0xaa92
xorl %r13d, %r13d
leaq 0x1ade7(%rip), %r12     # 0x25853
xorl %ebp, %ebp
movq 0x30(%r15), %rdx
addq %r13, %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x204a0
incq %rbp
movslq 0x28(%r15), %rax
addq $0x8, %r13
cmpq %rax, %rbp
jl 0xaa6e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18722
jmp 0xaa45