#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 const *, ...);
void print_format_float(const char *format_string, double parameter1,
                        double parameter2) {
  printf("\"");
  printf(format_string, parameter1);
  printf("\"\t");
  printf("Value = % f, Format = \"%s\"\n", parameter1, format_string);
  printf("\"");
  printf(format_string, parameter2);
  printf("\"\t");
  printf("Value = % f, Format = \"%s\"\n", parameter2, format_string);
}


x86 assembly (clang, -O0):
<print_format_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
lea    0xea3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
lea    0xe60(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_format_float>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %rdi,%rbx
mov    $0x22,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xea9(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9b(%rip),%r15
mov    %r15,%rdi
movsd  (%rsp),%xmm0
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x22,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rsi
mov    $0x1,%al
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\22\00"
@.str.1 = [3 x i8] c"\22\09\00"
@.str.2 = [28 x i8] c"Value = % f, Format = \22%s\22\0A\00"
define void @print_format_float(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = load double, double* %5
%10 = call i32 (i8*, ...) @printf(i8* %8, double %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = load double, double* %5
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %12, i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %4
%17 = load double, double* %6
%18 = call i32 (i8*, ...) @printf(i8* %16, double %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = load double, double* %6
%21 = load i8*, i8** %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %20, i8* %21)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"\22\09\00"
@.str.2 = [28 x i8] c"Value = % f, Format = \22%s\22\0A\00"
define void @print_format_float(i8* %0, double %1, double %2) {
%4 = tail call i32 @putchar(i32 34)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, double %1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %1, i8* %0)
%8 = tail call i32 @putchar(i32 34)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, double %2)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %2, i8* %0)
ret void
}