#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 jlis(int *, int, int /*<<< orphan*/, int *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int a1[] = {1, 2, 4};
  int a2[] = {1, 2, 3};
  int a3[] = {10, 20, 30, 1, 2};
  int b1[] = {3, 4, 7};
  int b2[] = {4, 5, 6};
  int b3[] = {10, 20, 30};
  printf("%d\n", jlis(a1, 3, 0, b1, 3, 0));
  jlis(NULL, 3, 0, NULL, 3, 0);
  printf("%d\n", jlis(a2, 3, 0, b2, 3, 0));
  jlis(NULL, 3, 0, NULL, 3, 0);
  printf("%d\n", jlis(a3, 5, 0, b3, 3, 0));
  jlis(NULL, 3, 0, NULL, 3, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xec1(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeb6(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x4c(%rbp)
mov    0xeae(%rip),%eax
mov    %eax,-0x44(%rbp)
mov    0xea8(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xea6(%rip),%eax
mov    %eax,-0x50(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x64(%rbp)
mov    0xe9e(%rip),%eax
mov    %eax,-0x5c(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x4c(%rbp),%rcx
mov    $0x3,%r8d
xor    %r9d,%r9d
mov    %r8d,%esi
mov    %r9d,%edx
call   1040 <jlis@plt>
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
mov    %rcx,%rdi
mov    %r8d,%esi
mov    %r9d,%edx
call   1040 <jlis@plt>
lea    -0x28(%rbp),%rdi
lea    -0x58(%rbp),%rcx
mov    $0x3,%r8d
xor    %r9d,%r9d
mov    %r8d,%esi
mov    %r9d,%edx
call   1040 <jlis@plt>
mov    %eax,%esi
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
mov    %rcx,%rdi
mov    %r8d,%esi
mov    %r9d,%edx
call   1040 <jlis@plt>
lea    -0x40(%rbp),%rdi
lea    -0x64(%rbp),%rcx
mov    $0x5,%esi
xor    %r9d,%r9d
mov    $0x3,%r8d
mov    %r9d,%edx
call   1040 <jlis@plt>
mov    %eax,%esi
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
mov    %rcx,%rdi
mov    %r8d,%esi
mov    %r9d,%edx
call   1040 <jlis@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    0xedd(%rip),%eax
mov    %eax,0x48(%rsp)
mov    0xeca(%rip),%rax
mov    %rax,0x40(%rsp)
mov    0xed3(%rip),%eax
mov    %eax,0x38(%rsp)
mov    0xec0(%rip),%rax
mov    %rax,0x30(%rsp)
mov    0xed9(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    0xecf(%rip),%eax
mov    %eax,0x28(%rsp)
mov    0xebc(%rip),%rax
mov    %rax,0x20(%rsp)
mov    0xec5(%rip),%eax
mov    %eax,0x18(%rsp)
mov    0xeb2(%rip),%rax
mov    %rax,0x10(%rsp)
mov    0xebb(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xea8(%rip),%rax
mov    %rax,(%rsp)
lea    0x40(%rsp),%rdi
lea    0x20(%rsp),%rcx
mov    $0x3,%esi
xor    %edx,%edx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
lea    0xe8a(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
lea    0x30(%rsp),%rdi
lea    0x10(%rsp),%rcx
mov    $0x3,%esi
xor    %edx,%edx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
lea    0x50(%rsp),%rdi
mov    %rsp,%rcx
mov    $0x5,%esi
xor    %edx,%edx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1040 <jlis@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a1 = [3 x i32] [i32 1, i32 2, i32 4]
@__const.main.a2 = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.a3 = [5 x i32] [i32 10, i32 20, i32 30, i32 1, i32 2]
@__const.main.b1 = [3 x i32] [i32 3, i32 4, i32 7]
@__const.main.b2 = [3 x i32] [i32 4, i32 5, i32 6]
@__const.main.b3 = [3 x i32] [i32 10, i32 20, i32 30]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [5 x i32]
%9 = alloca [3 x i32]
%10 = alloca [3 x i32]
%11 = alloca [3 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [3 x i32]* %6 to i8*
%13 = bitcast [3 x i32]* %7 to i8*
%14 = bitcast [5 x i32]* %8 to i8*
%15 = bitcast [3 x i32]* %9 to i8*
%16 = bitcast [3 x i32]* %10 to i8*
%17 = bitcast [3 x i32]* %11 to i8*
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%20 = call i32 @jlis(i32* %18, i32 3, i32 0, i32* %19, i32 3, i32 0)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%25 = call i32 @jlis(i32* %23, i32 3, i32 0, i32* %24, i32 3, i32 0)
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
%28 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%30 = call i32 @jlis(i32* %28, i32 5, i32 0, i32* %29, i32 3, i32 0)
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a1 = [3 x i32] [i32 1, i32 2, i32 4]
@__const.main.a2 = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.a3 = [5 x i32] [i32 10, i32 20, i32 30, i32 1, i32 2]
@__const.main.b1 = [3 x i32] [i32 3, i32 4, i32 7]
@__const.main.b2 = [3 x i32] [i32 4, i32 5, i32 6]
@__const.main.b3 = [3 x i32] [i32 10, i32 20, i32 30]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = alloca [5 x i32]
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [3 x i32]
%9 = bitcast [3 x i32]* %3 to i8*
%10 = bitcast [3 x i32]* %4 to i8*
%11 = bitcast [5 x i32]* %5 to i8*
%12 = bitcast [3 x i32]* %6 to i8*
%13 = bitcast [3 x i32]* %7 to i8*
%14 = bitcast [3 x i32]* %8 to i8*
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%17 = call i32 @jlis(i32* %15, i32 3, i32 0, i32* %16, i32 3, i32 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%22 = call i32 @jlis(i32* %20, i32 3, i32 0, i32* %21, i32 3, i32 0)
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %8, i64 0, i64 0
%27 = call i32 @jlis(i32* %25, i32 5, i32 0, i32* %26, i32 3, i32 0)
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = call i32 @jlis(i32* null, i32 3, i32 0, i32* null, i32 3, i32 0)
ret i32 0
}