#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*/ vui_showcmd_putc(char);
void vui_showcmd_put(int c) {
  if (c < 32) {
    vui_showcmd_putc('^');
    vui_showcmd_putc(c + '@');
  } else if (c >= 32 && c < 256) {
    vui_showcmd_putc(c);
  } else {
    vui_showcmd_putc('^');
    vui_showcmd_putc('?');
  }
}


x86 assembly (clang, -O0):
<vui_showcmd_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    1142 <vui_showcmd_put+0x32>
mov    $0x5e,%edi
call   1030 <vui_showcmd_putc@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%eax
movsbl %al,%edi
call   1030 <vui_showcmd_putc@plt>
jmp    1182 <vui_showcmd_put+0x72>
cmpl   $0x20,-0x4(%rbp)
jl     1169 <vui_showcmd_put+0x59>
cmpl   $0x100,-0x4(%rbp)
jge    1169 <vui_showcmd_put+0x59>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <vui_showcmd_putc@plt>
jmp    117d <vui_showcmd_put+0x6d>
mov    $0x5e,%edi
call   1030 <vui_showcmd_putc@plt>
mov    $0x3f,%edi
call   1030 <vui_showcmd_putc@plt>
jmp    1182 <vui_showcmd_put+0x72>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vui_showcmd_put>:
push   %rbx
mov    %edi,%ebx
cmp    $0x1f,%edi
jg     1127 <vui_showcmd_put+0x17>
mov    $0x5e,%edi
call   1030 <vui_showcmd_putc@plt>
add    $0x40,%bl
jmp    113b <vui_showcmd_put+0x2b>
cmp    $0xff,%ebx
jbe    113b <vui_showcmd_put+0x2b>
mov    $0x5e,%edi
call   1030 <vui_showcmd_putc@plt>
mov    $0x3f,%bl
movsbl %bl,%edi
pop    %rbx
jmp    1030 <vui_showcmd_putc@plt>

LLVM IR (-O0):
define void @vui_showcmd_put(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 32
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = call i32 @vui_showcmd_putc(i8 signext 94)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 64
%9 = trunc i32 %8 to i8
%10 = call i32 @vui_showcmd_putc(i8 signext %9)
br label %25
11: ; preds = %1
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 32
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 256
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %2
%19 = trunc i32 %18 to i8
%20 = call i32 @vui_showcmd_putc(i8 signext %19)
br label %24
21: ; preds = %14, %11
%22 = call i32 @vui_showcmd_putc(i8 signext 94)
%23 = call i32 @vui_showcmd_putc(i8 signext 63)
br label %24
24: ; preds = %21, %17
br label %25
25: ; preds = %24, %5
ret void
}

LLVM IR (-O2):
define void @vui_showcmd_put(i32 %0) {
%2 = icmp slt i32 %0, 32
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @vui_showcmd_putc(i8 signext 94)
%5 = trunc i32 %0 to i8
%6 = add i8 %5, 64
br label %13
7: ; preds = %1
%8 = icmp ult i32 %0, 256
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = trunc i32 %0 to i8
br label %13
11: ; preds = %7
%12 = tail call i32 @vui_showcmd_putc(i8 signext 94)
br label %13
13: ; preds = %9, %11, %3
%14 = phi i8 [ %10, %9 ], [ 63, %11 ], [ %6, %3 ]
%15 = tail call i32 @vui_showcmd_putc(i8 signext %14)
ret void
}