#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 atoi(char *);
int /*<<< orphan*/ getline_my(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  char line[1000];
  int i = 0;
  int digit_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 in double = %G;\n", line, digit);
  digit_i = atoi(line);
  printf("Getted from line = %s digit in integer = %d;\n", line, digit_i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x3f4(%rbp)
movl   $0x0,-0x3f8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x400(%rbp)
ff
lea    0xe8f(%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    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x3f0(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x3f8(%rbp)
lea    -0x3f0(%rbp),%rsi
mov    -0x3f8(%rbp),%edx
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline_my@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1060 <atoi@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x3f0,%rsp
pop    %rbx
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 in double = %G;\0A\00"
@.str.2 = [46 x i8] c"Getted from line = %s digit in integer = %d;\0A\00"
define void @main() {
%1 = alloca [1000 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %2
store i32 0, i32* %3
store double 0.000000e+00, double* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%7 = call i32 @getline_my(i8* %6, i32 1000)
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%9 = call double @atof(i8* %8)
store double %9, double* %4
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%11 = load double, double* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %10, double %11)
%13 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %3
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i8* %15, i32 %16)
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 in double = %G;\0A\00"
@.str.2 = [46 x i8] c"Getted from line = %s digit in integer = %d;\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 @atoi(i8* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i8* %2, i32 %7)
ret void
}