#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 display_three_array(int *part_a, int *part_b, int *part_c, int size_a,
                         int size_b, int size_c) {
  int i;
  printf("part a, size : %d\n", size_a);
  for (i = 0; i < size_a; i++) {
    printf("%d ", part_a[i]);
  }
  printf("\n");
  printf("part b, size : %d\n", size_b);
  for (i = 0; i < size_b; i++) {
    printf("%d ", part_b[i]);
  }
  printf("\n");
  printf("part c, size : %d\n", size_c);
  for (i = 0; i < size_c; i++) {
    printf("%d ", part_c[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<display_three_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    117a <display_three_array+0x6a>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1147 <display_three_array+0x37>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11d3 <display_three_array+0xc3>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a0 <display_three_array+0x90>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    122c <display_three_array+0x11c>
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11f9 <display_three_array+0xe9>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_three_array>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,0x4(%rsp)
mov    %r8d,(%rsp)
mov    %ecx,%ebp
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
lea    0xeba(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    1177 <display_three_array+0x57>
mov    %ebp,%r14d
lea    0xeb6(%rip),%rbp
xor    %r15d,%r15d
mov    (%rbx,%r15,4),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r14
jne    1160 <display_three_array+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe8f(%rip),%rdi
mov    (%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    11c8 <display_three_array+0xa8>
mov    %ebx,%ebp
lea    0xe72(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x0(%r13,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11b0 <display_three_array+0x90>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe51(%rip),%rdi
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    1217 <display_three_array+0xf7>
mov    %ebx,%ebp
lea    0xe20(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r12,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1200 <display_three_array+0xe0>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"part a, size : %d\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [19 x i8] c"part b, size : %d\0A\00"
@.str.4 = [19 x i8] c"part c, size : %d\0A\00"
define void @display_three_array(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14)
store i32 0, i32* %13
br label %16
16: ; preds = %27, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %10
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = load i32*, i32** %7
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %20
%28 = load i32, i32* %13
%29 = add nsw i32 %28, 1
store i32 %29, i32* %13
br label %16
30: ; preds = %16
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%32 = load i32, i32* %11
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %32)
store i32 0, i32* %13
br label %34
34: ; preds = %45, %30
%35 = load i32, i32* %13
%36 = load i32, i32* %11
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %48
38: ; preds = %34
%39 = load i32*, i32** %8
%40 = load i32, i32* %13
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %39, i64 %41
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %38
%46 = load i32, i32* %13
%47 = add nsw i32 %46, 1
store i32 %47, i32* %13
br label %34
48: ; preds = %34
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%50 = load i32, i32* %12
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %50)
store i32 0, i32* %13
br label %52
52: ; preds = %63, %48
%53 = load i32, i32* %13
%54 = load i32, i32* %12
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %66
56: ; preds = %52
%57 = load i32*, i32** %9
%58 = load i32, i32* %13
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i32, i32* %57, i64 %59
%61 = load i32, i32* %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %56
%64 = load i32, i32* %13
%65 = add nsw i32 %64, 1
store i32 %65, i32* %13
br label %52
66: ; preds = %52
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"part a, size : %d\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.3 = [19 x i8] c"part b, size : %d\0A\00"
@.str.4 = [19 x i8] c"part c, size : %d\0A\00"
define void @display_three_array(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%8 = icmp sgt i32 %3, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = zext i32 %3 to i64
br label %11
11: ; preds = %9, %11
%12 = phi i64 [ 0, %9 ], [ %16, %11 ]
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = add nuw nsw i64 %12, 1
%17 = icmp eq i64 %16, %10
br i1 %17, label %18, label %11
18: ; preds = %11, %6
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%21 = icmp sgt i32 %4, 0
br i1 %21, label %22, label %31
22: ; preds = %18
%23 = zext i32 %4 to i64
br label %24
24: ; preds = %22, %24
%25 = phi i64 [ 0, %22 ], [ %29, %24 ]
%26 = getelementptr inbounds i32, i32* %1, i64 %25
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = add nuw nsw i64 %25, 1
%30 = icmp eq i64 %29, %23
br i1 %30, label %31, label %24
31: ; preds = %24, %18
%32 = tail call i32 @putchar(i32 10)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %5)
%34 = icmp sgt i32 %5, 0
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = zext i32 %5 to i64
br label %37
37: ; preds = %35, %37
%38 = phi i64 [ 0, %35 ], [ %42, %37 ]
%39 = getelementptr inbounds i32, i32* %2, i64 %38
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = add nuw nsw i64 %38, 1
%43 = icmp eq i64 %42, %36
br i1 %43, label %44, label %37
44: ; preds = %37, %31
%45 = tail call i32 @putchar(i32 10)
ret void
}