#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 */
void *parse(char *, char *);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long, unsigned long,
                          int, int, unsigned long long, unsigned long long,
                          unsigned long long, unsigned long long,
                          unsigned long long, unsigned long long, long,
                          unsigned long long, unsigned long long,
                          unsigned long long);
void parse_client(char *s) {
  unsigned long cli_id = parse(s, "CI");
  unsigned long weight = parse(s, "ww");
  unsigned long cap = parse(s, "ca");
  unsigned long compress = parse(s, "co");
  unsigned long frozen = parse(s, "fr");
  unsigned long long eph_count = parse(s, "Ec");
  unsigned long long max_eph_count = parse(s, "Em");
  unsigned long long compressed_pages = parse(s, "cp");
  unsigned long long compressed_sum_size = parse(s, "cb");
  unsigned long long compress_poor = parse(s, "cn");
  unsigned long long compress_nomem = parse(s, "cm");
  unsigned long long total_cycles = parse(s, "Tc");
  unsigned long long succ_eph_gets = parse(s, "Ge");
  unsigned long long succ_pers_puts = parse(s, "Pp");
  unsigned long long succ_pers_gets = parse(s, "Gp");
  printf("domid%lu: weight=%lu,cap=%lu,compress=%d,frozen=%d,"
         "total_cycles=%llu,succ_eph_gets=%llu,"
         "succ_pers_puts=%llu,succ_pers_gets=%llu,"
         "eph_count=%llu,max_eph=%llu,"
         "compression ratio=%lu%% (samples=%llu,poor=%llu,nomem=%llu)\n",
         cli_id, weight, cap, compress ? 1 : 0, frozen ? 1 : 0, total_cycles,
         succ_eph_gets, succ_pers_puts, succ_pers_gets, eph_count,
         max_eph_count,
         compressed_pages
             ? (long)((compressed_sum_size * 100LL) / (compressed_pages * 4096))
             : 0,
         compressed_pages, compress_poor, compress_nomem);
}


x86 assembly (clang, -O0):
<parse_client>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rdi,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe79(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe57(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x68(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe46(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x70(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe35(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe24(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x80(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe13(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x88(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdff(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x90(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdeb(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0x98(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdd7(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x50(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xe0(%rbp)
mov    -0x58(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xdc(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0xb0(%rbp)
cmpq   $0x0,-0x70(%rbp)
je     133b <parse_client+0x21b>
imul   $0x64,-0x78(%rbp),%rax
mov    -0x70(%rbp),%rcx
shl    $0xc,%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x100(%rbp)
jmp    1349 <parse_client+0x229>
xor    %eax,%eax
mov    %rax,-0x100(%rbp)
jmp    1349 <parse_client+0x229>
mov    -0xb8(%rbp),%r15
mov    -0xc0(%rbp),%r12
mov    -0xc8(%rbp),%r13
mov    -0xd8(%rbp),%r14
mov    -0xdc(%rbp),%r9d
mov    -0xe0(%rbp),%r8d
mov    -0xe8(%rbp),%rcx
mov    -0xf0(%rbp),%rdx
mov    -0xf8(%rbp),%rsi
mov    -0x100(%rbp),%rbx
mov    -0x70(%rbp),%r11
mov    -0x80(%rbp),%r10
mov    -0x88(%rbp),%rax
lea    0xc88(%rip),%rdi
mov    %r14,(%rsp)
mov    -0xd0(%rbp),%r14
mov    %r14,0x8(%rsp)
mov    -0xb0(%rbp),%r14
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1030 <printf@plt>
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_client>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%r15
lea    0xec8(%rip),%rsi
call   1040 <parse@plt>
mov    %rax,0x48(%rsp)
lea    0xeba(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x40(%rsp)
lea    0xea9(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x38(%rsp)
lea    0xe98(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x28(%rsp)
lea    0xe87(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x18(%rsp)
lea    0xe76(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x30(%rsp)
lea    0xe65(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x20(%rsp)
lea    0xe54(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,%r12
mov    %rax,0x10(%rsp)
lea    0xe40(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x50(%rsp)
lea    0xe2f(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,%r14
lea    0xe20(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,%rbx
lea    0xe11(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,%rbp
lea    0xe02(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,%r13
lea    0xdf3(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
mov    %rax,0x8(%rsp)
lea    0xde2(%rip),%rsi
mov    %r15,%rdi
call   1040 <parse@plt>
test   %r12,%r12
mov    %rbp,0x60(%rsp)
mov    %rax,0x58(%rsp)
mov    %rbx,%r10
je     127f <parse_client+0x15f>
imul   $0x64,0x50(%rsp),%rax
shl    $0xc,%r12
mov    %rax,%rcx
or     %r12,%rcx
shr    $0x20,%rcx
je     1283 <parse_client+0x163>
xor    %edx,%edx
div    %r12
jmp    1288 <parse_client+0x168>
xor    %eax,%eax
jmp    1288 <parse_client+0x168>
xor    %edx,%edx
div    %r12d
mov    0x48(%rsp),%rsi
mov    0x40(%rsp),%rdx
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%r11
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%r15
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%rbx
mov    0x8(%rsp),%r12
xor    %r9d,%r9d
test   %rbp,%rbp
setne  %r9b
xor    %r8d,%r8d
test   %rdi,%rdi
setne  %r8b
lea    0xd5d(%rip),%rdi
push   %r10
push   %r14
push   %rbx
push   %rax
push   %r15
push   %r11
push   0x88(%rsp)
push   %r12
push   %r13
push   0xa8(%rsp)
call   1030 <printf@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"CI\00"
@.str.1 = [3 x i8] c"ww\00"
@.str.2 = [3 x i8] c"ca\00"
@.str.3 = [3 x i8] c"co\00"
@.str.4 = [3 x i8] c"fr\00"
@.str.5 = [3 x i8] c"Ec\00"
@.str.6 = [3 x i8] c"Em\00"
@.str.7 = [3 x i8] c"cp\00"
@.str.8 = [3 x i8] c"cb\00"
@.str.9 = [3 x i8] c"cn\00"
@.str.10 = [3 x i8] c"cm\00"
@.str.11 = [3 x i8] c"Tc\00"
@.str.12 = [3 x i8] c"Ge\00"
@.str.13 = [3 x i8] c"Pp\00"
@.str.14 = [3 x i8] c"Gp\00"
@.str.15 = [217 x i8] c"domid%lu: weight=%lu,cap=%lu,compress=%d,frozen=%d,total_cycles=%llu,succ_eph_gets=%llu,succ_pers_puts=%llu,succ_pers_gets=%llu,eph_count=%llu,max_eph=%llu,compression ratio=%lu%% (samples=%llu,poor=%llu,nomem=%llu)\0A\00"
define void @parse_client(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i8* %0, i8** %2
%18 = load i8*, i8** %2
%19 = call i8* @parse(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%20 = ptrtoint i8* %19 to i64
store i64 %20, i64* %3
%21 = load i8*, i8** %2
%22 = call i8* @parse(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = ptrtoint i8* %22 to i64
store i64 %23, i64* %4
%24 = load i8*, i8** %2
%25 = call i8* @parse(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%26 = ptrtoint i8* %25 to i64
store i64 %26, i64* %5
%27 = load i8*, i8** %2
%28 = call i8* @parse(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%29 = ptrtoint i8* %28 to i64
store i64 %29, i64* %6
%30 = load i8*, i8** %2
%31 = call i8* @parse(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%32 = ptrtoint i8* %31 to i64
store i64 %32, i64* %7
%33 = load i8*, i8** %2
%34 = call i8* @parse(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%35 = ptrtoint i8* %34 to i64
store i64 %35, i64* %8
%36 = load i8*, i8** %2
%37 = call i8* @parse(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%38 = ptrtoint i8* %37 to i64
store i64 %38, i64* %9
%39 = load i8*, i8** %2
%40 = call i8* @parse(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%41 = ptrtoint i8* %40 to i64
store i64 %41, i64* %10
%42 = load i8*, i8** %2
%43 = call i8* @parse(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%44 = ptrtoint i8* %43 to i64
store i64 %44, i64* %11
%45 = load i8*, i8** %2
%46 = call i8* @parse(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%47 = ptrtoint i8* %46 to i64
store i64 %47, i64* %12
%48 = load i8*, i8** %2
%49 = call i8* @parse(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%50 = ptrtoint i8* %49 to i64
store i64 %50, i64* %13
%51 = load i8*, i8** %2
%52 = call i8* @parse(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%53 = ptrtoint i8* %52 to i64
store i64 %53, i64* %14
%54 = load i8*, i8** %2
%55 = call i8* @parse(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%56 = ptrtoint i8* %55 to i64
store i64 %56, i64* %15
%57 = load i8*, i8** %2
%58 = call i8* @parse(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%59 = ptrtoint i8* %58 to i64
store i64 %59, i64* %16
%60 = load i8*, i8** %2
%61 = call i8* @parse(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%62 = ptrtoint i8* %61 to i64
store i64 %62, i64* %17
%63 = load i64, i64* %3
%64 = load i64, i64* %4
%65 = load i64, i64* %5
%66 = load i64, i64* %6
%67 = icmp ne i64 %66, 0
%68 = zext i1 %67 to i64
%69 = select i1 %67, i32 1, i32 0
%70 = load i64, i64* %7
%71 = icmp ne i64 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i32 1, i32 0
%74 = load i64, i64* %14
%75 = load i64, i64* %15
%76 = load i64, i64* %16
%77 = load i64, i64* %17
%78 = load i64, i64* %8
%79 = load i64, i64* %9
%80 = load i64, i64* %10
%81 = icmp ne i64 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %1
%83 = load i64, i64* %11
%84 = mul i64 %83, 100
%85 = load i64, i64* %10
%86 = mul i64 %85, 4096
%87 = udiv i64 %84, %86
br label %89
88: ; preds = %1
br label %89
89: ; preds = %88, %82
%90 = phi i64 [ %87, %82 ], [ 0, %88 ]
%91 = load i64, i64* %10
%92 = load i64, i64* %12
%93 = load i64, i64* %13
%94 = call i32 @printf(i8* getelementptr inbounds ([217 x i8], [217 x i8]* @.str.15, i64 0, i64 0), i64 %63, i64 %64, i64 %65, i32 %69, i32 %73, i64 %74, i64 %75, i64 %76, i64 %77, i64 %78, i64 %79, i64 %90, i64 %91, i64 %92, i64 %93)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"CI\00"
@.str.1 = [3 x i8] c"ww\00"
@.str.2 = [3 x i8] c"ca\00"
@.str.3 = [3 x i8] c"co\00"
@.str.4 = [3 x i8] c"fr\00"
@.str.5 = [3 x i8] c"Ec\00"
@.str.6 = [3 x i8] c"Em\00"
@.str.7 = [3 x i8] c"cp\00"
@.str.8 = [3 x i8] c"cb\00"
@.str.9 = [3 x i8] c"cn\00"
@.str.10 = [3 x i8] c"cm\00"
@.str.11 = [3 x i8] c"Tc\00"
@.str.12 = [3 x i8] c"Ge\00"
@.str.13 = [3 x i8] c"Pp\00"
@.str.14 = [3 x i8] c"Gp\00"
@.str.15 = [217 x i8] c"domid%lu: weight=%lu,cap=%lu,compress=%d,frozen=%d,total_cycles=%llu,succ_eph_gets=%llu,succ_pers_puts=%llu,succ_pers_gets=%llu,eph_count=%llu,max_eph=%llu,compression ratio=%lu%% (samples=%llu,poor=%llu,nomem=%llu)\0A\00"
define void @parse_client(i8* %0) {
%2 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%10 = ptrtoint i8* %9 to i64
%11 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%16 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%17 = tail call i8* @parse(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%18 = icmp eq i8* %9, null
br i1 %18, label %24, label %19
19: ; preds = %1
%20 = ptrtoint i8* %11 to i64
%21 = mul i64 %20, 100
%22 = shl i64 %10, 12
%23 = udiv i64 %21, %22
br label %24
24: ; preds = %1, %19
%25 = phi i64 [ %23, %19 ], [ 0, %1 ]
%26 = icmp ne i8* %6, null
%27 = zext i1 %26 to i32
%28 = icmp ne i8* %5, null
%29 = zext i1 %28 to i32
%30 = ptrtoint i8* %17 to i64
%31 = ptrtoint i8* %16 to i64
%32 = ptrtoint i8* %15 to i64
%33 = ptrtoint i8* %14 to i64
%34 = ptrtoint i8* %13 to i64
%35 = ptrtoint i8* %12 to i64
%36 = ptrtoint i8* %8 to i64
%37 = ptrtoint i8* %7 to i64
%38 = ptrtoint i8* %4 to i64
%39 = ptrtoint i8* %3 to i64
%40 = ptrtoint i8* %2 to i64
%41 = tail call i32 @printf(i8* getelementptr inbounds ([217 x i8], [217 x i8]* @.str.15, i64 0, i64 0), i64 %40, i64 %39, i64 %38, i32 %29, i32 %27, i64 %33, i64 %32, i64 %31, i64 %30, i64 %37, i64 %36, i64 %25, i64 %10, i64 %35, i64 %34)
ret void
}