#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_3_check(char *line) {
  char **splitted = createStringArray();
  int n = 0;
  splitString(line, splitted, &n);
  if (strcmp(splitted[0], "mov") == 0) {
    return 1;
  }
  destroyStringArray(splitted);
  return 0;
}


x86 assembly (clang, -O0):
<dp_3_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>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
lea    0xe83(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1198 <dp_3_check+0x58>
movl   $0x1,-0x4(%rbp)
jmp    11a8 <dp_3_check+0x68>
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_3_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>
mov    (%rbx),%rdi
lea    0xe86(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     118e <dp_3_check+0x4e>
mov    %rbx,%rdi
call   1050 <destroyStringArray@plt>
jmp    1194 <dp_3_check+0x54>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"mov\00"
define i32 @dp_3_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 i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %1
store i32 1, i32* %2
br label %19
16: ; preds = %1
%17 = load i8**, i8*** %4
%18 = call i32 @destroyStringArray(i8** %17)
store i32 0, i32* %2
br label %19
19: ; preds = %16, %15
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [4 x i8] c"mov\00"
define i32 @dp_3_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 i8*, i8** %3
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @destroyStringArray(i8** %3)
br label %11
11: ; preds = %1, %9
%12 = phi i32 [ 0, %9 ], [ 1, %1 ]
ret i32 %12
}