#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 */
struct zxcvbn_res {
  int dummy;
};
struct zxcvbn_date {
  int dummy;
};
typedef int int8_t;

/* Variables and functions */
scalar_t__ zxcvbn_date_match_nosep(struct zxcvbn_res *, char *, int,
                                   struct zxcvbn_date *, unsigned int);
scalar_t__ zxcvbn_date_match_sep(struct zxcvbn_res *, char *, int,
                                 struct zxcvbn_date *, unsigned int);
int8_t zxcvbn_date_match(struct zxcvbn_res *res, char *password,
                         int password_len, struct zxcvbn_date *dates,
                         unsigned int dates_num) {
  if (zxcvbn_date_match_nosep(res, password, password_len, dates, dates_num))
    return -1;
  if (zxcvbn_date_match_sep(res, password, password_len, dates, dates_num))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<zxcvbn_date_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
call   1040 <zxcvbn_date_match_nosep@plt>
cmp    $0x0,%rax
je     1169 <zxcvbn_date_match+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    119e <zxcvbn_date_match+0x7e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
call   1030 <zxcvbn_date_match_sep@plt>
cmp    $0x0,%rax
je     1197 <zxcvbn_date_match+0x77>
movl   $0xffffffff,-0x4(%rbp)
jmp    119e <zxcvbn_date_match+0x7e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zxcvbn_date_match>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <zxcvbn_date_match_nosep@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1162 <zxcvbn_date_match+0x42>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1030 <zxcvbn_date_match_sep@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.zxcvbn_res = type { i32 }
%struct.zxcvbn_date = type { i32 }
define i32 @zxcvbn_date_match(%struct.zxcvbn_res* %0, i8* %1, i32 %2, %struct.zxcvbn_date* %3, i32 %4) {
%6 = alloca i32
%7 = alloca %struct.zxcvbn_res*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca %struct.zxcvbn_date*
%11 = alloca i32
store %struct.zxcvbn_res* %0, %struct.zxcvbn_res** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store %struct.zxcvbn_date* %3, %struct.zxcvbn_date** %10
store i32 %4, i32* %11
%12 = load %struct.zxcvbn_res*, %struct.zxcvbn_res** %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = load %struct.zxcvbn_date*, %struct.zxcvbn_date** %10
%16 = load i32, i32* %11
%17 = call i64 @zxcvbn_date_match_nosep(%struct.zxcvbn_res* %12, i8* %13, i32 %14, %struct.zxcvbn_date* %15, i32 %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %5
store i32 -1, i32* %6
br label %30
20: ; preds = %5
%21 = load %struct.zxcvbn_res*, %struct.zxcvbn_res** %7
%22 = load i8*, i8** %8
%23 = load i32, i32* %9
%24 = load %struct.zxcvbn_date*, %struct.zxcvbn_date** %10
%25 = load i32, i32* %11
%26 = call i64 @zxcvbn_date_match_sep(%struct.zxcvbn_res* %21, i8* %22, i32 %23, %struct.zxcvbn_date* %24, i32 %25)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 -1, i32* %6
br label %30
29: ; preds = %20
store i32 0, i32* %6
br label %30
30: ; preds = %29, %28, %19
%31 = load i32, i32* %6
ret i32 %31
}

LLVM IR (-O2):
%struct.zxcvbn_res = type { i32 }
%struct.zxcvbn_date = type { i32 }
define i32 @zxcvbn_date_match(%struct.zxcvbn_res* %0, i8* %1, i32 %2, %struct.zxcvbn_date* %3, i32 %4) {
%6 = tail call i64 @zxcvbn_date_match_nosep(%struct.zxcvbn_res* %0, i8* %1, i32 %2, %struct.zxcvbn_date* %3, i32 %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i64 @zxcvbn_date_match_sep(%struct.zxcvbn_res* %0, i8* %1, i32 %2, %struct.zxcvbn_date* %3, i32 %4)
%10 = icmp ne i64 %9, 0
%11 = sext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ -1, %5 ], [ %11, %8 ]
ret i32 %13
}