#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*/ strcat(char *, char *);
void addspace(char *buf[]) {
  int i;
  char space[] = "  ";
  for (i = 0; i < 9; i++) {
    strcat(buf[i], space);
  }
}


x86 assembly (clang, -O0):
<addspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xedd(%rip),%ax
mov    %ax,-0xf(%rbp)
mov    0xed5(%rip),%al
mov    %al,-0xd(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    1164 <addspace+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0xf(%rbp),%rsi
call   1030 <strcat@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <addspace+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addspace>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movb   $0x0,0x6(%rsp)
movw   $0x2020,0x4(%rsp)
mov    (%rdi),%rdi
lea    0x4(%rsp),%r14
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x8(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x10(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x18(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x20(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x28(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x30(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x38(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    0x40(%rbx),%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.addspace.space = [3 x i8] c" \00"
define void @addspace(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca [3 x i8]
store i8** %0, i8*** %2
%5 = bitcast [3 x i8]* %4 to i8*
store i32 0, i32* %3
br label %6
6: ; preds = %17, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i8**, i8*** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %10, i64 %12
%14 = load i8*, i8** %13
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%16 = call i32 @strcat(i8* %14, i8* %15)
br label %17
17: ; preds = %9
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@__const.addspace.space = [3 x i8] c" \00"
define void @addspace(i8** nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = load i8*, i8** %0
%5 = call i32 @strcat(i8* %4, i8* %3)
%6 = getelementptr inbounds i8*, i8** %0, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @strcat(i8* %7, i8* %3)
%9 = getelementptr inbounds i8*, i8** %0, i64 2
%10 = load i8*, i8** %9
%11 = call i32 @strcat(i8* %10, i8* %3)
%12 = getelementptr inbounds i8*, i8** %0, i64 3
%13 = load i8*, i8** %12
%14 = call i32 @strcat(i8* %13, i8* %3)
%15 = getelementptr inbounds i8*, i8** %0, i64 4
%16 = load i8*, i8** %15
%17 = call i32 @strcat(i8* %16, i8* %3)
%18 = getelementptr inbounds i8*, i8** %0, i64 5
%19 = load i8*, i8** %18
%20 = call i32 @strcat(i8* %19, i8* %3)
%21 = getelementptr inbounds i8*, i8** %0, i64 6
%22 = load i8*, i8** %21
%23 = call i32 @strcat(i8* %22, i8* %3)
%24 = getelementptr inbounds i8*, i8** %0, i64 7
%25 = load i8*, i8** %24
%26 = call i32 @strcat(i8* %25, i8* %3)
%27 = getelementptr inbounds i8*, i8** %0, i64 8
%28 = load i8*, i8** %27
%29 = call i32 @strcat(i8* %28, i8* %3)
ret void
}