#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 createQueryURL(char const *, int, char const *, char *, int, char const **,
                   char const **, char **);
int createUrlForRENAME(const char *host, int nnPort, const char *srcpath,
                       const char *destpath, const char *user, char **url) {
  const char *paraNames[2], *paraValues[2];
  paraNames[0] = "destination";
  paraNames[1] = "user.name";
  paraValues[0] = destpath;
  paraValues[1] = user;
  return createQueryURL(host, nnPort, srcpath, "RENAME", 2, paraNames,
                        paraValues, url);
}


x86 assembly (clang, -O0):
<createUrlForRENAME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    -0x40(%rbp),%r9
lea    -0x50(%rbp),%r10
mov    -0x30(%rbp),%rax
lea    0xea3(%rip),%rcx
mov    $0x2,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <createQueryURL@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createUrlForRENAME>:
sub    $0x28,%rsp
mov    %r9,%r10
lea    0xee2(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xee2(%rip),%rax
mov    %rax,0x18(%rsp)
mov    %rcx,(%rsp)
mov    %r8,0x8(%rsp)
mov    %rsp,%rax
lea    0xed4(%rip),%rcx
lea    0x10(%rsp),%r9
mov    $0x2,%r8d
push   %r10
push   %rax
call   1030 <createQueryURL@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"destination\00"
@.str.1 = [10 x i8] c"user.name\00"
@.str.2 = [7 x i8] c"RENAME\00"
define i32 @createUrlForRENAME(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8** %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8**
%13 = alloca [2 x i8*]
%14 = alloca [2 x i8*]
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8** %5, i8*** %12
%15 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %15
%16 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %16
%17 = load i8*, i8** %10
%18 = getelementptr inbounds [2 x i8*], [2 x i8*]* %14, i64 0, i64 0
store i8* %17, i8** %18
%19 = load i8*, i8** %11
%20 = getelementptr inbounds [2 x i8*], [2 x i8*]* %14, i64 0, i64 1
store i8* %19, i8** %20
%21 = load i8*, i8** %7
%22 = load i32, i32* %8
%23 = load i8*, i8** %9
%24 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%25 = getelementptr inbounds [2 x i8*], [2 x i8*]* %14, i64 0, i64 0
%26 = load i8**, i8*** %12
%27 = call i32 @createQueryURL(i8* %21, i32 %22, i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 2, i8** %24, i8** %25, i8** %26)
ret i32 %27
}

LLVM IR (-O2):
@.str = [12 x i8] c"destination\00"
@.str.1 = [10 x i8] c"user.name\00"
@.str.2 = [7 x i8] c"RENAME\00"
define i32 @createUrlForRENAME(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8** %5) {
%7 = alloca [2 x i8*]
%8 = alloca [2 x i8*]
%9 = bitcast [2 x i8*]* %7 to i8*
%10 = bitcast [2 x i8*]* %8 to i8*
%11 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [2 x i8*], [2 x i8*]* %8, i64 0, i64 0
store i8* %3, i8** %13
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %8, i64 0, i64 1
store i8* %4, i8** %14
%15 = call i32 @createQueryURL(i8* %0, i32 %1, i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 2, i8** %11, i8** %13, i8** %5)
ret i32 %15
}