#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 */
scalar_t__ IVenColumna(char **, char);
scalar_t__ IVenDiagonal(char **, char);
scalar_t__ IVenFila(char **, char);
int IVenRatlla(char tauler[6][7], char jugador) {
  if (IVenFila(tauler, jugador) || IVenColumna(tauler, jugador) ||
      IVenDiagonal(tauler, jugador)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<IVenRatlla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <IVenFila@plt>
cmp    $0x0,%rax
jne    1187 <IVenRatlla+0x57>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <IVenColumna@plt>
cmp    $0x0,%rax
jne    1187 <IVenRatlla+0x57>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1050 <IVenDiagonal@plt>
cmp    $0x0,%rax
je     1193 <IVenRatlla+0x63>
movl   $0x1,-0x4(%rbp)
jmp    119a <IVenRatlla+0x6a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IVenRatlla>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <IVenFila@plt>
mov    $0x1,%r14d
test   %rax,%rax
jne    1170 <IVenRatlla+0x40>
movsbl %bpl,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <IVenColumna@plt>
test   %rax,%rax
jne    1170 <IVenRatlla+0x40>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <IVenDiagonal@plt>
xor    %r14d,%r14d
test   %rax,%rax
setne  %r14b
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IVenRatlla([7 x i8]* %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca [7 x i8]*
%5 = alloca i8
store [7 x i8]* %0, [7 x i8]** %4
store i8 %1, i8* %5
%6 = load [7 x i8]*, [7 x i8]** %4
%7 = bitcast [7 x i8]* %6 to i8**
%8 = load i8, i8* %5
%9 = call i64 @IVenFila(i8** %7, i8 signext %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %23, label %11
11: ; preds = %2
%12 = load [7 x i8]*, [7 x i8]** %4
%13 = bitcast [7 x i8]* %12 to i8**
%14 = load i8, i8* %5
%15 = call i64 @IVenColumna(i8** %13, i8 signext %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %11
%18 = load [7 x i8]*, [7 x i8]** %4
%19 = bitcast [7 x i8]* %18 to i8**
%20 = load i8, i8* %5
%21 = call i64 @IVenDiagonal(i8** %19, i8 signext %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %17, %11, %2
store i32 1, i32* %3
br label %25
24: ; preds = %17
store i32 0, i32* %3
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @IVenRatlla([7 x i8]* %0, i8 signext %1) {
%3 = bitcast [7 x i8]* %0 to i8**
%4 = tail call i64 @IVenFila(i8** %3, i8 signext %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = tail call i64 @IVenColumna(i8** %3, i8 signext %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 @IVenDiagonal(i8** %3, i8 signext %1)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %9, %2, %6
%14 = phi i32 [ 1, %6 ], [ 1, %2 ], [ %12, %9 ]
ret i32 %14
}