#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*/ gets(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
main() {
  char uf[2];
  printf("Digite a UF: ");
  gets(uf);
  if (strcmp(uf, "rj") == 0)
    printf("Rio de Janeiro");
  else if (strcmp(uf, "sp") == 0)
    printf("Sao Paulo");
  else if (strcmp(uf, "mt") == 0)
    printf("Mato Grosso");
  else
    printf("UF invalida");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x6(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x6(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    117f <main+0x4f>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    11eb <main+0xbb>
lea    -0x6(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11aa <main+0x7a>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xb6>
lea    -0x6(%rbp),%rdi
lea    0xe78(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11d5 <main+0xa5>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xb1>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xb6>
jmp    11eb <main+0xbb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11a0 <main+0x70>
lea    0xeb7(%rip),%rsi
lea    0xe(%rsp),%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11a9 <main+0x79>
lea    0xeae(%rip),%rsi
lea    0xe(%rsp),%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xe9d(%rip),%rax
lea    0xea2(%rip),%rdi
cmove  %rax,%rdi
jmp    11b0 <main+0x80>
lea    0xe6a(%rip),%rdi
jmp    11b0 <main+0x80>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Digite a UF: \00"
@.str.1 = [3 x i8] c"rj\00"
@.str.2 = [15 x i8] c"Rio de Janeiro\00"
@.str.3 = [3 x i8] c"sp\00"
@.str.4 = [10 x i8] c"Sao Paulo\00"
@.str.5 = [3 x i8] c"mt\00"
@.str.6 = [12 x i8] c"Mato Grosso\00"
@.str.7 = [12 x i8] c"UF invalida\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %27
11: ; preds = %0
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %26
17: ; preds = %11
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
br label %25
23: ; preds = %17
%24 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %26
26: ; preds = %25, %15
br label %27
27: ; preds = %26, %9
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [14 x i8] c"Digite a UF: \00"
@.str.1 = [3 x i8] c"rj\00"
@.str.2 = [15 x i8] c"Rio de Janeiro\00"
@.str.3 = [3 x i8] c"sp\00"
@.str.4 = [10 x i8] c"Sao Paulo\00"
@.str.5 = [3 x i8] c"mt\00"
@.str.6 = [12 x i8] c"Mato Grosso\00"
@.str.7 = [12 x i8] c"UF invalida\00"
define i32 @main() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %0
%8 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0)
br label %14
14: ; preds = %10, %7, %0
%15 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %7 ], [ %13, %10 ]
%16 = call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}