#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int nconjelem, nsubconj, contador, *nelem, i;
  printf("Quantos elementos o conjunto possui: ");
  scanf("%d", &nconjelem);
  printf("Quantos subconjuntos o conjunto possui: ");
  scanf("%d", &nsubconj);
  if (nsubconj > 1 && nsubconj <= 10) {
    contador = nsubconj;
    printf("Quantos elemento o subconjunto possui: ");
    scanf("%d", &nsubconj);
    for (i = 0; i == nconjelem; i++) {
      printf("Qual elemento: ");
      scanf("%d", nelem);
    }
  }
  if (nsubconj <= 0 || nconjelem <= 0) {
    printf(
        "===NÃO POSSIVEL FAZER O CONJUNTO===\n====OPERAÇÃO FINALIZADA====\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0xc(%rbp)
jle    11df <main+0xbf>
cmpl   $0xa,-0xc(%rbp)
jg     11df <main+0xbf>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xe92(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11da <main+0xba>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe5f(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a4 <main+0x84>
jmp    11df <main+0xbf>
cmpl   $0x0,-0xc(%rbp)
jle    11f3 <main+0xd3>
cmpl   $0x0,-0x8(%rbp)
jg     11ff <main+0xdf>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
add    $0xfffffffe,%eax
cmp    $0x9,%eax
jae    11dd <main+0xad>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jne    11e1 <main+0xb1>
xor    %ebp,%ebp
lea    0xecf(%rip),%r14
lea    0xe74(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <scanf@plt>
add    $0x1,%ebp
mov    0xc(%rsp),%eax
cmp    %eax,%ebp
je     11c0 <main+0x90>
jmp    11e1 <main+0xb1>
mov    0xc(%rsp),%eax
cmpl   $0x0,0x8(%rsp)
jle    11ec <main+0xbc>
test   %eax,%eax
jg     11f8 <main+0xc8>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Quantos elementos o conjunto possui: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"Quantos subconjuntos o conjunto possui: \00"
@.str.3 = [40 x i8] c"Quantos elemento o subconjunto possui: \00"
@.str.4 = [16 x i8] c"Qual elemento: \00"
@.str.5 = [68 x i8] c"===N\C3\83O POSSIVEL FAZER O CONJUNTO===\0A====OPERA\C3\87\C3\83O FINALIZADA====\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %32
13: ; preds = %0
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 10
br i1 %15, label %16, label %32
16: ; preds = %13
%17 = load i32, i32* %3
store i32 %17, i32* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
store i32 0, i32* %6
br label %20
20: ; preds = %28, %16
%21 = load i32, i32* %6
%22 = load i32, i32* %2
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %31
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%26 = load i32*, i32** %5
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %26)
br label %28
28: ; preds = %24
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %20
31: ; preds = %20
br label %32
32: ; preds = %31, %13, %0
%33 = load i32, i32* %3
%34 = icmp sle i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load i32, i32* %2
%37 = icmp sle i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35, %32
%39 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Quantos elementos o conjunto possui: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"Quantos subconjuntos o conjunto possui: \00"
@.str.3 = [40 x i8] c"Quantos elemento o subconjunto possui: \00"
@.str.4 = [16 x i8] c"Qual elemento: \00"
@str = [67 x i8] c"===N\C3\83O POSSIVEL FAZER O CONJUNTO===\0A====OPERA\C3\87\C3\83O FINALIZADA====\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = add i32 %9, -2
%11 = icmp ult i32 %10, 9
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = load i32, i32* %1
br label %26
14: ; preds = %0
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %14, %19
%20 = phi i32 [ %23, %19 ], [ 0, %14 ]
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* undef)
%23 = add nuw nsw i32 %20, 1
%24 = load i32, i32* %1
%25 = icmp eq i32 %23, %24
br i1 %25, label %19, label %26
26: ; preds = %19, %12, %14
%27 = phi i32 [ %13, %12 ], [ %17, %14 ], [ %24, %19 ]
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 1
%30 = icmp slt i32 %27, 1
%31 = select i1 %29, i1 true, i1 %30
br i1 %31, label %32, label %34
32: ; preds = %26
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
br label %34
34: ; preds = %26, %32
ret i32 0
}