#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 EOF;
int UCHAR_MAX;
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int stub1(int);
void prclass(const char *name, int (*fn)(int)) {
  int c;
  fputs(name, stdout);
  fputs(": ", stdout);
  for (c = EOF; c <= UCHAR_MAX; ++c)
    if ((*fn)(c))
      fputc(c, stdout);
  fputs("\n", stdout);
}


x86 assembly (clang, -O0):
<prclass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%eax
jg     11ab <prclass+0x8b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
call   *%rax
cmp    $0x0,%eax
je     1198 <prclass+0x78>
mov    -0x14(%rbp),%edi
mov    0x2e3f(%rip),%rax
mov    (%rax),%esi
call   1040 <fputc@plt>
jmp    119d <prclass+0x7d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <prclass+0x43>
mov    0x2e1e(%rip),%rax
mov    (%rax),%esi
lea    0xe48(%rip),%rdi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prclass>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    0x2e9e(%rip),%r15
mov    (%r15),%esi
call   1030 <fputs@plt>
mov    (%r15),%esi
lea    0xebc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%ebx
mov    0x2e97(%rip),%r12
cmp    (%r12),%ebx
jle    118b <prclass+0x6b>
mov    (%r15),%esi
lea    0xe9a(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <fputs@plt>
nopl   0x0(%rax)
lea    0x1(%rbx),%eax
cmp    (%r12),%ebx
mov    %eax,%ebx
jge    115f <prclass+0x3f>
mov    %ebx,%edi
call   *%r14
test   %eax,%eax
je     1180 <prclass+0x60>
mov    (%r15),%esi
mov    %ebx,%edi
call   1040 <fputc@plt>
jmp    1180 <prclass+0x60>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c": \00"
@EOF = global i32 0
@UCHAR_MAX = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @prclass(i8* %0, i32 (i32)* %1) {
%3 = alloca i8*
%4 = alloca i32 (i32)*
%5 = alloca i32
store i8* %0, i8** %3
store i32 (i32)* %1, i32 (i32)** %4
%6 = load i8*, i8** %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* %6, i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EOF
store i32 %11, i32* %5
br label %12
12: ; preds = %26, %2
%13 = load i32, i32* %5
%14 = load i32, i32* @UCHAR_MAX
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = load i32 (i32)*, i32 (i32)** %4
%18 = load i32, i32* %5
%19 = call i32 %17(i32 %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %16
%22 = load i32, i32* %5
%23 = load i32, i32* @stdout
%24 = call i32 @fputc(i32 %22, i32 %23)
br label %25
25: ; preds = %21, %16
br label %26
26: ; preds = %25
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %12
29: ; preds = %12
%30 = load i32, i32* @stdout
%31 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %30)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c": \00"
@EOF = global i32 0
@UCHAR_MAX = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @prclass(i8* %0, i32 (i32)* nocapture %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* %0, i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @EOF
%8 = load i32, i32* @UCHAR_MAX
%9 = icmp sgt i32 %7, %8
br i1 %9, label %21, label %10
10: ; preds = %2, %17
%11 = phi i32 [ %18, %17 ], [ %7, %2 ]
%12 = tail call i32 %1(i32 %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = load i32, i32* @stdout
%16 = tail call i32 @fputc(i32 %11, i32 %15)
br label %17
17: ; preds = %10, %14
%18 = add nsw i32 %11, 1
%19 = load i32, i32* @UCHAR_MAX
%20 = icmp slt i32 %11, %19
br i1 %20, label %10, label %21
21: ; preds = %17, %2
%22 = load i32, i32* @stdout
%23 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret void
}