#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*/ printf(char *, ...);
void dump(const unsigned long *a, long m, const unsigned long *b, long n,
          const unsigned long *c, const unsigned long *d) {
  printf("failed:=[");
  printf("[");
  int j;
  for (j = 0; j < m; j++) {
    if (j)
      printf(", ");
    printf("%lu", a[j]);
  }
  printf("],");
  printf("[");
  for (j = 0; j < n; j++) {
    if (j)
      printf(", ");
    printf("%lu", b[j]);
  }
  printf("],");
  printf("[");
  for (j = 0; j < m + n; j++) {
    if (j)
      printf(", ");
    printf("%lu", c[j]);
  }
  printf("],");
  printf("[");
  for (j = 0; j < m + n; j++) {
    if (j)
      printf(", ");
    printf("%lu", d[j]);
  }
  printf("]");
  printf("];\n");
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    11a1 <dump+0x91>
cmpl   $0x0,-0x34(%rbp)
je     1179 <dump+0x69>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1153 <dump+0x43>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1212 <dump+0x102>
cmpl   $0x0,-0x34(%rbp)
je     11ea <dump+0xda>
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c4 <dump+0xb4>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    -0x20(%rbp),%rcx
cmp    %rcx,%rax
jge    128a <dump+0x17a>
cmpl   $0x0,-0x34(%rbp)
je     1262 <dump+0x152>
lea    0xdaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1235 <dump+0x125>
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    -0x20(%rbp),%rcx
cmp    %rcx,%rax
jge    1302 <dump+0x1f2>
cmpl   $0x0,-0x34(%rbp)
je     12da <dump+0x1ca>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ad <dump+0x19d>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x8(%rsp)
mov    %r8,(%rsp)
mov    %rcx,%r14
mov    %rdx,0x10(%rsp)
mov    %rsi,%r12
mov    %rdi,%rbp
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %r12,%r12
jle    11c2 <dump+0x92>
mov    0x0(%rbp),%rsi
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%r12
je     11c2 <dump+0x92>
mov    $0x1,%r13d
lea    0xe73(%rip),%rbx
lea    0xe6f(%rip),%r15
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%rbp,%r13,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r13
cmp    %r13,%r12
jne    11a0 <dump+0x70>
lea    0xe48(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %r14,%r14
mov    0x10(%rsp),%rbx
jle    1231 <dump+0x101>
mov    (%rbx),%rsi
lea    0xe1f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%r14
je     1231 <dump+0x101>
mov    $0x1,%ebp
lea    0xe03(%rip),%r13
lea    0xdff(%rip),%r15
xchg   %ax,%ax
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1210 <dump+0xe0>
lea    0xdd9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
add    %r12,%r14
test   %r14,%r14
jle    1323 <dump+0x1f3>
mov    (%rsp),%rbx
mov    (%rbx),%rsi
lea    0xdaa(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%r14
je     12b1 <dump+0x181>
mov    $0x1,%ebp
lea    0xd8e(%rip),%r12
lea    0xd8a(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1290 <dump+0x160>
lea    0xd59(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %r14,%r14
mov    0x8(%rsp),%r12
jle    133b <dump+0x20b>
mov    (%r12),%rsi
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%r14
je     133b <dump+0x20b>
mov    $0x1,%ebp
lea    0xd13(%rip),%rbx
lea    0xd0f(%rip),%r15
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12,%rbp,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1300 <dump+0x1d0>
jmp    133b <dump+0x20b>
lea    0xce7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    $0x5d,%edi
call   1030 <putchar@plt>
lea    0xcc8(%rip),%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"failed:=[\00"
@.str.1 = [2 x i8] c"[\00"
@.str.2 = [3 x i8] c", \00"
@.str.3 = [4 x i8] c"%lu\00"
@.str.4 = [3 x i8] c"],\00"
@.str.5 = [2 x i8] c"]\00"
@.str.6 = [4 x i8] c"];\0A\00"
define void @dump(i64* %0, i64 %1, i64* %2, i64 %3, i64* %4, i64* %5) {
%7 = alloca i64*
%8 = alloca i64
%9 = alloca i64*
%10 = alloca i64
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca i32
store i64* %0, i64** %7
store i64 %1, i64* %8
store i64* %2, i64** %9
store i64 %3, i64* %10
store i64* %4, i64** %11
store i64* %5, i64** %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %13
br label %16
16: ; preds = %33, %6
%17 = load i32, i32* %13
%18 = sext i32 %17 to i64
%19 = load i64, i64* %8
%20 = icmp slt i64 %18, %19
br i1 %20, label %21, label %36
21: ; preds = %16
%22 = load i32, i32* %13
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %21
%27 = load i64*, i64** %7
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i64, i64* %27, i64 %29
%31 = load i64, i64* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %31)
br label %33
33: ; preds = %26
%34 = load i32, i32* %13
%35 = add nsw i32 %34, 1
store i32 %35, i32* %13
br label %16
36: ; preds = %16
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %13
br label %39
39: ; preds = %56, %36
%40 = load i32, i32* %13
%41 = sext i32 %40 to i64
%42 = load i64, i64* %10
%43 = icmp slt i64 %41, %42
br i1 %43, label %44, label %59
44: ; preds = %39
%45 = load i32, i32* %13
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %49
49: ; preds = %47, %44
%50 = load i64*, i64** %9
%51 = load i32, i32* %13
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i64, i64* %50, i64 %52
%54 = load i64, i64* %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %54)
br label %56
56: ; preds = %49
%57 = load i32, i32* %13
%58 = add nsw i32 %57, 1
store i32 %58, i32* %13
br label %39
59: ; preds = %39
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %13
br label %62
62: ; preds = %81, %59
%63 = load i32, i32* %13
%64 = sext i32 %63 to i64
%65 = load i64, i64* %8
%66 = load i64, i64* %10
%67 = add nsw i64 %65, %66
%68 = icmp slt i64 %64, %67
br i1 %68, label %69, label %84
69: ; preds = %62
%70 = load i32, i32* %13
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %74
74: ; preds = %72, %69
%75 = load i64*, i64** %11
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i64, i64* %75, i64 %77
%79 = load i64, i64* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %79)
br label %81
81: ; preds = %74
%82 = load i32, i32* %13
%83 = add nsw i32 %82, 1
store i32 %83, i32* %13
br label %62
84: ; preds = %62
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %13
br label %87
87: ; preds = %106, %84
%88 = load i32, i32* %13
%89 = sext i32 %88 to i64
%90 = load i64, i64* %8
%91 = load i64, i64* %10
%92 = add nsw i64 %90, %91
%93 = icmp slt i64 %89, %92
br i1 %93, label %94, label %109
94: ; preds = %87
%95 = load i32, i32* %13
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %99
99: ; preds = %97, %94
%100 = load i64*, i64** %12
%101 = load i32, i32* %13
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i64, i64* %100, i64 %102
%104 = load i64, i64* %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %104)
br label %106
106: ; preds = %99
%107 = load i32, i32* %13
%108 = add nsw i32 %107, 1
store i32 %108, i32* %13
br label %87
109: ; preds = %87
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"failed:=[\00"
@.str.2 = [3 x i8] c", \00"
@.str.3 = [4 x i8] c"%lu\00"
@.str.4 = [3 x i8] c"],\00"
@str = [3 x i8] c"];\00"
define void @dump(i64* nocapture %0, i64 %1, i64* nocapture %2, i64 %3, i64* nocapture %4, i64* nocapture %5) {
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @putchar(i32 91)
%9 = icmp sgt i64 %1, 0
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i64, i64* %0
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %11)
%13 = icmp eq i64 %1, 1
br i1 %13, label %22, label %14
14: ; preds = %10, %14
%15 = phi i64 [ %20, %14 ], [ 1, %10 ]
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%17 = getelementptr inbounds i64, i64* %0, i64 %15
%18 = load i64, i64* %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %18)
%20 = add nuw nsw i64 %15, 1
%21 = icmp eq i64 %20, %1
br i1 %21, label %22, label %14
22: ; preds = %14, %10, %6
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%24 = tail call i32 @putchar(i32 91)
%25 = icmp sgt i64 %3, 0
br i1 %25, label %26, label %38
26: ; preds = %22
%27 = load i64, i64* %2
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %27)
%29 = icmp eq i64 %3, 1
br i1 %29, label %38, label %30
30: ; preds = %26, %30
%31 = phi i64 [ %36, %30 ], [ 1, %26 ]
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%33 = getelementptr inbounds i64, i64* %2, i64 %31
%34 = load i64, i64* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %34)
%36 = add nuw nsw i64 %31, 1
%37 = icmp eq i64 %36, %3
br i1 %37, label %38, label %30
38: ; preds = %30, %26, %22
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%40 = tail call i32 @putchar(i32 91)
%41 = add i64 %3, %1
%42 = icmp sgt i64 %41, 0
br i1 %42, label %43, label %70
43: ; preds = %38
%44 = load i64, i64* %4
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %44)
%46 = icmp eq i64 %41, 1
br i1 %46, label %55, label %47
47: ; preds = %43, %47
%48 = phi i64 [ %53, %47 ], [ 1, %43 ]
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%50 = getelementptr inbounds i64, i64* %4, i64 %48
%51 = load i64, i64* %50
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %51)
%53 = add nuw nsw i64 %48, 1
%54 = icmp eq i64 %53, %41
br i1 %54, label %55, label %47
55: ; preds = %47, %43
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%57 = tail call i32 @putchar(i32 91)
br i1 %42, label %58, label %73
58: ; preds = %55
%59 = load i64, i64* %5
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %59)
%61 = icmp eq i64 %41, 1
br i1 %61, label %73, label %62
62: ; preds = %58, %62
%63 = phi i64 [ %68, %62 ], [ 1, %58 ]
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%65 = getelementptr inbounds i64, i64* %5, i64 %63
%66 = load i64, i64* %65
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 %66)
%68 = add nuw nsw i64 %63, 1
%69 = icmp eq i64 %68, %41
br i1 %69, label %73, label %62
70: ; preds = %38
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%72 = tail call i32 @putchar(i32 91)
br label %73
73: ; preds = %62, %70, %58, %55
%74 = tail call i32 @putchar(i32 93)
%75 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}