int find_start_block_wide(int step) {
  int basic_root;
  int it;
  if (step == 0)
    return 0;
  if (step == 1)
    return 10;
  if (step == 2)
    return 22;
  if (step == 3)
    return 38;
  basic_root = 10 + step * 2;
  it = 4;
  while (it < step) {
    it += 2;
    basic_root += 2;
  }
  return find_start_block_wide(step - 1) + basic_root;
}


x86 assembly (clang, -O0):
<find_start_block_wide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <find_start_block_wide+0x21>
movl   $0x0,-0x4(%rbp)
jmp    11ba <find_start_block_wide+0xaa>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <find_start_block_wide+0x37>
movl   $0xa,-0x4(%rbp)
jmp    11ba <find_start_block_wide+0xaa>
cmpl   $0x2,-0x8(%rbp)
jne    115d <find_start_block_wide+0x4d>
movl   $0x16,-0x4(%rbp)
jmp    11ba <find_start_block_wide+0xaa>
cmpl   $0x3,-0x8(%rbp)
jne    1173 <find_start_block_wide+0x63>
movl   $0x26,-0x4(%rbp)
jmp    11ba <find_start_block_wide+0xaa>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a9 <find_start_block_wide+0x99>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1186 <find_start_block_wide+0x76>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <find_start_block_wide@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_start_block_wide>:
lea    (%rdi,%rdi,1),%r9d
add    $0xc,%r9d
lea    -0x5(%rdi),%ecx
movslq %edi,%rax
lea    0xeeb(%rip),%rsi
lea    (%rsi,%rax,4),%r8
lea    (%rdi,%rdi,1),%esi
add    $0xa,%esi
xor    %eax,%eax
cmp    $0x4,%edi
jb     1156 <find_start_block_wide+0x56>
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%edx
and    $0xfffffffe,%edx
add    %r9d,%edx
cmp    $0x5,%edi
cmovl  %esi,%edx
add    $0xffffffff,%edi
add    %edx,%eax
add    $0xfffffffe,%r9d
add    $0xffffffff,%ecx
add    $0xfffffffffffffffc,%r8
add    $0xfffffffe,%esi
cmp    $0x4,%edi
jae    1130 <find_start_block_wide+0x30>
add    (%r8),%eax
ret

LLVM IR (-O0):
define i32 @find_start_block_wide(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %40
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 10, i32* %2
br label %40
13: ; preds = %9
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 22, i32* %2
br label %40
17: ; preds = %13
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 3
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 38, i32* %2
br label %40
21: ; preds = %17
%22 = load i32, i32* %3
%23 = mul nsw i32 %22, 2
%24 = add nsw i32 10, %23
store i32 %24, i32* %4
store i32 4, i32* %5
br label %25
25: ; preds = %29, %21
%26 = load i32, i32* %5
%27 = load i32, i32* %3
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %34
29: ; preds = %25
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 2
store i32 %31, i32* %5
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 2
store i32 %33, i32* %4
br label %25
34: ; preds = %25
%35 = load i32, i32* %3
%36 = sub nsw i32 %35, 1
%37 = call i32 @find_start_block_wide(i32 %36)
%38 = load i32, i32* %4
%39 = add nsw i32 %37, %38
store i32 %39, i32* %2
br label %40
40: ; preds = %34, %20, %16, %12, %8
%41 = load i32, i32* %2
ret i32 %41
}

LLVM IR (-O2):
@switch.table.find_start_block_wide = [4 x i32] [i32 0, i32 10, i32 22, i32 38]
define i32 @find_start_block_wide(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 12
%4 = add i32 %0, -5
br label %5
5: ; preds = %11, %1
%6 = phi i32 [ %21, %11 ], [ %4, %1 ]
%7 = phi i32 [ %20, %11 ], [ %3, %1 ]
%8 = phi i32 [ %19, %11 ], [ 0, %1 ]
%9 = phi i32 [ %18, %11 ], [ %0, %1 ]
%10 = icmp ult i32 %9, 4
br i1 %10, label %22, label %11
11: ; preds = %5
%12 = and i32 %6, -2
%13 = add i32 %7, %12
%14 = shl nsw i32 %9, 1
%15 = add nsw i32 %14, 10
%16 = icmp sgt i32 %9, 4
%17 = select i1 %16, i32 %13, i32 %15
%18 = add nsw i32 %9, -1
%19 = add nsw i32 %17, %8
%20 = add i32 %7, -2
%21 = add i32 %6, -1
br label %5
22: ; preds = %5
%23 = sext i32 %9 to i64
%24 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.find_start_block_wide, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = add nsw i32 %25, %8
ret i32 %26
}