#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 *, unsigned int, unsigned int, unsigned int,
                          unsigned int, unsigned int);
void print_crt(unsigned int *crt) {
  printf("p = %u, q = %u, dp = %u, dq = %u, q_inv = %u\n", crt[0], crt[1],
         crt[2], crt[3], crt[4]);
  printf("crt[] = {%u,%u,%u,%u,%u};\n", crt[0], crt[1], crt[2], crt[3], crt[4]);
}


x86 assembly (clang, -O0):
<print_crt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r9d
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r9d
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crt>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    0xc(%rdi),%r8d
mov    0x10(%rdi),%r9d
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%esi
mov    0x4(%rbx),%edx
mov    0x8(%rbx),%ecx
mov    0xc(%rbx),%r8d
mov    0x10(%rbx),%r9d
lea    0xee7(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"p = %u, q = %u, dp = %u, dq = %u, q_inv = %u\0A\00"
@.str.1 = [27 x i8] c"crt[] = {%u,%u,%u,%u,%u};\0A\00"
define void @print_crt(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i32 %17)
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 0
%21 = load i32, i32* %20
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 2
%27 = load i32, i32* %26
%28 = load i32*, i32** %2
%29 = getelementptr inbounds i32, i32* %28, i64 3
%30 = load i32, i32* %29
%31 = load i32*, i32** %2
%32 = getelementptr inbounds i32, i32* %31, i64 4
%33 = load i32, i32* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %24, i32 %27, i32 %30, i32 %33)
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"p = %u, q = %u, dp = %u, dq = %u, q_inv = %u\0A\00"
@.str.1 = [27 x i8] c"crt[] = {%u,%u,%u,%u,%u};\0A\00"
define void @print_crt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %8, i32 %10)
%12 = load i32, i32* %0
%13 = load i32, i32* %3
%14 = load i32, i32* %5
%15 = load i32, i32* %7
%16 = load i32, i32* %9
%17 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15, i32 %16)
ret void
}