#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*/ _verbprintf(int /*<<< orphan*/, char *, ...);
unsigned char disp_parm(unsigned char *bp, unsigned char param_len) {
  unsigned char i, len;
  len = param_len;
  while (len) {
    i = *bp++;
    if ((i >= 32) && (i < 128))
      do {
        if (0 <= 0)
          _verbprintf(0, "%c", i);
      } while (0);
    else
      do {
        if (0 <= 0)
          _verbprintf(0, ".");
      } while (0);
    len--;
  }
  return param_len;
}


x86 assembly (clang, -O0):
<disp_parm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xb(%rbp)
cmpb   $0x0,-0xb(%rbp)
je     11a7 <disp_parm+0x97>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
cmp    $0x20,%eax
jl     1180 <disp_parm+0x70>
movzbl -0xa(%rbp),%eax
cmp    $0x80,%eax
jge    1180 <disp_parm+0x70>
jmp    1167 <disp_parm+0x57>
movzbl -0xa(%rbp),%edx
xor    %edi,%edi
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1030 <_verbprintf@plt>
jmp    119a <disp_parm+0x8a>
jmp    1185 <disp_parm+0x75>
xor    %edi,%edi
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1030 <_verbprintf@plt>
jmp    119a <disp_parm+0x8a>
mov    -0xb(%rbp),%al
add    $0xff,%al
mov    %al,-0xb(%rbp)
jmp    1128 <disp_parm+0x18>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_parm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
test   %esi,%esi
je     116c <disp_parm+0x5c>
mov    %rdi,%r13
movzbl %r14b,%ebp
lea    0xed0(%rip),%r15
lea    0xecc(%rip),%r12
xor    %ebx,%ebx
jmp    1153 <disp_parm+0x43>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
add    $0x1,%rbx
cmp    %bl,%bpl
je     116c <disp_parm+0x5c>
movzbl 0x0(%r13,%rbx,1),%edx
xor    %edi,%edi
cmp    $0x20,%dl
jl     1140 <disp_parm+0x30>
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <_verbprintf@plt>
jmp    114a <disp_parm+0x3a>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c".\00"
define zeroext i8 @disp_parm(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
store i8 %7, i8* %6
br label %8
8: ; preds = %32, %2
%9 = load i8, i8* %6
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %35
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
%14 = load i8, i8* %12
store i8 %14, i8* %5
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = icmp sge i32 %16, 32
br i1 %17, label %18, label %28
18: ; preds = %11
%19 = load i8, i8* %5
%20 = zext i8 %19 to i32
%21 = icmp slt i32 %20, 128
br i1 %21, label %22, label %28
22: ; preds = %18
br label %23
23: ; preds = %22
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %23
br label %32
28: ; preds = %18, %11
br label %29
29: ; preds = %28
%30 = call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29
br label %32
32: ; preds = %31, %27
%33 = load i8, i8* %6
%34 = add i8 %33, -1
store i8 %34, i8* %6
br label %8
35: ; preds = %8
%36 = load i8, i8* %4
ret i8 %36
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c".\00"
define zeroext i8 @disp_parm(i8* nocapture %0, i8 returned zeroext %1) {
%3 = icmp eq i8 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2, %15
%5 = phi i8 [ %16, %15 ], [ %1, %2 ]
%6 = phi i8* [ %7, %15 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %6
%9 = icmp sgt i8 %8, 31
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = zext i8 %8 to i32
%12 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %15
13: ; preds = %4
%14 = tail call i32 (i32, i8*, ...) @_verbprintf(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = add i8 %5, -1
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %15, %2
ret i8 %1
}