#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*/ sprintf(char *, char *, char *);
int strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int i = 0;
  int j = 0;
  int iLen = 0;
  int iData = 0;
  char hex[5];
  if (argc < 2)
    return 0;
  for (j = 1; j < argc; j++) {
    sprintf(hex, "0x%s", argv[j]);
    iData = strtol(hex, NULL, 16);
    if (iData < 30)
      printf(". ");
    else
      printf("%c ", iData);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1178 <main+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1212 <main+0xe2>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11fd <main+0xcd>
lea    -0x25(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe5e(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x25(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1e,-0x20(%rbp)
jge    11d9 <main+0xa9>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ea <main+0xba>
mov    -0x20(%rbp),%esi
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ef <main+0xbf>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117f <main+0x4f>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     11e0 <main+0xa0>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%ebp
mov    $0x1,%r12d
lea    0xe9a(%rip),%r14
lea    0x3(%rsp),%rbx
lea    0xe96(%rip),%r13
jmp    1195 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    %r12,%rbp
je     11c8 <main+0x88>
mov    (%r15,%r12,8),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <strtol@plt>
cmp    $0x1d,%eax
jg     1180 <main+0x40>
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    118c <main+0x4c>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"0x%s\00"
@.str.1 = [3 x i8] c". \00"
@.str.2 = [4 x i8] c"%c \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %24, label %6
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %19
%9 = phi i64 [ 1, %6 ], [ %20, %19 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @strtol(i8* nocapture %4, i32* null, i32 16)
%14 = icmp slt i32 %13, 30
br i1 %14, label %15, label %17
15: ; preds = %8
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %8
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %19
19: ; preds = %15, %17
%20 = add nuw nsw i64 %9, 1
%21 = icmp eq i64 %20, %7
br i1 %21, label %22, label %8
22: ; preds = %19
%23 = tail call i32 @putchar(i32 10)
br label %24
24: ; preds = %2, %22
ret i32 0
}