#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*/ analyze_hand(int *, int *, int *, int *, int *, int *,
                                int *);
int /*<<< orphan*/ print_result(int *, int *, int *, int *, int *);
scalar_t__ read_cards(int *, int *);
int main(void) {
  int num_in_rank[13];
  int num_in_suit[4];
  bool straight, flush, four, three;
  int pairs;
  while (read_cards(num_in_rank, num_in_suit)) {
    analyze_hand(num_in_rank, num_in_suit, &straight, &flush, &four, &three,
                 &pairs);
    print_result(&straight, &flush, &four, &three, &pairs);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <read_cards@plt>
cmp    $0x0,%rax
je     1199 <main+0x69>
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x54(%rbp),%rdx
lea    -0x58(%rbp),%rcx
lea    -0x5c(%rbp),%r8
lea    -0x60(%rbp),%r9
lea    -0x64(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <analyze_hand@plt>
lea    -0x54(%rbp),%rdi
lea    -0x58(%rbp),%rsi
lea    -0x5c(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x64(%rbp),%r8
call   1040 <print_result@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0x30(%rsp),%rdi
lea    0x20(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
call   1030 <read_cards@plt>
test   %rax,%rax
je     11b3 <main+0x83>
lea    0xc(%rsp),%r15
mov    %r15,(%rsp)
lea    0x30(%rsp),%rdi
lea    0x20(%rsp),%r13
mov    %r13,%rsi
lea    0x1c(%rsp),%rbx
mov    %rbx,%rdx
lea    0x18(%rsp),%rbp
mov    %rbp,%rcx
lea    0x14(%rsp),%r14
mov    %r14,%r8
lea    0x10(%rsp),%r12
mov    %r12,%r9
call   1050 <analyze_hand@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1040 <print_result@plt>
lea    0x30(%rsp),%rdi
mov    %r13,%rsi
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i32]
%3 = alloca [4 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
br label %9
9: ; preds = %14, %0
%10 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%12 = call i64 @read_cards(i32* %10, i32* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%17 = call i32 @analyze_hand(i32* %15, i32* %16, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%18 = call i32 @print_result(i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
br label %9
19: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [13 x i32]
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast [13 x i32]* %1 to i8*
%9 = bitcast [4 x i32]* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%17 = call i64 @read_cards(i32* %15, i32* %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %24, label %19
19: ; preds = %0, %19
%20 = call i32 @analyze_hand(i32* %15, i32* %16, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%21 = call i32 @print_result(i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%22 = call i64 @read_cards(i32* %15, i32* %16)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %19
24: ; preds = %19, %0
ret i32 0
}