sidepath(k, l, chance) int k, l, chance;
{
  int k_old, l_old;
  k_old = k;
  l_old = l;
  chance += 15;
  while (move(&k, &l)) {
    mark(k, l, &k_old, &l_old, -2);
    if (rand() % chance == 0)
      sidepath(k, l, chance);
  }
}


x86 assembly (clang, -O0):
<sidepath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0xf,%eax
mov    %eax,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1060 <move@plt>
cmp    $0x0,%eax
je     11c0 <sidepath+0x80>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0xfffffffe,%r8d
mov    $0x0,%al
call   1040 <mark@plt>
mov    $0x0,%al
call   1050 <rand@plt>
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    11bb <sidepath+0x7b>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <sidepath@plt>
jmp    1166 <sidepath+0x26>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sidepath>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <move@plt>
test   %eax,%eax
je     11d9 <sidepath+0x99>
add    $0xf,%ebx
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%r12
mov    %rsp,%r13
jmp    11a1 <sidepath+0x61>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <move@plt>
test   %eax,%eax
je     11d9 <sidepath+0x99>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0xfffffffe,%r8d
xor    %eax,%eax
call   1040 <mark@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltd
idiv   %ebx
test   %edx,%edx
jne    1190 <sidepath+0x50>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    %ebx,%edx
call   1030 <sidepath@plt>
jmp    1190 <sidepath+0x50>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @sidepath(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%10 = load i32, i32* %5
store i32 %10, i32* %8
%11 = load i32, i32* %6
store i32 %11, i32* %9
%12 = load i32, i32* %7
%13 = add nsw i32 %12, 15
store i32 %13, i32* %7
br label %14
14: ; preds = %30, %3
%15 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @move to i32 (i32*, i32*, ...)*)(i32* %5, i32* %6)
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %31
17: ; preds = %14
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = call i32 (i32, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @mark to i32 (i32, i32, i32*, i32*, i32, ...)*)(i32 %18, i32 %19, i32* %8, i32* %9, i32 -2)
%21 = call i32 (...) @rand()
%22 = load i32, i32* %7
%23 = srem i32 %21, %22
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %17
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = call i32 @sidepath(i32 %26, i32 %27, i32 %28)
br label %30
30: ; preds = %25, %17
br label %14
31: ; preds = %14
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @sidepath(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = bitcast i32* %6 to i8*
%9 = bitcast i32* %7 to i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
%10 = add nsw i32 %2, 15
%11 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @move to i32 (i32*, i32*, ...)*)(i32* %4, i32* %5)
%12 = icmp eq i32 %11, 0
br i1 %12, label %27, label %13
13: ; preds = %3, %24
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 (i32, i32, i32*, i32*, i32, ...) bitcast (i32 (...)* @mark to i32 (i32, i32, i32*, i32*, i32, ...)*)(i32 %14, i32 %15, i32* %6, i32* %7, i32 -2)
%17 = call i32 (...) @rand()
%18 = srem i32 %17, %10
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %13
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = call i32 @sidepath(i32 %21, i32 %22, i32 %10)
br label %24
24: ; preds = %20, %13
%25 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @move to i32 (i32*, i32*, ...)*)(i32* %4, i32* %5)
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %13
27: ; preds = %24, %3
ret i32 undef
}