#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 */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  int i;
  i = 1;
  while (i < argc) {
    while (*argv[i]) {
      if (*argv[i] >= 'A' && *argv[i] <= 'z') {
        setlocale(LC_ALL, "");
        printf("%lc", (wint_t)(*argv[i] + 65248));
      } else
        printf("%c", *argv[i]);
      argv[i]++;
    }
    i++;
  }
  printf("\n");
  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   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1214 <main+0xf4>
jmp    114e <main+0x2e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmpb   $0x0,(%rax)
je     1206 <main+0xe6>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     11d0 <main+0xb0>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     11d0 <main+0xb0>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%esi
add    $0xfee0,%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ed <main+0xcd>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%esi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
add    $0x1,%rdx
mov    %rdx,(%rax,%rcx,8)
jmp    114e <main+0x2e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     11db <main+0xab>
mov    %rsi,%r13
mov    %edi,%r12d
mov    $0x1,%ebx
mov    0x2e8a(%rip),%rbp
lea    0xea6(%rip),%r14
lea    0xe9c(%rip),%r15
jmp    1179 <main+0x49>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %r12,%rbx
je     11db <main+0xab>
mov    0x0(%r13,%rbx,8),%rax
mov    (%rax),%al
jmp    11aa <main+0x7a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
mov    0x0(%r13,%rbx,8),%rax
lea    0x1(%rax),%rcx
mov    %rcx,0x0(%r13,%rbx,8)
movzbl 0x1(%rax),%eax
test   %al,%al
je     1170 <main+0x40>
lea    -0x41(%rax),%ecx
cmp    $0x39,%cl
ja     1190 <main+0x60>
mov    0x0(%rbp),%edi
mov    %r14,%rsi
call   1050 <setlocale@plt>
mov    0x0(%r13,%rbx,8),%rax
movsbl (%rax),%esi
add    $0xfee0,%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1198 <main+0x68>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%lc\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %66, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %69
11: ; preds = %7
br label %12
12: ; preds = %59, %11
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp ne i8 %18, 0
br i1 %19, label %20, label %66
20: ; preds = %12
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sge i32 %27, 65
br i1 %28, label %29, label %50
29: ; preds = %20
%30 = load i8**, i8*** %5
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8*, i8** %30, i64 %32
%34 = load i8*, i8** %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp sle i32 %36, 122
br i1 %37, label %38, label %50
38: ; preds = %29
%39 = load i32, i32* @LC_ALL
%40 = call i32 @setlocale(i32 %39, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%41 = load i8**, i8*** %5
%42 = load i32, i32* %6
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = add nsw i32 %47, 65248
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %48)
br label %59
50: ; preds = %29, %20
%51 = load i8**, i8*** %5
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8*, i8** %51, i64 %53
%55 = load i8*, i8** %54
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %50, %38
%60 = load i8**, i8*** %5
%61 = load i32, i32* %6
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %60, i64 %62
%64 = load i8*, i8** %63
%65 = getelementptr inbounds i8, i8* %64, i32 1
store i8* %65, i8** %63
br label %12
66: ; preds = %12
%67 = load i32, i32* %6
%68 = add nsw i32 %67, 1
store i32 %68, i32* %6
br label %7
69: ; preds = %7
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%lc\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %35
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %32
%7 = phi i64 [ 1, %4 ], [ %33, %32 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %32, label %12
12: ; preds = %6, %27
%13 = phi i8 [ %30, %27 ], [ %10, %6 ]
%14 = add i8 %13, -65
%15 = icmp ult i8 %14, 58
br i1 %15, label %16, label %24
16: ; preds = %12
%17 = load i32, i32* @LC_ALL
%18 = tail call i32 @setlocale(i32 %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %8
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = add nsw i32 %21, 65248
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %27
24: ; preds = %12
%25 = sext i8 %13 to i32
%26 = tail call i32 @putchar(i32 %25)
br label %27
27: ; preds = %24, %16
%28 = load i8*, i8** %8
%29 = getelementptr inbounds i8, i8* %28, i64 1
store i8* %29, i8** %8
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, 0
br i1 %31, label %32, label %12
32: ; preds = %27, %6
%33 = add nuw nsw i64 %7, 1
%34 = icmp eq i64 %33, %5
br i1 %34, label %35, label %6
35: ; preds = %32, %2
%36 = tail call i32 @putchar(i32 10)
ret i32 0
}