#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__ contem(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char s[] = "abc";
  char v[] = "cdeabf";
  if (contem(v, s))
    printf("'%s' contém todos os caracteres presentes em '%s'", v, s);
  else
    printf("'%s' não contém todos os caracteres presentes em '%s'", v, s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec6(%rip),%eax
mov    %eax,-0xf(%rbp)
mov    0xec0(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xf(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <contem@plt>
cmp    $0x0,%rax
je     1185 <main+0x65>
lea    -0xf(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <main+0x79>
lea    -0xf(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x636261,0xc(%rsp)
movl   $0x666261,0x13(%rsp)
movl   $0x61656463,0x10(%rsp)
61
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <contem@plt>
test   %rax,%rax
lea    0xedc(%rip),%rax
lea    0xea2(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s = [4 x i8] c"abc\00"
@__const.main.v = [7 x i8] c"cdeabf\00"
@.str = [51 x i8] c"'%s' cont\C3\A9m todos os caracteres presentes em '%s'\00"
@.str.1 = [56 x i8] c"'%s' n\C3\A3o cont\C3\A9m todos os caracteres presentes em '%s'\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca [7 x i8]
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
%5 = bitcast [7 x i8]* %3 to i8*
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%8 = call i64 @contem(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
br label %18
14: ; preds = %0
%15 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* %16)
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@__const.main.v = [7 x i8] c"cdeabf\00"
@.str = [51 x i8] c"'%s' cont\C3\A9m todos os caracteres presentes em '%s'\00"
@.str.1 = [56 x i8] c"'%s' n\C3\A3o cont\C3\A9m todos os caracteres presentes em '%s'\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
%3 = bitcast i32* %1 to i8*
store i32 6513249, i32* %1
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%5 = call i64 @contem(i8* %4, i8* %3)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
%8 = call i32 @printf(i8* %7, i8* %4, i8* %3)
ret i32 0
}