#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 *, double);
int /*<<< orphan*/ scanf(char *, int *, double *);
int main(void) {
  int customers, fee = 1;
  double total_cost, gas_cost;
  scanf("%d %lf", &customers, &gas_cost);
  if (customers > 0) {
    total_cost = (fee + gas_cost) / (customers + 1);
  } else {
    total_cost = gas_cost;
  }
  printf("%.2lf\n", total_cost);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1176 <main+0x56>
cvtsi2sdl -0xc(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1180 <main+0x60>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
movsd  0x10(%rsp),%xmm0
test   %eax,%eax
jle    115b <main+0x3b>
addsd  0xeb0(%rip),%xmm0
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, double* %2)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
%8 = load double, double* %2
br i1 %7, label %9, label %14
9: ; preds = %0
%10 = fadd double %8, 1.000000e+00
%11 = add nuw nsw i32 %6, 1
%12 = sitofp i32 %11 to double
%13 = fdiv double %10, %12
br label %14
14: ; preds = %0, %9
%15 = phi double [ %13, %9 ], [ %8, %0 ]
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %15)
ret i32 0
}