#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 */
scalar_t__ child_fly(char **, int);
int /*<<< orphan*/ init_map(char **);
int mother_fly(char **, int);
int /*<<< orphan*/ print_map(char **);
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char const *argv[]) {
  srand(time(NULL));
  char map[10][20];
  init_map(map);
  int start = rand() % 20 * 10;
  int end = mother_fly(map, start);
  print_map(map);
  if (child_fly(map, end))
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
lea    -0xe0(%rbp),%rdi
call   1050 <init_map@plt>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
imul   $0xa,%edx,%eax
mov    %eax,-0xe4(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0xe4(%rbp),%esi
call   1070 <mother_fly@plt>
mov    %eax,-0xe8(%rbp)
lea    -0xe0(%rbp),%rdi
call   1090 <print_map@plt>
lea    -0xe0(%rbp),%rdi
mov    -0xe8(%rbp),%esi
call   1030 <child_fly@plt>
cmp    $0x0,%rax
je     121e <main+0x9e>
lea    0xdec(%rip),%rdi
call   1040 <printf@plt>
jmp    122a <main+0xaa>
lea    0xde0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0xc8,%rsp
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <init_map@plt>
xor    %eax,%eax
call   10a0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%esi
mov    %rbx,%rdi
call   1070 <mother_fly@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1090 <print_map@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <child_fly@plt>
test   %rax,%rax
lea    0xe0e(%rip),%rax
lea    0xe0a(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Yes\0A\00"
@.str.1 = [4 x i8] c"No\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x [20 x i8]]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @time(i32* null)
%10 = call i32 @srand(i32 %9)
%11 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 0
%12 = bitcast [20 x i8]* %11 to i8**
%13 = call i32 @init_map(i8** %12)
%14 = call i32 (...) @rand()
%15 = srem i32 %14, 20
%16 = mul nsw i32 %15, 10
store i32 %16, i32* %7
%17 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 0
%18 = bitcast [20 x i8]* %17 to i8**
%19 = load i32, i32* %7
%20 = call i32 @mother_fly(i8** %18, i32 %19)
store i32 %20, i32* %8
%21 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 0
%22 = bitcast [20 x i8]* %21 to i8**
%23 = call i32 @print_map(i8** %22)
%24 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 0
%25 = bitcast [20 x i8]* %24 to i8**
%26 = load i32, i32* %8
%27 = call i64 @child_fly(i8** %25, i32 %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %2
%30 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %33
31: ; preds = %2
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31, %29
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"No\00"
@str.2 = [4 x i8] c"Yes\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x [20 x i8]]
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @srand(i32 %4)
%6 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 0, i64 0
%7 = bitcast [10 x [20 x i8]]* %3 to i8**
%8 = call i32 @init_map(i8** %7)
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 20
%11 = mul nsw i32 %10, 10
%12 = call i32 @mother_fly(i8** %7, i32 %11)
%13 = call i32 @print_map(i8** %7)
%14 = call i64 @child_fly(i8** %7, i32 %12)
%15 = icmp eq i64 %14, 0
%16 = select i1 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0)
%17 = call i32 @puts(i8* dereferenceable(1) %16)
ret i32 0
}