#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 rand();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ srand(int);
int time(int /*<<< orphan*/);
int main() {
  printf("******************************************\n");
  printf("* Bem vindo ao nosso jogo de adivinhação *\n");
  printf("******************************************\n");
  int segundos = time(0);
  srand(segundos);
  int numerogrande = rand();
  int numerosecreto = numerogrande % 100;
  int chute;
  int tentativas = 1;
  double pontos = 1000;
  int acertou = 0;
  int nivel;
  printf("Qual o nível de dificuldade?\n");
  printf("(1) Fácil (2) Médio (3) Difícil\n\n");
  printf("Escolha: ");
  scanf("%d", &nivel);
  int numerodetentativas;
  switch (nivel) {
  case 1:
    numerodetentativas = 20;
    break;
  case 2:
    numerodetentativas = 15;
    break;
  default:
    numerodetentativas = 6;
    break;
  }
  for (int i = 1; i <= numerodetentativas; i++) {
    printf("Tentativa %d\n", tentativas);
    printf("Qual é o seu chute? ");
    scanf("%d", &chute);
    printf("Seu chute foi %d\n", chute);
    if (chute < 0) {
      printf("Você não pode chutar números negativos!\n");
      continue;
    }
    acertou = (chute == numerosecreto);
    int maior = chute > numerosecreto;
    if (acertou) {
      break;
    } else if (maior) {
      printf("Seu chute foi maior que o número secreto\n");
    } else {
      printf("Seu chute foi menor que o número secreto\n");
    }
    tentativas++;
    double pontosperdidos = (chute - numerosecreto) / (double)2;
    if (pontosperdidos < 0) {
      pontosperdidos = pontosperdidos * -1;
    }
    pontos = pontos - pontosperdidos;
  }
  printf("Fim de jogo!\n");
  if (acertou) {
    printf("Você ganhou\n");
    printf("Você acertou em %d tentativas!\n", tentativas);
    printf("Total de pontos: %.1f\n", pontos);
  } else {
    printf("Você perdeu! Tente de novo!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    %rdi,-0x58(%rbp)
xor    %eax,%eax
mov    %eax,-0x4c(%rbp)
mov    %al,-0x45(%rbp)
call   1030 <printf@plt>
mov    -0x45(%rbp),%al
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    -0x45(%rbp),%al
call   1030 <printf@plt>
mov    -0x4c(%rbp),%edi
call   1050 <time@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <srand@plt>
mov    -0x45(%rbp),%al
call   1070 <rand@plt>
mov    %eax,%ecx
mov    -0x45(%rbp),%al
mov    %ecx,-0xc(%rbp)
movslq -0xc(%rbp),%rdx
mov    %edx,%ecx
imul   $0x51eb851f,%rdx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x25,%rdx
add    %esi,%edx
imul   $0x64,%edx,%edx
sub    %edx,%ecx
mov    %ecx,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movabs $0x408f400000000000,%rcx
40 8f 40
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x45(%rbp),%al
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x45(%rbp),%al
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x1,%eax
je     1252 <main+0x102>
jmp    1241 <main+0xf1>
mov    -0x44(%rbp),%eax
sub    $0x2,%eax
je     125e <main+0x10e>
jmp    126a <main+0x11a>
movl   $0x14,-0x2c(%rbp)
jmp    1271 <main+0x121>
movl   $0xf,-0x2c(%rbp)
jmp    1271 <main+0x121>
movl   $0x6,-0x2c(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     13a3 <main+0x253>
mov    -0x18(%rbp),%esi
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0e(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jge    12e1 <main+0x191>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1395 <main+0x245>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1312 <main+0x1c2>
jmp    13a3 <main+0x253>
cmpl   $0x0,-0x34(%rbp)
je     132f <main+0x1df>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133d <main+0x1ed>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x1f2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xca3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1386 <main+0x236>
movsd  0xc8c(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1278 <main+0x128>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
je     13f2 <main+0x2a2>
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xdca(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1400 <main+0x2b0>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
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
lea    0xf63(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
movslq %eax,%r14
imul   $0x51eb851f,%r14,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%r14d
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe4e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe4a(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x14(%rsp),%eax
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
cmp    $0x1,%eax
lea    0x7(%rcx,%rcx,8),%eax
mov    $0x15,%r15d
cmovne %eax,%r15d
add    $0xffffffff,%r15d
movsd  0xddd(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebp
lea    0xe16(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xe20(%rip),%rbx
jmp    1266 <main+0x106>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xf79(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%r15d
je     131d <main+0x1bd>
lea    0xdd0(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdb3(%rip),%rdi
mov    %r13,%rsi
call   1070 <scanf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     1250 <main+0xf0>
cmp    %r14d,%eax
je     1337 <main+0x1d7>
lea    0xec7(%rip),%rdi
lea    0xeea(%rip),%rax
cmovg  %rax,%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
sub    %r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x1,%ebp
mulsd  0xd2a(%rip),%xmm0
movapd %xmm0,%xmm1
xorpd  0xd36(%rip),%xmm1
movapd %xmm0,%xmm2
cmpltsd 0xd19(%rip),%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
add    $0xffffffff,%r15d
jne    1266 <main+0x106>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
lea    0xe22(%rip),%rdi
call   1030 <puts@plt>
jmp    1373 <main+0x213>
lea    0xe07(%rip),%rdi
call   1030 <puts@plt>
lea    0xe25(%rip),%rdi
call   1030 <puts@plt>
lea    0xd1d(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd2e(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"******************************************\0A\00"
@.str.1 = [46 x i8] c"* Bem vindo ao nosso jogo de adivinha\C3\A7\C3\A3o *\0A\00"
@.str.2 = [31 x i8] c"Qual o n\C3\ADvel de dificuldade?\0A\00"
@.str.3 = [37 x i8] c"(1) F\C3\A1cil (2) M\C3\A9dio (3) Dif\C3\ADcil\0A\0A\00"
@.str.4 = [10 x i8] c"Escolha: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [14 x i8] c"Tentativa %d\0A\00"
@.str.7 = [22 x i8] c"Qual \C3\A9 o seu chute? \00"
@.str.8 = [18 x i8] c"Seu chute foi %d\0A\00"
@.str.9 = [44 x i8] c"Voc\C3\AA n\C3\A3o pode chutar n\C3\BAmeros negativos!\0A\00"
@.str.10 = [43 x i8] c"Seu chute foi maior que o n\C3\BAmero secreto\0A\00"
@.str.11 = [43 x i8] c"Seu chute foi menor que o n\C3\BAmero secreto\0A\00"
@.str.12 = [14 x i8] c"Fim de jogo!\0A\00"
@.str.13 = [14 x i8] c"Voc\C3\AA ganhou\0A\00"
@.str.14 = [33 x i8] c"Voc\C3\AA acertou em %d tentativas!\0A\00"
@.str.15 = [23 x i8] c"Total de pontos: %.1f\0A\00"
@.str.16 = [30 x i8] c"Voc\C3\AA perdeu! Tente de novo!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
store i32 0, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @time(i32 0)
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = call i32 @srand(i32 %18)
%20 = call i32 (...) @rand()
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = srem i32 %21, 100
store i32 %22, i32* %4
store i32 1, i32* %6
store double 1.000000e+03, double* %7
store i32 0, i32* %8
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %9)
%27 = load i32, i32* %9
switch i32 %27, label %30 [
i32 1, label %28
i32 2, label %29
]
28: ; preds = %0
store i32 20, i32* %10
br label %31
29: ; preds = %0
store i32 15, i32* %10
br label %31
30: ; preds = %0
store i32 6, i32* %10
br label %31
31: ; preds = %30, %29, %28
store i32 1, i32* %11
br label %32
32: ; preds = %84, %31
%33 = load i32, i32* %11
%34 = load i32, i32* %10
%35 = icmp sle i32 %33, %34
br i1 %35, label %36, label %87
36: ; preds = %32
%37 = load i32, i32* %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%41 = load i32, i32* %5
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %5
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %36
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
br label %84
47: ; preds = %36
%48 = load i32, i32* %5
%49 = load i32, i32* %4
%50 = icmp eq i32 %48, %49
%51 = zext i1 %50 to i32
store i32 %51, i32* %8
%52 = load i32, i32* %5
%53 = load i32, i32* %4
%54 = icmp sgt i32 %52, %53
%55 = zext i1 %54 to i32
store i32 %55, i32* %12
%56 = load i32, i32* %8
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %47
br label %87
59: ; preds = %47
%60 = load i32, i32* %12
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0))
br label %66
64: ; preds = %59
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0))
br label %66
66: ; preds = %64, %62
br label %67
67: ; preds = %66
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
%70 = load i32, i32* %5
%71 = load i32, i32* %4
%72 = sub nsw i32 %70, %71
%73 = sitofp i32 %72 to double
%74 = fdiv double %73, 2.000000e+00
store double %74, double* %13
%75 = load double, double* %13
%76 = fcmp olt double %75, 0.000000e+00
br i1 %76, label %77, label %80
77: ; preds = %67
%78 = load double, double* %13
%79 = fmul double %78, -1.000000e+00
store double %79, double* %13
br label %80
80: ; preds = %77, %67
%81 = load double, double* %7
%82 = load double, double* %13
%83 = fsub double %81, %82
store double %83, double* %7
br label %84
84: ; preds = %80, %45
%85 = load i32, i32* %11
%86 = add nsw i32 %85, 1
store i32 %86, i32* %11
br label %32
87: ; preds = %58, %32
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%89 = load i32, i32* %8
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %97
91: ; preds = %87
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
%93 = load i32, i32* %6
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0), i32 %93)
%95 = load double, double* %7
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), double %95)
br label %99
97: ; preds = %87
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0))
br label %99
99: ; preds = %97, %91
%100 = load i32, i32* %1
ret i32 %100
}

LLVM IR (-O2):
@.str.4 = [10 x i8] c"Escolha: \00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [14 x i8] c"Tentativa %d\0A\00"
@.str.7 = [22 x i8] c"Qual \C3\A9 o seu chute? \00"
@.str.8 = [18 x i8] c"Seu chute foi %d\0A\00"
@.str.14 = [33 x i8] c"Voc\C3\AA acertou em %d tentativas!\0A\00"
@.str.15 = [23 x i8] c"Total de pontos: %.1f\0A\00"
@str.17 = [45 x i8] c"* Bem vindo ao nosso jogo de adivinha\C3\A7\C3\A3o *\00"
@str.18 = [43 x i8] c"******************************************\00"
@str.19 = [30 x i8] c"Qual o n\C3\ADvel de dificuldade?\00"
@str.20 = [36 x i8] c"(1) F\C3\A1cil (2) M\C3\A9dio (3) Dif\C3\ADcil\0A\00"
@str.21 = [13 x i8] c"Fim de jogo!\00"
@str.22 = [29 x i8] c"Voc\C3\AA perdeu! Tente de novo!\00"
@str.23 = [13 x i8] c"Voc\C3\AA ganhou\00"
@str.24 = [42 x i8] c"Seu chute foi menor que o n\C3\BAmero secreto\00"
@str.25 = [42 x i8] c"Seu chute foi maior que o n\C3\BAmero secreto\00"
@str.26 = [43 x i8] c"Voc\C3\AA n\C3\A3o pode chutar n\C3\BAmeros negativos!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @time(i32 0)
%7 = tail call i32 @srand(i32 %6)
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 100
%10 = bitcast i32* %1 to i8*
%11 = bitcast i32* %2 to i8*
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.19, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.20, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 2
%18 = icmp eq i32 %16, 1
%19 = select i1 %17, i32 16, i32 7
%20 = select i1 %18, i32 21, i32 %19
br label %21
21: ; preds = %0, %54
%22 = phi i32 [ 1, %0 ], [ %56, %54 ]
%23 = phi i32 [ 1, %0 ], [ %57, %54 ]
%24 = phi double [ 1.000000e+03, %0 ], [ %55, %54 ]
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %22)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%28 = load i32, i32* %1
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %1
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %21
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.26, i64 0, i64 0))
br label %54
34: ; preds = %21
%35 = icmp eq i32 %30, %9
br i1 %35, label %36, label %41
36: ; preds = %34
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.21, i64 0, i64 0))
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0), i32 %22)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), double %24)
br label %62
41: ; preds = %34
%42 = icmp sgt i32 %30, %9
%43 = select i1 %42, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.25, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.24, i64 0, i64 0)
%44 = call i32 @puts(i8* dereferenceable(1) %43)
%45 = add nsw i32 %22, 1
%46 = load i32, i32* %1
%47 = sub nsw i32 %46, %9
%48 = sitofp i32 %47 to double
%49 = fmul double %48, 5.000000e-01
%50 = fcmp olt double %49, 0.000000e+00
%51 = fneg double %49
%52 = select i1 %50, double %51, double %49
%53 = fsub double %24, %52
br label %54
54: ; preds = %41, %32
%55 = phi double [ %24, %32 ], [ %53, %41 ]
%56 = phi i32 [ %22, %32 ], [ %45, %41 ]
%57 = add nuw nsw i32 %23, 1
%58 = icmp eq i32 %57, %20
br i1 %58, label %59, label %21
59: ; preds = %54
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.21, i64 0, i64 0))
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.22, i64 0, i64 0))
br label %62
62: ; preds = %59, %36
ret i32 0
}