#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 */
long busquedaBin(long, long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long *);
main() {
  long n;
  long cn;
  long lim_sup_grupo2;
  printf("Centros numéricos entre 1 y ");
  scanf("%ld", &n);
  printf("\n");
  for (cn = 3; cn < n; cn++) {
    lim_sup_grupo2 = busquedaBin(cn, n);
    if (lim_sup_grupo2 != 0)
      printf("%d es centro numérico de 1 a %d y %d a %d\n", cn, cn - 1, cn + 1,
             lim_sup_grupo2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x3,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    11d9 <main+0xa9>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <busquedaBin@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11c3 <main+0x93>
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
mov    -0x18(%rbp),%rcx
add    $0x1,%rcx
mov    -0x20(%rbp),%r8
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c8 <main+0x98>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1173 <main+0x43>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rsi
cmp    $0x4,%rsi
jl     11cb <main+0x8b>
mov    $0x3,%ebx
lea    0xe99(%rip),%r14
jmp    11b8 <main+0x78>
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%rdx
lea    0x1(%rbx),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rbx
mov    0x8(%rsp),%rsi
cmp    %rsi,%rbx
jge    11cb <main+0x8b>
mov    %rbx,%rdi
call   1040 <busquedaBin@plt>
test   %rax,%rax
jne    1190 <main+0x50>
add    $0x1,%rbx
jmp    11ae <main+0x6e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Centros num\C3\A9ricos entre 1 y \00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [44 x i8] c"%d es centro num\C3\A9rico de 1 a %d y %d a %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i64 3, i64* %3
br label %8
8: ; preds = %27, %0
%9 = load i64, i64* %3
%10 = load i64, i64* %2
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %30
12: ; preds = %8
%13 = load i64, i64* %3
%14 = load i64, i64* %2
%15 = call i64 @busquedaBin(i64 %13, i64 %14)
store i64 %15, i64* %4
%16 = load i64, i64* %4
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %26
18: ; preds = %12
%19 = load i64, i64* %3
%20 = load i64, i64* %3
%21 = sub nsw i64 %20, 1
%22 = load i64, i64* %3
%23 = add nsw i64 %22, 1
%24 = load i64, i64* %4
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i64 %19, i64 %21, i64 %23, i64 %24)
br label %26
26: ; preds = %18, %12
br label %27
27: ; preds = %26
%28 = load i64, i64* %3
%29 = add nsw i64 %28, 1
store i64 %29, i64* %3
br label %8
30: ; preds = %8
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [30 x i8] c"Centros num\C3\A9ricos entre 1 y \00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.3 = [44 x i8] c"%d es centro num\C3\A9rico de 1 a %d y %d a %d\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = call i32 @putchar(i32 10)
%6 = load i64, i64* %1
%7 = icmp sgt i64 %6, 3
br i1 %7, label %8, label %23
8: ; preds = %0, %19
%9 = phi i64 [ %21, %19 ], [ %6, %0 ]
%10 = phi i64 [ %20, %19 ], [ 3, %0 ]
%11 = call i64 @busquedaBin(i64 %10, i64 %9)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = add nuw nsw i64 %10, 1
br label %19
15: ; preds = %8
%16 = add nsw i64 %10, -1
%17 = add nuw nsw i64 %10, 1
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i64 %10, i64 %16, i64 %17, i64 %11)
br label %19
19: ; preds = %13, %15
%20 = phi i64 [ %14, %13 ], [ %17, %15 ]
%21 = load i64, i64* %1
%22 = icmp slt i64 %20, %21
br i1 %22, label %8, label %23
23: ; preds = %19, %0
ret i32 0
}