#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 A[5] = {10, 20, 30, 40, 50};
  double B[4] = {1.1, 2.2, 3.3, 4.4};
  char Name[] = "This is a test.";
  int *Aptr;
  double *Bptr;
  char *NamePtr;
  int i;
  printf("Examples of Array References with Pointers\n\n");
  for (i = 0; i < 5; i++)
    printf("%d ", A[i]);
  printf("\n\n");
  Aptr = A;
  for (i = 0; i < 5; i++)
    printf("%d ", *Aptr++);
  printf("\n\n");
  Bptr = B;
  for (i = 0; i < 4; i++)
    printf("%2.1lf ", *Bptr++);
  printf("\n\n");
  NamePtr = Name;
  for (i = 0; i < strlen(Name); i++)
    printf("%c", *NamePtr++);
  printf("\n\n");
  NamePtr = Name + strlen(Name) - 1;
  for (i = 0; i < strlen(Name); i++)
    printf("%c", *NamePtr--);
  printf("\n\n");
  NamePtr = Name;
  while (*NamePtr != '\0')
    printf("%c", *NamePtr++);
  printf("\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x5,-0x6c(%rbp)
jge    11d6 <main+0xb6>
movslq -0x6c(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11a8 <main+0x88>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0x5,-0x6c(%rbp)
jge    122a <main+0x10a>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x58(%rbp)
mov    (%rax),%esi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11f3 <main+0xd3>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x6c(%rbp)
cmpl   $0x4,-0x6c(%rbp)
jge    1280 <main+0x160>
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x60(%rbp)
movsd  (%rax),%xmm0
lea    0xe16(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1247 <main+0x127>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x70(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%eax
cmp    %ecx,%eax
jge    12e7 <main+0x1c7>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%esi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    129d <main+0x17d>
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
cmp    %ecx,%eax
jge    136b <main+0x24b>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%esi
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1321 <main+0x201>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13b6 <main+0x296>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%esi
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1381 <main+0x261>
lea    0xcbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee2(%rip),%rdi
call   1040 <puts@plt>
lea    0xeca(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xeae(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xe1a(%rip),%rbx
movsd  0xdde(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xdd4(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xdca(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xdc0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    1299 <main+0x159>
xor    %ebp,%ebp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbp,1),%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
add    $0x1,%rbp
cmp    %eax,%ebp
jl     1280 <main+0x140>
lea    0xdc6(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    12ec <main+0x1ac>
movslq %ebp,%rax
lea    (%rax,%r14,1),%rbp
add    $0xffffffffffffffff,%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl 0x0(%rbp),%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    %r14,%rdi
call   1050 <strlen@plt>
add    $0xffffffffffffffff,%rbp
cmp    %eax,%ebx
jl     12d0 <main+0x190>
lea    0xd73(%rip),%rdi
call   1040 <puts@plt>
mov    (%rsp),%al
test   %al,%al
je     1323 <main+0x1e3>
lea    0x1(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1310 <main+0x1d0>
lea    0xd3c(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.A = [5 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50]
@__const.main.B = [4 x double] [double 1.100000e+00, double 2.200000e+00, double 3.300000e+00, double 4.400000e+00]
@__const.main.Name = [16 x i8] c"This is a test.\00"
@.str = [45 x i8] c"Examples of Array References with Pointers\0A\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@.str.3 = [8 x i8] c"%2.1lf \00"
@.str.4 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [4 x double]
%4 = alloca [16 x i8]
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [5 x i32]* %2 to i8*
%10 = bitcast [4 x double]* %3 to i8*
%11 = bitcast [16 x i8]* %4 to i8*
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %13
13: ; preds = %22, %0
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 5
br i1 %15, label %16, label %25
16: ; preds = %13
%17 = load i32, i32* %8
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %16
%23 = load i32, i32* %8
%24 = add nsw i32 %23, 1
store i32 %24, i32* %8
br label %13
25: ; preds = %13
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32* %27, i32** %5
store i32 0, i32* %8
br label %28
28: ; preds = %36, %25
%29 = load i32, i32* %8
%30 = icmp slt i32 %29, 5
br i1 %30, label %31, label %39
31: ; preds = %28
%32 = load i32*, i32** %5
%33 = getelementptr inbounds i32, i32* %32, i32 1
store i32* %33, i32** %5
%34 = load i32, i32* %32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
br label %36
36: ; preds = %31
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %28
39: ; preds = %28
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%41 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
store double* %41, double** %6
store i32 0, i32* %8
br label %42
42: ; preds = %50, %39
%43 = load i32, i32* %8
%44 = icmp slt i32 %43, 4
br i1 %44, label %45, label %53
45: ; preds = %42
%46 = load double*, double** %6
%47 = getelementptr inbounds double, double* %46, i32 1
store double* %47, double** %6
%48 = load double, double* %46
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %48)
br label %50
50: ; preds = %45
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %42
53: ; preds = %42
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%55 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
store i8* %55, i8** %7
store i32 0, i32* %8
br label %56
56: ; preds = %67, %53
%57 = load i32, i32* %8
%58 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%59 = call i32 @strlen(i8* %58)
%60 = icmp slt i32 %57, %59
br i1 %60, label %61, label %70
61: ; preds = %56
%62 = load i8*, i8** %7
%63 = getelementptr inbounds i8, i8* %62, i32 1
store i8* %63, i8** %7
%64 = load i8, i8* %62
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %61
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 1
store i32 %69, i32* %8
br label %56
70: ; preds = %56
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%72 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%73 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%74 = call i32 @strlen(i8* %73)
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %72, i64 %75
%77 = getelementptr inbounds i8, i8* %76, i64 -1
store i8* %77, i8** %7
store i32 0, i32* %8
br label %78
78: ; preds = %89, %70
%79 = load i32, i32* %8
%80 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%81 = call i32 @strlen(i8* %80)
%82 = icmp slt i32 %79, %81
br i1 %82, label %83, label %92
83: ; preds = %78
%84 = load i8*, i8** %7
%85 = getelementptr inbounds i8, i8* %84, i32 -1
store i8* %85, i8** %7
%86 = load i8, i8* %84
%87 = sext i8 %86 to i32
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %87)
br label %89
89: ; preds = %83
%90 = load i32, i32* %8
%91 = add nsw i32 %90, 1
store i32 %91, i32* %8
br label %78
92: ; preds = %78
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%94 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
store i8* %94, i8** %7
br label %95
95: ; preds = %100, %92
%96 = load i8*, i8** %7
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %106
100: ; preds = %95
%101 = load i8*, i8** %7
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %7
%103 = load i8, i8* %101
%104 = sext i8 %103 to i32
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %104)
br label %95
106: ; preds = %95
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.Name = [16 x i8] c"This is a test.\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.3 = [8 x i8] c"%2.1lf \00"
@str = [44 x i8] c"Examples of Array References with Pointers\0A\00"
@str.10 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 20)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 30)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 40)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 50)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 20)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 30)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 40)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 50)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 1.100000e+00)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 2.200000e+00)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 3.300000e+00)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 4.400000e+00)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%21 = call i32 @strlen(i8* %2)
%22 = icmp sgt i32 %21, 0
br i1 %22, label %23, label %33
23: ; preds = %0, %23
%24 = phi i32 [ %30, %23 ], [ 0, %0 ]
%25 = phi i8* [ %26, %23 ], [ %2, %0 ]
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8, i8* %25
%28 = sext i8 %27 to i32
%29 = call i32 @putchar(i32 %28)
%30 = add nuw nsw i32 %24, 1
%31 = call i32 @strlen(i8* %2)
%32 = icmp slt i32 %30, %31
br i1 %32, label %23, label %33
33: ; preds = %23, %0
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%35 = call i32 @strlen(i8* %2)
%36 = call i32 @strlen(i8* %2)
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %51
38: ; preds = %33
%39 = sext i32 %35 to i64
%40 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 %39
br label %41
41: ; preds = %38, %41
%42 = phi i8* [ %44, %41 ], [ %40, %38 ]
%43 = phi i32 [ %48, %41 ], [ 0, %38 ]
%44 = getelementptr inbounds i8, i8* %42, i64 -1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = call i32 @putchar(i32 %46)
%48 = add nuw nsw i32 %43, 1
%49 = call i32 @strlen(i8* %2)
%50 = icmp slt i32 %48, %49
br i1 %50, label %41, label %51
51: ; preds = %41, %33
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%53 = load i8, i8* %2
%54 = icmp eq i8 %53, 0
br i1 %54, label %63, label %55
55: ; preds = %51, %55
%56 = phi i8 [ %61, %55 ], [ %53, %51 ]
%57 = phi i8* [ %59, %55 ], [ %2, %51 ]
%58 = sext i8 %56 to i32
%59 = getelementptr inbounds i8, i8* %57, i64 1
%60 = call i32 @putchar(i32 %58)
%61 = load i8, i8* %59
%62 = icmp eq i8 %61, 0
br i1 %62, label %63, label %55
63: ; preds = %55, %51
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}