#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 */
double atof(char *);
int /*<<< orphan*/ getline_my(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  char line[1000];
  int i = 0;
  double digit = 0.0;
  printf("Input please line to convert:");
  getline_my(line, 1000);
  digit = atof(line);
  printf("Getted from line = %s digit if double = %G;\n", line, digit);
  printf("Getted from line = %s digit if double = %G;\n", line, digit);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x3f4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x400(%rbp)
ff
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline_my@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x400(%rbp)
ff
lea    -0x3f0(%rbp),%rsi
movsd  -0x400(%rbp),%xmm0
ff
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x3f0(%rbp),%rsi
movsd  -0x400(%rbp),%xmm0
ff
lea    0xe68(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3f8,%rsp
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline_my@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
movsd  %xmm0,0x8(%rsp)
lea    0xeaf(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x3f8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Input please line to convert:\00"
@.str.1 = [45 x i8] c"Getted from line = %s digit if double = %G;\0A\00"
define void @main() {
%1 = alloca [1000 x i8]
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %2
store double 0.000000e+00, double* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%6 = call i32 @getline_my(i8* %5, i32 1000)
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%8 = call double @atof(i8* %7)
store double %8, double* %3
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%10 = load double, double* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %9, double %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%13 = load double, double* %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %12, double %13)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Input please line to convert:\00"
@.str.1 = [45 x i8] c"Getted from line = %s digit if double = %G;\0A\00"
define void @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%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 @getline_my(i8* %2, i32 1000)
%5 = call double @atof(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %2, double %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %2, double %5)
ret void
}