#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ xml_desc;
struct upnphttp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BuildResp_upnphttp(struct upnphttp *, char const *, int);
int /*<<< orphan*/ CloseSocket_upnphttp(struct upnphttp *);
int /*<<< orphan*/ SendResp_upnphttp(struct upnphttp *);
void sendDummyDesc(struct upnphttp *h) {
  static const char xml_desc[] =
      "<?xml version=\"1.0\"?>\n"
      "<scpd xmlns=\"urn:schemas-upnp-org:service-1-0\">"
      " <specVersion>"
      "    <major>1</major>"
      "    <minor>0</minor>"
      "  </specVersion>"
      "  <actionList />"
      "  <serviceStateTable />"
      "</scpd>";
  BuildResp_upnphttp(h, xml_desc, sizeof(xml_desc) - 1);
  SendResp_upnphttp(h);
  CloseSocket_upnphttp(h);
}


x86 assembly (clang, -O0):
<sendDummyDesc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0xb9,%edx
call   1040 <BuildResp_upnphttp@plt>
mov    -0x8(%rbp),%rdi
call   1030 <SendResp_upnphttp@plt>
mov    -0x8(%rbp),%rdi
call   1050 <CloseSocket_upnphttp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendDummyDesc>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    $0xb9,%edx
call   1040 <BuildResp_upnphttp@plt>
mov    %rbx,%rdi
call   1030 <SendResp_upnphttp@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <CloseSocket_upnphttp@plt>

LLVM IR (-O0):
%struct.upnphttp = type { i32 }
@sendDummyDesc.xml_desc = internal constant [186 x i8] c"<?xml version=\221.0\22?>\0A<scpd xmlns=\22urn:schemas-upnp-org:service-1-0\22> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <actionList /> <serviceStateTable /></scpd>\00"
define void @sendDummyDesc(%struct.upnphttp* %0) {
%2 = alloca %struct.upnphttp*
store %struct.upnphttp* %0, %struct.upnphttp** %2
%3 = load %struct.upnphttp*, %struct.upnphttp** %2
%4 = call i32 @BuildResp_upnphttp(%struct.upnphttp* %3, i8* getelementptr inbounds ([186 x i8], [186 x i8]* @sendDummyDesc.xml_desc, i64 0, i64 0), i32 185)
%5 = load %struct.upnphttp*, %struct.upnphttp** %2
%6 = call i32 @SendResp_upnphttp(%struct.upnphttp* %5)
%7 = load %struct.upnphttp*, %struct.upnphttp** %2
%8 = call i32 @CloseSocket_upnphttp(%struct.upnphttp* %7)
ret void
}

LLVM IR (-O2):
%struct.upnphttp = type { i32 }
@sendDummyDesc.xml_desc = internal constant [186 x i8] c"<?xml version=\221.0\22?>\0A<scpd xmlns=\22urn:schemas-upnp-org:service-1-0\22> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <actionList /> <serviceStateTable /></scpd>\00"
define void @sendDummyDesc(%struct.upnphttp* %0) {
%2 = tail call i32 @BuildResp_upnphttp(%struct.upnphttp* %0, i8* getelementptr inbounds ([186 x i8], [186 x i8]* @sendDummyDesc.xml_desc, i64 0, i64 0), i32 185)
%3 = tail call i32 @SendResp_upnphttp(%struct.upnphttp* %0)
%4 = tail call i32 @CloseSocket_upnphttp(%struct.upnphttp* %0)
ret void
}