#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 strlen(char *);
int main(int argc, char *argv[]) {
  int i, l;
  unsigned long j;
  for (i = 1; i < argc; i++) {
    for (j = 0, l = strlen(argv[i]); j < l; j++) {
      printf("\\x%X", argv[i][j] & 0xff);
    }
    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    11cb <main+0xab>
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmp    %rcx,%rax
jae    11af <main+0x8f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
and    $0xff,%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1165 <main+0x45>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
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     11ad <main+0x7d>
mov    %rsi,%r12
mov    %edi,%r15d
mov    $0x1,%r13d
lea    0xead(%rip),%r14
jmp    1173 <main+0x43>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
cmp    %r15,%r13
je     11ad <main+0x7d>
mov    (%r12,%r13,8),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
je     1160 <main+0x30>
movslq %eax,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r12,%r13,8),%rax
movzbl (%rax,%rbp,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1190 <main+0x60>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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