convert(p, t, cvn, len) struct tnode *p;
{
  register int n;
  switch (cvn) {
  case 5:
  case 4:
    if (len == 1)
      return (p);
    return (block(2, (cvn == 5 ? 43 : 42), t, 0, p, block(1, 21, 0, 0, len)));
  case 1:
    n = 51;
    break;
  case 6:
    n = 52;
    break;
  case 2:
    n = 58;
    break;
  case 7:
    n = 59;
    break;
  case 8:
    n = 56;
    break;
  case 3:
    n = 57;
    break;
  }
  return (block(1, n, t, 0, p));
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x7,%eax
ja     1207 <convert+0xf7>
mov    -0x28(%rbp),%rax
lea    0xebb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x1,-0x1c(%rbp)
jne    1164 <convert+0x54>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1222 <convert+0x112>
mov    -0x18(%rbp),%edx
mov    $0x2a,%eax
mov    $0x2b,%ecx
cmp    $0x5,%edx
cmove  %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%r8d
mov    $0x1,%edi
mov    $0x15,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <block@plt>
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%r8
mov    %eax,%r9d
mov    $0x2,%edi
xor    %ecx,%ecx
mov    $0x0,%al
call   1030 <block@plt>
mov    %eax,-0x4(%rbp)
jmp    1222 <convert+0x112>
movl   $0x33,-0x20(%rbp)
jmp    1207 <convert+0xf7>
movl   $0x34,-0x20(%rbp)
jmp    1207 <convert+0xf7>
movl   $0x3a,-0x20(%rbp)
jmp    1207 <convert+0xf7>
movl   $0x3b,-0x20(%rbp)
jmp    1207 <convert+0xf7>
movl   $0x38,-0x20(%rbp)
jmp    1207 <convert+0xf7>
movl   $0x39,-0x20(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    $0x1,%edi
xor    %ecx,%ecx
mov    $0x0,%al
call   1030 <block@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
lea    -0x2(%rdx),%eax
cmp    $0x6,%eax
ja     1141 <convert+0x31>
mov    %ecx,%r8d
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmp    $0x1,%r8d
jne    1164 <convert+0x54>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x33,%esi
jmp    11a9 <convert+0x99>
mov    $0x3a,%esi
jmp    11a9 <convert+0x99>
mov    $0x39,%esi
jmp    11a9 <convert+0x99>
mov    $0x3b,%esi
jmp    11a9 <convert+0x99>
mov    $0x38,%esi
jmp    11a9 <convert+0x99>
xor    %r14d,%r14d
cmp    $0x5,%edx
sete   %r14b
or     $0x2a,%r14d
mov    $0x1,%edi
mov    $0x15,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <block@plt>
mov    $0x2,%edi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    %eax,%r9d
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <block@plt>
mov    $0x34,%esi
mov    $0x1,%edi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <block@plt>

LLVM IR (-O0):
%struct.tnode = type opaque
define i32 @convert(%struct.tnode* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.tnode*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.tnode* %0, %struct.tnode** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%11 = load i32, i32* %8
switch i32 %11, label %34 [
i32 5, label %12
i32 4, label %12
i32 1, label %28
i32 6, label %29
i32 2, label %30
i32 7, label %31
i32 8, label %32
i32 3, label %33
]
12: ; preds = %4, %4
%13 = load i32, i32* %9
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load %struct.tnode*, %struct.tnode** %6
%17 = ptrtoint %struct.tnode* %16 to i32
store i32 %17, i32* %5
br label %39
18: ; preds = %12
%19 = load i32, i32* %8
%20 = icmp eq i32 %19, 5
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 43, i32 42
%23 = load i32, i32* %7
%24 = load %struct.tnode*, %struct.tnode** %6
%25 = load i32, i32* %9
%26 = call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, i32, ...)*)(i32 1, i32 21, i32 0, i32 0, i32 %25)
%27 = call i32 (i32, i32, i32, i32, %struct.tnode*, i32, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, %struct.tnode*, i32, ...)*)(i32 2, i32 %22, i32 %23, i32 0, %struct.tnode* %24, i32 %26)
store i32 %27, i32* %5
br label %39
28: ; preds = %4
store i32 51, i32* %10
br label %34
29: ; preds = %4
store i32 52, i32* %10
br label %34
30: ; preds = %4
store i32 58, i32* %10
br label %34
31: ; preds = %4
store i32 59, i32* %10
br label %34
32: ; preds = %4
store i32 56, i32* %10
br label %34
33: ; preds = %4
store i32 57, i32* %10
br label %34
34: ; preds = %4, %33, %32, %31, %30, %29, %28
%35 = load i32, i32* %10
%36 = load i32, i32* %7
%37 = load %struct.tnode*, %struct.tnode** %6
%38 = call i32 (i32, i32, i32, i32, %struct.tnode*, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, %struct.tnode*, ...)*)(i32 1, i32 %35, i32 %36, i32 0, %struct.tnode* %37)
store i32 %38, i32* %5
br label %39
39: ; preds = %34, %18, %15
%40 = load i32, i32* %5
ret i32 %40
}

LLVM IR (-O2):
%struct.tnode = type opaque
define i32 @convert(%struct.tnode* %0, i32 %1, i32 %2, i32 %3) {
switch i32 %2, label %20 [
i32 5, label %5
i32 4, label %5
i32 3, label %19
i32 6, label %15
i32 2, label %16
i32 7, label %17
i32 8, label %18
]
5: ; preds = %4, %4
%6 = icmp eq i32 %3, 1
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = ptrtoint %struct.tnode* %0 to i64
%9 = trunc i64 %8 to i32
br label %23
10: ; preds = %5
%11 = icmp eq i32 %2, 5
%12 = select i1 %11, i32 43, i32 42
%13 = tail call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, i32, ...)*)(i32 1, i32 21, i32 0, i32 0, i32 %3)
%14 = tail call i32 (i32, i32, i32, i32, %struct.tnode*, i32, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, %struct.tnode*, i32, ...)*)(i32 2, i32 %12, i32 %1, i32 0, %struct.tnode* %0, i32 %13)
br label %23
15: ; preds = %4
br label %20
16: ; preds = %4
br label %20
17: ; preds = %4
br label %20
18: ; preds = %4
br label %20
19: ; preds = %4
br label %20
20: ; preds = %4, %19, %18, %17, %16, %15
%21 = phi i32 [ 57, %19 ], [ 56, %18 ], [ 59, %17 ], [ 58, %16 ], [ 52, %15 ], [ 51, %4 ]
%22 = tail call i32 (i32, i32, i32, i32, %struct.tnode*, ...) bitcast (i32 (...)* @block to i32 (i32, i32, i32, i32, %struct.tnode*, ...)*)(i32 1, i32 %21, i32 %1, i32 0, %struct.tnode* %0)
br label %23
23: ; preds = %20, %10, %7
%24 = phi i32 [ %22, %20 ], [ %9, %7 ], [ %14, %10 ]
ret i32 %24
}