#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 main() {
  char ascii[128];
  for (int i = 1; i <= 126; i++) {
    ascii[i] = i;
    if (i > 31) {
      printf("%c ", ascii[i]);
    } else {
      printf("*");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
cmpl   $0x7e,-0x94(%rbp)
jg     11a5 <main+0x95>
mov    -0x94(%rbp),%eax
mov    %al,%cl
movslq -0x94(%rbp),%rax
mov    %cl,-0x90(%rbp,%rax,1)
cmpl   $0x1f,-0x94(%rbp)
jle    117e <main+0x6e>
movslq -0x94(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%esi
ff
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118c <main+0x7c>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1191 <main+0x81>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    112c <main+0x1c>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xed0(%rip),%r14
jmp    1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
je     1165 <main+0x45>
cmp    $0x20,%ebx
jb     1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c \00"
@.str.1 = [2 x i8] c"*\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
br label %4
4: ; preds = %25, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 126
br i1 %6, label %7, label %28
7: ; preds = %4
%8 = load i32, i32* %3
%9 = trunc i32 %8 to i8
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 %11
store i8 %9, i8* %12
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 31
br i1 %14, label %15, label %22
15: ; preds = %7
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %24
22: ; preds = %7
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %15
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %4
28: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
define i32 @main() {
br label %2
1: ; preds = %9
ret i32 0
2: ; preds = %0, %9
%3 = phi i32 [ 1, %0 ], [ %10, %9 ]
%4 = icmp ugt i32 %3, 31
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %9
7: ; preds = %2
%8 = tail call i32 @putchar(i32 42)
br label %9
9: ; preds = %5, %7
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 127
br i1 %11, label %1, label %2
}