#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ libgamma_perror(char *, int);
int /*<<< orphan*/ printf(char *, char const *, float);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
void print_crtc_information_float(int do_print, const char *description,
                                  int error, float value) {
  char buf[256];
  if (do_print) {
    if (error) {
      snprintf(buf, sizeof(buf), "  (error) %s", description);
      libgamma_perror(buf, error);
    } else {
      printf("  %s: %"
             "f"
             "\n",
             description, value);
    }
  }
}


x86 assembly (clang, -O0):
<print_crtc_information_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11a8 <print_crtc_information_float+0x78>
cmpl   $0x0,-0x14(%rbp)
je     118e <print_crtc_information_float+0x5e>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x100,%esi
lea    0xe8b(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x120(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <libgamma_perror@plt>
jmp    11a3 <print_crtc_information_float+0x73>
mov    -0x10(%rbp),%rsi
movss  -0x18(%rbp),%xmm0
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
jmp    11a8 <print_crtc_information_float+0x78>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crtc_information_float>:
push   %r14
push   %rbx
sub    $0x108,%rsp
test   %edi,%edi
je     1168 <print_crtc_information_float+0x38>
mov    %edx,%ebx
mov    %rsi,%rcx
test   %edx,%edx
je     1173 <print_crtc_information_float+0x43>
lea    0xeb2(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1040 <snprintf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <libgamma_perror@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe93(%rip),%rdi
mov    %rcx,%rsi
add    $0x108,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c" (error) %s\00"
@.str.1 = [10 x i8] c" %s: %f\0A\00"
define void @print_crtc_information_float(i32 %0, i8* %1, i32 %2, float %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = icmp eq i32 %0, 0
br i1 %7, label %15, label %8
8: ; preds = %4
%9 = icmp eq i32 %2, 0
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = call i32 @snprintf(i8* %6, i32 256, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
%12 = call i32 @libgamma_perror(i8* %6, i32 %2)
br label %15
13: ; preds = %8
%14 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1, float %3)
br label %15
15: ; preds = %10, %13, %4
ret void
}