_Bool pruefe_siegesbedingung(int zeilen, int spalten,
                             int spielfeld[zeilen][spalten], int laenge_linie,
                             int spielstein) {
  _Bool gewonnen = 0;
  gewonnen = pruefe_siegesbedingung_horizontal(zeilen, spalten, spielfeld,
                                               laenge_linie, spielstein);
  if (gewonnen == 0)
    gewonnen = pruefe_siegesbedingung_vertikal(zeilen, spalten, spielfeld,
                                               laenge_linie, spielstein);
  if (gewonnen == 0)
    gewonnen = pruefe_siegesbedingung_diagonal(zeilen, spalten, spielfeld,
                                               laenge_linie, spielstein);
  return gewonnen;
}


x86 assembly (clang, -O0):
<pruefe_siegesbedingung>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x0,%al
call   1030 <pruefe_siegesbedingung_horizontal@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    11a4 <pruefe_siegesbedingung+0x74>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x0,%al
call   1040 <pruefe_siegesbedingung_vertikal@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    11d8 <pruefe_siegesbedingung+0xa8>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x0,%al
call   1050 <pruefe_siegesbedingung_diagonal@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pruefe_siegesbedingung>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %rdx,%r12
mov    %esi,%r13d
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <pruefe_siegesbedingung_horizontal@plt>
mov    $0x1,%bl
test   %eax,%eax
jne    1189 <pruefe_siegesbedingung+0x59>
mov    %ebp,%edi
mov    %r13d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   1040 <pruefe_siegesbedingung_vertikal@plt>
test   %eax,%eax
jne    1189 <pruefe_siegesbedingung+0x59>
mov    %ebp,%edi
mov    %r13d,%esi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   1050 <pruefe_siegesbedingung_diagonal@plt>
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i1 @pruefe_siegesbedingung(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
store i8 0, i8* %11
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32*, i32** %8
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_horizontal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %16, i32 %17, i32* %18, i32 %19, i32 %20)
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i8
store i8 %23, i8* %11
%24 = load i8, i8* %11
%25 = trunc i8 %24 to i1
%26 = zext i1 %25 to i32
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %37
28: ; preds = %5
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = load i32*, i32** %8
%32 = load i32, i32* %9
%33 = load i32, i32* %10
%34 = call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_vertikal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %29, i32 %30, i32* %31, i32 %32, i32 %33)
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i8
store i8 %36, i8* %11
br label %37
37: ; preds = %28, %5
%38 = load i8, i8* %11
%39 = trunc i8 %38 to i1
%40 = zext i1 %39 to i32
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %51
42: ; preds = %37
%43 = load i32, i32* %6
%44 = load i32, i32* %7
%45 = load i32*, i32** %8
%46 = load i32, i32* %9
%47 = load i32, i32* %10
%48 = call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_diagonal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %43, i32 %44, i32* %45, i32 %46, i32 %47)
%49 = icmp ne i32 %48, 0
%50 = zext i1 %49 to i8
store i8 %50, i8* %11
br label %51
51: ; preds = %42, %37
%52 = load i8, i8* %11
%53 = trunc i8 %52 to i1
ret i1 %53
}

LLVM IR (-O2):
define zeroext i1 @pruefe_siegesbedingung(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_horizontal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = tail call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_vertikal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = tail call i32 (i32, i32, i32*, i32, i32, ...) bitcast (i32 (...)* @pruefe_siegesbedingung_diagonal to i32 (i32, i32, i32*, i32, i32, ...)*)(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4)
%13 = icmp ne i32 %12, 0
br label %14
14: ; preds = %5, %11, %8
%15 = phi i1 [ %13, %11 ], [ true, %8 ], [ true, %5 ]
ret i1 %15
}