#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*/ exit(int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ int2human_usage();
char *make_human_readable_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strtoul(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  char *pszInputText;
  int nI;
  if (argc < 2) {
    pszInputText = (char *)malloc(4096 + 1);
    if (!fgets(pszInputText, 4096, stdin)) {
      int2human_usage();
      exit(1);
    }
  } else {
    int nReqLen = 1;
    for (nI = 1; nI < argc; nI++) {
      if (!strcmp(argv[nI], "--?") || !strcmp(argv[nI], "--help")) {
        int2human_usage();
        exit(1);
      }
      nReqLen += strlen(argv[nI]) + 1;
    }
    pszInputText = (char *)malloc(nReqLen);
    pszInputText[0] = 0;
    for (nI = 1; nI < argc; nI++) {
      strcat(pszInputText, argv[nI]);
      strcat(pszInputText, " ");
    }
  }
  char *p;
  for (p = pszInputText; *p;) {
    char *pS = p;
    for (; *p != 0x20 && *p; p++)
      ;
    *p++ = 0;
    printf("%s ", make_human_readable_str(strtoul(pS, NULL, 10), 1, 0));
  }
  free(pszInputText);
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1214 <main+0x64>
mov    $0x1001,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2dff(%rip),%rax
mov    (%rax),%edx
mov    $0x1000,%esi
call   1080 <fgets@plt>
cmp    $0x0,%eax
jne    120f <main+0x5f>
mov    $0x0,%al
call   1040 <int2human_usage@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    130f <main+0x15f>
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12b1 <main+0x101>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdbf(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     1270 <main+0xc0>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xda2(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1281 <main+0xd1>
mov    $0x0,%al
call   1040 <int2human_usage@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
add    $0x1,%rcx
movslq -0x20(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1222 <main+0x72>
mov    -0x20(%rbp),%edi
call   10a0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    130a <main+0x15a>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   10c0 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xd16(%rip),%rsi
call   10c0 <strcat@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12cb <main+0x11b>
jmp    130f <main+0x15f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     13bf <main+0x20f>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x31(%rbp)
je     1351 <main+0x1a1>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    1361 <main+0x1b1>
jmp    1377 <main+0x1c7>
jmp    1366 <main+0x1b6>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    132c <main+0x17c>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10b0 <strtoul@plt>
mov    %eax,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1070 <make_human_readable_str@plt>
mov    %rax,%rsi
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1317 <main+0x167>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
lea    0xc40(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jge    120c <main+0x4c>
mov    $0x1001,%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
mov    0x2e04(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    $0x1000,%esi
call   1090 <fgets@plt>
test   %eax,%eax
jne    12b1 <main+0xf1>
xor    %eax,%eax
call   1050 <int2human_usage@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    %rsi,%r13
mov    %edi,0x4(%rsp)
mov    %edi,%r15d
mov    $0x1,%ebp
mov    $0x1,%r14d
lea    0xddc(%rip),%r12
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rbx
mov    %rbx,%rdi
lea    0xdc1(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     11fb <main+0x3b>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     11fb <main+0x3b>
mov    %rbx,%rdi
call   1060 <strlen@plt>
add    %eax,%ebp
add    $0x1,%ebp
add    $0x1,%r14
cmp    %r14,%r15
jne    1230 <main+0x70>
mov    %ebp,%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
movb   $0x0,(%rax)
cmpl   $0x2,0x4(%rsp)
jl     12b8 <main+0xf8>
mov    $0x1,%ebp
lea    0xd80(%rip),%rbx
nopl   (%rax)
mov    0x0(%r13,%rbp,8),%rsi
mov    %r14,%rdi
call   10d0 <strcat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   10d0 <strcat@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1290 <main+0xd0>
mov    (%r14),%al
test   %al,%al
jne    12d1 <main+0x111>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xd33(%rip),%rbx
mov    %r14,%rdi
jmp    1315 <main+0x155>
nopl   (%rax)
movb   $0x0,-0x1(%rbp)
xor    %esi,%esi
mov    $0xa,%edx
call   10c0 <strtoul@plt>
mov    %eax,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1080 <make_human_readable_str@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x0(%rbp),%al
mov    %rbp,%rdi
test   %al,%al
je     12b8 <main+0xf8>
lea    0x1(%rdi),%rbp
test   $0xdf,%al
je     12e0 <main+0x120>
nopl   (%rax)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   $0xdf,%al
jne    1320 <main+0x160>
jmp    12e0 <main+0x120>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"--?\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [4 x i8] c"%s \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %24
13: ; preds = %2
%14 = call i64 @malloc(i32 4097)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %16, i32 4096, i32 %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %13
%21 = call i32 (...) @int2human_usage()
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %13
br label %87
24: ; preds = %2
store i32 1, i32* %8
store i32 1, i32* %7
br label %25
25: ; preds = %60, %24
%26 = load i32, i32* %7
%27 = load i32, i32* %4
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %63
29: ; preds = %25
%30 = load i8**, i8*** %5
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8*, i8** %30, i64 %32
%34 = load i8*, i8** %33
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %45
37: ; preds = %29
%38 = load i8**, i8*** %5
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %37, %29
%46 = call i32 (...) @int2human_usage()
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %37
%49 = load i8**, i8*** %5
%50 = load i32, i32* %7
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %49, i64 %51
%53 = load i8*, i8** %52
%54 = call i64 @strlen(i8* %53)
%55 = add nsw i64 %54, 1
%56 = load i32, i32* %8
%57 = sext i32 %56 to i64
%58 = add nsw i64 %57, %55
%59 = trunc i64 %58 to i32
store i32 %59, i32* %8
br label %60
60: ; preds = %48
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
br label %25
63: ; preds = %25
%64 = load i32, i32* %8
%65 = call i64 @malloc(i32 %64)
%66 = inttoptr i64 %65 to i8*
store i8* %66, i8** %6
%67 = load i8*, i8** %6
%68 = getelementptr inbounds i8, i8* %67, i64 0
store i8 0, i8* %68
store i32 1, i32* %7
br label %69
69: ; preds = %83, %63
%70 = load i32, i32* %7
%71 = load i32, i32* %4
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %86
73: ; preds = %69
%74 = load i8*, i8** %6
%75 = load i8**, i8*** %5
%76 = load i32, i32* %7
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %75, i64 %77
%79 = load i8*, i8** %78
%80 = call i32 @strcat(i8* %74, i8* %79)
%81 = load i8*, i8** %6
%82 = call i32 @strcat(i8* %81, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %83
83: ; preds = %73
%84 = load i32, i32* %7
%85 = add nsw i32 %84, 1
store i32 %85, i32* %7
br label %69
86: ; preds = %69
br label %87
87: ; preds = %86, %23
%88 = load i8*, i8** %6
store i8* %88, i8** %9
br label %89
89: ; preds = %111, %87
%90 = load i8*, i8** %9
%91 = load i8, i8* %90
%92 = icmp ne i8 %91, 0
br i1 %92, label %93, label %118
93: ; preds = %89
%94 = load i8*, i8** %9
store i8* %94, i8** %10
br label %95
95: ; preds = %108, %93
%96 = load i8*, i8** %9
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 32
br i1 %99, label %100, label %105
100: ; preds = %95
%101 = load i8*, i8** %9
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp ne i32 %103, 0
br label %105
105: ; preds = %100, %95
%106 = phi i1 [ false, %95 ], [ %104, %100 ]
br i1 %106, label %107, label %111
107: ; preds = %105
br label %108
108: ; preds = %107
%109 = load i8*, i8** %9
%110 = getelementptr inbounds i8, i8* %109, i32 1
store i8* %110, i8** %9
br label %95
111: ; preds = %105
%112 = load i8*, i8** %9
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %9
store i8 0, i8* %112
%114 = load i8*, i8** %10
%115 = call i32 @strtoul(i8* %114, i32* null, i32 10)
%116 = call i8* @make_human_readable_str(i32 %115, i32 1, i32 0)
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %116)
br label %89
118: ; preds = %89
%119 = load i8*, i8** %6
%120 = call i32 @free(i8* %119)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%122 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"--?\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %15
6: ; preds = %2
%7 = tail call i64 @malloc(i32 4097)
%8 = inttoptr i64 %7 to i8*
%9 = load i32, i32* @stdin
%10 = tail call i32 @fgets(i8* %8, i32 4096, i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %49
12: ; preds = %6
%13 = tail call i32 (...) @int2human_usage()
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %4, %28
%16 = phi i64 [ 1, %4 ], [ %33, %28 ]
%17 = phi i32 [ 1, %4 ], [ %32, %28 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %16
%19 = load i8*, i8** %18
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %15
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %22, %15
%26 = tail call i32 (...) @int2human_usage()
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %22
%29 = tail call i64 @strlen(i8* dereferenceable(1) %19)
%30 = trunc i64 %29 to i32
%31 = add i32 %17, 1
%32 = add i32 %31, %30
%33 = add nuw nsw i64 %16, 1
%34 = icmp eq i64 %33, %5
br i1 %34, label %35, label %15
35: ; preds = %28
%36 = tail call i64 @malloc(i32 %32)
%37 = inttoptr i64 %36 to i8*
store i8 0, i8* %37
%38 = icmp sgt i32 %0, 1
br i1 %38, label %39, label %69
39: ; preds = %35
%40 = zext i32 %0 to i64
br label %41
41: ; preds = %39, %41
%42 = phi i64 [ 1, %39 ], [ %47, %41 ]
%43 = getelementptr inbounds i8*, i8** %1, i64 %42
%44 = load i8*, i8** %43
%45 = tail call i32 @strcat(i8* %37, i8* %44)
%46 = tail call i32 @strcat(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%47 = add nuw nsw i64 %42, 1
%48 = icmp eq i64 %47, %40
br i1 %48, label %49, label %41
49: ; preds = %41, %6
%50 = phi i8* [ %8, %6 ], [ %37, %41 ]
%51 = load i8, i8* %50
%52 = icmp eq i8 %51, 0
br i1 %52, label %69, label %53
53: ; preds = %49, %62
%54 = phi i8 [ %67, %62 ], [ %51, %49 ]
%55 = phi i8* [ %63, %62 ], [ %50, %49 ]
br label %56
56: ; preds = %53, %59
%57 = phi i8 [ %61, %59 ], [ %54, %53 ]
%58 = phi i8* [ %60, %59 ], [ %55, %53 ]
switch i8 %57, label %59 [
i8 32, label %62
i8 0, label %62
]
59: ; preds = %56
%60 = getelementptr inbounds i8, i8* %58, i64 1
%61 = load i8, i8* %60
br label %56
62: ; preds = %56, %56
%63 = getelementptr inbounds i8, i8* %58, i64 1
store i8 0, i8* %58
%64 = tail call i32 @strtoul(i8* nocapture %55, i32* null, i32 10)
%65 = tail call i8* @make_human_readable_str(i32 %64, i32 1, i32 0)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %65)
%67 = load i8, i8* %63
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %53
69: ; preds = %62, %35, %49
%70 = phi i8* [ %50, %49 ], [ %37, %35 ], [ %50, %62 ]
%71 = tail call i32 @free(i8* %70)
%72 = tail call i32 @putchar(i32 10)
%73 = tail call i32 @exit(i32 0)
unreachable
}