#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*/ getchar();
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, int *);
void main() {
  float x, k, y = 1;
  int n, i = 1;
  scanf("%f%d", &x, &n);
  k = x;
  while (i <= n) {
    y += k;
    k = k * x / (i + 1);
    i++;
  }
  printf("jishu=%f\n", y);
  getchar();
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xeb1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11b0 <main+0x80>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116a <main+0x3a>
movss  -0xc(%rbp),%xmm0
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%eax
test   %eax,%eax
jle    1164 <main+0x34>
movss  0x4(%rsp),%xmm1
cmp    $0x1,%eax
jne    116e <main+0x3e>
movss  0xea1(%rip),%xmm0
movaps %xmm1,%xmm2
jmp    11c7 <main+0x97>
movss  0xe94(%rip),%xmm0
jmp    11cf <main+0x9f>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
neg    %ecx
movss  0xe83(%rip),%xmm0
mov    $0x2,%edx
movaps %xmm1,%xmm2
cs nopw 0x0(%rax,%rax,1)
nop
addss  %xmm2,%xmm0
xorps  %xmm3,%xmm3
cvtsi2ss %edx,%xmm3
mulss  %xmm1,%xmm2
divss  %xmm3,%xmm2
addss  %xmm2,%xmm0
mulss  %xmm1,%xmm2
lea    0x1(%rdx),%esi
xorps  %xmm3,%xmm3
cvtsi2ss %esi,%xmm3
divss  %xmm3,%xmm2
lea    (%rcx,%rdx,1),%esi
add    $0x2,%esi
add    $0x2,%edx
cmp    $0x2,%esi
jne    1190 <main+0x60>
test   $0x1,%al
je     11cf <main+0x9f>
addss  %xmm2,%xmm0
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%d\00"
@.str.1 = [10 x i8] c"jishu=%f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store float 1.000000e+00, float* %3
store i32 1, i32* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, i32* %4)
%7 = load float, float* %1
store float %7, float* %2
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = load float, float* %2
%14 = load float, float* %3
%15 = fadd float %14, %13
store float %15, float* %3
%16 = load float, float* %2
%17 = load float, float* %1
%18 = fmul float %16, %17
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
%21 = sitofp i32 %20 to float
%22 = fdiv float %18, %21
store float %22, float* %2
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %8
25: ; preds = %8
%26 = load float, float* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %26)
%28 = call i32 (...) @getchar()
%29 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%d\00"
@.str.1 = [10 x i8] c"jishu=%f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca i32
%3 = bitcast float* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%6 = load float, float* %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
br i1 %8, label %38, label %9
9: ; preds = %0
%10 = and i32 %7, 1
%11 = icmp eq i32 %7, 1
br i1 %11, label %31, label %12
12: ; preds = %9
%13 = and i32 %7, -2
br label %14
14: ; preds = %14, %12
%15 = phi i32 [ 1, %12 ], [ %26, %14 ]
%16 = phi float [ 1.000000e+00, %12 ], [ %24, %14 ]
%17 = phi float [ %6, %12 ], [ %28, %14 ]
%18 = phi i32 [ 0, %12 ], [ %29, %14 ]
%19 = fadd float %17, %16
%20 = fmul float %6, %17
%21 = add nuw i32 %15, 1
%22 = sitofp i32 %21 to float
%23 = fdiv float %20, %22
%24 = fadd float %23, %19
%25 = fmul float %6, %23
%26 = add nuw i32 %15, 2
%27 = sitofp i32 %26 to float
%28 = fdiv float %25, %27
%29 = add i32 %18, 2
%30 = icmp eq i32 %29, %13
br i1 %30, label %31, label %14
31: ; preds = %14, %9
%32 = phi float [ undef, %9 ], [ %24, %14 ]
%33 = phi float [ 1.000000e+00, %9 ], [ %24, %14 ]
%34 = phi float [ %6, %9 ], [ %28, %14 ]
%35 = icmp eq i32 %10, 0
%36 = fadd float %34, %33
%37 = select i1 %35, float %32, float %36
br label %38
38: ; preds = %31, %0
%39 = phi float [ 1.000000e+00, %0 ], [ %37, %31 ]
%40 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %39)
%41 = call i32 (...) @getchar()
%42 = call i32 (...) @getchar()
ret void
}