// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_envelope_end_out
SOAP_FMAC2
soap_envelope_end_out(struct soap *soap)
{
	//(2011-8-9 duwenyong)modify����Envelope�󲻷���"\r\n"�����ַ���
	//���򺣿�DS-2CD863PF(NF)-E(W) �᷵��matching rule specified is not supported.
  //if (soap_element_end_out(soap, "SOAP-ENV:Envelope") || soap_send_raw(soap, "\r\n", 2))	/* 2.8: always emit \r\n after SOAP Envelope */
  if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))	/* 2.8: always emit \r\n after SOAP Envelope */
    return soap->error;
#ifndef WITH_LEANER
  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */
    sprintf(soap->id, soap->dime_id_format, 0);
    soap->dime.id = soap->id;
    if (soap->local_namespaces)
    { if (soap->local_namespaces[0].out)
        soap->dime.type = (char*)soap->local_namespaces[0].out;
      else
        soap->dime.type = (char*)soap->local_namespaces[0].ns;
    }
    soap->dime.options = NULL;
    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
    if (!soap->dime.first)
      soap->dime.flags |= SOAP_DIME_ME;
    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + (soap->dime.type ? ((strlen(soap->dime.type)+3)&(~3)) : 0);
  }
  if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);
#endif
  soap->part = SOAP_END_ENVELOPE;
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x5749(%rip), %rsi      # 0x39d40
callq 0x24680
cmpl $0x0, %eax
je 0x34613
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x34806
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x347a8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x347a8
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x347a8
movq -0x10(%rbp), %rax
movq 0xc170(%rax), %rcx
movq -0x10(%rbp), %rax
subq 0x1f290(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1f290(%rax)
movq -0x10(%rbp), %rdi
addq $0x1cd98, %rdi          # imm = 0x1CD98
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %edx, %edx
movb $0x0, %al
callq 0x3320
movq -0x10(%rbp), %rcx
addq $0x1cd98, %rcx          # imm = 0x1CD98
movq -0x10(%rbp), %rax
movq %rcx, 0x1f2b8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x346fb
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x346df
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1f2c0(%rax)
jmp 0x346f9
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1f2c0(%rax)
jmp 0x346fb
movq -0x10(%rbp), %rax
movq $0x0, 0x1f2c8(%rax)
movq -0x10(%rbp), %rax
movb $0x24, 0x1f2a8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1f2d8(%rax)
jne 0x34737
movq -0x10(%rbp), %rax
movsbl 0x1f2a8(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x1f2a8(%rax)
movq -0x10(%rbp), %rax
movq 0x1f2b8(%rax), %rdi
callq 0x3100
addq $0x3, %rax
andq $-0x4, %rax
addq $0xc, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1f2c0(%rax)
je 0x34783
movq -0x10(%rbp), %rax
movq 0x1f2c0(%rax), %rdi
callq 0x3100
addq $0x3, %rax
andq $-0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0x3478b
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x3478b
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
addq 0xc170(%rax), %rcx
movq %rcx, 0xc170(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x347f2
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x347f2
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
subq 0x1f290(%rax), %rdx
andq $0x3, %rdx
leaq 0x4b99(%rip), %rsi      # 0x39381
callq 0x16bc0
movl %eax, -0x4(%rbp)
jmp 0x34806
movq -0x10(%rbp), %rax
movw $0x8, 0x1e5f0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop