#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 main(int argc, char *argv[]) {
  char *arr1[10];
  int a = 0;
  a = argc;
  *argv++;
  while (a--) {
    printf(" * argv = %s;\n", *argv);
    *argv++;
  }
  argv -= argc;
  a = argc;
  while (a-- > 1) {
    printf("* * argv = %c;\n", **argv);
    *argv++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x64(%rbp)
cmp    $0x0,%eax
je     1179 <main+0x69>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    113f <main+0x2f>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x64(%rbp)
cmp    $0x1,%eax
jle    11d6 <main+0xc6>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1199 <main+0x89>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
je     119f <main+0x8f>
mov    %rsi,%r13
mov    %edi,%r15d
mov    %edi,%r12d
lea    0x0(,%r12,8),%rbp
lea    0xec5(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    0x8(%r13,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xfffffffffffffff8,%rbp
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <main+0x30>
cmp    $0x2,%r12d
jl     119f <main+0x8f>
sub    %rbp,%r13
add    $0x8,%r13
add    $0x1,%r15d
lea    0xe9b(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x8,%r13
add    $0xffffffff,%r15d
cmp    $0x2,%r15d
ja     1180 <main+0x70>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c" * argv = %s;\0A\00"
@.str.1 = [16 x i8] c"* * argv = %c;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8*]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%8 = load i32, i32* %4
store i32 %8, i32* %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i32 1
store i8** %10, i8*** %5
%11 = load i8*, i8** %9
br label %12
12: ; preds = %16, %2
%13 = load i32, i32* %7
%14 = add nsw i32 %13, -1
store i32 %14, i32* %7
%15 = icmp ne i32 %13, 0
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i32 1
store i8** %21, i8*** %5
%22 = load i8*, i8** %20
br label %12
23: ; preds = %12
%24 = load i32, i32* %4
%25 = load i8**, i8*** %5
%26 = sext i32 %24 to i64
%27 = sub i64 0, %26
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
store i8** %28, i8*** %5
%29 = load i32, i32* %4
store i32 %29, i32* %7
br label %30
30: ; preds = %34, %23
%31 = load i32, i32* %7
%32 = add nsw i32 %31, -1
store i32 %32, i32* %7
%33 = icmp sgt i32 %31, 1
br i1 %33, label %34, label %43
34: ; preds = %30
%35 = load i8**, i8*** %5
%36 = load i8*, i8** %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i32 1
store i8** %41, i8*** %5
%42 = load i8*, i8** %40
br label %30
43: ; preds = %30
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
@.str = [15 x i8] c" * argv = %s;\0A\00"
@.str.1 = [16 x i8] c"* * argv = %c;\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %29, label %4
4: ; preds = %2, %4
%5 = phi i8** [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %8, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8*, i8** %5, i64 1
%8 = add nsw i32 %6, -1
%9 = load i8*, i8** %7
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = icmp eq i32 %8, 0
br i1 %11, label %12, label %4
12: ; preds = %4
%13 = icmp sgt i32 %0, 1
br i1 %13, label %14, label %29
14: ; preds = %12
%15 = getelementptr inbounds i8*, i8** %5, i64 2
%16 = zext i32 %0 to i64
%17 = sub nsw i64 0, %16
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
br label %19
19: ; preds = %14, %19
%20 = phi i32 [ %22, %19 ], [ %0, %14 ]
%21 = phi i8** [ %27, %19 ], [ %18, %14 ]
%22 = add nsw i32 %20, -1
%23 = load i8*, i8** %21
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds i8*, i8** %21, i64 1
%28 = icmp ugt i32 %20, 2
br i1 %28, label %19, label %29
29: ; preds = %19, %2, %12
ret i32 0
}