#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*/ clean_text(char *);
int /*<<< orphan*/ getline_my(char *);
int /*<<< orphan*/ is_digit_print(char *);
int /*<<< orphan*/ is_space_print(char *);
scalar_t__ isspace(char);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  char s[100];
  char word_null = 0;
  short int i = 0;
  long long word = 0;
  clean_text(s);
  getline_my(s);
  is_space_print(s);
  printf("\n\n---------------\n\n");
  is_digit_print(s);
  printf("\n-----------------\n");
  for (i = 0; isspace(s[i]); ++i) {
    printf("s [ %d ] = %c;\n", i, s[i]);
  };
  printf("123\f123\n\n\n");
  word_null = '0';
  printf("word = 0 = %d;\n", word_null);
  word = 1;
  for (i = 1; i <= 64; ++i) {
    word *= 2;
    printf("at step %4d word = 2^n - 1 = %22lld;\n", i, word - 1);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movb   $0x0,-0x71(%rbp)
movw   $0x0,-0x74(%rbp)
movq   $0x0,-0x80(%rbp)
lea    -0x70(%rbp),%rdi
call   1080 <clean_text@plt>
lea    -0x70(%rbp),%rdi
call   1060 <getline_my@plt>
lea    -0x70(%rbp),%rdi
call   1070 <is_space_print@plt>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <is_digit_print@plt>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movw   $0x0,-0x74(%rbp)
movswq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     1209 <main+0xa9>
movswl -0x74(%rbp),%esi
movswq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edx
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x74(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x74(%rbp)
jmp    11c3 <main+0x63>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x30,-0x71(%rbp)
movsbl -0x71(%rbp),%esi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x1,-0x80(%rbp)
movw   $0x1,-0x74(%rbp)
movswl -0x74(%rbp),%eax
cmp    $0x40,%eax
jg     127f <main+0x11f>
mov    -0x80(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x80(%rbp)
movswl -0x74(%rbp),%esi
mov    -0x80(%rbp),%rdx
sub    $0x1,%rdx
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x74(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x74(%rbp)
jmp    123b <main+0xdb>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%r15
mov    %r15,%rdi
call   1090 <clean_text@plt>
mov    %r15,%rdi
call   1070 <getline_my@plt>
mov    %r15,%rdi
call   1080 <is_space_print@plt>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1040 <is_digit_print@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
movsbl (%rsp),%edi
call   1060 <isspace@plt>
test   %rax,%rax
je     11fa <main+0x8a>
lea    0xe37(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movswl %bx,%esi
movsbl (%r15),%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
movswq %bx,%rax
lea    (%rsp,%rax,1),%r15
movsbl (%rsp,%rax,1),%edi
call   1060 <isspace@plt>
test   %rax,%rax
jne    11d0 <main+0x60>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe03(%rip),%rdi
mov    $0x30,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%eax
mov    $0x1,%ebx
lea    0xdf6(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    (%rax,%rax,1),%r15
lea    (%rax,%rax,1),%rdx
add    $0xffffffffffffffff,%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
mov    %r15,%rax
cmp    $0x41,%ebx
jne    1230 <main+0xc0>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0A\0A---------------\0A\0A\00"
@.str.1 = [20 x i8] c"\0A-----------------\0A\00"
@.str.2 = [16 x i8] c"s [ %d ] = %c;\0A\00"
@.str.3 = [11 x i8] c"123\0C123\0A\0A\0A\00"
@.str.4 = [16 x i8] c"word = 0 = %d;\0A\00"
@.str.5 = [38 x i8] c"at step %4d word = 2^n - 1 = %22lld;\0A\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = alloca i8
%3 = alloca i16
%4 = alloca i64
store i8 0, i8* %2
store i16 0, i16* %3
store i64 0, i64* %4
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = call i32 @clean_text(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%8 = call i32 @getline_my(i8* %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%10 = call i32 @is_space_print(i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%13 = call i32 @is_digit_print(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i16 0, i16* %3
br label %15
15: ; preds = %31, %0
%16 = load i16, i16* %3
%17 = sext i16 %16 to i64
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = call i64 @isspace(i8 signext %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %34
22: ; preds = %15
%23 = load i16, i16* %3
%24 = sext i16 %23 to i32
%25 = load i16, i16* %3
%26 = sext i16 %25 to i64
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %29)
br label %31
31: ; preds = %22
%32 = load i16, i16* %3
%33 = add i16 %32, 1
store i16 %33, i16* %3
br label %15
34: ; preds = %15
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
store i8 48, i8* %2
%36 = load i8, i8* %2
%37 = sext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %37)
store i64 1, i64* %4
store i16 1, i16* %3
br label %39
39: ; preds = %51, %34
%40 = load i16, i16* %3
%41 = sext i16 %40 to i32
%42 = icmp sle i32 %41, 64
br i1 %42, label %43, label %54
43: ; preds = %39
%44 = load i64, i64* %4
%45 = mul nsw i64 %44, 2
store i64 %45, i64* %4
%46 = load i16, i16* %3
%47 = sext i16 %46 to i32
%48 = load i64, i64* %4
%49 = sub nsw i64 %48, 1
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i32 %47, i64 %49)
br label %51
51: ; preds = %43
%52 = load i16, i16* %3
%53 = add i16 %52, 1
store i16 %53, i16* %3
br label %39
54: ; preds = %39
ret void
}

LLVM IR (-O2):
@.str.2 = [16 x i8] c"s [ %d ] = %c;\0A\00"
@.str.4 = [16 x i8] c"word = 0 = %d;\0A\00"
@.str.5 = [38 x i8] c"at step %4d word = 2^n - 1 = %22lld;\0A\00"
@str = [19 x i8] c"\0A\0A---------------\0A\00"
@str.6 = [19 x i8] c"\0A-----------------\00"
@str.7 = [10 x i8] c"123\0C123\0A\0A\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @clean_text(i8* %2)
%4 = call i32 @getline_my(i8* %2)
%5 = call i32 @is_space_print(i8* %2)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%7 = call i32 @is_digit_print(i8* %2)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.6, i64 0, i64 0))
%9 = load i8, i8* %2
%10 = call i64 @isspace(i8 signext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %25, label %12
12: ; preds = %0, %12
%13 = phi i8* [ %21, %12 ], [ %2, %0 ]
%14 = phi i16 [ %19, %12 ], [ 0, %0 ]
%15 = sext i16 %14 to i32
%16 = load i8, i8* %13
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %17)
%19 = add i16 %14, 1
%20 = sext i16 %19 to i64
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = call i64 @isspace(i8 signext %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %12
25: ; preds = %12, %0
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 48)
br label %28
28: ; preds = %25, %28
%29 = phi i32 [ 1, %25 ], [ %34, %28 ]
%30 = phi i64 [ 1, %25 ], [ %31, %28 ]
%31 = shl nsw i64 %30, 1
%32 = add nsw i64 %31, -1
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i32 %29, i64 %32)
%34 = add nuw nsw i32 %29, 1
%35 = icmp eq i32 %34, 65
br i1 %35, label %36, label %28
36: ; preds = %28
ret void
}