#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*/ disableSwap();
int /*<<< orphan*/ printf(char *);
int system(char *);
int /*<<< orphan*/ unmountFilesystems();
void performUnmounts(void) {
  int ignore;
  printf("disabling swap...\n");
  disableSwap();
  printf("unmounting filesystems...\n");
  unmountFilesystems();
  printf("waiting for mdraid sets to become clean...\n");
  ignore = system("/sbin/mdadm --wait-clean --scan");
}


x86 assembly (clang, -O0):
<performUnmounts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <disableSwap@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <unmountFilesystems@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<performUnmounts>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <disableSwap@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <unmountFilesystems@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xe86(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"disabling swap...\0A\00"
@.str.1 = [27 x i8] c"unmounting filesystems...\0A\00"
@.str.2 = [44 x i8] c"waiting for mdraid sets to become clean...\0A\00"
@.str.3 = [32 x i8] c"/sbin/mdadm --wait-clean --scan\00"
define void @performUnmounts() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @disableSwap()
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @unmountFilesystems()
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
store i32 %7, i32* %1
ret void
}

LLVM IR (-O2):
@.str.3 = [32 x i8] c"/sbin/mdadm --wait-clean --scan\00"
@str = [18 x i8] c"disabling swap...\00"
@str.4 = [26 x i8] c"unmounting filesystems...\00"
@str.5 = [43 x i8] c"waiting for mdraid sets to become clean...\00"
define void @performUnmounts() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @disableSwap()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 (...) @unmountFilesystems()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
ret void
}