#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*/ strcpy(char *, char *);
void update_tokens(char **tok, char **prev) {
  int i;
  for (i = 0; i < 6; ++i) {
    strcpy(prev[i], tok[i]);
  }
}


x86 assembly (clang, -O0):
<update_tokens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    115c <update_tokens+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <update_tokens+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_tokens>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
mov    (%rbx),%rsi
call   1030 <strcpy@plt>
mov    0x8(%r14),%rdi
mov    0x8(%rbx),%rsi
call   1030 <strcpy@plt>
mov    0x10(%r14),%rdi
mov    0x10(%rbx),%rsi
call   1030 <strcpy@plt>
mov    0x18(%r14),%rdi
mov    0x18(%rbx),%rsi
call   1030 <strcpy@plt>
mov    0x20(%r14),%rdi
mov    0x20(%rbx),%rsi
call   1030 <strcpy@plt>
mov    0x28(%r14),%rdi
mov    0x28(%rbx),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @update_tokens(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i32
store i8** %0, i8*** %3
store i8** %1, i8*** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 6
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i8**, i8*** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %10, i64 %12
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @strcpy(i8* %14, i8* %19)
br label %21
21: ; preds = %9
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @update_tokens(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8*, i8** %0
%5 = tail call i32 @strcpy(i8* %3, i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %0, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcpy(i8* %7, i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %0, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @strcpy(i8* %12, i8* %14)
%16 = getelementptr inbounds i8*, i8** %1, i64 3
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8*, i8** %0, i64 3
%19 = load i8*, i8** %18
%20 = tail call i32 @strcpy(i8* %17, i8* %19)
%21 = getelementptr inbounds i8*, i8** %1, i64 4
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8*, i8** %0, i64 4
%24 = load i8*, i8** %23
%25 = tail call i32 @strcpy(i8* %22, i8* %24)
%26 = getelementptr inbounds i8*, i8** %1, i64 5
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8*, i8** %0, i64 5
%29 = load i8*, i8** %28
%30 = tail call i32 @strcpy(i8* %27, i8* %29)
ret void
}