#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*/ bissexto(int);
int diasDoMes(int ano, int mes) {
  switch (mes) {
  case 1:
  case 3:
  case 5:
  case 7:
  case 8:
  case 10:
  case 12:
    return 31;
  case 2:
    if (bissexto(ano))
      return 29;
    else
      return 28;
  case 4:
  case 6:
  case 9:
  case 11:
    return 30;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<diasDoMes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     11df <diasDoMes+0xcf>
jmp    1132 <diasDoMes+0x22>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     11eb <diasDoMes+0xdb>
jmp    1143 <diasDoMes+0x33>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     11df <diasDoMes+0xcf>
jmp    1154 <diasDoMes+0x44>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     1214 <diasDoMes+0x104>
jmp    1165 <diasDoMes+0x55>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     11df <diasDoMes+0xcf>
jmp    1176 <diasDoMes+0x66>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     1214 <diasDoMes+0x104>
jmp    1187 <diasDoMes+0x77>
mov    -0x10(%rbp),%eax
add    $0xfffffff9,%eax
sub    $0x2,%eax
jb     11df <diasDoMes+0xcf>
jmp    119b <diasDoMes+0x8b>
mov    -0x10(%rbp),%eax
sub    $0x9,%eax
je     1214 <diasDoMes+0x104>
jmp    11ac <diasDoMes+0x9c>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
je     11df <diasDoMes+0xcf>
jmp    11bd <diasDoMes+0xad>
mov    -0x10(%rbp),%eax
sub    $0xb,%eax
je     1214 <diasDoMes+0x104>
jmp    11ce <diasDoMes+0xbe>
mov    -0x10(%rbp),%eax
sub    $0xc,%eax
jne    1220 <diasDoMes+0x110>
jmp    11df <diasDoMes+0xcf>
movl   $0x1f,-0x4(%rbp)
jmp    1227 <diasDoMes+0x117>
mov    -0x8(%rbp),%edi
call   1030 <bissexto@plt>
cmp    $0x0,%eax
je     1208 <diasDoMes+0xf8>
movl   $0x1d,-0x4(%rbp)
jmp    1227 <diasDoMes+0x117>
movl   $0x1c,-0x4(%rbp)
jmp    1227 <diasDoMes+0x117>
movl   $0x1e,-0x4(%rbp)
jmp    1227 <diasDoMes+0x117>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diasDoMes>:
cmp    $0xc,%esi
ja     1150 <diasDoMes+0x40>
mov    $0x1f,%eax
mov    $0x15aa,%ecx
bt     %esi,%ecx
jae    1125 <diasDoMes+0x15>
ret
mov    $0xa50,%eax
bt     %esi,%eax
jae    1135 <diasDoMes+0x25>
mov    $0x1e,%eax
ret
cmp    $0x2,%esi
jne    1150 <diasDoMes+0x40>
push   %rax
call   1030 <bissexto@plt>
cmp    $0x1,%eax
mov    $0x1d,%eax
sbb    $0x0,%eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @diasDoMes(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
switch i32 %6, label %15 [
i32 1, label %7
i32 3, label %7
i32 5, label %7
i32 7, label %7
i32 8, label %7
i32 10, label %7
i32 12, label %7
i32 2, label %8
i32 4, label %14
i32 6, label %14
i32 9, label %14
i32 11, label %14
]
7: ; preds = %2, %2, %2, %2, %2, %2, %2
store i32 31, i32* %3
br label %16
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @bissexto(i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 29, i32* %3
br label %16
13: ; preds = %8
store i32 28, i32* %3
br label %16
14: ; preds = %2, %2, %2, %2
store i32 30, i32* %3
br label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %16
16: ; preds = %15, %14, %13, %12, %7
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @diasDoMes(i32 %0, i32 %1) {
switch i32 %1, label %8 [
i32 1, label %9
i32 3, label %9
i32 5, label %9
i32 7, label %9
i32 8, label %9
i32 10, label %9
i32 12, label %9
i32 2, label %3
i32 4, label %7
i32 6, label %7
i32 9, label %7
i32 11, label %7
]
3: ; preds = %2
%4 = tail call i32 @bissexto(i32 %0)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 28, i32 29
br label %9
7: ; preds = %2, %2, %2, %2
br label %9
8: ; preds = %2
br label %9
9: ; preds = %3, %2, %2, %2, %2, %2, %2, %2, %8, %7
%10 = phi i32 [ -1, %8 ], [ 30, %7 ], [ 31, %2 ], [ 31, %2 ], [ 31, %2 ], [ 31, %2 ], [ 31, %2 ], [ 31, %2 ], [ 31, %2 ], [ %6, %3 ]
ret i32 %10
}