#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 */
typedef int /*<<< orphan*/ radek;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int real_delka_jmena(char const *, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *orez_jmeno(const char *jmeno, int delka_jmena) {
  static char radek[260];
  int real_delka = 0, i;
  memset(radek, ' ', sizeof(radek));
  strncpy(radek, jmeno, delka_jmena);
  if ((real_delka = real_delka_jmena(jmeno, delka_jmena))) {
    radek[delka_jmena - 4] = '~';
    strncpy(radek + delka_jmena - 3, jmeno + real_delka - 3, 3);
  }
  radek[260 - 1] = 0;
  for (i = 0; i < delka_jmena; i++)
    if (radek[i] < 32)
      radek[i] = '?';
  return radek;
}


x86 assembly (clang, -O0):
<orez_jmeno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0x2f03(%rip),%rdi
mov    $0x20,%esi
mov    $0x104,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0x2ee6(%rip),%rdi
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <real_delka_jmena@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     11c6 <orez_jmeno+0x96>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
movslq %eax,%rcx
lea    0x2eb9(%rip),%rax
movb   $0x7e,(%rax,%rcx,1)
movslq -0xc(%rbp),%rax
lea    0x2eaa(%rip),%rdi
add    %rax,%rdi
add    $0xfffffffffffffffd,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
add    %rax,%rsi
add    $0xfffffffffffffffd,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2f86(%rip)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    121a <orez_jmeno+0xea>
movslq -0x14(%rbp),%rcx
lea    0x2e65(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jge    1207 <orez_jmeno+0xd7>
movslq -0x14(%rbp),%rcx
lea    0x2e4d(%rip),%rax
movb   $0x3f,(%rax,%rcx,1)
jmp    120c <orez_jmeno+0xdc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11d4 <orez_jmeno+0xa4>
lea    0x2e2f(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orez_jmeno>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
lea    0x2f10(%rip),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x104,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <real_delka_jmena@plt>
test   %eax,%eax
je     1191 <orez_jmeno+0x61>
movslq %ebp,%rcx
movb   $0x7e,-0x4(%rcx,%rbx,1)
lea    (%rcx,%rbx,1),%rdi
add    $0xfffffffffffffffd,%rdi
cltq
lea    (%r14,%rax,1),%rsi
add    $0xfffffffffffffffd,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2fbb(%rip)
test   %ebp,%ebp
jle    137b <orez_jmeno+0x24b>
mov    %ebp,%eax
cmp    $0x10,%ebp
jae    11ae <orez_jmeno+0x7e>
xor    %ecx,%ecx
jmp    1399 <orez_jmeno+0x269>
mov    %eax,%ecx
and    $0xfffffff0,%ecx
xor    %edx,%edx
movdqa 0xe43(%rip),%xmm0
movdqa 0xe4b(%rip),%xmm1
jmp    11dd <orez_jmeno+0xad>
nopw   0x0(%rax,%rax,1)
add    $0x10,%rdx
cmp    %rdx,%rcx
je     1376 <orez_jmeno+0x246>
movq   (%rdx,%rbx,1),%xmm3
movdqa %xmm0,%xmm2
pcmpgtb %xmm3,%xmm2
movd   %xmm2,%esi
test   $0x1,%sil
je     11f8 <orez_jmeno+0xc8>
movb   $0x3f,(%rdx,%rbx,1)
movdqa %xmm2,%xmm4
pslld  $0x8,%xmm4
movd   %xmm4,%esi
shr    $0x10,%esi
test   $0x1,%sil
je     1213 <orez_jmeno+0xe3>
movb   $0x3f,0x1(%rdx,%rbx,1)
pshuflw $0x55,%xmm3,%xmm4
movdqa %xmm0,%xmm5
pcmpgtb %xmm4,%xmm5
pextrw $0x2,%xmm5,%esi
test   $0x1,%sil
je     1230 <orez_jmeno+0x100>
movb   $0x3f,0x2(%rdx,%rbx,1)
movdqa %xmm2,%xmm4
psllq  $0x18,%xmm4
pextrw $0x3,%xmm4,%esi
test   $0x1,%sil
je     1249 <orez_jmeno+0x119>
movb   $0x3f,0x3(%rdx,%rbx,1)
pshufd $0x55,%xmm3,%xmm3
movdqa %xmm1,%xmm4
pcmpgtb %xmm3,%xmm4
pextrw $0x4,%xmm4,%esi
test   $0x1,%sil
je     1266 <orez_jmeno+0x136>
movb   $0x3f,0x4(%rdx,%rbx,1)
movdqa %xmm2,%xmm3
pslldq $0x5,%xmm3
pextrw $0x5,%xmm3,%esi
test   $0x1,%sil
je     127f <orez_jmeno+0x14f>
movb   $0x3f,0x5(%rdx,%rbx,1)
pextrw $0x3,%xmm2,%esi
test   $0x1,%sil
je     128f <orez_jmeno+0x15f>
movb   $0x3f,0x6(%rdx,%rbx,1)
pslldq $0x7,%xmm2
pextrw $0x7,%xmm2,%esi
test   $0x1,%sil
je     12a4 <orez_jmeno+0x174>
movb   $0x3f,0x7(%rdx,%rbx,1)
movq   0x8(%rdx,%rbx,1),%xmm3
movdqa %xmm0,%xmm2
pcmpgtb %xmm3,%xmm2
movd   %xmm2,%esi
test   $0x1,%sil
je     12c1 <orez_jmeno+0x191>
movb   $0x3f,0x8(%rdx,%rbx,1)
movdqa %xmm2,%xmm4
pslld  $0x8,%xmm4
movd   %xmm4,%esi
shr    $0x10,%esi
test   $0x1,%sil
je     12dc <orez_jmeno+0x1ac>
movb   $0x3f,0x9(%rdx,%rbx,1)
pshuflw $0x55,%xmm3,%xmm4
movdqa %xmm0,%xmm5
pcmpgtb %xmm4,%xmm5
pextrw $0x2,%xmm5,%esi
test   $0x1,%sil
je     12f9 <orez_jmeno+0x1c9>
movb   $0x3f,0xa(%rdx,%rbx,1)
movdqa %xmm2,%xmm4
psllq  $0x18,%xmm4
pextrw $0x3,%xmm4,%esi
test   $0x1,%sil
je     1312 <orez_jmeno+0x1e2>
movb   $0x3f,0xb(%rdx,%rbx,1)
pshufd $0x55,%xmm3,%xmm3
movdqa %xmm1,%xmm4
pcmpgtb %xmm3,%xmm4
pextrw $0x4,%xmm4,%esi
test   $0x1,%sil
je     132f <orez_jmeno+0x1ff>
movb   $0x3f,0xc(%rdx,%rbx,1)
movdqa %xmm2,%xmm3
pslldq $0x5,%xmm3
pextrw $0x5,%xmm3,%esi
test   $0x1,%sil
je     1348 <orez_jmeno+0x218>
movb   $0x3f,0xd(%rdx,%rbx,1)
pextrw $0x3,%xmm2,%esi
test   $0x1,%sil
je     1358 <orez_jmeno+0x228>
movb   $0x3f,0xe(%rdx,%rbx,1)
pslldq $0x7,%xmm2
pextrw $0x7,%xmm2,%esi
test   $0x1,%sil
je     11d0 <orez_jmeno+0xa0>
movb   $0x3f,0xf(%rdx,%rbx,1)
jmp    11d0 <orez_jmeno+0xa0>
cmp    %rax,%rcx
jne    1399 <orez_jmeno+0x269>
lea    0x2cce(%rip),%rax
pop    %rbx
pop    %r14
pop    %rbp
ret
nopw   0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    %rcx,%rax
je     137b <orez_jmeno+0x24b>
cmpb   $0x1f,(%rcx,%rbx,1)
jg     1390 <orez_jmeno+0x260>
movb   $0x3f,(%rcx,%rbx,1)
jmp    1390 <orez_jmeno+0x260>

LLVM IR (-O0):
@orez_jmeno.radek = internal global [260 x i8] zeroinitializer
define i8* @orez_jmeno(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = call i32 @memset(i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0), i8 signext 32, i32 260)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @strncpy(i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0), i8* %8, i32 %9)
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @real_delka_jmena(i8* %11, i32 %12)
store i32 %13, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %2
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %18
store i8 126, i8* %19
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0), i64 %21
%23 = getelementptr inbounds i8, i8* %22, i64 -3
%24 = load i8*, i8** %3
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = getelementptr inbounds i8, i8* %27, i64 -3
%29 = call i32 @strncpy(i8* %23, i8* %28, i32 3)
br label %30
30: ; preds = %15, %2
store i8 0, i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 259)
store i32 0, i32* %6
br label %31
31: ; preds = %47, %30
%32 = load i32, i32* %6
%33 = load i32, i32* %4
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %50
35: ; preds = %31
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp slt i32 %40, 32
br i1 %41, label %42, label %46
42: ; preds = %35
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %44
store i8 63, i8* %45
br label %46
46: ; preds = %42, %35
br label %47
47: ; preds = %46
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 1
store i32 %49, i32* %6
br label %31
50: ; preds = %31
ret i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0)
}

LLVM IR (-O2):
@orez_jmeno.radek = internal global [260 x i8] zeroinitializer
define i8* @orez_jmeno(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0), i8 signext 32, i32 260)
%4 = tail call i32 @strncpy(i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @real_delka_jmena(i8* %0, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %18, label %7
7: ; preds = %2
%8 = add nsw i32 %1, -4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %9
store i8 126, i8* %10
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 -3
%14 = sext i32 %5 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = getelementptr inbounds i8, i8* %15, i64 -3
%17 = tail call i32 @strncpy(i8* %13, i8* %16, i32 3)
br label %18
18: ; preds = %7, %2
store i8 0, i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 259)
%19 = icmp sgt i32 %1, 0
br i1 %19, label %20, label %129
20: ; preds = %18
%21 = zext i32 %1 to i64
%22 = icmp ult i32 %1, 16
br i1 %22, label %118, label %23
23: ; preds = %20
%24 = and i64 %21, 4294967280
br label %25
25: ; preds = %113, %23
%26 = phi i64 [ 0, %23 ], [ %114, %113 ]
%27 = or i64 %26, 8
%28 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %26
%29 = bitcast i8* %28 to <8 x i8>*
%30 = load <8 x i8>, <8 x i8>* %29
%31 = getelementptr inbounds i8, i8* %28, i64 8
%32 = bitcast i8* %31 to <8 x i8>*
%33 = load <8 x i8>, <8 x i8>* %32
%34 = icmp slt <8 x i8> %30, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%35 = icmp slt <8 x i8> %33, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%36 = extractelement <8 x i1> %34, i64 0
br i1 %36, label %37, label %39
37: ; preds = %25
%38 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %26
store i8 63, i8* %38
br label %39
39: ; preds = %37, %25
%40 = extractelement <8 x i1> %34, i64 1
br i1 %40, label %41, label %44
41: ; preds = %39
%42 = or i64 %26, 1
%43 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %42
store i8 63, i8* %43
br label %44
44: ; preds = %41, %39
%45 = extractelement <8 x i1> %34, i64 2
br i1 %45, label %46, label %49
46: ; preds = %44
%47 = or i64 %26, 2
%48 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %47
store i8 63, i8* %48
br label %49
49: ; preds = %46, %44
%50 = extractelement <8 x i1> %34, i64 3
br i1 %50, label %51, label %54
51: ; preds = %49
%52 = or i64 %26, 3
%53 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %52
store i8 63, i8* %53
br label %54
54: ; preds = %51, %49
%55 = extractelement <8 x i1> %34, i64 4
br i1 %55, label %56, label %59
56: ; preds = %54
%57 = or i64 %26, 4
%58 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %57
store i8 63, i8* %58
br label %59
59: ; preds = %56, %54
%60 = extractelement <8 x i1> %34, i64 5
br i1 %60, label %61, label %64
61: ; preds = %59
%62 = or i64 %26, 5
%63 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %62
store i8 63, i8* %63
br label %64
64: ; preds = %61, %59
%65 = extractelement <8 x i1> %34, i64 6
br i1 %65, label %66, label %69
66: ; preds = %64
%67 = or i64 %26, 6
%68 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %67
store i8 63, i8* %68
br label %69
69: ; preds = %66, %64
%70 = extractelement <8 x i1> %34, i64 7
br i1 %70, label %71, label %74
71: ; preds = %69
%72 = or i64 %26, 7
%73 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %72
store i8 63, i8* %73
br label %74
74: ; preds = %71, %69
%75 = extractelement <8 x i1> %35, i64 0
br i1 %75, label %76, label %78
76: ; preds = %74
%77 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %27
store i8 63, i8* %77
br label %78
78: ; preds = %76, %74
%79 = extractelement <8 x i1> %35, i64 1
br i1 %79, label %80, label %83
80: ; preds = %78
%81 = or i64 %26, 9
%82 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %81
store i8 63, i8* %82
br label %83
83: ; preds = %80, %78
%84 = extractelement <8 x i1> %35, i64 2
br i1 %84, label %85, label %88
85: ; preds = %83
%86 = or i64 %26, 10
%87 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %86
store i8 63, i8* %87
br label %88
88: ; preds = %85, %83
%89 = extractelement <8 x i1> %35, i64 3
br i1 %89, label %90, label %93
90: ; preds = %88
%91 = or i64 %26, 11
%92 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %91
store i8 63, i8* %92
br label %93
93: ; preds = %90, %88
%94 = extractelement <8 x i1> %35, i64 4
br i1 %94, label %95, label %98
95: ; preds = %93
%96 = or i64 %26, 12
%97 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %96
store i8 63, i8* %97
br label %98
98: ; preds = %95, %93
%99 = extractelement <8 x i1> %35, i64 5
br i1 %99, label %100, label %103
100: ; preds = %98
%101 = or i64 %26, 13
%102 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %101
store i8 63, i8* %102
br label %103
103: ; preds = %100, %98
%104 = extractelement <8 x i1> %35, i64 6
br i1 %104, label %105, label %108
105: ; preds = %103
%106 = or i64 %26, 14
%107 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %106
store i8 63, i8* %107
br label %108
108: ; preds = %105, %103
%109 = extractelement <8 x i1> %35, i64 7
br i1 %109, label %110, label %113
110: ; preds = %108
%111 = or i64 %26, 15
%112 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %111
store i8 63, i8* %112
br label %113
113: ; preds = %110, %108
%114 = add nuw i64 %26, 16
%115 = icmp eq i64 %114, %24
br i1 %115, label %116, label %25
116: ; preds = %113
%117 = icmp eq i64 %24, %21
br i1 %117, label %129, label %118
118: ; preds = %20, %116
%119 = phi i64 [ 0, %20 ], [ %24, %116 ]
br label %120
120: ; preds = %118, %126
%121 = phi i64 [ %127, %126 ], [ %119, %118 ]
%122 = getelementptr inbounds [260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = icmp slt i8 %123, 32
br i1 %124, label %125, label %126
125: ; preds = %120
store i8 63, i8* %122
br label %126
126: ; preds = %120, %125
%127 = add nuw nsw i64 %121, 1
%128 = icmp eq i64 %127, %21
br i1 %128, label %129, label %120
129: ; preds = %126, %116, %18
ret i8* getelementptr inbounds ([260 x i8], [260 x i8]* @orez_jmeno.radek, i64 0, i64 0)
}