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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1179 <main+0x69>
jmp    1135 <main+0x25>
cmpl   $0x1,-0x8(%rbp)
jle    1174 <main+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%edx
lea    0xea2(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <main+0x25>
jmp    1179 <main+0x69>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1152 <main+0x42>
mov    %rsi,%rbx
mov    %edi,%r14d
add    $0x8,%rbx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%rax
movsbl (%rax),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <printf@plt>
lea    -0x1(%r14),%eax
add    $0x8,%rbx
cmp    $0x2,%r14d
mov    %eax,%r14d
ja     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [40 x i8] c"* ( ++ argv ) [ 0 ] = '%c'; argc = %d;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %23
8: ; preds = %2
br label %9
9: ; preds = %12, %8
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = load i32, i32* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %17, i32 %18)
%20 = load i32, i32* %4
%21 = add nsw i32 %20, -1
store i32 %21, i32* %4
br label %9
22: ; preds = %9
br label %23
23: ; preds = %22, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"* ( ++ argv ) [ 0 ] = '%c'; argc = %d;\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %0, %2 ]
%6 = phi i8** [ %7, %4 ], [ %1, %2 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %9, i32 %5)
%11 = add nsw i32 %5, -1
%12 = icmp ugt i32 %5, 2
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret i32 0
}