#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 */
struct statfs {
  long f_bsize;
  long f_blocks;
  long f_bfree;
};

/* Variables and functions */
int /*<<< orphan*/ statfs(char *, struct statfs *);
char Status_Disk(char *Disk, long *Total, long *Used) {
  struct statfs Disk_Information;
  statfs(Disk, &Disk_Information);
  long Block_Size = Disk_Information.f_bsize;
  *Total = Block_Size * Disk_Information.f_blocks;
  *Used = (*Total) - (Disk_Information.f_bfree * Block_Size);
  return 'V';
}


x86 assembly (clang, -O0):
<Status_Disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <statfs@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rcx
imul   -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x20(%rbp),%rax
imul   -0x38(%rbp),%rax
sub    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x56,%al
movsbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Status_Disk>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <statfs@plt>
mov    (%rsp),%rax
mov    0x8(%rsp),%rcx
imul   %rax,%rcx
mov    %rcx,(%rbx)
imul   0x10(%rsp),%rax
sub    %rax,%rcx
mov    %rcx,(%r14)
mov    $0x56,%al
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.statfs = type { i64, i64, i64 }
define signext i8 @Status_Disk(i8* %0, i64* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca %struct.statfs
%8 = alloca i64
store i8* %0, i8** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%9 = load i8*, i8** %4
%10 = call i32 @statfs(i8* %9, %struct.statfs* %7)
%11 = getelementptr inbounds %struct.statfs, %struct.statfs* %7, i32 0, i32 0
%12 = load i64, i64* %11
store i64 %12, i64* %8
%13 = load i64, i64* %8
%14 = getelementptr inbounds %struct.statfs, %struct.statfs* %7, i32 0, i32 1
%15 = load i64, i64* %14
%16 = mul nsw i64 %13, %15
%17 = load i64*, i64** %5
store i64 %16, i64* %17
%18 = load i64*, i64** %5
%19 = load i64, i64* %18
%20 = getelementptr inbounds %struct.statfs, %struct.statfs* %7, i32 0, i32 2
%21 = load i64, i64* %20
%22 = load i64, i64* %8
%23 = mul nsw i64 %21, %22
%24 = sub nsw i64 %19, %23
%25 = load i64*, i64** %6
store i64 %24, i64* %25
ret i8 86
}

LLVM IR (-O2):
%struct.statfs = type { i64, i64, i64 }
define signext i8 @Status_Disk(i8* %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = alloca %struct.statfs
%5 = bitcast %struct.statfs* %4 to i8*
%6 = call i32 @statfs(i8* %0, %struct.statfs* %4)
%7 = getelementptr inbounds %struct.statfs, %struct.statfs* %4, i64 0, i32 0
%8 = load i64, i64* %7
%9 = getelementptr inbounds %struct.statfs, %struct.statfs* %4, i64 0, i32 1
%10 = load i64, i64* %9
%11 = mul nsw i64 %10, %8
store i64 %11, i64* %1
%12 = getelementptr inbounds %struct.statfs, %struct.statfs* %4, i64 0, i32 2
%13 = load i64, i64* %12
%14 = mul nsw i64 %13, %8
%15 = sub nsw i64 %11, %14
store i64 %15, i64* %2
ret i8 86
}