#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[]) {
  int i, j;
  int index = 0;
  static char name[100];
  if (argc == 1) {
    printf("Hello, everyone.\n");
    return 0;
  }
  for (i = 1; i < argc; i++) {
    for (j = 0; argv[i][j] != '\0'; j++) {
      if (index > 98) {
        printf("Ê¸»úÎó¤¬Ä¹¤¹¤®¤Þ¤¹\n");
        return 0;
      }
      name[index++] = argv[i][j];
    }
    if (i == argc - 1)
      name[index] = '\0';
    else
      name[index++] = ' ';
  }
  printf("Hello, %s.\n", name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1151 <main+0x41>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1252 <main+0x142>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1236 <main+0x126>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11e5 <main+0xd5>
cmpl   $0x62,-0x1c(%rbp)
jle    11ac <main+0x9c>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1252 <main+0x142>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %eax,%rcx
lea    0x2e6c(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116b <main+0x5b>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    120a <main+0xfa>
movslq -0x1c(%rbp),%rcx
lea    0x2e3f(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
jmp    1223 <main+0x113>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %eax,%rcx
lea    0x2e21(%rip),%rax
movb   $0x20,(%rax,%rcx,1)
jmp    1228 <main+0x118>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1158 <main+0x48>
lea    0xdfb(%rip),%rdi
lea    0x2dfc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    1135 <main+0x15>
lea    0xf01(%rip),%rdi
jmp    11ee <main+0xce>
jle    11d0 <main+0xb0>
lea    -0x1(%rdi),%r8d
mov    %edi,%r9d
xor    %r10d,%r10d
mov    $0x1,%r14d
lea    0x2eee(%rip),%r11
jmp    1186 <main+0x66>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %ebx,%r10d
xor    %eax,%eax
cmp    %r8,%r14
setne  %al
mov    %eax,%ecx
shl    $0x5,%cl
add    %r10d,%eax
movslq %r10d,%rdx
mov    %cl,(%rdx,%r11,1)
add    $0x1,%r14
mov    %eax,%r10d
cmp    %r9,%r14
je     11d0 <main+0xb0>
mov    (%rsi,%r14,8),%rax
mov    (%rax),%cl
test   %cl,%cl
je     1163 <main+0x43>
movslq %r10d,%rax
cmp    $0x64,%eax
mov    $0x63,%edi
cmovge %eax,%edi
sub    %eax,%edi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %rbx,%rdi
je     11e7 <main+0xc7>
lea    (%rax,%rbx,1),%rdx
mov    %cl,(%r11,%rdx,1)
mov    (%rsi,%r14,8),%rcx
movzbl 0x1(%rcx,%rbx,1),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    11b0 <main+0x90>
jmp    1160 <main+0x40>
lea    0xe29(%rip),%rdi
lea    0x2e62(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11f3 <main+0xd3>
lea    0xe1e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@main.name = internal global [100 x i8] zeroinitializer
@.str = [18 x i8] c"Hello, everyone.\0A\00"
@.str.1 = [38 x i8] c"\C3\8A\C2\B8\C2\BB\C3\BA\C3\8E\C3\B3\C2\A4\C2\AC\C3\84\C2\B9\C2\A4\C2\B9\C2\A4\C2\AE\C2\A4\C3\9E\C2\A4\C2\B9\0A\00"
@.str.2 = [12 x i8] c"Hello, %s.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %73
13: ; preds = %2
store i32 1, i32* %6
br label %14
14: ; preds = %68, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %71
18: ; preds = %14
store i32 0, i32* %7
br label %19
19: ; preds = %50, %18
%20 = load i8**, i8*** %5
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %53
31: ; preds = %19
%32 = load i32, i32* %8
%33 = icmp sgt i32 %32, 98
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %73
36: ; preds = %31
%37 = load i8**, i8*** %5
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = load i32, i32* %7
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
%45 = load i8, i8* %44
%46 = load i32, i32* %8
%47 = add nsw i32 %46, 1
store i32 %47, i32* %8
%48 = sext i32 %46 to i64
%49 = getelementptr inbounds [100 x i8], [100 x i8]* @main.name, i64 0, i64 %48
store i8 %45, i8* %49
br label %50
50: ; preds = %36
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
br label %19
53: ; preds = %19
%54 = load i32, i32* %6
%55 = load i32, i32* %4
%56 = sub nsw i32 %55, 1
%57 = icmp eq i32 %54, %56
br i1 %57, label %58, label %62
58: ; preds = %53
%59 = load i32, i32* %8
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [100 x i8], [100 x i8]* @main.name, i64 0, i64 %60
store i8 0, i8* %61
br label %67
62: ; preds = %53
%63 = load i32, i32* %8
%64 = add nsw i32 %63, 1
store i32 %64, i32* %8
%65 = sext i32 %63 to i64
%66 = getelementptr inbounds [100 x i8], [100 x i8]* @main.name, i64 0, i64 %65
store i8 32, i8* %66
br label %67
67: ; preds = %62, %58
br label %68
68: ; preds = %67
%69 = load i32, i32* %6
%70 = add nsw i32 %69, 1
store i32 %70, i32* %6
br label %14
71: ; preds = %14
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @main.name, i64 0, i64 0))
store i32 0, i32* %3
br label %73
73: ; preds = %71, %34, %11
%74 = load i32, i32* %3
ret i32 %74
}

LLVM IR (-O2):
@main.name = internal global [100 x i8] zeroinitializer
@.str.2 = [12 x i8] c"Hello, %s.\0A\00"
@str = [37 x i8] c"\C3\8A\C2\B8\C2\BB\C3\BA\C3\8E\C3\B3\C2\A4\C2\AC\C3\84\C2\B9\C2\A4\C2\B9\C2\A4\C2\AE\C2\A4\C3\9E\C2\A4\C2\B9\00"
@str.3 = [17 x i8] c"Hello, everyone.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %52
6: ; preds = %4
%7 = add nsw i32 %0, -1
%8 = zext i32 %7 to i64
%9 = zext i32 %0 to i64
br label %12
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
br label %54
12: ; preds = %6, %41
%13 = phi i64 [ 1, %6 ], [ %50, %41 ]
%14 = phi i32 [ 0, %6 ], [ %47, %41 ]
%15 = getelementptr inbounds i8*, i8** %1, i64 %13
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %41, label %19
19: ; preds = %12
%20 = sext i32 %14 to i64
%21 = call i32 @llvm.smax.i32(i32 %14, i32 99)
%22 = sub i32 %21, %14
%23 = zext i32 %22 to i64
br label %24
24: ; preds = %19, %31
%25 = phi i64 [ 0, %19 ], [ %34, %31 ]
%26 = phi i64 [ %20, %19 ], [ %32, %31 ]
%27 = phi i8 [ %17, %19 ], [ %37, %31 ]
%28 = icmp eq i64 %25, %23
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
br label %54
31: ; preds = %24
%32 = add nsw i64 %26, 1
%33 = getelementptr inbounds [100 x i8], [100 x i8]* @main.name, i64 0, i64 %26
store i8 %27, i8* %33
%34 = add nuw nsw i64 %25, 1
%35 = load i8*, i8** %15
%36 = getelementptr inbounds i8, i8* %35, i64 %34
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 0
br i1 %38, label %39, label %24
39: ; preds = %31
%40 = trunc i64 %32 to i32
br label %41
41: ; preds = %39, %12
%42 = phi i32 [ %14, %12 ], [ %40, %39 ]
%43 = icmp eq i64 %13, %8
%44 = select i1 %43, i8 0, i8 32
%45 = xor i1 %43, true
%46 = zext i1 %45 to i32
%47 = add nsw i32 %42, %46
%48 = sext i32 %42 to i64
%49 = getelementptr inbounds [100 x i8], [100 x i8]* @main.name, i64 0, i64 %48
store i8 %44, i8* %49
%50 = add nuw nsw i64 %13, 1
%51 = icmp eq i64 %50, %9
br i1 %51, label %52, label %12
52: ; preds = %41, %4
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @main.name, i64 0, i64 0))
br label %54
54: ; preds = %52, %29, %10
ret i32 0
}