#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 */

/* Variables and functions */
int /*<<< orphan*/ UpnpAsyncResponse_DONE(void *, char *);
int /*<<< orphan*/ UpnpAsyncResponse_OUT(void *, char *, char *,
                                         int /*<<< orphan*/, int, int);
int /*<<< orphan*/ UpnpAsyncResponse_START(void *, char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, unsigned int,
                          unsigned int, char *);
void UpnpContentDirectory_Browse(void *upnptoken, char *ObjectID,
                                 char *BrowseFlag, char *Filter,
                                 unsigned int StartingIndex,
                                 unsigned int RequestedCount,
                                 char *SortCriteria) {
  printf("Invoke: UpnpContentDirectory_Browse(%s,%s,%s,%u,%u,%s);\r\n",
         ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount,
         SortCriteria);
  UpnpAsyncResponse_START(upnptoken, "Browse",
                          "urn:schemas-upnp-org:service:ContentDirectory:1");
  UpnpAsyncResponse_OUT(upnptoken, "Result", "", 0, 1, 1);
  UpnpAsyncResponse_OUT(upnptoken, "NumberReturned", "", 0, 1, 1);
  UpnpAsyncResponse_OUT(upnptoken, "TotalMatches", "", 0, 1, 1);
  UpnpAsyncResponse_OUT(upnptoken, "UpdateID", "", 0, 1, 1);
  UpnpAsyncResponse_DONE(upnptoken, "Browse");
}


x86 assembly (clang, -O0):
<UpnpContentDirectory_Browse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    0x10(%rbp),%rax
lea    0xe7d(%rip),%rdi
mov    %rax,(%rsp)
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
lea    0xea3(%rip),%rdx
call   1060 <UpnpAsyncResponse_START@plt>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
lea    0xe84(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1040 <UpnpAsyncResponse_OUT@plt>
mov    -0x8(%rbp),%rdi
lea    0xea8(%rip),%rsi
lea    0xe62(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1040 <UpnpAsyncResponse_OUT@plt>
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
lea    0xe40(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1040 <UpnpAsyncResponse_OUT@plt>
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
lea    0xe1e(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1040 <UpnpAsyncResponse_OUT@plt>
mov    -0x8(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1050 <UpnpAsyncResponse_DONE@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpContentDirectory_Browse>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x30(%rsp),%rax
mov    %rax,(%rsp)
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%r14
lea    0xed2(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <UpnpAsyncResponse_START@plt>
lea    0xef0(%rip),%rsi
lea    0xeb1(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <UpnpAsyncResponse_OUT@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <UpnpAsyncResponse_OUT@plt>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <UpnpAsyncResponse_OUT@plt>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <UpnpAsyncResponse_OUT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <UpnpAsyncResponse_DONE@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Invoke: UpnpContentDirectory_Browse(%s,%s,%s,%u,%u,%s);\0D\0A\00"
@.str.1 = [7 x i8] c"Browse\00"
@.str.2 = [48 x i8] c"urn:schemas-upnp-org:service:ContentDirectory:1\00"
@.str.3 = [7 x i8] c"Result\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [15 x i8] c"NumberReturned\00"
@.str.6 = [13 x i8] c"TotalMatches\00"
@.str.7 = [9 x i8] c"UpdateID\00"
define void @UpnpContentDirectory_Browse(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i8* %6, i8** %14
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i8*, i8** %11
%18 = load i32, i32* %12
%19 = load i32, i32* %13
%20 = load i8*, i8** %14
%21 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16, i8* %17, i32 %18, i32 %19, i8* %20)
%22 = load i8*, i8** %8
%23 = call i32 @UpnpAsyncResponse_START(i8* %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%24 = load i8*, i8** %8
%25 = call i32 @UpnpAsyncResponse_OUT(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%26 = load i8*, i8** %8
%27 = call i32 @UpnpAsyncResponse_OUT(i8* %26, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%28 = load i8*, i8** %8
%29 = call i32 @UpnpAsyncResponse_OUT(i8* %28, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%30 = load i8*, i8** %8
%31 = call i32 @UpnpAsyncResponse_OUT(i8* %30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%32 = load i8*, i8** %8
%33 = call i32 @UpnpAsyncResponse_DONE(i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"Invoke: UpnpContentDirectory_Browse(%s,%s,%s,%u,%u,%s);\0D\0A\00"
@.str.1 = [7 x i8] c"Browse\00"
@.str.2 = [48 x i8] c"urn:schemas-upnp-org:service:ContentDirectory:1\00"
@.str.3 = [7 x i8] c"Result\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [15 x i8] c"NumberReturned\00"
@.str.6 = [13 x i8] c"TotalMatches\00"
@.str.7 = [9 x i8] c"UpdateID\00"
define void @UpnpContentDirectory_Browse(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5, i8* %6) {
%8 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3, i32 %4, i32 %5, i8* %6)
%9 = tail call i32 @UpnpAsyncResponse_START(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @UpnpAsyncResponse_OUT(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%11 = tail call i32 @UpnpAsyncResponse_OUT(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%12 = tail call i32 @UpnpAsyncResponse_OUT(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%13 = tail call i32 @UpnpAsyncResponse_OUT(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 1)
%14 = tail call i32 @UpnpAsyncResponse_DONE(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}