#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 */
float pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
void main() {
  int ultima = 1;
  while (ultima) {
    char exer;
    printf("Digite a letra da atividade: ");
    scanf("%c", &exer);
    switch (exer) {
    case 'a': {
      float v, r, i;
      printf("calculo v = ri\n");
      printf("Digite o valor de R (resistencia): ");
      scanf("%f", &r);
      printf("Digite o valor de I:  ");
      scanf("%f", &i);
      v = r / i;
      printf("O valor da tensao é %.2f \n", v);
      break;
    }
    case 'b': {
      float p, v, i;
      printf("Digite o valor da Tensão: ");
      scanf("%f", &v);
      printf("Digite o valor da Corrente: ");
      scanf("%f", &i);
      p = v * i;
      printf("O valor da Potencia é %.2fW\n", v);
      break;
    }
    case 'c': {
      float i, q, t;
      printf("Digite o valor da Carga Elétrica: ");
      scanf("%f", &q);
      printf("Digite o valor do tempo: ");
      scanf("%f", &t);
      i = q / t;
      printf("O valor da corrente é %.2f \n", i);
      break;
    }
    case 'd': {
      float v, w, q;
      printf("Digite o valor da trabalho/energia: ");
      scanf("%f", &w);
      printf("Digite o valor da carga eletrica: ");
      scanf("%f", &q);
      v = w / q;
      printf("O valor da Tensão é %.2f \n", v);
    }
    case 'e': {
      float p, r, i;
      printf("Digite o valor do raio: ");
      scanf("%f", &r);
      printf("Digite o valor da Corrente: ");
      scanf("%f", &i);
      p = r * pow(i, 2);
      printf("O valor da Potencia é %.2f \n", p);
    }
    case 'f': {
      float p, v, r;
      printf("Digite o valor da Velocidade: ");
      scanf("%f", &v);
      printf("Digite o valor do raio: ");
      scanf("%f", &r);
      p = pow(v, 2) / r;
      printf("O valor da potencia é %.2f \n", p);
    }
    }
    printf("Deseja fazer outra operacao? 1/0 \n");
    scanf("%d", &ultima);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1462 <main+0x332>
lea    0xec8(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x59(%rbp)
call   1030 <printf@plt>
mov    -0x59(%rbp),%al
lea    0xed2(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x5,%eax
ja     143d <main+0x30d>
mov    -0x58(%rbp),%rax
lea    0xe72(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe83(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    143d <main+0x30d>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe48(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe28(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x1c(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    143d <main+0x30d>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xddd(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdbd(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x28(%rbp),%xmm0
divss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    143d <main+0x30d>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd72(%rip),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd52(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x34(%rbp),%xmm0
divss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe59(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd0c(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcec(%rip),%rdi
lea    -0x44(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x44(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x60(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe0e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc8b(%rip),%rdi
lea    -0x4c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc6b(%rip),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x4c(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
divss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xddb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe00(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    113f <main+0xf>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x1,0x10(%rsp)
lea    0x10c2(%rip),%rbx
lea    0x10(%rsp),%rbp
lea    0xe97(%rip),%r13
lea    0xeed(%rip),%r14
lea    0x8(%rsp),%r15
lea    0xc(%rsp),%r12
jmp    12bf <main+0x17f>
lea    0xfc0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xfca(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xfc2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xfd1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeba(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mulss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf8e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf9e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf4c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
divss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
je     13f3 <main+0x2b3>
lea    0xd52(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd62(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%eax
add    $0xffffff9f,%eax
cmp    $0x5,%eax
ja     129b <main+0x15b>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xd3b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd27(%rip),%rdi
jmp    1294 <main+0x154>
lea    0xd37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xd38(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd30(%rip),%rdi
jmp    1294 <main+0x154>
lea    0xd42(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xd4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd3a(%rip),%rdi
jmp    1294 <main+0x154>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Digite a letra da atividade: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [16 x i8] c"calculo v = ri\0A\00"
@.str.3 = [36 x i8] c"Digite o valor de R (resistencia): \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [23 x i8] c"Digite o valor de I: \00"
@.str.6 = [28 x i8] c"O valor da tensao \C3\A9 %.2f \0A\00"
@.str.7 = [28 x i8] c"Digite o valor da Tens\C3\A3o: \00"
@.str.8 = [29 x i8] c"Digite o valor da Corrente: \00"
@.str.9 = [30 x i8] c"O valor da Potencia \C3\A9 %.2fW\0A\00"
@.str.10 = [36 x i8] c"Digite o valor da Carga El\C3\A9trica: \00"
@.str.11 = [26 x i8] c"Digite o valor do tempo: \00"
@.str.12 = [30 x i8] c"O valor da corrente \C3\A9 %.2f \0A\00"
@.str.13 = [37 x i8] c"Digite o valor da trabalho/energia: \00"
@.str.14 = [35 x i8] c"Digite o valor da carga eletrica: \00"
@.str.15 = [29 x i8] c"O valor da Tens\C3\A3o \C3\A9 %.2f \0A\00"
@.str.16 = [25 x i8] c"Digite o valor do raio: \00"
@.str.17 = [30 x i8] c"O valor da Potencia \C3\A9 %.2f \0A\00"
@.str.18 = [31 x i8] c"Digite o valor da Velocidade: \00"
@.str.19 = [30 x i8] c"O valor da potencia \C3\A9 %.2f \0A\00"
@.str.20 = [35 x i8] c"Deseja fazer outra operacao? 1/0 \0A\00"
@.str.21 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
store i32 1, i32* %1
br label %21
21: ; preds = %98, %0
%22 = load i32, i32* %1
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %101
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
switch i32 %28, label %98 [
i32 97, label %29
i32 98, label %41
i32 99, label %52
i32 100, label %63
i32 101, label %74
i32 102, label %86
]
29: ; preds = %24
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %4)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%35 = load float, float* %4
%36 = load float, float* %5
%37 = fdiv float %35, %36
store float %37, float* %3
%38 = load float, float* %3
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %39)
br label %98
41: ; preds = %24
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %7)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %8)
%46 = load float, float* %7
%47 = load float, float* %8
%48 = fmul float %46, %47
store float %48, float* %6
%49 = load float, float* %7
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double %50)
br label %98
52: ; preds = %24
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%54 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %10)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%56 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %11)
%57 = load float, float* %10
%58 = load float, float* %11
%59 = fdiv float %57, %58
store float %59, float* %9
%60 = load float, float* %9
%61 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), double %61)
br label %98
63: ; preds = %24
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0))
%65 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %13)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%67 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %14)
%68 = load float, float* %13
%69 = load float, float* %14
%70 = fdiv float %68, %69
store float %70, float* %12
%71 = load float, float* %12
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), double %72)
br label %74
74: ; preds = %24, %63
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%76 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %16)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%78 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %17)
%79 = load float, float* %16
%80 = load float, float* %17
%81 = call float @pow(float %80, i32 2)
%82 = fmul float %79, %81
store float %82, float* %15
%83 = load float, float* %15
%84 = fpext float %83 to double
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), double %84)
br label %86
86: ; preds = %24, %74
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
%88 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %19)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%90 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %20)
%91 = load float, float* %19
%92 = call float @pow(float %91, i32 2)
%93 = load float, float* %20
%94 = fdiv float %92, %93
store float %94, float* %18
%95 = load float, float* %18
%96 = fpext float %95 to double
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.19, i64 0, i64 0), double %96)
br label %98
98: ; preds = %86, %24, %52, %41, %29
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.20, i64 0, i64 0))
%100 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i32* %1)
br label %21
101: ; preds = %21
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Digite a letra da atividade: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.3 = [36 x i8] c"Digite o valor de R (resistencia): \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [23 x i8] c"Digite o valor de I: \00"
@.str.6 = [28 x i8] c"O valor da tensao \C3\A9 %.2f \0A\00"
@.str.7 = [28 x i8] c"Digite o valor da Tens\C3\A3o: \00"
@.str.8 = [29 x i8] c"Digite o valor da Corrente: \00"
@.str.9 = [30 x i8] c"O valor da Potencia \C3\A9 %.2fW\0A\00"
@.str.10 = [36 x i8] c"Digite o valor da Carga El\C3\A9trica: \00"
@.str.11 = [26 x i8] c"Digite o valor do tempo: \00"
@.str.12 = [30 x i8] c"O valor da corrente \C3\A9 %.2f \0A\00"
@.str.13 = [37 x i8] c"Digite o valor da trabalho/energia: \00"
@.str.14 = [35 x i8] c"Digite o valor da carga eletrica: \00"
@.str.15 = [29 x i8] c"O valor da Tens\C3\A3o \C3\A9 %.2f \0A\00"
@.str.16 = [25 x i8] c"Digite o valor do raio: \00"
@.str.17 = [30 x i8] c"O valor da Potencia \C3\A9 %.2f \0A\00"
@.str.18 = [31 x i8] c"Digite o valor da Velocidade: \00"
@.str.19 = [30 x i8] c"O valor da potencia \C3\A9 %.2f \0A\00"
@.str.21 = [3 x i8] c"%d\00"
@str = [34 x i8] c"Deseja fazer outra operacao? 1/0 \00"
@str.22 = [15 x i8] c"calculo v = ri\00"
define void @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%16 = bitcast float* %9 to i8*
%17 = bitcast float* %10 to i8*
%18 = bitcast float* %11 to i8*
%19 = bitcast float* %12 to i8*
%20 = bitcast float* %13 to i8*
%21 = bitcast float* %14 to i8*
%22 = bitcast float* %7 to i8*
%23 = bitcast float* %8 to i8*
%24 = bitcast float* %5 to i8*
%25 = bitcast float* %6 to i8*
%26 = bitcast float* %3 to i8*
%27 = bitcast float* %4 to i8*
br label %28
28: ; preds = %0, %94
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
switch i32 %32, label %94 [
i32 97, label %33
i32 98, label %44
i32 99, label %52
i32 100, label %62
i32 101, label %72
i32 102, label %83
]
33: ; preds = %28
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.22, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %3)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %4)
%39 = load float, float* %3
%40 = load float, float* %4
%41 = fdiv float %39, %40
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %42)
br label %94
44: ; preds = %28
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %6)
%49 = load float, float* %5
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double %50)
br label %94
52: ; preds = %28
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%54 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %7)
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%56 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %8)
%57 = load float, float* %7
%58 = load float, float* %8
%59 = fdiv float %57, %58
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), double %60)
br label %94
62: ; preds = %28
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0))
%64 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %9)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%66 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %10)
%67 = load float, float* %9
%68 = load float, float* %10
%69 = fdiv float %67, %68
%70 = fpext float %69 to double
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), double %70)
br label %72
72: ; preds = %28, %62
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%74 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %11)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%76 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %12)
%77 = load float, float* %11
%78 = load float, float* %12
%79 = call float @pow(float %78, i32 2)
%80 = fmul float %77, %79
%81 = fpext float %80 to double
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), double %81)
br label %83
83: ; preds = %28, %72
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0))
%85 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %13)
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%87 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %14)
%88 = load float, float* %13
%89 = call float @pow(float %88, i32 2)
%90 = load float, float* %14
%91 = fdiv float %89, %90
%92 = fpext float %91 to double
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.19, i64 0, i64 0), double %92)
br label %94
94: ; preds = %83, %28, %52, %44, %33
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i32* %1)
%97 = load i32, i32* %1
%98 = icmp eq i32 %97, 0
br i1 %98, label %99, label %28
99: ; preds = %94
ret void
}