#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 */
scalar_t__ malloc(int);
double modf(double, double *);
float modff(float, float *);
int /*<<< orphan*/ sprintf(char *, char *, long long, long long);
char *f2(float a, double b) {
  float ai;
  double bi;
  char *str1;
  char *str2;
  a = modff(a, &ai);
  b = modf(b, &bi);
  str1 = (char *)malloc(100);
  sprintf(str1, "%lld%lld", (long long)ai, (long long)bi);
  return str1;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x14(%rbp),%rdi
call   1030 <modff@plt>
movss  %xmm0,-0x4(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1040 <modf@plt>
movsd  %xmm0,-0x10(%rbp)
mov    $0x64,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
cvttss2si -0x14(%rbp),%rdx
cvttsd2si -0x20(%rbp),%rcx
lea    0xe63(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm1,0x10(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <modff@plt>
lea    0x18(%rsp),%rdi
movsd  0x10(%rsp),%xmm0
call   1040 <modf@plt>
mov    $0x64,%edi
call   1050 <malloc@plt>
cvttss2si 0xc(%rsp),%rdx
mov    %rax,%rbx
cvttsd2si 0x18(%rsp),%rcx
lea    0xe79(%rip),%rsi
mov    %rax,%rdi
call   1060 <sprintf@plt>
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%lld%lld\00"
define i8* @f2(float %0, double %1) {
%3 = alloca float
%4 = alloca double
%5 = alloca float
%6 = alloca double
%7 = alloca i8*
%8 = alloca i8*
store float %0, float* %3
store double %1, double* %4
%9 = load float, float* %3
%10 = call float @modff(float %9, float* %5)
store float %10, float* %3
%11 = load double, double* %4
%12 = call double @modf(double %11, double* %6)
store double %12, double* %4
%13 = call i64 @malloc(i32 100)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load float, float* %5
%17 = fptosi float %16 to i64
%18 = load double, double* %6
%19 = fptosi double %18 to i64
%20 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %17, i64 %19)
%21 = load i8*, i8** %7
ret i8* %21
}

LLVM IR (-O2):
@.str = [9 x i8] c"%lld%lld\00"
define i8* @f2(float %0, double %1) {
%3 = alloca float
%4 = alloca double
%5 = bitcast float* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call float @modff(float %0, float* %3)
%8 = call double @modf(double %1, double* %4)
%9 = tail call i64 @malloc(i32 100)
%10 = inttoptr i64 %9 to i8*
%11 = load float, float* %3
%12 = fptosi float %11 to i64
%13 = load double, double* %4
%14 = fptosi double %13 to i64
%15 = tail call i32 @sprintf(i8* dereferenceable(1) %10, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %12, i64 %14)
ret i8* %10
}