#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 /*<<< orphan*/ puts(char *);
void stampa_quaterne(int quaterna[]) {
  size_t indice_quaterna;
  indice_quaterna = 0;
  puts("");
  printf("{ ");
  while (indice_quaterna < 4) {
    printf("%d ", quaterna[indice_quaterna]);
    indice_quaterna++;
  }
  printf("}\n");
  return;
}


x86 assembly (clang, -O0):
<stampa_quaterne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x4,-0x10(%rbp)
jae    1183 <stampa_quaterne+0x63>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114e <stampa_quaterne+0x2e>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stampa_quaterne>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%esi
lea    0xeab(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe77(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [3 x i8] c"{ \00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [3 x i8] c"}\0A\00"
define void @stampa_quaterne(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
store i64 0, i64* %3
%4 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %9, %1
%7 = load i64, i64* %3
%8 = icmp ult i64 %7, 4
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32*, i32** %2
%11 = load i64, i64* %3
%12 = getelementptr inbounds i32, i32* %10, i64 %11
%13 = load i32, i32* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i64, i64* %3
%16 = add i64 %15, 1
store i64 %16, i64* %3
br label %6
17: ; preds = %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"{ \00"
@.str.2 = [4 x i8] c"%d \00"
@str = [2 x i8] c"}\00"
define void @stampa_quaterne(i32* nocapture %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}