#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__ is_subset(int *, int, int *, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int a[] = {10, 20, 30};
  int b[] = {30, 10, 10};
  if (is_subset(b, 3, a, 3))
    printf("B je podmnozina A (spravne)\n");
  else
    printf("B nie je podmnozina A (nespravne)\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xec0(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rdx
mov    $0x3,%ecx
mov    %ecx,%esi
call   1040 <is_subset@plt>
cmp    $0x0,%rax
je     1186 <main+0x66>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1192 <main+0x72>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xed4(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xec1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rdx
mov    $0x3,%esi
mov    $0x3,%ecx
call   1040 <is_subset@plt>
test   %rax,%rax
lea    0xea5(%rip),%rax
lea    0xec0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 10, i32 20, i32 30]
@__const.main.b = [3 x i32] [i32 30, i32 10, i32 10]
@.str = [29 x i8] c"B je podmnozina A (spravne)\0A\00"
@.str.1 = [35 x i8] c"B nie je podmnozina A (nespravne)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [3 x i32]
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
%5 = bitcast [3 x i32]* %3 to i8*
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%8 = call i64 @is_subset(i32* %6, i32 3, i32* %7, i32 3)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x i32] [i32 10, i32 20, i32 30]
@__const.main.b = [3 x i32] [i32 30, i32 10, i32 10]
@str = [34 x i8] c"B nie je podmnozina A (nespravne)\00"
@str.2 = [28 x i8] c"B je podmnozina A (spravne)\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = call i64 @is_subset(i32* %5, i32 3, i32* %6, i32 3)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}