#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*/ printf(char *, ...);
int /*<<< orphan*/ strcpy_argv(char *, char *);
int /*<<< orphan*/ strcpy_my(char *, char *);
void arr_ops(char **array, int argc, char **argv) {
  int i = 0;
  int j = 0;
  char tmp[100];
  for (i = 0; i < argc; i++) {
    printf("* ( argv + ( i = %d ) ) = '%s' _whole string_;\n\n", i,
           *(argv + i));
    j = 0;
    while (*(*(argv + i) + j) != '\0') {
      printf("* ( * ( argv + i ) + j ) = '%c';\n", *(*(argv + i) + j));
      j++;
    }
    strcpy_argv(tmp, *(argv + i));
    printf("getted string tmp:'%s'\n", tmp);
    printf("string * ( arr + i ):'%s'\n", *(array + i));
    strcpy_my(*(array + i), tmp);
    printf("-------------------\n");
  }
}


x86 assembly (clang, -O0):
<arr_ops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1253 <arr_ops+0x123>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11d8 <arr_ops+0xa8>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118b <arr_ops+0x5b>
lea    -0x90(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy_argv@plt>
lea    -0x90(%rbp),%rsi
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <strcpy_my@plt>
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115b <arr_ops+0x2b>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arr_ops>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
test   %esi,%esi
jle    1223 <arr_ops+0xe3>
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %esi,%eax
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%r12
lea    0xec2(%rip),%r13
xor    %ebp,%ebp
jmp    11ce <arr_ops+0x8e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
call   1050 <strcpy_argv@plt>
lea    0xec4(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14,%rbp,8),%rsi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14,%rbp,8),%rdi
mov    %r12,%rsi
call   1060 <strcpy_my@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%rbp
cmp    0x8(%rsp),%rbp
je     1223 <arr_ops+0xe3>
mov    (%rbx,%rbp,8),%rdx
lea    0xe27(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
mov    (%rsi),%al
test   %al,%al
je     1180 <arr_ops+0x40>
mov    $0x1,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
movzbl (%rsi,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
jne    1200 <arr_ops+0xc0>
jmp    1180 <arr_ops+0x40>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"* ( argv + ( i = %d ) ) = '%s' _whole string_;\0A\0A\00"
@.str.1 = [34 x i8] c"* ( * ( argv + i ) + j ) = '%c';\0A\00"
@.str.2 = [24 x i8] c"getted string tmp:'%s'\0A\00"
@.str.3 = [27 x i8] c"string * ( arr + i ):'%s'\0A\00"
@.str.4 = [21 x i8] c"-------------------\0A\00"
define void @arr_ops(i8** %0, i32 %1, i8** %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca [100 x i8]
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %7
br label %10
10: ; preds = %72, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %75
14: ; preds = %10
%15 = load i32, i32* %7
%16 = load i8**, i8*** %6
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %15, i8* %20)
store i32 0, i32* %8
br label %22
22: ; preds = %34, %14
%23 = load i8**, i8*** %6
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %48
34: ; preds = %22
%35 = load i8**, i8*** %6
%36 = load i32, i32* %7
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %39, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %8
%47 = add nsw i32 %46, 1
store i32 %47, i32* %8
br label %22
48: ; preds = %22
%49 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%50 = load i8**, i8*** %6
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 @strcpy_argv(i8* %49, i8* %54)
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %56)
%58 = load i8**, i8*** %4
%59 = load i32, i32* %7
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %62)
%64 = load i8**, i8*** %4
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8*, i8** %64, i64 %66
%68 = load i8*, i8** %67
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%70 = call i32 @strcpy_my(i8* %68, i8* %69)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %72
72: ; preds = %48
%73 = load i32, i32* %7
%74 = add nsw i32 %73, 1
store i32 %74, i32* %7
br label %10
75: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"* ( argv + ( i = %d ) ) = '%s' _whole string_;\0A\0A\00"
@.str.1 = [34 x i8] c"* ( * ( argv + i ) + j ) = '%c';\0A\00"
@.str.2 = [24 x i8] c"getted string tmp:'%s'\0A\00"
@.str.3 = [27 x i8] c"string * ( arr + i ):'%s'\0A\00"
@str = [20 x i8] c"-------------------\00"
define void @arr_ops(i8** nocapture %0, i32 %1, i8** nocapture %2) {
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %40
7: ; preds = %3
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %7, %28
%10 = phi i64 [ 0, %7 ], [ %38, %28 ]
%11 = getelementptr inbounds i8*, i8** %2, i64 %10
%12 = load i8*, i8** %11
%13 = trunc i64 %10 to i32
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %12)
%15 = load i8*, i8** %11
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %28, label %18
18: ; preds = %9, %18
%19 = phi i64 [ %23, %18 ], [ 0, %9 ]
%20 = phi i8 [ %26, %18 ], [ %16, %9 ]
%21 = sext i8 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = add nuw i64 %19, 1
%24 = load i8*, i8** %11
%25 = getelementptr inbounds i8, i8* %24, i64 %23
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 0
br i1 %27, label %28, label %18
28: ; preds = %18, %9
%29 = phi i8* [ %15, %9 ], [ %24, %18 ]
%30 = call i32 @strcpy_argv(i8* %5, i8* %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%32 = getelementptr inbounds i8*, i8** %0, i64 %10
%33 = load i8*, i8** %32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %33)
%35 = load i8*, i8** %32
%36 = call i32 @strcpy_my(i8* %35, i8* %5)
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%38 = add nuw nsw i64 %10, 1
%39 = icmp eq i64 %38, %8
br i1 %39, label %40, label %9
40: ; preds = %28, %3
ret void
}