#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*/ getchar();
int /*<<< orphan*/ percentage(char *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int message[7] = {0};
  percentage("hello world", message);
  printf("The number of control     character:%d\n", message[0]);
  printf("The number of space       character:%d\n", message[1]);
  printf("The number of digit       character:%d\n", message[2]);
  printf("The number of lower       character:%d\n", message[3]);
  printf("The number of upper       character:%d\n", message[4]);
  printf("The number of punctuation character:%d\n", message[5]);
  printf("The number of unable to be print character:%d\n", message[6]);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x1c,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1050 <percentage@plt>
mov    -0x20(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xf29(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0xc(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb9(%rip),%rdi
mov    %rsp,%rsi
call   1040 <percentage@plt>
mov    (%rsp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xf2b(%rip),%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xf43(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [40 x i8] c"The number of control character:%d\0A\00"
@.str.2 = [40 x i8] c"The number of space character:%d\0A\00"
@.str.3 = [40 x i8] c"The number of digit character:%d\0A\00"
@.str.4 = [40 x i8] c"The number of lower character:%d\0A\00"
@.str.5 = [40 x i8] c"The number of upper character:%d\0A\00"
@.str.6 = [40 x i8] c"The number of punctuation character:%d\0A\00"
@.str.7 = [47 x i8] c"The number of unable to be print character:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
store i32 0, i32* %1
%3 = bitcast [7 x i32]* %2 to i8*
%4 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%5 = call i32 @percentage(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 1
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 3
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 4
%19 = load i32, i32* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 5
%22 = load i32, i32* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 6
%25 = load i32, i32* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0), i32 %25)
%27 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"hello world\00"
@.str.1 = [40 x i8] c"The number of control character:%d\0A\00"
@.str.2 = [40 x i8] c"The number of space character:%d\0A\00"
@.str.3 = [40 x i8] c"The number of digit character:%d\0A\00"
@.str.4 = [40 x i8] c"The number of lower character:%d\0A\00"
@.str.5 = [40 x i8] c"The number of upper character:%d\0A\00"
@.str.6 = [40 x i8] c"The number of punctuation character:%d\0A\00"
@.str.7 = [47 x i8] c"The number of unable to be print character:%d\0A\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @percentage(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 1
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 2
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 3
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 4
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 5
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 6
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0), i32 %23)
%25 = call i32 (...) @getchar()
ret i32 0
}