#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__ minusculo(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str[] = "1 exercicio pratico ";
  if (minusculo(str))
    printf("\"%s\" tem todos os caracteres minusculos\n", str);
  else
    printf("\"%s\" NAO tem todos os caracteres minusculos\n", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec0(%rip),%al
mov    %al,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <minusculo@plt>
cmp    $0x0,%rax
je     117f <main+0x5f>
lea    -0x20(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <main+0x6f>
lea    -0x20(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x206f6369746172,%rax
mov    %rax,0xd(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <minusculo@plt>
test   %rax,%rax
lea    0xeea(%rip),%rax
lea    0xeba(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [21 x i8] c"1 exercicio pratico \00"
@.str = [41 x i8] c"\22%s\22 tem todos os caracteres minusculos\0A\00"
@.str.1 = [45 x i8] c"\22%s\22 NAO tem todos os caracteres minusculos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
store i32 0, i32* %1
%3 = bitcast [21 x i8]* %2 to i8*
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%5 = call i64 @minusculo(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %13
10: ; preds = %0
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@__const.main.str = [21 x i8] c"1 exercicio pratico \00"
@.str = [41 x i8] c"\22%s\22 tem todos os caracteres minusculos\0A\00"
@.str.1 = [45 x i8] c"\22%s\22 NAO tem todos os caracteres minusculos\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%3 = call i64 @minusculo(i8* %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
%6 = call i32 @printf(i8* %5, i8* %2)
ret i32 0
}