#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 /*<<< orphan*/ test(int, int, int);
int main() {
  for (int start0 = 0; start0 < 10; start0++) {
    for (int len0 = 2; len0 <= 10; len0++) {
      for (int stride0 = 1; stride0 < 10; stride0++) {
        if (start0 + (len0 - 1) * stride0 < 10) {
          test(start0, len0, stride0);
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11b1 <main+0xa1>
movl   $0x2,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     119e <main+0x8e>
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    118b <main+0x7b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
cmp    $0xa,%eax
jge    1178 <main+0x68>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <test@plt>
jmp    117d <main+0x6d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    1190 <main+0x80>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    11a3 <main+0x93>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %r14d,%r14d
jmp    113e <main+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r14d
cmp    $0xa,%r14d
je     12d3 <main+0x1c3>
mov    $0x3,%eax
mov    %rax,0x20(%rsp)
mov    $0x5,%eax
mov    %rax,0x18(%rsp)
mov    $0x6,%eax
mov    %rax,0x10(%rsp)
mov    $0x7,%eax
mov    %rax,0x8(%rsp)
mov    $0x9,%r15d
mov    $0x2,%r12d
mov    $0x4,%r13d
mov    $0x8,%ebp
mov    $0x2,%ebx
jmp    11df <main+0xcf>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebx
add    $0x8,%ebp
add    $0x4,%r13d
add    $0x2,%r12d
add    $0x9,%r15d
mov    0x8(%rsp),%rax
add    $0x7,%eax
mov    %rax,0x8(%rsp)
mov    0x10(%rsp),%rax
add    $0x6,%eax
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rax
add    $0x5,%eax
mov    %rax,0x18(%rsp)
mov    0x20(%rsp),%rax
add    $0x3,%eax
mov    %rax,0x20(%rsp)
cmp    $0xb,%ebx
je     1130 <main+0x20>
lea    (%r14,%rbx,1),%eax
add    $0xffffffff,%eax
cmp    $0xa,%eax
jae    11fa <main+0xea>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <test@plt>
lea    (%r14,%r12,1),%eax
cmp    $0x9,%eax
ja     1212 <main+0x102>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x2,%edx
call   1030 <test@plt>
mov    0x20(%rsp),%rax
add    %r14d,%eax
cmp    $0x9,%eax
ja     122e <main+0x11e>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x3,%edx
call   1030 <test@plt>
lea    (%r14,%r13,1),%eax
cmp    $0x9,%eax
ja     1246 <main+0x136>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x4,%edx
call   1030 <test@plt>
mov    0x18(%rsp),%rax
add    %r14d,%eax
cmp    $0x9,%eax
ja     1262 <main+0x152>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x5,%edx
call   1030 <test@plt>
mov    0x10(%rsp),%rax
add    %r14d,%eax
cmp    $0x9,%eax
ja     127e <main+0x16e>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x6,%edx
call   1030 <test@plt>
mov    0x8(%rsp),%rax
add    %r14d,%eax
cmp    $0x9,%eax
ja     129a <main+0x18a>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x7,%edx
call   1030 <test@plt>
lea    (%r14,%rbp,1),%eax
cmp    $0x9,%eax
ja     12b2 <main+0x1a2>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x8,%edx
call   1030 <test@plt>
lea    (%r14,%r15,1),%eax
cmp    $0x9,%eax
ja     1190 <main+0x80>
mov    %r14d,%edi
mov    %ebx,%esi
mov    $0x9,%edx
call   1030 <test@plt>
jmp    1190 <main+0x80>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 0, %0 ], [ %10, %9 ]
br label %4
3: ; preds = %9
ret i32 0
4: ; preds = %1, %62
%5 = phi i32 [ 2, %1 ], [ %63, %62 ]
%6 = add nsw i32 %5, -1
%7 = add nuw nsw i32 %6, %2
%8 = icmp ult i32 %7, 10
br i1 %8, label %12, label %14
9: ; preds = %62
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 10
br i1 %11, label %3, label %1
12: ; preds = %4
%13 = tail call i32 @test(i32 %2, i32 %5, i32 1)
br label %14
14: ; preds = %4, %12
%15 = shl nuw nsw i32 %6, 1
%16 = add nuw nsw i32 %15, %2
%17 = icmp ult i32 %16, 10
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 @test(i32 %2, i32 %5, i32 2)
br label %20
20: ; preds = %18, %14
%21 = mul nuw nsw i32 %6, 3
%22 = add nuw nsw i32 %21, %2
%23 = icmp ult i32 %22, 10
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = tail call i32 @test(i32 %2, i32 %5, i32 3)
br label %26
26: ; preds = %24, %20
%27 = shl nuw nsw i32 %6, 2
%28 = add nuw nsw i32 %27, %2
%29 = icmp ult i32 %28, 10
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = tail call i32 @test(i32 %2, i32 %5, i32 4)
br label %32
32: ; preds = %30, %26
%33 = mul nuw nsw i32 %6, 5
%34 = add nuw nsw i32 %33, %2
%35 = icmp ult i32 %34, 10
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = tail call i32 @test(i32 %2, i32 %5, i32 5)
br label %38
38: ; preds = %36, %32
%39 = mul nuw nsw i32 %6, 6
%40 = add nuw nsw i32 %39, %2
%41 = icmp ult i32 %40, 10
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = tail call i32 @test(i32 %2, i32 %5, i32 6)
br label %44
44: ; preds = %42, %38
%45 = mul nuw nsw i32 %6, 7
%46 = add nuw nsw i32 %45, %2
%47 = icmp ult i32 %46, 10
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = tail call i32 @test(i32 %2, i32 %5, i32 7)
br label %50
50: ; preds = %48, %44
%51 = shl nuw nsw i32 %6, 3
%52 = add nuw nsw i32 %51, %2
%53 = icmp ult i32 %52, 10
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = tail call i32 @test(i32 %2, i32 %5, i32 8)
br label %56
56: ; preds = %54, %50
%57 = mul nuw nsw i32 %6, 9
%58 = add nuw nsw i32 %57, %2
%59 = icmp ult i32 %58, 10
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = tail call i32 @test(i32 %2, i32 %5, i32 9)
br label %62
62: ; preds = %60, %56
%63 = add nuw nsw i32 %5, 1
%64 = icmp eq i32 %63, 11
br i1 %64, label %9, label %4
}