#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ crearMes(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int);
int /*<<< orphan*/ getDiasMes(int, int);
int /*<<< orphan*/ getNombreMes(int);
void crearCalendario(FILE *c, int anio) {
  int i;
  for (i = 1; i <= 12; ++i) {
    crearMes(c, getDiasMes(i, anio), getNombreMes(i), anio);
  }
}


x86 assembly (clang, -O0):
<crearCalendario>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0xc,-0x10(%rbp)
jg     118d <crearCalendario+0x5d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <getDiasMes@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <getNombreMes@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
mov    -0xc(%rbp),%ecx
call   1040 <crearMes@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <crearCalendario+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crearCalendario>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x1,%edi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x1,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x2,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x2,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x3,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x4,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x4,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x5,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x6,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x6,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x7,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x7,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x8,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x8,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0x9,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0x9,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0xa,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0xa,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0xb,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0xb,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1040 <crearMes@plt>
mov    $0xc,%edi
mov    %ebx,%esi
call   1050 <getDiasMes@plt>
mov    %eax,%ebp
mov    $0xc,%edi
call   1030 <getNombreMes@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <crearMes@plt>

LLVM IR (-O0):
define void @crearCalendario(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = icmp sle i32 %7, 12
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @getDiasMes(i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @getNombreMes(i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @crearMes(i32* %10, i32 %13, i32 %15, i32 %16)
br label %18
18: ; preds = %9
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @crearCalendario(i32* %0, i32 %1) {
%3 = tail call i32 @getDiasMes(i32 1, i32 %1)
%4 = tail call i32 @getNombreMes(i32 1)
%5 = tail call i32 @crearMes(i32* %0, i32 %3, i32 %4, i32 %1)
%6 = tail call i32 @getDiasMes(i32 2, i32 %1)
%7 = tail call i32 @getNombreMes(i32 2)
%8 = tail call i32 @crearMes(i32* %0, i32 %6, i32 %7, i32 %1)
%9 = tail call i32 @getDiasMes(i32 3, i32 %1)
%10 = tail call i32 @getNombreMes(i32 3)
%11 = tail call i32 @crearMes(i32* %0, i32 %9, i32 %10, i32 %1)
%12 = tail call i32 @getDiasMes(i32 4, i32 %1)
%13 = tail call i32 @getNombreMes(i32 4)
%14 = tail call i32 @crearMes(i32* %0, i32 %12, i32 %13, i32 %1)
%15 = tail call i32 @getDiasMes(i32 5, i32 %1)
%16 = tail call i32 @getNombreMes(i32 5)
%17 = tail call i32 @crearMes(i32* %0, i32 %15, i32 %16, i32 %1)
%18 = tail call i32 @getDiasMes(i32 6, i32 %1)
%19 = tail call i32 @getNombreMes(i32 6)
%20 = tail call i32 @crearMes(i32* %0, i32 %18, i32 %19, i32 %1)
%21 = tail call i32 @getDiasMes(i32 7, i32 %1)
%22 = tail call i32 @getNombreMes(i32 7)
%23 = tail call i32 @crearMes(i32* %0, i32 %21, i32 %22, i32 %1)
%24 = tail call i32 @getDiasMes(i32 8, i32 %1)
%25 = tail call i32 @getNombreMes(i32 8)
%26 = tail call i32 @crearMes(i32* %0, i32 %24, i32 %25, i32 %1)
%27 = tail call i32 @getDiasMes(i32 9, i32 %1)
%28 = tail call i32 @getNombreMes(i32 9)
%29 = tail call i32 @crearMes(i32* %0, i32 %27, i32 %28, i32 %1)
%30 = tail call i32 @getDiasMes(i32 10, i32 %1)
%31 = tail call i32 @getNombreMes(i32 10)
%32 = tail call i32 @crearMes(i32* %0, i32 %30, i32 %31, i32 %1)
%33 = tail call i32 @getDiasMes(i32 11, i32 %1)
%34 = tail call i32 @getNombreMes(i32 11)
%35 = tail call i32 @crearMes(i32* %0, i32 %33, i32 %34, i32 %1)
%36 = tail call i32 @getDiasMes(i32 12, i32 %1)
%37 = tail call i32 @getNombreMes(i32 12)
%38 = tail call i32 @crearMes(i32* %0, i32 %36, i32 %37, i32 %1)
ret void
}