#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 */
typedef int /*<<< orphan*/ words;

/* Variables and functions */
int chopByChar(char *, char, char **, int);
char *cloneString(char *);
int /*<<< orphan*/ freeMem(char *);
scalar_t__ isGtfGroup(char *);
int gffHasGtfGroup(char *line) {
  char *words[10];
  char *dupe = cloneString(line);
  int wordCt =
      chopByChar(dupe, '\t', words, (sizeof(words) / sizeof((words)[0])));
  int isGtf = 0;
  if (wordCt >= 9)
    if (isGtfGroup(words[8]))
      isGtf = 1;
  freeMem(dupe);
  return isGtf;
}


x86 assembly (clang, -O0):
<gffHasGtfGroup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cloneString@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
lea    -0x60(%rbp),%rdx
mov    $0x9,%esi
mov    $0xa,%ecx
call   1050 <chopByChar@plt>
mov    %eax,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0x9,-0x6c(%rbp)
jl     11a3 <gffHasGtfGroup+0x63>
mov    -0x20(%rbp),%rdi
call   1060 <isGtfGroup@plt>
cmp    $0x0,%rax
je     119e <gffHasGtfGroup+0x5e>
movl   $0x1,-0x70(%rbp)
jmp    11a3 <gffHasGtfGroup+0x63>
mov    -0x68(%rbp),%rdi
call   1030 <freeMem@plt>
mov    -0x70(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gffHasGtfGroup>:
push   %rbp
push   %rbx
sub    $0x58,%rsp
call   1040 <cloneString@plt>
mov    %rax,%rbx
mov    %rsp,%rdx
mov    %rax,%rdi
mov    $0x9,%esi
mov    $0xa,%ecx
call   1050 <chopByChar@plt>
xor    %ebp,%ebp
cmp    $0x9,%eax
jl     117d <gffHasGtfGroup+0x3d>
mov    0x40(%rsp),%rdi
call   1060 <isGtfGroup@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %rbx,%rdi
call   1030 <freeMem@plt>
mov    %ebp,%eax
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @gffHasGtfGroup(i8* %0) {
%2 = alloca i8*
%3 = alloca [10 x i8*]
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i8* @cloneString(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%11 = call i32 @chopByChar(i8* %9, i8 signext 9, i8** %10, i32 10)
store i32 %11, i32* %5
store i32 0, i32* %6
%12 = load i32, i32* %5
%13 = icmp sge i32 %12, 9
br i1 %13, label %14, label %21
14: ; preds = %1
%15 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 8
%16 = load i8*, i8** %15
%17 = call i64 @isGtfGroup(i8* %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 1, i32* %6
br label %20
20: ; preds = %19, %14
br label %21
21: ; preds = %20, %1
%22 = load i8*, i8** %4
%23 = call i32 @freeMem(i8* %22)
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @gffHasGtfGroup(i8* %0) {
%2 = alloca [10 x i8*]
%3 = bitcast [10 x i8*]* %2 to i8*
%4 = tail call i8* @cloneString(i8* %0)
%5 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
%6 = call i32 @chopByChar(i8* %4, i8 signext 9, i8** %5, i32 10)
%7 = icmp sgt i32 %6, 8
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 8
%10 = load i8*, i8** %9
%11 = call i64 @isGtfGroup(i8* %10)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %8, %1
%15 = phi i32 [ 0, %1 ], [ %13, %8 ]
%16 = call i32 @freeMem(i8* %4)
ret i32 %15
}