#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*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, unsigned long *);
int main(int argc, char const *argvc[]) {
  int values[3] = {0};
  for (int i = 0; i < 3; i++) {
    unsigned long N;
    scanf("%lu", &N);
    getchar();
    for (unsigned long x = 0; x < N; x++) {
      unsigned long a = 0;
      scanf("%lu", &a);
      values[i] = values[i] | a;
    }
  }
  if (values[0] == values[1] && values[1] == values[2])
    printf("Hromadky jsou v poradku.");
  else
    printf("Polevku nelze varit.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1040 <memset@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    11f7 <main+0xb7>
lea    0xe82(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    11e4 <main+0xa4>
movq   $0x0,-0x38(%rbp)
lea    0xe4d(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1060 <scanf@plt>
movslq -0x20(%rbp),%rax
movslq -0x1c(%rbp,%rax,4),%rax
or     -0x38(%rbp),%rax
mov    %eax,%ecx
movslq -0x20(%rbp),%rax
mov    %ecx,-0x1c(%rbp,%rax,4)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1196 <main+0x56>
jmp    11e9 <main+0xa9>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    116d <main+0x2d>
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1220 <main+0xe0>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1220 <main+0xe0>
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
jmp    122c <main+0xec>
lea    0xdf6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
xor    %r12d,%r12d
xor    %eax,%eax
call   1040 <getchar@plt>
cmpq   $0x0,0x10(%rsp)
mov    $0x0,%r13d
je     11a4 <main+0x74>
xor    %r13d,%r13d
lea    0xe8f(%rip),%r14
lea    0x8(%rsp),%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
or     0x8(%rsp),%r13d
add    $0x1,%rbx
cmp    0x10(%rsp),%rbx
jb     1180 <main+0x50>
lea    0xe55(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmpq   $0x0,0x10(%rsp)
je     1204 <main+0xd4>
xor    %r12d,%r12d
lea    0xe32(%rip),%r14
lea    0x8(%rsp),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movq   $0x0,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
or     0x8(%rsp),%r12d
add    $0x1,%rbx
cmp    0x10(%rsp),%rbx
jb     11e0 <main+0xb0>
lea    0xdf5(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmpq   $0x0,0x10(%rsp)
je     1263 <main+0x133>
xor    %ebx,%ebx
lea    0xdd1(%rip),%r14
lea    0x8(%rsp),%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movq   $0x0,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
or     0x8(%rsp),%ebx
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
jb     1240 <main+0x110>
xor    %r12d,%r13d
xor    %r12d,%ebx
lea    0xd94(%rip),%rax
lea    0xda6(%rip),%rdi
or     %r13d,%ebx
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
@.str.1 = [25 x i8] c"Hromadky jsou v poradku.\00"
@.str.2 = [21 x i8] c"Polevku nelze varit.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i32]
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [3 x i32]* %6 to i8*
store i32 0, i32* %7
br label %12
12: ; preds = %39, %2
%13 = load i32, i32* %7
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %42
15: ; preds = %12
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %8)
%17 = call i32 (...) @getchar()
store i64 0, i64* %9
br label %18
18: ; preds = %35, %15
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = icmp ult i64 %19, %20
br i1 %21, label %22, label %38
22: ; preds = %18
store i64 0, i64* %10
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %10)
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = sext i32 %27 to i64
%29 = load i64, i64* %10
%30 = or i64 %28, %29
%31 = trunc i64 %30 to i32
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 %33
store i32 %31, i32* %34
br label %35
35: ; preds = %22
%36 = load i64, i64* %9
%37 = add i64 %36, 1
store i64 %37, i64* %9
br label %18
38: ; preds = %18
br label %39
39: ; preds = %38
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %12
42: ; preds = %12
%43 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%44 = load i32, i32* %43
%45 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%46 = load i32, i32* %45
%47 = icmp eq i32 %44, %46
br i1 %47, label %48, label %56
48: ; preds = %42
%49 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%50 = load i32, i32* %49
%51 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
%52 = load i32, i32* %51
%53 = icmp eq i32 %50, %52
br i1 %53, label %54, label %56
54: ; preds = %48
%55 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %58
56: ; preds = %48, %42
%57 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %58
58: ; preds = %56, %54
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
@.str.1 = [25 x i8] c"Hromadky jsou v poradku.\00"
@.str.2 = [21 x i8] c"Polevku nelze varit.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%8 = call i32 (...) @getchar()
%9 = load i64, i64* %3
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %50
11: ; preds = %50, %2
%12 = phi i32 [ 0, %2 ], [ %56, %50 ]
%13 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%14 = call i32 (...) @getchar()
%15 = load i64, i64* %3
%16 = icmp eq i64 %15, 0
br i1 %16, label %27, label %17
17: ; preds = %11, %17
%18 = phi i32 [ %23, %17 ], [ 0, %11 ]
%19 = phi i64 [ %24, %17 ], [ 0, %11 ]
store i64 0, i64* %4
%20 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %4)
%21 = load i64, i64* %4
%22 = trunc i64 %21 to i32
%23 = or i32 %18, %22
%24 = add nuw i64 %19, 1
%25 = load i64, i64* %3
%26 = icmp ult i64 %24, %25
br i1 %26, label %17, label %27
27: ; preds = %17, %11
%28 = phi i32 [ 0, %11 ], [ %23, %17 ]
%29 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%30 = call i32 (...) @getchar()
%31 = load i64, i64* %3
%32 = icmp eq i64 %31, 0
br i1 %32, label %43, label %33
33: ; preds = %27, %33
%34 = phi i32 [ %39, %33 ], [ 0, %27 ]
%35 = phi i64 [ %40, %33 ], [ 0, %27 ]
store i64 0, i64* %4
%36 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %4)
%37 = load i64, i64* %4
%38 = trunc i64 %37 to i32
%39 = or i32 %34, %38
%40 = add nuw i64 %35, 1
%41 = load i64, i64* %3
%42 = icmp ult i64 %40, %41
br i1 %42, label %33, label %43
43: ; preds = %33, %27
%44 = phi i32 [ 0, %27 ], [ %39, %33 ]
%45 = icmp eq i32 %12, %28
%46 = icmp eq i32 %28, %44
%47 = select i1 %45, i1 %46, i1 false
%48 = select i1 %47, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0)
%49 = call i32 @printf(i8* dereferenceable(1) %48)
ret i32 0
50: ; preds = %2, %50
%51 = phi i32 [ %56, %50 ], [ 0, %2 ]
%52 = phi i64 [ %57, %50 ], [ 0, %2 ]
store i64 0, i64* %4
%53 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %4)
%54 = load i64, i64* %4
%55 = trunc i64 %54 to i32
%56 = or i32 %51, %55
%57 = add nuw i64 %52, 1
%58 = load i64, i64* %3
%59 = icmp ult i64 %57, %58
br i1 %59, label %50, label %11
}