#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 statvfs {
  int /*<<< orphan*/ f_namemax;
  scalar_t__ f_flag;
  int /*<<< orphan*/ f_fsid;
  int /*<<< orphan*/ f_favail;
  int /*<<< orphan*/ f_ffree;
  int /*<<< orphan*/ f_files;
  int /*<<< orphan*/ f_bavail;
  int /*<<< orphan*/ f_bfree;
  int /*<<< orphan*/ f_blocks;
  int /*<<< orphan*/ f_frsize;
  int /*<<< orphan*/ f_bsize;
};
struct TYPE_2__ {
  int /*<<< orphan*/ *__val;
};
struct statfs {
  int /*<<< orphan*/ f_namelen;
  TYPE_1__ f_fsid;
  int /*<<< orphan*/ f_ffree;
  int /*<<< orphan*/ f_files;
  int /*<<< orphan*/ f_bavail;
  int /*<<< orphan*/ f_bfree;
  int /*<<< orphan*/ f_blocks;
  int /*<<< orphan*/ f_frsize;
  int /*<<< orphan*/ f_bsize;
};

/* Variables and functions */
void __statvfs_cvt(struct statfs *from, struct statvfs *to) {
  to->f_bsize = from->f_bsize;
  to->f_frsize = from->f_frsize;
  to->f_blocks = from->f_blocks;
  to->f_bfree = from->f_bfree;
  to->f_bavail = from->f_bavail;
  to->f_files = from->f_files;
  to->f_ffree = from->f_ffree;
  to->f_favail = from->f_ffree;
  to->f_fsid = from->f_fsid.__val[0];
  to->f_flag = 0;
  to->f_namemax = from->f_namelen;
}


x86 assembly (clang, -O0):
<__statvfs_cvt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x30(%rax)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x2c(%rax)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__statvfs_cvt>:
mov    0x28(%rdi),%eax
mov    %eax,0x30(%rsi)
mov    0x24(%rdi),%eax
mov    %eax,0x2c(%rsi)
mov    0x20(%rdi),%eax
mov    %eax,0x28(%rsi)
movups 0x10(%rdi),%xmm0
movups %xmm0,0x18(%rsi)
movss  %xmm0,0x14(%rsi)
mov    0x8(%rdi),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsi)
movq   $0x0,0x8(%rsi)
mov    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
%struct.statfs = type { i32, %struct.TYPE_2__, i32, i32, i32, i32, i32, i32, i32 }
%struct.TYPE_2__ = type { i32* }
%struct.statvfs = type { i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @__statvfs_cvt(%struct.statfs* %0, %struct.statvfs* %1) {
%3 = alloca %struct.statfs*
%4 = alloca %struct.statvfs*
store %struct.statfs* %0, %struct.statfs** %3
store %struct.statvfs* %1, %struct.statvfs** %4
%5 = load %struct.statfs*, %struct.statfs** %3
%6 = getelementptr inbounds %struct.statfs, %struct.statfs* %5, i32 0, i32 8
%7 = load i32, i32* %6
%8 = load %struct.statvfs*, %struct.statvfs** %4
%9 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %8, i32 0, i32 10
store i32 %7, i32* %9
%10 = load %struct.statfs*, %struct.statfs** %3
%11 = getelementptr inbounds %struct.statfs, %struct.statfs* %10, i32 0, i32 7
%12 = load i32, i32* %11
%13 = load %struct.statvfs*, %struct.statvfs** %4
%14 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %13, i32 0, i32 9
store i32 %12, i32* %14
%15 = load %struct.statfs*, %struct.statfs** %3
%16 = getelementptr inbounds %struct.statfs, %struct.statfs* %15, i32 0, i32 6
%17 = load i32, i32* %16
%18 = load %struct.statvfs*, %struct.statvfs** %4
%19 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %18, i32 0, i32 8
store i32 %17, i32* %19
%20 = load %struct.statfs*, %struct.statfs** %3
%21 = getelementptr inbounds %struct.statfs, %struct.statfs* %20, i32 0, i32 5
%22 = load i32, i32* %21
%23 = load %struct.statvfs*, %struct.statvfs** %4
%24 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %23, i32 0, i32 7
store i32 %22, i32* %24
%25 = load %struct.statfs*, %struct.statfs** %3
%26 = getelementptr inbounds %struct.statfs, %struct.statfs* %25, i32 0, i32 4
%27 = load i32, i32* %26
%28 = load %struct.statvfs*, %struct.statvfs** %4
%29 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %28, i32 0, i32 6
store i32 %27, i32* %29
%30 = load %struct.statfs*, %struct.statfs** %3
%31 = getelementptr inbounds %struct.statfs, %struct.statfs* %30, i32 0, i32 3
%32 = load i32, i32* %31
%33 = load %struct.statvfs*, %struct.statvfs** %4
%34 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %33, i32 0, i32 5
store i32 %32, i32* %34
%35 = load %struct.statfs*, %struct.statfs** %3
%36 = getelementptr inbounds %struct.statfs, %struct.statfs* %35, i32 0, i32 2
%37 = load i32, i32* %36
%38 = load %struct.statvfs*, %struct.statvfs** %4
%39 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %38, i32 0, i32 4
store i32 %37, i32* %39
%40 = load %struct.statfs*, %struct.statfs** %3
%41 = getelementptr inbounds %struct.statfs, %struct.statfs* %40, i32 0, i32 2
%42 = load i32, i32* %41
%43 = load %struct.statvfs*, %struct.statvfs** %4
%44 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %43, i32 0, i32 3
store i32 %42, i32* %44
%45 = load %struct.statfs*, %struct.statfs** %3
%46 = getelementptr inbounds %struct.statfs, %struct.statfs* %45, i32 0, i32 1
%47 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %46, i32 0, i32 0
%48 = load i32*, i32** %47
%49 = getelementptr inbounds i32, i32* %48, i64 0
%50 = load i32, i32* %49
%51 = load %struct.statvfs*, %struct.statvfs** %4
%52 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %51, i32 0, i32 2
store i32 %50, i32* %52
%53 = load %struct.statvfs*, %struct.statvfs** %4
%54 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %53, i32 0, i32 1
store i64 0, i64* %54
%55 = load %struct.statfs*, %struct.statfs** %3
%56 = getelementptr inbounds %struct.statfs, %struct.statfs* %55, i32 0, i32 0
%57 = load i32, i32* %56
%58 = load %struct.statvfs*, %struct.statvfs** %4
%59 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %58, i32 0, i32 0
store i32 %57, i32* %59
ret void
}

LLVM IR (-O2):
%struct.statfs = type { i32, %struct.TYPE_2__, i32, i32, i32, i32, i32, i32, i32 }
%struct.TYPE_2__ = type { i32* }
%struct.statvfs = type { i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @__statvfs_cvt(%struct.statfs* nocapture %0, %struct.statvfs* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 8
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 10
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 7
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 9
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 6
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 8
store i32 %10, i32* %11
%12 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 2
%13 = bitcast i32* %12 to <4 x i32>*
%14 = load <4 x i32>, <4 x i32>* %13
%15 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 4
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %14, <4 x i32>* %16
%17 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 3
%18 = extractelement <4 x i32> %14, i64 0
store i32 %18, i32* %17
%19 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 1, i32 0
%20 = load i32*, i32** %19
%21 = load i32, i32* %20
%22 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 2
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 1
store i64 0, i64* %23
%24 = getelementptr inbounds %struct.statfs, %struct.statfs* %0, i64 0, i32 0
%25 = load i32, i32* %24
%26 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 0
store i32 %25, i32* %26
ret void
}