#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 */
int is_distance_under_recrusively(char *, int, char *, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/, int,
                                  int *);
int is_distance_under(char *a, int al, char *b, int bl, int s) {
  int d[1200 * 1200];
  int i;
  for (i = 0; i <= 1200 * 1200; i++) {
    d[i] = 0;
  }
  return is_distance_under_recrusively(a, al, b, bl, 0, 0, 0, s, d);
}


x86 assembly (clang, -O0):
<is_distance_under>:
push   %rbp
mov    %rsp,%rbp
sub    $0x57e440,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x57e424(%rbp)
cmpl   $0x15f900,-0x57e424(%rbp)
jg     116d <is_distance_under+0x5d>
movslq -0x57e424(%rbp),%rax
movl   $0x0,-0x57e420(%rbp,%rax,4)
mov    -0x57e424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x57e424(%rbp)
jmp    1137 <is_distance_under+0x27>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r10d
lea    -0x57e420(%rbp),%rax
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <is_distance_under_recrusively@plt>
add    $0x57e440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_distance_under>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x57e408,%rsp
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %rdx,%r12
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%r13
mov    $0x57e404,%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r13
push   %r14
push   $0x0
call   1040 <is_distance_under_recrusively@plt>
add    $0x57e428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_distance_under(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca [1440000 x i32]
%12 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %12
br label %13
13: ; preds = %20, %5
%14 = load i32, i32* %12
%15 = icmp sle i32 %14, 1440000
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %12
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [1440000 x i32], [1440000 x i32]* %11, i64 0, i64 %18
store i32 0, i32* %19
br label %20
20: ; preds = %16
%21 = load i32, i32* %12
%22 = add nsw i32 %21, 1
store i32 %22, i32* %12
br label %13
23: ; preds = %13
%24 = load i8*, i8** %6
%25 = load i32, i32* %7
%26 = load i8*, i8** %8
%27 = load i32, i32* %9
%28 = load i32, i32* %10
%29 = getelementptr inbounds [1440000 x i32], [1440000 x i32]* %11, i64 0, i64 0
%30 = call i32 @is_distance_under_recrusively(i8* %24, i32 %25, i8* %26, i32 %27, i32 0, i32 0, i32 0, i32 %28, i32* %29)
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_distance_under(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca [1440000 x i32]
%7 = bitcast [1440000 x i32]* %6 to i8*
%8 = getelementptr inbounds [1440000 x i32], [1440000 x i32]* %6, i64 0, i64 0
%9 = call i32 @is_distance_under_recrusively(i8* %0, i32 %1, i8* %2, i32 %3, i32 0, i32 0, i32 0, i32 %4, i32* %8)
ret i32 %9
}