#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
unsigned int strlen(char *);
int main(int argc, char *argv[]) {
  unsigned x;
  unsigned y;
  unsigned c;
  if (argc < 2) {
    fprintf(stderr, "Usage: %s <string>\n", argv[0]);
    return (1);
  };
  c = 0;
  for (x = 1; x < argc; x++) {
    for (y = 0; y < strlen(argv[x]); y++) {
      if ((c)) {
        if (!(c % 10))
          printf(",\n");
        else
          printf(", ");
      };
      printf("0x%02X", argv[x][y]);
      c++;
    };
  };
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1178 <main+0x48>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1260 <main+0x130>
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    124b <main+0x11b>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jae    1238 <main+0x108>
cmpl   $0x0,-0x1c(%rbp)
je     1201 <main+0xd1>
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    11ee <main+0xbe>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11fc <main+0xcc>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1201 <main+0xd1>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1199 <main+0x69>
jmp    123d <main+0x10d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1186 <main+0x56>
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jge    1188 <main+0x38>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xe87(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%eax
jmp    125a <main+0x10a>
mov    %edi,%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%ebp
lea    0xe7c(%rip),%r14
xor    %r13d,%r13d
jmp    11b7 <main+0x67>
mov    0xc(%rsp),%r13d
add    %r15d,%r13d
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
je     124e <main+0xfe>
mov    (%rbx,%rbp,8),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
je     11a8 <main+0x58>
mov    %r13d,%r12d
xor    %r15d,%r15d
mov    %r13d,0xc(%rsp)
jmp    1219 <main+0xc9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xe2d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%rbx,%rbp,8),%rax
movsbl (%rax,%r15,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
add    $0x1,%r15
mov    (%rbx,%rbp,8),%rdi
call   1050 <strlen@plt>
mov    %eax,%eax
cmp    %rax,%r15
jae    11a0 <main+0x50>
mov    %r12d,%eax
add    %r15d,%eax
je     11ee <main+0x9e>
mov    %r13d,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
lea    (%r12,%r15,1),%ecx
add    %ecx,%eax
jne    11e0 <main+0x90>
lea    0xdd7(%rip),%rdi
call   1040 <puts@plt>
jmp    11ee <main+0x9e>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Usage: %s <string>\0A\00"
@.str.1 = [3 x i8] c",\0A\00"
@.str.2 = [3 x i8] c", \00"
@.str.3 = [7 x i8] c"0x%02X\00"
@.str.4 = [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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %15)
store i32 1, i32* %3
br label %67
17: ; preds = %2
store i32 0, i32* %8
store i32 1, i32* %6
br label %18
18: ; preds = %62, %17
%19 = load i32, i32* %6
%20 = load i32, i32* %4
%21 = icmp ult i32 %19, %20
br i1 %21, label %22, label %65
22: ; preds = %18
store i32 0, i32* %7
br label %23
23: ; preds = %58, %22
%24 = load i32, i32* %7
%25 = load i8**, i8*** %5
%26 = load i32, i32* %6
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
%30 = call i32 @strlen(i8* %29)
%31 = icmp ult i32 %24, %30
br i1 %31, label %32, label %61
32: ; preds = %23
%33 = load i32, i32* %8
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %44
35: ; preds = %32
%36 = load i32, i32* %8
%37 = urem i32 %36, 10
%38 = icmp ne i32 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %35
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %43
41: ; preds = %35
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
br label %44
44: ; preds = %43, %32
%45 = load i8**, i8*** %5
%46 = load i32, i32* %6
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i8*, i8** %45, i64 %47
%49 = load i8*, i8** %48
%50 = load i32, i32* %7
%51 = zext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %8
%57 = add i32 %56, 1
store i32 %57, i32* %8
br label %58
58: ; preds = %44
%59 = load i32, i32* %7
%60 = add i32 %59, 1
store i32 %60, i32* %7
br label %23
61: ; preds = %23
br label %62
62: ; preds = %61
%63 = load i32, i32* %6
%64 = add i32 %63, 1
store i32 %64, i32* %6
br label %18
65: ; preds = %18
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %67
67: ; preds = %65, %11
%68 = load i32, i32* %3
ret i32 %68
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Usage: %s <string>\0A\00"
@.str.2 = [3 x i8] c", \00"
@.str.3 = [7 x i8] c"0x%02X\00"
@str = [2 x i8] c",\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %10
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %46
10: ; preds = %4, %40
%11 = phi i64 [ 1, %4 ], [ %42, %40 ]
%12 = phi i32 [ 0, %4 ], [ %41, %40 ]
%13 = getelementptr inbounds i8*, i8** %1, i64 %11
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %40, label %17
17: ; preds = %10, %28
%18 = phi i64 [ %35, %28 ], [ 0, %10 ]
%19 = phi i32 [ %34, %28 ], [ %12, %10 ]
%20 = icmp eq i32 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %17
%22 = urem i32 %19, 10
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %28
26: ; preds = %21
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %24, %26, %17
%29 = load i8*, i8** %13
%30 = getelementptr inbounds i8, i8* %29, i64 %18
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = add i32 %19, 1
%35 = add nuw nsw i64 %18, 1
%36 = load i8*, i8** %13
%37 = tail call i32 @strlen(i8* %36)
%38 = zext i32 %37 to i64
%39 = icmp ult i64 %35, %38
br i1 %39, label %17, label %40
40: ; preds = %28, %10
%41 = phi i32 [ %12, %10 ], [ %34, %28 ]
%42 = add nuw nsw i64 %11, 1
%43 = icmp eq i64 %42, %5
br i1 %43, label %44, label %10
44: ; preds = %40
%45 = tail call i32 @putchar(i32 10)
br label %46
46: ; preds = %44, %6
%47 = phi i32 [ 1, %6 ], [ 0, %44 ]
ret i32 %47
}