#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*/ strcpy(char *, char *);
void delete_spaces1(char *s) {
  char *p;
  int c1, c2;
  while (*s) {
    if (!((*s) == ' ' || (*s) == '\t')) {
      s++;
      continue;
    }
    for (p = s; ((*p) == ' ' || (*p) == '\t'); p++)
      ;
    c1 = *(s - 1);
    c2 = *p;
    if ((!(((c1) >= 'a' && (c1) <= 'z') || ((c1) >= 'A' && (c1) <= 'Z') ||
           ((c1) >= '0' && (c1) <= '9')) &&
         c1 != '_') ||
        (!(((c2) >= 'a' && (c2) <= 'z') || ((c2) >= 'A' && (c2) <= 'Z') ||
           ((c2) >= '0' && (c2) <= '9')) &&
         c2 != '_')) {
      strcpy(s, p);
      s++;
    } else {
      strcpy(s + 1, p);
      s++;
    }
  }
}


x86 assembly (clang, -O0):
<delete_spaces1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     128e <delete_spaces1+0x17e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     115a <delete_spaces1+0x4a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     115a <delete_spaces1+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <delete_spaces1+0xc>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x19(%rbp)
je     1187 <delete_spaces1+0x77>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1197 <delete_spaces1+0x87>
jmp    11ad <delete_spaces1+0x9d>
jmp    119c <delete_spaces1+0x8c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1162 <delete_spaces1+0x52>
mov    -0x8(%rbp),%rax
movsbl -0x1(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x61,-0x14(%rbp)
jl     11d6 <delete_spaces1+0xc6>
cmpl   $0x7a,-0x14(%rbp)
jle    1208 <delete_spaces1+0xf8>
cmpl   $0x41,-0x14(%rbp)
jl     11ea <delete_spaces1+0xda>
cmpl   $0x5a,-0x14(%rbp)
jle    1208 <delete_spaces1+0xf8>
cmpl   $0x30,-0x14(%rbp)
jl     11fe <delete_spaces1+0xee>
cmpl   $0x39,-0x14(%rbp)
jle    1208 <delete_spaces1+0xf8>
cmpl   $0x5f,-0x14(%rbp)
jne    124e <delete_spaces1+0x13e>
cmpl   $0x61,-0x18(%rbp)
jl     121c <delete_spaces1+0x10c>
cmpl   $0x7a,-0x18(%rbp)
jle    126c <delete_spaces1+0x15c>
cmpl   $0x41,-0x18(%rbp)
jl     1230 <delete_spaces1+0x120>
cmpl   $0x5a,-0x18(%rbp)
jle    126c <delete_spaces1+0x15c>
cmpl   $0x30,-0x18(%rbp)
jl     1244 <delete_spaces1+0x134>
cmpl   $0x39,-0x18(%rbp)
jle    126c <delete_spaces1+0x15c>
cmpl   $0x5f,-0x18(%rbp)
je     126c <delete_spaces1+0x15c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1289 <delete_spaces1+0x179>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <delete_spaces1+0xc>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_spaces1>:
push   %rbx
mov    %rdi,%rbx
jmp    112c <delete_spaces1+0x1c>
cs nopw 0x0(%rax,%rax,1)
test   %al,%al
je     11ba <delete_spaces1+0xaa>
add    $0x1,%rbx
mov    (%rbx),%al
cmp    $0x9,%al
je     1136 <delete_spaces1+0x26>
cmp    $0x20,%al
jne    1120 <delete_spaces1+0x10>
mov    %rbx,%rsi
jmp    1148 <delete_spaces1+0x38>
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rsi),%eax
add    $0x1,%rsi
cmp    $0x20,%al
je     1140 <delete_spaces1+0x30>
cmp    $0x9,%al
je     1140 <delete_spaces1+0x30>
mov    -0x1(%rbx),%cl
mov    %ecx,%edx
and    $0xdf,%dl
add    $0xbf,%dl
cmp    $0x1a,%dl
jae    1180 <delete_spaces1+0x70>
mov    %eax,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0x1a,%cl
jae    11a0 <delete_spaces1+0x90>
lea    0x1(%rbx),%rdi
jmp    11b0 <delete_spaces1+0xa0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x5f,%cl
je     1160 <delete_spaces1+0x50>
add    $0xc6,%cl
mov    %rbx,%rdi
cmp    $0xf6,%cl
jb     11b0 <delete_spaces1+0xa0>
jmp    1160 <delete_spaces1+0x50>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x5f,%al
je     116d <delete_spaces1+0x5d>
add    $0xc6,%al
mov    %rbx,%rdi
cmp    $0xf6,%al
jae    116d <delete_spaces1+0x5d>
nopl   (%rax)
call   1030 <strcpy@plt>
jmp    1128 <delete_spaces1+0x18>
pop    %rbx
ret

LLVM IR (-O0):
define void @delete_spaces1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
br label %6
6: ; preds = %103, %20, %1
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %104
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 32
br i1 %14, label %23, label %15
15: ; preds = %10
%16 = load i8*, i8** %2
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 9
br i1 %19, label %23, label %20
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %6
23: ; preds = %15, %10
%24 = load i8*, i8** %2
store i8* %24, i8** %3
br label %25
25: ; preds = %38, %23
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 32
br i1 %29, label %35, label %30
30: ; preds = %25
%31 = load i8*, i8** %3
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 9
br label %35
35: ; preds = %30, %25
%36 = phi i1 [ true, %25 ], [ %34, %30 ]
br i1 %36, label %37, label %41
37: ; preds = %35
br label %38
38: ; preds = %37
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i32 1
store i8* %40, i8** %3
br label %25
41: ; preds = %35
%42 = load i8*, i8** %2
%43 = getelementptr inbounds i8, i8* %42, i64 -1
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
store i32 %45, i32* %4
%46 = load i8*, i8** %3
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
store i32 %48, i32* %5
%49 = load i32, i32* %4
%50 = icmp sge i32 %49, 97
br i1 %50, label %51, label %54
51: ; preds = %41
%52 = load i32, i32* %4
%53 = icmp sle i32 %52, 122
br i1 %53, label %69, label %54
54: ; preds = %51, %41
%55 = load i32, i32* %4
%56 = icmp sge i32 %55, 65
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = load i32, i32* %4
%59 = icmp sle i32 %58, 90
br i1 %59, label %69, label %60
60: ; preds = %57, %54
%61 = load i32, i32* %4
%62 = icmp sge i32 %61, 48
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = load i32, i32* %4
%65 = icmp sle i32 %64, 57
br i1 %65, label %69, label %66
66: ; preds = %63, %60
%67 = load i32, i32* %4
%68 = icmp ne i32 %67, 95
br i1 %68, label %90, label %69
69: ; preds = %66, %63, %57, %51
%70 = load i32, i32* %5
%71 = icmp sge i32 %70, 97
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = load i32, i32* %5
%74 = icmp sle i32 %73, 122
br i1 %74, label %96, label %75
75: ; preds = %72, %69
%76 = load i32, i32* %5
%77 = icmp sge i32 %76, 65
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = load i32, i32* %5
%80 = icmp sle i32 %79, 90
br i1 %80, label %96, label %81
81: ; preds = %78, %75
%82 = load i32, i32* %5
%83 = icmp sge i32 %82, 48
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load i32, i32* %5
%86 = icmp sle i32 %85, 57
br i1 %86, label %96, label %87
87: ; preds = %84, %81
%88 = load i32, i32* %5
%89 = icmp ne i32 %88, 95
br i1 %89, label %90, label %96
90: ; preds = %87, %66
%91 = load i8*, i8** %2
%92 = load i8*, i8** %3
%93 = call i32 @strcpy(i8* %91, i8* %92)
%94 = load i8*, i8** %2
%95 = getelementptr inbounds i8, i8* %94, i32 1
store i8* %95, i8** %2
br label %103
96: ; preds = %87, %84, %78, %72
%97 = load i8*, i8** %2
%98 = getelementptr inbounds i8, i8* %97, i64 1
%99 = load i8*, i8** %3
%100 = call i32 @strcpy(i8* %98, i8* %99)
%101 = load i8*, i8** %2
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %2
br label %103
103: ; preds = %96, %90
br label %6
104: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @delete_spaces1(i8* %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %0, %1 ], [ %10, %9 ]
%4 = load i8, i8* %3
switch i8 %4, label %9 [
i8 0, label %39
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
br label %11
6: ; preds = %23, %32, %37
%7 = phi i8* [ %38, %37 ], [ %3, %32 ], [ %3, %23 ]
%8 = tail call i32 @strcpy(i8* %7, i8* %13)
br label %9
9: ; preds = %6, %2
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %5, %14
%12 = phi i8 [ %16, %14 ], [ %4, %5 ]
%13 = phi i8* [ %15, %14 ], [ %3, %5 ]
switch i8 %12, label %17 [
i8 32, label %14
i8 9, label %14
]
14: ; preds = %11, %11
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = load i8, i8* %15
br label %11
17: ; preds = %11
%18 = getelementptr inbounds i8, i8* %3, i64 -1
%19 = load i8, i8* %18
%20 = and i8 %19, -33
%21 = add i8 %20, -65
%22 = icmp ult i8 %21, 26
br i1 %22, label %28, label %23
23: ; preds = %17
%24 = add i8 %19, -58
%25 = icmp ult i8 %24, -10
%26 = icmp ne i8 %19, 95
%27 = and i1 %26, %25
br i1 %27, label %6, label %28
28: ; preds = %23, %17
%29 = and i8 %12, -33
%30 = add i8 %29, -65
%31 = icmp ult i8 %30, 26
br i1 %31, label %37, label %32
32: ; preds = %28
%33 = add i8 %12, -58
%34 = icmp ult i8 %33, -10
%35 = icmp ne i8 %12, 95
%36 = and i1 %35, %34
br i1 %36, label %6, label %37
37: ; preds = %32, %28
%38 = getelementptr inbounds i8, i8* %3, i64 1
br label %6
39: ; preds = %2
ret void
}