#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 */
struct symbol {
  int dummy;
};
struct ast {
  int dummy;
};

/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
struct ast *new_assign(struct symbol *, int /*<<< orphan*/, char);
int /*<<< orphan*/ new_number(double);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
struct ast *new_dynamic_number_assign(struct symbol *_symbol, char *message) {
  printf("%s", message);
  char buffer[256];
  fgets(buffer, 256, stdin);
  double value = atof(buffer);
  return new_assign(_symbol, new_number(value), 'K');
}


x86 assembly (clang, -O0):
<new_dynamic_number_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    0x2e67(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1060 <fgets@plt>
lea    -0x110(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    %rax,-0x120(%rbp)
movsd  -0x118(%rbp),%xmm0
ff
call   1070 <new_number@plt>
mov    -0x120(%rbp),%rdi
mov    %eax,%esi
mov    $0x4b,%edx
call   1050 <new_assign@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_dynamic_number_assign>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%r14
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
call   1070 <new_number@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    $0x4b,%edx
call   1050 <new_assign@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ast = type { i32 }
%struct.symbol = type { i32 }
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define %struct.ast* @new_dynamic_number_assign(%struct.symbol* %0, i8* %1) {
%3 = alloca %struct.symbol*
%4 = alloca i8*
%5 = alloca [256 x i8]
%6 = alloca double
store %struct.symbol* %0, %struct.symbol** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 256, i32 %10)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%13 = call double @atof(i8* %12)
store double %13, double* %6
%14 = load %struct.symbol*, %struct.symbol** %3
%15 = load double, double* %6
%16 = call i32 @new_number(double %15)
%17 = call %struct.ast* @new_assign(%struct.symbol* %14, i32 %16, i8 signext 75)
ret %struct.ast* %17
}

LLVM IR (-O2):
%struct.ast = type { i32 }
%struct.symbol = type { i32 }
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define %struct.ast* @new_dynamic_number_assign(%struct.symbol* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 256, i32 %6)
%8 = call double @atof(i8* %5)
%9 = call i32 @new_number(double %8)
%10 = call %struct.ast* @new_assign(%struct.symbol* %0, i32 %9, i8 signext 75)
ret %struct.ast* %10
}