#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 */
typedef int /*<<< orphan*/ map;

/* Variables and functions */
int /*<<< orphan*/ char_array_to_c(char *, int, char *);
void modp_toprint_map() {
  size_t i = 0;
  char map[256];
  for (i = 0; i < sizeof(map); ++i) {
    if (i < 32 || i > 126) {
      map[i] = '?';
    } else {
      map[i] = (char)i;
    }
  }
  char_array_to_c(map, sizeof(map), "gsToPrintMap");
}


x86 assembly (clang, -O0):
<modp_toprint_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x8(%rbp)
cmpq   $0x100,-0x8(%rbp)
jae    1187 <modp_toprint_map+0x77>
cmpq   $0x20,-0x8(%rbp)
jb     114f <modp_toprint_map+0x3f>
cmpq   $0x7e,-0x8(%rbp)
jbe    1160 <modp_toprint_map+0x50>
mov    -0x8(%rbp),%rax
movb   $0x3f,-0x110(%rbp,%rax,1)
3f
jmp    1171 <modp_toprint_map+0x61>
mov    -0x8(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,-0x110(%rbp,%rax,1)
jmp    1176 <modp_toprint_map+0x66>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112b <modp_toprint_map+0x1b>
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
lea    0xe66(%rip),%rdx
call   1030 <char_array_to_c@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modp_toprint_map>:
sub    $0x108,%rsp
mov    $0xffffffffffffff82,%rax
mov    $0x3f,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x1(%rax),%rdx
lea    0x7e(%rax),%esi
cmp    $0xffffffffffffffa1,%rdx
movzbl %sil,%edx
cmovb  %ecx,%edx
mov    %dl,0x7e(%rsp,%rax,1)
lea    0x7f(%rax),%edx
cmp    $0xffffffffffffffa1,%rax
movzbl %dl,%edx
cmovb  %ecx,%edx
mov    %dl,0x7f(%rsp,%rax,1)
lea    0x1(%rax),%rdx
lea    -0x80(%rax),%esi
cmp    $0xffffffffffffffa1,%rdx
movzbl %sil,%edx
cmovb  %ecx,%edx
lea    0x2(%rax),%rsi
cmp    $0xffffffffffffffa1,%rsi
lea    -0x7f(%rax),%esi
movzbl %sil,%esi
cmovb  %ecx,%esi
mov    %dl,0x80(%rsp,%rax,1)
mov    %sil,0x81(%rsp,%rax,1)
add    $0x4,%rax
cmp    $0x82,%rax
jne    1130 <modp_toprint_map+0x20>
lea    0xe63(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
call   1030 <char_array_to_c@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"gsToPrintMap\00"
define void @modp_toprint_map() {
%1 = alloca i64
%2 = alloca [256 x i8]
store i64 0, i64* %1
store i64 0, i64* %1
br label %3
3: ; preds = %21, %0
%4 = load i64, i64* %1
%5 = icmp ult i64 %4, 256
br i1 %5, label %6, label %24
6: ; preds = %3
%7 = load i64, i64* %1
%8 = icmp ult i64 %7, 32
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i64, i64* %1
%11 = icmp ugt i64 %10, 126
br i1 %11, label %12, label %15
12: ; preds = %9, %6
%13 = load i64, i64* %1
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %13
store i8 63, i8* %14
br label %20
15: ; preds = %9
%16 = load i64, i64* %1
%17 = trunc i64 %16 to i8
%18 = load i64, i64* %1
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %18
store i8 %17, i8* %19
br label %20
20: ; preds = %15, %12
br label %21
21: ; preds = %20
%22 = load i64, i64* %1
%23 = add i64 %22, 1
store i64 %23, i64* %1
br label %3
24: ; preds = %3
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%26 = call i32 @char_array_to_c(i8* %25, i32 256, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"gsToPrintMap\00"
define void @modp_toprint_map() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ 0, %0 ], [ %28, %3 ]
%5 = add nsw i64 %4, -127
%6 = icmp ult i64 %5, -95
%7 = trunc i64 %4 to i8
%8 = select i1 %6, i8 63, i8 %7
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %4
store i8 %8, i8* %9
%10 = or i64 %4, 1
%11 = add nsw i64 %4, -126
%12 = icmp ult i64 %11, -95
%13 = trunc i64 %10 to i8
%14 = select i1 %12, i8 63, i8 %13
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %10
store i8 %14, i8* %15
%16 = or i64 %4, 2
%17 = add nsw i64 %4, -125
%18 = icmp ult i64 %17, -95
%19 = trunc i64 %16 to i8
%20 = select i1 %18, i8 63, i8 %19
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %16
store i8 %20, i8* %21
%22 = or i64 %4, 3
%23 = add nsw i64 %4, -124
%24 = icmp ult i64 %23, -95
%25 = trunc i64 %22 to i8
%26 = select i1 %24, i8 63, i8 %25
%27 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %22
store i8 %26, i8* %27
%28 = add nuw nsw i64 %4, 4
%29 = icmp eq i64 %28, 256
br i1 %29, label %30, label %3
30: ; preds = %3
%31 = call i32 @char_array_to_c(i8* %2, i32 256, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}