#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, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ sqrt_b(int);
int /*<<< orphan*/ sqrt_n(int);
int main(int argc, char *argv[]) {
  int n, op;
  scanf("%d%d", &op, &n);
  if (op == 1) {
    printf("sqrt_b(%d)=%lf\n", n, sqrt_b(n));
  } else {
    printf("sqrt_n(%d)=%lf\n", n, sqrt_n(n));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1060 <scanf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    1198 <main+0x58>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <sqrt_b@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <main+0x77>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <sqrt_n@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1060 <scanf@plt>
cmpl   $0x1,0x8(%rsp)
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
jne    1176 <main+0x36>
call   1040 <sqrt_b@plt>
lea    0xe91(%rip),%rdi
jmp    1182 <main+0x42>
call   1050 <sqrt_n@plt>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [16 x i8] c"sqrt_b(%d)=%lf\0A\00"
@.str.2 = [16 x i8] c"sqrt_n(%d)=%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %6)
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @sqrt_b(i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %14)
br label %21
16: ; preds = %2
%17 = load i32, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @sqrt_n(i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 %19)
br label %21
21: ; preds = %16, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [16 x i8] c"sqrt_b(%d)=%lf\0A\00"
@.str.2 = [16 x i8] c"sqrt_n(%d)=%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %3)
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
%10 = load i32, i32* %3
br i1 %9, label %11, label %14
11: ; preds = %2
%12 = call i32 @sqrt_b(i32 %10)
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %12)
br label %17
14: ; preds = %2
%15 = call i32 @sqrt_n(i32 %10)
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %15)
br label %17
17: ; preds = %14, %11
ret i32 0
}