#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 */
struct swlist {
  int dummy;
};
struct dict {
  int dummy;
};
struct cuetime {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ blank_brackets(char *, char, char);
scalar_t__ is_lower(char);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ process_wordstring(char *, struct cuetime const *,
                                      struct swlist *, struct dict *,
                                      struct dict const *);
char *strchr(char *, char);
char to_lower(char);
void process_line(char *line, const struct cuetime *cuetime, struct swlist *wl,
                  struct dict *dict, const struct dict *srcdict) {
  blank_brackets(line, '<', '>');
  blank_brackets(line, '[', ']');
  blank_brackets(line, '{', '}');
  blank_brackets(line, '(', ')');
  for (char *p = line; *p; p++) {
    if (*p == ':') {
      memset(line, ' ', p - line + 1);
      break;
    }
    if (is_lower(*p))
      break;
  }
  for (char *p = line; *p; p++)
    *p = to_lower(*p);
  for (char *p = line; *p; p++) {
    if (!is_lower(*p) && !((*p == '-' || *p == '\'') && p > line &&
                           is_lower(p[-1]) && is_lower(p[1])))
      *p = ' ';
  }
  for (char *p = line;;) {
    while (*p == ' ')
      p++;
    if (!*p)
      break;
    char *end = strchr(p, ' ');
    if (end)
      *end = '\0';
    process_wordstring(p, cuetime, wl, dict, srcdict);
    if (!end)
      break;
    p = end + 1;
  }
}


x86 assembly (clang, -O0):
<process_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
mov    $0x3e,%edx
call   1080 <blank_brackets@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5b,%esi
mov    $0x5d,%edx
call   1080 <blank_brackets@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7b,%esi
mov    $0x7d,%edx
call   1080 <blank_brackets@plt>
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
mov    $0x29,%edx
call   1080 <blank_brackets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     1242 <process_line+0xe2>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1211 <process_line+0xb1>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
mov    $0x20,%esi
call   1060 <memset@plt>
jmp    1242 <process_line+0xe2>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_lower@plt>
cmp    $0x0,%rax
je     122c <process_line+0xcc>
jmp    1242 <process_line+0xe2>
jmp    1231 <process_line+0xd1>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11d0 <process_line+0x70>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmpb   $0x0,(%rax)
je     127c <process_line+0x11c>
mov    -0x38(%rbp),%rax
movsbl (%rax),%edi
call   1050 <to_lower@plt>
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    124a <process_line+0xea>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmpb   $0x0,(%rax)
je     1320 <process_line+0x1c0>
mov    -0x40(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_lower@plt>
cmp    $0x0,%rax
jne    130a <process_line+0x1aa>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     12c7 <process_line+0x167>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1303 <process_line+0x1a3>
mov    -0x40(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1303 <process_line+0x1a3>
mov    -0x40(%rbp),%rax
movsbl -0x1(%rax),%edi
call   1030 <is_lower@plt>
cmp    $0x0,%rax
je     1303 <process_line+0x1a3>
mov    -0x40(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <is_lower@plt>
cmp    $0x0,%rax
jne    130a <process_line+0x1aa>
mov    -0x40(%rbp),%rax
movb   $0x20,(%rax)
jmp    130f <process_line+0x1af>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1284 <process_line+0x124>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    132d <process_line+0x1cd>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    134e <process_line+0x1ee>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    132d <process_line+0x1cd>
mov    -0x48(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1360 <process_line+0x200>
jmp    13be <process_line+0x25e>
mov    -0x48(%rbp),%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     1384 <process_line+0x224>
mov    -0x50(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1070 <process_wordstring@plt>
cmpq   $0x0,-0x50(%rbp)
jne    13ad <process_line+0x24d>
jmp    13be <process_line+0x25e>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1328 <process_line+0x1c8>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x3c,%esi
mov    $0x3e,%edx
call   1080 <blank_brackets@plt>
mov    %rbx,%rdi
mov    $0x5b,%esi
mov    $0x5d,%edx
call   1080 <blank_brackets@plt>
mov    %rbx,%rdi
mov    $0x7b,%esi
mov    $0x7d,%edx
call   1080 <blank_brackets@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x29,%edx
call   1080 <blank_brackets@plt>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rbx,%rbp,1),%eax
test   %al,%al
je     1201 <process_line+0xa1>
cmp    $0x3a,%al
je     11ef <process_line+0x8f>
movsbl %al,%edi
call   1030 <is_lower@plt>
test   %rax,%rax
jne    1201 <process_line+0xa1>
add    $0x1,%rbp
jmp    11d0 <process_line+0x70>
add    $0x1,%ebp
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %ebp,%edx
call   1060 <memset@plt>
mov    (%rbx),%al
test   %al,%al
je     12b1 <process_line+0x151>
lea    0x1(%rbx),%rbp
nop
movsbl %al,%edi
call   1050 <to_lower@plt>
mov    %al,-0x1(%rbp)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1210 <process_line+0xb0>
mov    (%rbx),%al
test   %al,%al
je     12b1 <process_line+0x151>
mov    %rbx,%rbp
jmp    1250 <process_line+0xf0>
cs nopw 0x0(%rax,%rax,1)
movb   $0x20,0x0(%rbp)
movzbl 0x1(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
je     12b1 <process_line+0x151>
movsbl %al,%edi
call   1030 <is_lower@plt>
test   %rax,%rax
jne    1244 <process_line+0xe4>
movzbl 0x0(%rbp),%eax
cmp    $0x2d,%al
je     1269 <process_line+0x109>
cmp    $0x27,%al
jne    1240 <process_line+0xe0>
cmp    %rbx,%rbp
jbe    1240 <process_line+0xe0>
movsbl -0x1(%rbp),%edi
call   1030 <is_lower@plt>
test   %rax,%rax
je     1240 <process_line+0xe0>
movsbl 0x1(%rbp),%edi
call   1030 <is_lower@plt>
test   %rax,%rax
jne    1244 <process_line+0xe4>
jmp    1240 <process_line+0xe0>
nopl   0x0(%rax)
mov    %rax,%rbp
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1070 <process_wordstring@plt>
mov    %rbp,%rbx
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x20,%al
je     12ad <process_line+0x14d>
test   %al,%al
je     12f0 <process_line+0x190>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
test   %rax,%rax
jne    1290 <process_line+0x130>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <process_wordstring@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.cuetime = type { i32 }
%struct.swlist = type { i32 }
%struct.dict = type { i32 }
define void @process_line(i8* %0, %struct.cuetime* %1, %struct.swlist* %2, %struct.dict* %3, %struct.dict* %4) {
%6 = alloca i8*
%7 = alloca %struct.cuetime*
%8 = alloca %struct.swlist*
%9 = alloca %struct.dict*
%10 = alloca %struct.dict*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i8* %0, i8** %6
store %struct.cuetime* %1, %struct.cuetime** %7
store %struct.swlist* %2, %struct.swlist** %8
store %struct.dict* %3, %struct.dict** %9
store %struct.dict* %4, %struct.dict** %10
%16 = load i8*, i8** %6
%17 = call i32 @blank_brackets(i8* %16, i8 signext 60, i8 signext 62)
%18 = load i8*, i8** %6
%19 = call i32 @blank_brackets(i8* %18, i8 signext 91, i8 signext 93)
%20 = load i8*, i8** %6
%21 = call i32 @blank_brackets(i8* %20, i8 signext 123, i8 signext 125)
%22 = load i8*, i8** %6
%23 = call i32 @blank_brackets(i8* %22, i8 signext 40, i8 signext 41)
%24 = load i8*, i8** %6
store i8* %24, i8** %11
br label %25
25: ; preds = %51, %5
%26 = load i8*, i8** %11
%27 = load i8, i8* %26
%28 = icmp ne i8 %27, 0
br i1 %28, label %29, label %54
29: ; preds = %25
%30 = load i8*, i8** %11
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 58
br i1 %33, label %34, label %44
34: ; preds = %29
%35 = load i8*, i8** %6
%36 = load i8*, i8** %11
%37 = load i8*, i8** %6
%38 = ptrtoint i8* %36 to i64
%39 = ptrtoint i8* %37 to i64
%40 = sub i64 %38, %39
%41 = add nsw i64 %40, 1
%42 = trunc i64 %41 to i32
%43 = call i32 @memset(i8* %35, i8 signext 32, i32 %42)
br label %54
44: ; preds = %29
%45 = load i8*, i8** %11
%46 = load i8, i8* %45
%47 = call i64 @is_lower(i8 signext %46)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %50
49: ; preds = %44
br label %54
50: ; preds = %44
br label %51
51: ; preds = %50
%52 = load i8*, i8** %11
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %11
br label %25
54: ; preds = %49, %34, %25
%55 = load i8*, i8** %6
store i8* %55, i8** %12
br label %56
56: ; preds = %65, %54
%57 = load i8*, i8** %12
%58 = load i8, i8* %57
%59 = icmp ne i8 %58, 0
br i1 %59, label %60, label %68
60: ; preds = %56
%61 = load i8*, i8** %12
%62 = load i8, i8* %61
%63 = call signext i8 @to_lower(i8 signext %62)
%64 = load i8*, i8** %12
store i8 %63, i8* %64
br label %65
65: ; preds = %60
%66 = load i8*, i8** %12
%67 = getelementptr inbounds i8, i8* %66, i32 1
store i8* %67, i8** %12
br label %56
68: ; preds = %56
%69 = load i8*, i8** %6
store i8* %69, i8** %13
br label %70
70: ; preds = %108, %68
%71 = load i8*, i8** %13
%72 = load i8, i8* %71
%73 = icmp ne i8 %72, 0
br i1 %73, label %74, label %111
74: ; preds = %70
%75 = load i8*, i8** %13
%76 = load i8, i8* %75
%77 = call i64 @is_lower(i8 signext %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %107, label %79
79: ; preds = %74
%80 = load i8*, i8** %13
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 45
br i1 %83, label %89, label %84
84: ; preds = %79
%85 = load i8*, i8** %13
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 39
br i1 %88, label %89, label %105
89: ; preds = %84, %79
%90 = load i8*, i8** %13
%91 = load i8*, i8** %6
%92 = icmp ugt i8* %90, %91
br i1 %92, label %93, label %105
93: ; preds = %89
%94 = load i8*, i8** %13
%95 = getelementptr inbounds i8, i8* %94, i64 -1
%96 = load i8, i8* %95
%97 = call i64 @is_lower(i8 signext %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %105
99: ; preds = %93
%100 = load i8*, i8** %13
%101 = getelementptr inbounds i8, i8* %100, i64 1
%102 = load i8, i8* %101
%103 = call i64 @is_lower(i8 signext %102)
%104 = icmp ne i64 %103, 0
br i1 %104, label %107, label %105
105: ; preds = %99, %93, %89, %84
%106 = load i8*, i8** %13
store i8 32, i8* %106
br label %107
107: ; preds = %105, %99, %74
br label %108
108: ; preds = %107
%109 = load i8*, i8** %13
%110 = getelementptr inbounds i8, i8* %109, i32 1
store i8* %110, i8** %13
br label %70
111: ; preds = %70
%112 = load i8*, i8** %6
store i8* %112, i8** %14
br label %113
113: ; preds = %144, %111
br label %114
114: ; preds = %119, %113
%115 = load i8*, i8** %14
%116 = load i8, i8* %115
%117 = sext i8 %116 to i32
%118 = icmp eq i32 %117, 32
br i1 %118, label %119, label %122
119: ; preds = %114
%120 = load i8*, i8** %14
%121 = getelementptr inbounds i8, i8* %120, i32 1
store i8* %121, i8** %14
br label %114
122: ; preds = %114
%123 = load i8*, i8** %14
%124 = load i8, i8* %123
%125 = icmp ne i8 %124, 0
br i1 %125, label %127, label %126
126: ; preds = %122
br label %147
127: ; preds = %122
%128 = load i8*, i8** %14
%129 = call i8* @strchr(i8* %128, i8 signext 32)
store i8* %129, i8** %15
%130 = load i8*, i8** %15
%131 = icmp ne i8* %130, null
br i1 %131, label %132, label %134
132: ; preds = %127
%133 = load i8*, i8** %15
store i8 0, i8* %133
br label %134
134: ; preds = %132, %127
%135 = load i8*, i8** %14
%136 = load %struct.cuetime*, %struct.cuetime** %7
%137 = load %struct.swlist*, %struct.swlist** %8
%138 = load %struct.dict*, %struct.dict** %9
%139 = load %struct.dict*, %struct.dict** %10
%140 = call i32 @process_wordstring(i8* %135, %struct.cuetime* %136, %struct.swlist* %137, %struct.dict* %138, %struct.dict* %139)
%141 = load i8*, i8** %15
%142 = icmp ne i8* %141, null
br i1 %142, label %144, label %143
143: ; preds = %134
br label %147
144: ; preds = %134
%145 = load i8*, i8** %15
%146 = getelementptr inbounds i8, i8* %145, i64 1
store i8* %146, i8** %14
br label %113
147: ; preds = %143, %126
ret void
}

LLVM IR (-O2):
%struct.cuetime = type { i32 }
%struct.swlist = type { i32 }
%struct.dict = type { i32 }
define void @process_line(i8* %0, %struct.cuetime* %1, %struct.swlist* %2, %struct.dict* %3, %struct.dict* %4) {
%6 = tail call i32 @blank_brackets(i8* %0, i8 signext 60, i8 signext 62)
%7 = tail call i32 @blank_brackets(i8* %0, i8 signext 91, i8 signext 93)
%8 = tail call i32 @blank_brackets(i8* %0, i8 signext 123, i8 signext 125)
%9 = tail call i32 @blank_brackets(i8* %0, i8 signext 40, i8 signext 41)
br label %10
10: ; preds = %23, %5
%11 = phi i8* [ %0, %5 ], [ %24, %23 ]
%12 = load i8, i8* %11
switch i8 %12, label %20 [
i8 0, label %25
i8 58, label %13
]
13: ; preds = %10
%14 = ptrtoint i8* %11 to i64
%15 = ptrtoint i8* %0 to i64
%16 = sub i64 %14, %15
%17 = trunc i64 %16 to i32
%18 = add i32 %17, 1
%19 = tail call i32 @memset(i8* %0, i8 signext 32, i32 %18)
br label %25
20: ; preds = %10
%21 = tail call i64 @is_lower(i8 signext %12)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = getelementptr inbounds i8, i8* %11, i64 1
br label %10
25: ; preds = %20, %10, %13
%26 = load i8, i8* %0
%27 = icmp eq i8 %26, 0
br i1 %27, label %62, label %31
28: ; preds = %31
%29 = load i8, i8* %0
%30 = icmp eq i8 %29, 0
br i1 %30, label %62, label %38
31: ; preds = %25, %31
%32 = phi i8 [ %36, %31 ], [ %26, %25 ]
%33 = phi i8* [ %35, %31 ], [ %0, %25 ]
%34 = tail call signext i8 @to_lower(i8 signext %32)
store i8 %34, i8* %33
%35 = getelementptr inbounds i8, i8* %33, i64 1
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 0
br i1 %37, label %28, label %31
38: ; preds = %28, %58
%39 = phi i8 [ %60, %58 ], [ %29, %28 ]
%40 = phi i8* [ %59, %58 ], [ %0, %28 ]
%41 = tail call i64 @is_lower(i8 signext %39)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %58
43: ; preds = %38
%44 = load i8, i8* %40
switch i8 %44, label %57 [
i8 45, label %45
i8 39, label %45
]
45: ; preds = %43, %43
%46 = icmp ugt i8* %40, %0
br i1 %46, label %47, label %57
47: ; preds = %45
%48 = getelementptr inbounds i8, i8* %40, i64 -1
%49 = load i8, i8* %48
%50 = tail call i64 @is_lower(i8 signext %49)
%51 = icmp eq i64 %50, 0
br i1 %51, label %57, label %52
52: ; preds = %47
%53 = getelementptr inbounds i8, i8* %40, i64 1
%54 = load i8, i8* %53
%55 = tail call i64 @is_lower(i8 signext %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %43, %52, %47, %45
store i8 32, i8* %40
br label %58
58: ; preds = %38, %52, %57
%59 = getelementptr inbounds i8, i8* %40, i64 1
%60 = load i8, i8* %59
%61 = icmp eq i8 %60, 0
br i1 %61, label %62, label %38
62: ; preds = %58, %28, %25
br label %63
63: ; preds = %66, %62
%64 = phi i8* [ %0, %62 ], [ %68, %66 ]
%65 = load i8, i8* %64
switch i8 %65, label %69 [
i8 32, label %66
i8 0, label %76
]
66: ; preds = %63, %74
%67 = phi i8* [ %70, %74 ], [ %64, %63 ]
%68 = getelementptr inbounds i8, i8* %67, i64 1
br label %63
69: ; preds = %63
%70 = tail call i8* @strchr(i8* %64, i8 signext 32)
%71 = icmp eq i8* %70, null
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = tail call i32 @process_wordstring(i8* %64, %struct.cuetime* %1, %struct.swlist* %2, %struct.dict* %3, %struct.dict* %4)
br label %76
74: ; preds = %69
store i8 0, i8* %70
%75 = tail call i32 @process_wordstring(i8* %64, %struct.cuetime* %1, %struct.swlist* %2, %struct.dict* %3, %struct.dict* %4)
br label %66
76: ; preds = %63, %72
ret void
}