#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 */
char *dou2pre(double);
scalar_t__ malloc(int);
double pre2dou(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char input1[17], input2[17];
  scanf("%s", input1);
  scanf("%s", input2);
  double input1_dou, input2_dou;
  input1_dou = pre2dou(input1);
  input2_dou = pre2dou(input2);
  double output_dou = input1_dou - input2_dou;
  char *output;
  output = (char *)malloc(sizeof(char) * 17);
  output = dou2pre(output_dou);
  output[16] = '\0';
  printf("%s\n", output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <pre2dou@plt>
movsd  %xmm0,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <pre2dou@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    $0x11,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1070 <dou2pre@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movb   $0x0,0x10(%rax)
mov    -0x60(%rbp),%rsi
lea    0xe2a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
lea    0xea0(%rip),%rbx
lea    0x30(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0x10(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    %r14,%rdi
call   1030 <pre2dou@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r15,%rdi
call   1030 <pre2dou@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    $0x11,%edi
call   1050 <malloc@plt>
movsd  0x8(%rsp),%xmm0
call   1070 <dou2pre@plt>
movb   $0x0,0x10(%rax)
lea    0xe3d(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [17 x i8]
%3 = alloca [17 x i8]
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i8*
store i32 0, i32* %1
%8 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%13 = call double @pre2dou(i8* %12)
store double %13, double* %4
%14 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%15 = call double @pre2dou(i8* %14)
store double %15, double* %5
%16 = load double, double* %4
%17 = load double, double* %5
%18 = fsub double %16, %17
store double %18, double* %6
%19 = call i64 @malloc(i32 17)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %7
%21 = load double, double* %6
%22 = call i8* @dou2pre(double %21)
store i8* %22, i8** %7
%23 = load i8*, i8** %7
%24 = getelementptr inbounds i8, i8* %23, i64 16
store i8 0, i8* %24
%25 = load i8*, i8** %7
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [17 x i8]
%2 = alloca [17 x i8]
%3 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call double @pre2dou(i8* %3)
%8 = call double @pre2dou(i8* %4)
%9 = fsub double %7, %8
%10 = call i64 @malloc(i32 17)
%11 = call i8* @dou2pre(double %9)
%12 = getelementptr inbounds i8, i8* %11, i64 16
store i8 0, i8* %12
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}