#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 atoi(char const *);
float multiplier_affix(char const *);
scalar_t__ parse_float(float *, char const *);
int nepim_unit_int(const char *str) {
  float f;
  if (parse_float(&f, str))
    return atoi(str) * multiplier_affix(str);
  return f * multiplier_affix(str);
}


x86 assembly (clang, -O0):
<nepim_unit_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1050 <parse_float@plt>
cmp    $0x0,%rax
je     1186 <nepim_unit_int+0x56>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <multiplier_affix@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    11ac <nepim_unit_int+0x7c>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <multiplier_affix@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nepim_unit_int>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <parse_float@plt>
test   %rax,%rax
je     116f <nepim_unit_int+0x3f>
mov    %rbx,%rdi
call   1040 <atoi@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <multiplier_affix@plt>
movaps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
jmp    1189 <nepim_unit_int+0x59>
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <multiplier_affix@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nepim_unit_int(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @parse_float(float* %4, i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @atoi(i8* %9)
%11 = sitofp i32 %10 to float
%12 = load i8*, i8** %3
%13 = call float @multiplier_affix(i8* %12)
%14 = fmul float %11, %13
%15 = fptosi float %14 to i32
store i32 %15, i32* %2
br label %22
16: ; preds = %1
%17 = load float, float* %4
%18 = load i8*, i8** %3
%19 = call float @multiplier_affix(i8* %18)
%20 = fmul float %17, %19
%21 = fptosi float %20 to i32
store i32 %21, i32* %2
br label %22
22: ; preds = %16, %8
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @nepim_unit_int(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i64 @parse_float(float* %2, i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = call i32 @atoi(i8* %0)
%8 = sitofp i32 %7 to float
%9 = call float @multiplier_affix(i8* %0)
br label %13
10: ; preds = %1
%11 = load float, float* %2
%12 = call float @multiplier_affix(i8* %0)
br label %13
13: ; preds = %10, %6
%14 = phi float [ %12, %10 ], [ %8, %6 ]
%15 = phi float [ %11, %10 ], [ %9, %6 ]
%16 = fmul float %15, %14
%17 = fptosi float %16 to i32
ret i32 %17
}