#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 *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int strlen(char *);
int main(int argc, char const *argv[]) {
  float weight, volume;
  int size, letters;
  char name[40];
  printf("Hi What 's yourt first name?\n");
  scanf("%s", name);
  printf("%s,what 's your weight in pounds?\n", name);
  scanf("%f", &weight);
  size = sizeof name;
  letters = strlen(name);
  volume = weight / 62.4;
  printf("Well, %s,your volume is %2.2f cubic feet.\n", name, volume);
  printf("Also ,your first name has %d letters.\n", letters);
  printf("and we have %d bytes to store it in .\n", size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x50(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x28,-0x1c(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe52(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    -0x50(%rbp),%rsi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeae(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xe5a(%rip),%xmm0
mov    %eax,%ebp
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7a(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe94(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeab(%rip),%rdi
mov    $0x28,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Hi What 's yourt first name?\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [35 x i8] c"%s,what 's your weight in pounds?\0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [43 x i8] c"Well, %s,your volume is %2.2f cubic feet.\0A\00"
@.str.5 = [39 x i8] c"Also ,your first name has %d letters.\0A\00"
@.str.6 = [39 x i8] c"and we have %d bytes to store it in .\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
%10 = alloca [40 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %6)
store i32 40, i32* %8
%17 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %9
%19 = load float, float* %6
%20 = fpext float %19 to double
%21 = fdiv double %20, 0x404F333333333333
%22 = fptrunc double %21 to float
store float %22, float* %7
%23 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%24 = load float, float* %7
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8* %23, double %25)
%27 = load i32, i32* %9
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %8
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [35 x i8] c"%s,what 's your weight in pounds?\0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [43 x i8] c"Well, %s,your volume is %2.2f cubic feet.\0A\00"
@.str.5 = [39 x i8] c"Also ,your first name has %d letters.\0A\00"
@.str.6 = [39 x i8] c"and we have %d bytes to store it in .\0A\00"
@str = [29 x i8] c"Hi What 's yourt first name?\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca [40 x i8]
%5 = bitcast float* %3 to i8*
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %3)
%11 = call i32 @strlen(i8* %6)
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fdiv double %13, 0x404F333333333333
%15 = fptrunc double %14 to float
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8* %6, double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i32 40)
ret i32 0
}