#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 *, ...);
void _32_print_asciiSection(unsigned int size, unsigned int next_addr,
                            unsigned char *octet) {
  unsigned int i;
  i = 0;
  while (i < 16) {
    if ((i + next_addr) < size) {
      if (octet[i + next_addr] >= ' ' && octet[i + next_addr] <= '~')
        printf("%c", octet[i + next_addr]);
      else
        printf(".");
    } else
      printf(" ");
    i += 1;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<_32_print_asciiSection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jae    11c6 <_32_print_asciiSection+0xb6>
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    11aa <_32_print_asciiSection+0x9a>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     1197 <_32_print_asciiSection+0x87>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7e,%eax
jg     1197 <_32_print_asciiSection+0x87>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a5 <_32_print_asciiSection+0x95>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <_32_print_asciiSection+0xa8>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <_32_print_asciiSection+0x19>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_32_print_asciiSection>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %edi,%r15d
mov    %esi,%ebx
xor    %ebp,%ebp
mov    $0x2e,%r12d
jmp    113f <_32_print_asciiSection+0x2f>
nopw   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x10,%rbp
je     1163 <_32_print_asciiSection+0x53>
lea    (%rbx,%rbp,1),%rax
mov    $0x20,%edi
cmp    %r15d,%eax
jae    1130 <_32_print_asciiSection+0x20>
mov    %eax,%eax
movzbl (%r14,%rax,1),%eax
lea    -0x20(%rax),%ecx
cmp    $0x5f,%cl
cmovae %r12d,%eax
movzbl %al,%edi
jmp    1130 <_32_print_asciiSection+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c".\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @_32_print_asciiSection(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32 0, i32* %7
br label %8
8: ; preds = %52, %3
%9 = load i32, i32* %7
%10 = icmp ult i32 %9, 16
br i1 %10, label %11, label %55
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = add i32 %12, %13
%15 = load i32, i32* %4
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %50
17: ; preds = %11
%18 = load i8*, i8** %6
%19 = load i32, i32* %7
%20 = load i32, i32* %5
%21 = add i32 %19, %20
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %18, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = icmp sge i32 %25, 32
br i1 %26, label %27, label %47
27: ; preds = %17
%28 = load i8*, i8** %6
%29 = load i32, i32* %7
%30 = load i32, i32* %5
%31 = add i32 %29, %30
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %28, i64 %32
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = icmp sle i32 %35, 126
br i1 %36, label %37, label %47
37: ; preds = %27
%38 = load i8*, i8** %6
%39 = load i32, i32* %7
%40 = load i32, i32* %5
%41 = add i32 %39, %40
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %38, i64 %42
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %45)
br label %49
47: ; preds = %27, %17
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %49
49: ; preds = %47, %37
br label %52
50: ; preds = %11
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %52
52: ; preds = %50, %49
%53 = load i32, i32* %7
%54 = add i32 %53, 1
store i32 %54, i32* %7
br label %8
55: ; preds = %8
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @_32_print_asciiSection(i32 %0, i32 %1, i8* nocapture %2) {
br label %4
4: ; preds = %3, %17
%5 = phi i64 [ 0, %3 ], [ %20, %17 ]
%6 = trunc i64 %5 to i32
%7 = add i32 %6, %1
%8 = icmp ult i32 %7, %0
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = zext i32 %7 to i64
%11 = getelementptr inbounds i8, i8* %2, i64 %10
%12 = load i8, i8* %11
%13 = add i8 %12, -32
%14 = icmp ult i8 %13, 95
%15 = select i1 %14, i8 %12, i8 46
%16 = zext i8 %15 to i32
br label %17
17: ; preds = %9, %4
%18 = phi i32 [ 32, %4 ], [ %16, %9 ]
%19 = tail call i32 @putchar(i32 %18)
%20 = add nuw nsw i64 %5, 1
%21 = icmp eq i64 %20, 16
br i1 %21, label %22, label %4
22: ; preds = %17
%23 = tail call i32 @putchar(i32 10)
ret void
}