#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))
      verbprintf(0, "%c", i);
    else
      verbprintf(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     1198 <disp_parm+0x88>
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     117b <disp_parm+0x6b>
movzbl -0xa(%rbp),%eax
cmp    $0x80,%eax
jge    117b <disp_parm+0x6b>
movzbl -0xa(%rbp),%edx
xor    %edi,%edi
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1030 <verbprintf@plt>
jmp    118b <disp_parm+0x7b>
xor    %edi,%edi
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1030 <verbprintf@plt>
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 = %28, %2
%9 = load i8, i8* %6
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %31
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 %26
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 %26
22: ; preds = %18
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = call i32 (i32, i8*, ...) @verbprintf(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %24)
br label %28
26: ; preds = %18, %11
%27 = call i32 (i32, i8*, ...) @verbprintf(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = load i8, i8* %6
%30 = add i8 %29, -1
store i8 %30, i8* %6
br label %8
31: ; preds = %8
%32 = load i8, i8* %4
ret i8 %32
}

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
}