#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 *d_s(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, double);
double t_conv(float *, int *);
int t_extract(char *, float *);
int main(int argc, char *argv[]) {
  char *temp_string;
  int temp_type;
  float temp;
  if (argc == 1) {
    temp_string = d_s(temp_string);
    temp_type = t_extract(temp_string, &temp);
  } else {
    temp_type = t_extract(argv[1], &temp);
  }
  printf("%.1f\n", t_conv(&temp, &temp_type));
  free(temp_string);
  return temp_type;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1192 <main+0x42>
mov    -0x18(%rbp),%rdi
call   1060 <d_s@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <t_extract@plt>
mov    %eax,-0x1c(%rbp)
jmp    11a6 <main+0x56>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <t_extract@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1070 <t_conv@plt>
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    1163 <main+0x13>
call   1060 <d_s@plt>
mov    %rax,%rbx
jmp    1167 <main+0x17>
mov    0x8(%rsi),%rbx
lea    0x4(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <t_extract@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %r14,%rdi
call   1070 <t_conv@plt>
lea    0xe74(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    (%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %6
%13 = call i8* @d_s(i8* %12)
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = call i32 @t_extract(i8* %14, float* %8)
store i32 %15, i32* %7
br label %21
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @t_extract(i8* %19, float* %8)
store i32 %20, i32* %7
br label %21
21: ; preds = %16, %11
%22 = call double @t_conv(float* %8, i32* %7)
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %22)
%24 = load i8*, i8** %6
%25 = call i32 @free(i8* %24)
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca float
%5 = bitcast i32* %3 to i8*
%6 = bitcast float* %4 to i8*
%7 = icmp eq i32 %0, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i8* @d_s(i8* undef)
br label %13
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
br label %13
13: ; preds = %10, %8
%14 = phi i8* [ %12, %10 ], [ %9, %8 ]
%15 = phi i8* [ undef, %10 ], [ %9, %8 ]
%16 = call i32 @t_extract(i8* %14, float* %4)
store i32 %16, i32* %3
%17 = call double @t_conv(float* %4, i32* %3)
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %17)
%19 = call i32 @free(i8* %15)
%20 = load i32, i32* %3
ret i32 %20
}