#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  double f_bavail;
  double f_blocks;
  double f_ffree;
  double f_files;
};
struct aufs_stbr {
  int bindex;
  TYPE_1__ stfs;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, unsigned long long,
                          unsigned long long, int, unsigned long long,
                          unsigned long long);
__attribute__((unused)) void pr_stbr(struct aufs_stbr *stbr) {
  printf("b%d %d%%(%llu/%llu), %d%%(%llu/%llu) free\n", stbr->bindex,
         (int)(stbr->stfs.f_bavail * 100.0 / stbr->stfs.f_blocks),
         (unsigned long long)stbr->stfs.f_bavail,
         (unsigned long long)stbr->stfs.f_blocks,
         (int)(stbr->stfs.f_ffree * 100.0 / stbr->stfs.f_files),
         (unsigned long long)stbr->stfs.f_ffree,
         (unsigned long long)stbr->stfs.f_files);
}


x86 assembly (clang, -O0):
<pr_stbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
movsd  0x8(%rax),%xmm3
movsd  0xed1(%rip),%xmm0
movaps %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movsd  0x10(%rax),%xmm1
divsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edx
movsd  0xebd(%rip),%xmm2
movaps %xmm3,%xmm4
subsd  %xmm2,%xmm4
cvttsd2si %xmm4,%rdi
cvttsd2si %xmm3,%rcx
mov    %rcx,%r8
sar    $0x3f,%r8
and    %r8,%rdi
or     %rdi,%rcx
movaps %xmm1,%xmm3
subsd  %xmm2,%xmm3
cvttsd2si %xmm3,%rdi
cvttsd2si %xmm1,%r8
mov    %r8,%r9
sar    $0x3f,%r9
and    %r9,%rdi
or     %rdi,%r8
movsd  0x18(%rax),%xmm1
movaps %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movsd  0x20(%rax),%xmm0
divsd  %xmm0,%xmm3
cvttsd2si %xmm3,%r9d
movaps %xmm1,%xmm3
subsd  %xmm2,%xmm3
cvttsd2si %xmm3,%rax
cvttsd2si %xmm1,%r10
mov    %r10,%rdi
sar    $0x3f,%rdi
and    %rdi,%rax
or     %rax,%r10
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rdi
cvttsd2si %xmm0,%rax
mov    %rax,%r11
sar    $0x3f,%r11
and    %r11,%rdi
or     %rdi,%rax
lea    0xe2c(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_stbr>:
push   %rbx
movsd  0x8(%rdi),%xmm2
movsd  0xee2(%rip),%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x10(%rdi),%xmm3
divsd  %xmm3,%xmm0
cvttsd2si %xmm0,%edx
mov    (%rdi),%esi
movsd  0xecb(%rip),%xmm0
cvttsd2si %xmm2,%rax
subsd  %xmm0,%xmm2
cvttsd2si %xmm2,%r8
mov    %rax,%rcx
sar    $0x3f,%rcx
and    %r8,%rcx
or     %rax,%rcx
cvttsd2si %xmm3,%rax
subsd  %xmm0,%xmm3
cvttsd2si %xmm3,%r10
mov    %rax,%r8
sar    $0x3f,%r8
movsd  0x18(%rdi),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x20(%rdi),%xmm3
divsd  %xmm3,%xmm1
cvttsd2si %xmm1,%r9d
cvttsd2si %xmm2,%r11
and    %r10,%r8
subsd  %xmm0,%xmm2
cvttsd2si %xmm2,%r10
or     %rax,%r8
mov    %r11,%rbx
sar    $0x3f,%rbx
cvttsd2si %xmm3,%rdi
and    %r10,%rbx
subsd  %xmm0,%xmm3
cvttsd2si %xmm3,%r10
or     %r11,%rbx
mov    %rdi,%rax
sar    $0x3f,%rax
and    %r10,%rax
or     %rdi,%rax
lea    0xe49(%rip),%rdi
push   %rax
push   %rbx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.aufs_stbr = type { i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, double, double, double }
@.str = [43 x i8] c"b%d %d%%(%llu/%llu), %d%%(%llu/%llu) free\0A\00"
define void @pr_stbr(%struct.aufs_stbr* %0) {
%2 = alloca %struct.aufs_stbr*
store %struct.aufs_stbr* %0, %struct.aufs_stbr** %2
%3 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%4 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%7 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %6, i32 0, i32 1
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
%9 = load double, double* %8
%10 = fmul double %9, 1.000000e+02
%11 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%12 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %11, i32 0, i32 1
%13 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %12, i32 0, i32 1
%14 = load double, double* %13
%15 = fdiv double %10, %14
%16 = fptosi double %15 to i32
%17 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%18 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %17, i32 0, i32 1
%19 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %18, i32 0, i32 0
%20 = load double, double* %19
%21 = fptoui double %20 to i64
%22 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%23 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %22, i32 0, i32 1
%24 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %23, i32 0, i32 1
%25 = load double, double* %24
%26 = fptoui double %25 to i64
%27 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%28 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %27, i32 0, i32 1
%29 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %28, i32 0, i32 2
%30 = load double, double* %29
%31 = fmul double %30, 1.000000e+02
%32 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%33 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %32, i32 0, i32 1
%34 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %33, i32 0, i32 3
%35 = load double, double* %34
%36 = fdiv double %31, %35
%37 = fptosi double %36 to i32
%38 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%39 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %38, i32 0, i32 1
%40 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %39, i32 0, i32 2
%41 = load double, double* %40
%42 = fptoui double %41 to i64
%43 = load %struct.aufs_stbr*, %struct.aufs_stbr** %2
%44 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %43, i32 0, i32 1
%45 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %44, i32 0, i32 3
%46 = load double, double* %45
%47 = fptoui double %46 to i64
%48 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %16, i64 %21, i64 %26, i32 %37, i64 %42, i64 %47)
ret void
}

LLVM IR (-O2):
%struct.aufs_stbr = type { i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, double, double, double }
@.str = [43 x i8] c"b%d %d%%(%llu/%llu), %d%%(%llu/%llu) free\0A\00"
define void @pr_stbr(%struct.aufs_stbr* nocapture %0) {
%2 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %0, i64 0, i32 1, i32 0
%5 = load double, double* %4
%6 = fmul double %5, 1.000000e+02
%7 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %0, i64 0, i32 1, i32 1
%8 = load double, double* %7
%9 = fdiv double %6, %8
%10 = fptosi double %9 to i32
%11 = fptoui double %5 to i64
%12 = fptoui double %8 to i64
%13 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %0, i64 0, i32 1, i32 2
%14 = load double, double* %13
%15 = fmul double %14, 1.000000e+02
%16 = getelementptr inbounds %struct.aufs_stbr, %struct.aufs_stbr* %0, i64 0, i32 1, i32 3
%17 = load double, double* %16
%18 = fdiv double %15, %17
%19 = fptosi double %18 to i32
%20 = fptoui double %14 to i64
%21 = fptoui double %17 to i64
%22 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %10, i64 %11, i64 %12, i32 %19, i64 %20, i64 %21)
ret void
}