#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 */
char **createStringArray();
int /*<<< orphan*/ destroyStringArray(char **);
int /*<<< orphan*/ splitString(char *, char **, int *);
scalar_t__ strcmp(char *, char *);
int dp_1_check(char *line) {
  char **splitted = createStringArray();
  int n = 0;
  splitString(line, splitted, &n);
  if (n == 4) {
    if (strcmp(splitted[0], "sub") == 0 && strcmp(splitted[1], "r2") == 0 &&
        strcmp(splitted[2], "r1") == 0 && strcmp(splitted[3], "r0") == 0) {
      destroyStringArray(splitted);
      return 1;
    }
  }
  destroyStringArray(splitted);
  return 0;
}


x86 assembly (clang, -O0):
<dp_1_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <createStringArray@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <splitString@plt>
cmpl   $0x4,-0x1c(%rbp)
jne    120a <dp_1_check+0xca>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
lea    0xe79(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <dp_1_check+0xc5>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe5f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <dp_1_check+0xc5>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe44(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <dp_1_check+0xc5>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe29(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <dp_1_check+0xc5>
mov    -0x18(%rbp),%rdi
call   1050 <destroyStringArray@plt>
movl   $0x1,-0x4(%rbp)
jmp    121a <dp_1_check+0xda>
jmp    120a <dp_1_check+0xca>
mov    -0x18(%rbp),%rdi
call   1050 <destroyStringArray@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dp_1_check>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbp
xor    %r14d,%r14d
xor    %eax,%eax
call   1060 <createStringArray@plt>
mov    %rax,%rbx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <splitString@plt>
cmpl   $0x4,0xc(%rsp)
jne    11ca <dp_1_check+0x8a>
mov    (%rbx),%rdi
lea    0xe7f(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    11ca <dp_1_check+0x8a>
mov    0x8(%rbx),%rdi
lea    0xe6e(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    11ca <dp_1_check+0x8a>
mov    0x10(%rbx),%rdi
lea    0xe5c(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    11ca <dp_1_check+0x8a>
mov    0x18(%rbx),%rdi
lea    0xe4a(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11de <dp_1_check+0x9e>
mov    %rbx,%rdi
call   1050 <destroyStringArray@plt>
mov    %r14d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
call   1050 <destroyStringArray@plt>
mov    $0x1,%r14d
jmp    11d2 <dp_1_check+0x92>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
@.str.1 = [3 x i8] c"r2\00"
@.str.2 = [3 x i8] c"r1\00"
@.str.3 = [3 x i8] c"r0\00"
define i32 @dp_1_check(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i32
store i8* %0, i8** %3
%6 = call i8** (...) @createStringArray()
store i8** %6, i8*** %4
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = load i8**, i8*** %4
%9 = call i32 @splitString(i8* %7, i8** %8, i32* %5)
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 4
br i1 %11, label %12, label %40
12: ; preds = %1
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %39
18: ; preds = %12
%19 = load i8**, i8*** %4
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %39
24: ; preds = %18
%25 = load i8**, i8*** %4
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %39
30: ; preds = %24
%31 = load i8**, i8*** %4
%32 = getelementptr inbounds i8*, i8** %31, i64 3
%33 = load i8*, i8** %32
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %30
%37 = load i8**, i8*** %4
%38 = call i32 @destroyStringArray(i8** %37)
store i32 1, i32* %2
br label %43
39: ; preds = %30, %24, %18, %12
br label %40
40: ; preds = %39, %1
%41 = load i8**, i8*** %4
%42 = call i32 @destroyStringArray(i8** %41)
store i32 0, i32* %2
br label %43
43: ; preds = %40, %36
%44 = load i32, i32* %2
ret i32 %44
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
@.str.1 = [3 x i8] c"r2\00"
@.str.2 = [3 x i8] c"r1\00"
@.str.3 = [3 x i8] c"r0\00"
define i32 @dp_1_check(i8* %0) {
%2 = alloca i32
%3 = tail call i8** (...) @createStringArray()
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @splitString(i8* %0, i8** %3, i32* %2)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 4
br i1 %7, label %8, label %29
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %29
12: ; preds = %8
%13 = getelementptr inbounds i8*, i8** %3, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %29
17: ; preds = %12
%18 = getelementptr inbounds i8*, i8** %3, i64 2
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %17
%23 = getelementptr inbounds i8*, i8** %3, i64 3
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %22
%28 = call i32 @destroyStringArray(i8** %3)
br label %31
29: ; preds = %8, %12, %17, %22, %1
%30 = call i32 @destroyStringArray(i8** %3)
br label %31
31: ; preds = %29, %27
%32 = phi i32 [ 1, %27 ], [ 0, %29 ]
ret i32 %32
}