#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 *, int, int, int);
int print_status(int *A, int *len_a, int *B, int *len_b, int *C, int *len_c) {
  printf("len_a:%d len_b:%d len_c%d\n", *len_a, *len_b, *len_c);
  printf("A top: %d, B top: %d, C top: %d", A[*len_a], B[*len_b], C[*len_b]);
  return (0);
}


x86 assembly (clang, -O0):
<print_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_status>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r12
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r13
mov    (%rsi),%esi
mov    (%rcx),%edx
mov    (%r9),%ecx
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movslq (%rbx),%rax
mov    0x0(%r13,%rax,4),%esi
movslq (%r12),%rax
mov    (%r15,%rax,4),%edx
mov    (%r14,%rax,4),%ecx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"len_a:%d len_b:%d len_c%d\0A\00"
@.str.1 = [32 x i8] c"A top: %d, B top: %d, C top: %d\00"
define i32 @print_status(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*
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
%13 = load i32*, i32** %8
%14 = load i32, i32* %13
%15 = load i32*, i32** %10
%16 = load i32, i32* %15
%17 = load i32*, i32** %12
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16, i32 %18)
%20 = load i32*, i32** %7
%21 = load i32*, i32** %8
%22 = load i32, i32* %21
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %20, i64 %23
%25 = load i32, i32* %24
%26 = load i32*, i32** %9
%27 = load i32*, i32** %10
%28 = load i32, i32* %27
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %26, i64 %29
%31 = load i32, i32* %30
%32 = load i32*, i32** %11
%33 = load i32*, i32** %10
%34 = load i32, i32* %33
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %32, i64 %35
%37 = load i32, i32* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %31, i32 %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"len_a:%d len_b:%d len_c%d\0A\00"
@.str.1 = [32 x i8] c"A top: %d, B top: %d, C top: %d\00"
define i32 @print_status(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
%7 = load i32, i32* %1
%8 = load i32, i32* %3
%9 = load i32, i32* %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %2, i64 %16
%18 = load i32, i32* %17
%19 = getelementptr inbounds i32, i32* %4, i64 %16
%20 = load i32, i32* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %18, i32 %20)
ret i32 0
}