#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 */
char *strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
void build_index_url(const char *domain, char *index_url) {
  char http[200] = "http://";
  char index[] = "index.html";
  strcpy(index_url, strcat((strcat(http, domain)), index));
}


x86 assembly (clang, -O0):
<build_index_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0xc8,%edx
call   1040 <memcpy@plt>
mov    0xf66(%rip),%rax
mov    %rax,-0xeb(%rbp)
mov    0xf60(%rip),%ax
mov    %ax,-0xe3(%rbp)
mov    0xf55(%rip),%al
mov    %al,-0xe1(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0xf8(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
mov    %rax,%rdi
lea    -0xeb(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0xf8(%rbp),%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_index_url>:
push   %r15
push   %r14
push   %rbx
sub    $0xe0,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeb7(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    $0xc8,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
movabs $0x74682e7865646e69,%rax
2e 68 74
mov    %rax,(%rsp)
movl   $0x6c6d74,0x7(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.build_index_url.http = [200 x i8] c"http://\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.build_index_url.index = [11 x i8] c"index.html\00"
define void @build_index_url(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [200 x i8]
%6 = alloca [11 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = bitcast [200 x i8]* %5 to i8*
%8 = bitcast [11 x i8]* %6 to i8*
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%11 = load i8*, i8** %3
%12 = call i8* @strcat(i8* %10, i8* %11)
%13 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%14 = call i8* @strcat(i8* %12, i8* %13)
%15 = call i32 @strcpy(i8* %9, i8* %14)
ret void
}

LLVM IR (-O2):
@__const.build_index_url.http = [200 x i8] c"http://\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.build_index_url.index = [11 x i8] c"index.html\00"
define void @build_index_url(i8* nocapture %0, i8* %1) {
%3 = alloca [200 x i8]
%4 = alloca [11 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%7 = call i8* @strcat(i8* %5, i8* dereferenceable(1) %0)
%8 = call i8* @strcat(i8* %5, i8* %6)
%9 = call i32 @strcpy(i8* %1, i8* %5)
ret void
}