#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*/ tests;

/* Variables and functions */
char *find_ft(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ iexpect_streq(char *, int, size_t, char const *,
                                 char const *);
int /*<<< orphan*/ strview_from_cstring(char const *);
void test_find_ft_firstline(void) {
  static const struct {
    const char *line;
    const char *expected_filetype;
  } tests[] = {
      {"<!DOCTYPE html>", "html"},
      {"<!doctype HTML", "html"},
      {"<!doctype htm", NULL},
      {"<!DOCTYPE fontconfig", "xml"},
      {"<!DOCTYPE colormap", "xml"},
      {"<!DOCTYPE busconfig", "xml"},
      {"<!doctype busconfig", NULL},
      {"<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "xml"},
      {"%YAML 1.1", "yaml"},
      {"[wrap-file]", "ini"},
      {"[wrap-file", NULL},
      {"[section] \t", "ini"},
      {" [section]", NULL},
      {"[section \t", NULL},
      {"[ section]", NULL},
      {"[1]", NULL},
      {"diff --git a/example.txt b/example.txt", "diff"},
      {".TH DTE 1", NULL},
      {"", NULL},
      {" ", NULL},
      {" <?xml", NULL},
      {"\0<?xml", NULL},
      {"#!/usr/bin/ash", "sh"},
      {"#!/usr/bin/awk", "awk"},
      {"#!/usr/bin/bash", "sh"},
      {"#!/usr/bin/bigloo", "scheme"},
      {"#!/usr/bin/ccl", "lisp"},
      {"#!/usr/bin/chicken", "scheme"},
      {"#!/usr/bin/clisp", "lisp"},
      {"#!/usr/bin/coffee", "coffeescript"},
      {"#!/usr/bin/crystal", "ruby"},
      {"#!/usr/bin/dash", "sh"},
      {"#!/usr/bin/ecl", "lisp"},
      {"#!/usr/bin/gawk", "awk"},
      {"#!/usr/bin/gmake", "make"},
      {"#!/usr/bin/gnuplot", "gnuplot"},
      {"#!/usr/bin/groovy", "groovy"},
      {"#!/usr/bin/gsed", "sed"},
      {"#!/usr/bin/guile", "scheme"},
      {"#!/usr/bin/jruby", "ruby"},
      {"#!/usr/bin/ksh", "sh"},
      {"#!/usr/bin/lisp", "lisp"},
      {"#!/usr/bin/luajit", "lua"},
      {"#!/usr/bin/lua", "lua"},
      {"#!/usr/bin/macruby", "ruby"},
      {"#!/usr/bin/make", "make"},
      {"#!/usr/bin/mawk", "awk"},
      {"#!/usr/bin/mksh", "sh"},
      {"#!/usr/bin/moon", "moonscript"},
      {"#!/usr/bin/nawk", "awk"},
      {"#!/usr/bin/node", "javascript"},
      {"#!/usr/bin/openrc-run", "sh"},
      {"#!/usr/bin/pdksh", "sh"},
      {"#!/usr/bin/perl", "perl"},
      {"#!/usr/bin/php", "php"},
      {"#!/usr/bin/python", "python"},
      {"#!/usr/bin/r6rs", "scheme"},
      {"#!/usr/bin/racket", "scheme"},
      {"#!/usr/bin/rake", "ruby"},
      {"#!/usr/bin/ruby", "ruby"},
      {"#!/usr/bin/runhaskell", "haskell"},
      {"#!/usr/bin/sbcl", "lisp"},
      {"#!/usr/bin/sed", "sed"},
      {"#!/bin/sh", "sh"},
      {"#!/usr/bin/tcc", "c"},
      {"#!/usr/bin/tclsh", "tcl"},
      {"#!/usr/bin/wish", "tcl"},
      {"#!/usr/bin/zsh", "sh"},
      {"#!/usr/bin/lua5.3", "lua"},
      {"#!/usr/bin/env lua", "lua"},
      {"#!/usr/bin/env lua5.3", "lua"},
      {"#!  /usr/bin/env lua5.3", "lua"},
      {"#!  /usr/bin/env  lua5.3", "lua"},
      {"#!/usr/bin/env /usr/bin/lua", "lua"},
      {"#!/lua", "lua"},
      {"#!/usr/bin/_unhaskell", NULL},
      {"#!/usr/bin/runhaskel_", NULL},
      {"#!/usr/bin/unknown", NULL},
      {"#!lua", NULL},
      {"#!/usr/bin/ lua", NULL},
      {"#!/usr/bin/", NULL},
      {"#!/usr/bin/env", NULL},
      {"#!/usr/bin/env ", NULL},
      {"#!/usr/bin/env  ", NULL},
      {"#!/usr/bin/env/ lua", NULL},
      {"#!/lua/", NULL},
  };
  for (size_t i = 0; i < ((sizeof(tests) / sizeof((tests)[0])) /
                          ((size_t)(!(sizeof(tests) % sizeof((tests)[0])))));
       i++) {
    const char *ft = find_ft(NULL, strview_from_cstring(tests[i].line));
    iexpect_streq("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/craigbarnes/dte/refs/"
                  "heads/master/test/filetype.c",
                  219, i, ft, tests[i].expected_filetype);
  }
}


x86 assembly (clang, -O0):
<test_find_ft_firstline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
cmpq   $0x56,-0x8(%rbp)
jae    21b4 <test_find_ft_firstline+0x84>
mov    -0x8(%rbp),%rcx
lea    0x276a(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
call   2050 <strview_from_cstring@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edi
call   2040 <find_ft@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rsi
lea    0x2739(%rip),%rax
shl    $0x4,%rsi
add    %rsi,%rax
mov    0x8(%rax),%r8
lea    0x140c(%rip),%rdi
mov    $0xdb,%esi
call   2030 <iexpect_streq@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    2140 <test_find_ft_firstline+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_find_ft_firstline>:
push   %r15
push   %r14
push   %rbx
lea    0x278c(%rip),%r15
xor    %ebx,%ebx
lea    0x1460(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x8(%r15),%rdi
call   2050 <strview_from_cstring@plt>
xor    %edi,%edi
mov    %eax,%esi
call   2040 <find_ft@plt>
mov    (%r15),%r8
mov    %r14,%rdi
mov    $0xdb,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
call   2030 <iexpect_streq@plt>
add    $0x1,%rbx
add    $0x10,%r15
cmp    $0x56,%rbx
jne    2150 <test_find_ft_firstline+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.anon = type { i8*, i8* }
@test_find_ft_firstline.tests = internal constant [86 x %struct.anon] [%struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.23, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.39, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.46, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.47, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.48, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.49, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.50, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.51, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.52, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.53, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.54, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.55, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.56, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.57, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.59, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.60, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.61, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.46, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.62, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.63, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.64, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.65, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.66, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.67, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.68, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.69, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.70, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.71, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.72, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.73, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.74, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.75, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.76, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.77, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.78, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.79, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.80, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.81, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.82, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.83, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.84, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.52, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.85, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.86, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.87, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.88, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.89, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.90, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.89, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.91, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.92, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.93, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.94, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.95, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.96, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.97, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.98, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.99, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.100, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.101, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.102, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.103, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.104, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.105, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.106, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.107, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.108, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.109, i32 0, i32 0), i8* null }]
@.str = [16 x i8] c"<!DOCTYPE html>\00"
@.str.1 = [5 x i8] c"html\00"
@.str.2 = [15 x i8] c"<!doctype HTML\00"
@.str.3 = [14 x i8] c"<!doctype htm\00"
@.str.4 = [21 x i8] c"<!DOCTYPE fontconfig\00"
@.str.5 = [4 x i8] c"xml\00"
@.str.6 = [19 x i8] c"<!DOCTYPE colormap\00"
@.str.7 = [20 x i8] c"<!DOCTYPE busconfig\00"
@.str.8 = [20 x i8] c"<!doctype busconfig\00"
@.str.9 = [39 x i8] c"<?xml version=\221.0\22 encoding=\22UTF-8\22?>\00"
@.str.10 = [10 x i8] c"%YAML 1.1\00"
@.str.11 = [5 x i8] c"yaml\00"
@.str.12 = [12 x i8] c"[wrap-file]\00"
@.str.13 = [4 x i8] c"ini\00"
@.str.14 = [11 x i8] c"[wrap-file\00"
@.str.15 = [12 x i8] c"[section] \09\00"
@.str.16 = [11 x i8] c" [section]\00"
@.str.17 = [11 x i8] c"[section \09\00"
@.str.18 = [11 x i8] c"[ section]\00"
@.str.19 = [4 x i8] c"[1]\00"
@.str.20 = [39 x i8] c"diff --git a/example.txt b/example.txt\00"
@.str.21 = [5 x i8] c"diff\00"
@.str.22 = [10 x i8] c".TH DTE 1\00"
@.str.23 = [1 x i8] zeroinitializer
@.str.24 = [2 x i8] c" \00"
@.str.25 = [7 x i8] c" <?xml\00"
@.str.26 = [7 x i8] c"\00<?xml\00"
@.str.27 = [15 x i8] c"#!/usr/bin/ash\00"
@.str.28 = [3 x i8] c"sh\00"
@.str.29 = [15 x i8] c"#!/usr/bin/awk\00"
@.str.30 = [4 x i8] c"awk\00"
@.str.31 = [16 x i8] c"#!/usr/bin/bash\00"
@.str.32 = [18 x i8] c"#!/usr/bin/bigloo\00"
@.str.33 = [7 x i8] c"scheme\00"
@.str.34 = [15 x i8] c"#!/usr/bin/ccl\00"
@.str.35 = [5 x i8] c"lisp\00"
@.str.36 = [19 x i8] c"#!/usr/bin/chicken\00"
@.str.37 = [17 x i8] c"#!/usr/bin/clisp\00"
@.str.38 = [18 x i8] c"#!/usr/bin/coffee\00"
@.str.39 = [13 x i8] c"coffeescript\00"
@.str.40 = [19 x i8] c"#!/usr/bin/crystal\00"
@.str.41 = [5 x i8] c"ruby\00"
@.str.42 = [16 x i8] c"#!/usr/bin/dash\00"
@.str.43 = [15 x i8] c"#!/usr/bin/ecl\00"
@.str.44 = [16 x i8] c"#!/usr/bin/gawk\00"
@.str.45 = [17 x i8] c"#!/usr/bin/gmake\00"
@.str.46 = [5 x i8] c"make\00"
@.str.47 = [19 x i8] c"#!/usr/bin/gnuplot\00"
@.str.48 = [8 x i8] c"gnuplot\00"
@.str.49 = [18 x i8] c"#!/usr/bin/groovy\00"
@.str.50 = [7 x i8] c"groovy\00"
@.str.51 = [16 x i8] c"#!/usr/bin/gsed\00"
@.str.52 = [4 x i8] c"sed\00"
@.str.53 = [17 x i8] c"#!/usr/bin/guile\00"
@.str.54 = [17 x i8] c"#!/usr/bin/jruby\00"
@.str.55 = [15 x i8] c"#!/usr/bin/ksh\00"
@.str.56 = [16 x i8] c"#!/usr/bin/lisp\00"
@.str.57 = [18 x i8] c"#!/usr/bin/luajit\00"
@.str.58 = [4 x i8] c"lua\00"
@.str.59 = [15 x i8] c"#!/usr/bin/lua\00"
@.str.60 = [19 x i8] c"#!/usr/bin/macruby\00"
@.str.61 = [16 x i8] c"#!/usr/bin/make\00"
@.str.62 = [16 x i8] c"#!/usr/bin/mawk\00"
@.str.63 = [16 x i8] c"#!/usr/bin/mksh\00"
@.str.64 = [16 x i8] c"#!/usr/bin/moon\00"
@.str.65 = [11 x i8] c"moonscript\00"
@.str.66 = [16 x i8] c"#!/usr/bin/nawk\00"
@.str.67 = [16 x i8] c"#!/usr/bin/node\00"
@.str.68 = [11 x i8] c"javascript\00"
@.str.69 = [22 x i8] c"#!/usr/bin/openrc-run\00"
@.str.70 = [17 x i8] c"#!/usr/bin/pdksh\00"
@.str.71 = [16 x i8] c"#!/usr/bin/perl\00"
@.str.72 = [5 x i8] c"perl\00"
@.str.73 = [15 x i8] c"#!/usr/bin/php\00"
@.str.74 = [4 x i8] c"php\00"
@.str.75 = [18 x i8] c"#!/usr/bin/python\00"
@.str.76 = [7 x i8] c"python\00"
@.str.77 = [16 x i8] c"#!/usr/bin/r6rs\00"
@.str.78 = [18 x i8] c"#!/usr/bin/racket\00"
@.str.79 = [16 x i8] c"#!/usr/bin/rake\00"
@.str.80 = [16 x i8] c"#!/usr/bin/ruby\00"
@.str.81 = [22 x i8] c"#!/usr/bin/runhaskell\00"
@.str.82 = [8 x i8] c"haskell\00"
@.str.83 = [16 x i8] c"#!/usr/bin/sbcl\00"
@.str.84 = [15 x i8] c"#!/usr/bin/sed\00"
@.str.85 = [10 x i8] c"#!/bin/sh\00"
@.str.86 = [15 x i8] c"#!/usr/bin/tcc\00"
@.str.87 = [2 x i8] c"c\00"
@.str.88 = [17 x i8] c"#!/usr/bin/tclsh\00"
@.str.89 = [4 x i8] c"tcl\00"
@.str.90 = [16 x i8] c"#!/usr/bin/wish\00"
@.str.91 = [15 x i8] c"#!/usr/bin/zsh\00"
@.str.92 = [18 x i8] c"#!/usr/bin/lua5.3\00"
@.str.93 = [19 x i8] c"#!/usr/bin/env lua\00"
@.str.94 = [22 x i8] c"#!/usr/bin/env lua5.3\00"
@.str.95 = [24 x i8] c"#! /usr/bin/env lua5.3\00"
@.str.96 = [25 x i8] c"#! /usr/bin/env lua5.3\00"
@.str.97 = [28 x i8] c"#!/usr/bin/env /usr/bin/lua\00"
@.str.98 = [7 x i8] c"#!/lua\00"
@.str.99 = [22 x i8] c"#!/usr/bin/_unhaskell\00"
@.str.100 = [22 x i8] c"#!/usr/bin/runhaskel_\00"
@.str.101 = [19 x i8] c"#!/usr/bin/unknown\00"
@.str.102 = [6 x i8] c"#!lua\00"
@.str.103 = [16 x i8] c"#!/usr/bin/ lua\00"
@.str.104 = [12 x i8] c"#!/usr/bin/\00"
@.str.105 = [15 x i8] c"#!/usr/bin/env\00"
@.str.106 = [16 x i8] c"#!/usr/bin/env \00"
@.str.107 = [17 x i8] c"#!/usr/bin/env \00"
@.str.108 = [20 x i8] c"#!/usr/bin/env/ lua\00"
@.str.109 = [8 x i8] c"#!/lua/\00"
@.str.110 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/craigbarnes/dte/refs/heads/master/test/filetype.c\00"
define void @test_find_ft_firstline() {
%1 = alloca i64
%2 = alloca i8*
store i64 0, i64* %1
br label %3
3: ; preds = %20, %0
%4 = load i64, i64* %1
%5 = icmp ult i64 %4, 86
br i1 %5, label %6, label %23
6: ; preds = %3
%7 = load i64, i64* %1
%8 = getelementptr inbounds [86 x %struct.anon], [86 x %struct.anon]* @test_find_ft_firstline.tests, i64 0, i64 %7
%9 = getelementptr inbounds %struct.anon, %struct.anon* %8, i32 0, i32 0
%10 = load i8*, i8** %9
%11 = call i32 @strview_from_cstring(i8* %10)
%12 = call i8* @find_ft(i32* null, i32 %11)
store i8* %12, i8** %2
%13 = load i64, i64* %1
%14 = load i8*, i8** %2
%15 = load i64, i64* %1
%16 = getelementptr inbounds [86 x %struct.anon], [86 x %struct.anon]* @test_find_ft_firstline.tests, i64 0, i64 %15
%17 = getelementptr inbounds %struct.anon, %struct.anon* %16, i32 0, i32 1
%18 = load i8*, i8** %17
%19 = call i32 @iexpect_streq(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.110, i64 0, i64 0), i32 219, i64 %13, i8* %14, i8* %18)
br label %20
20: ; preds = %6
%21 = load i64, i64* %1
%22 = add i64 %21, 1
store i64 %22, i64* %1
br label %3
23: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.anon = type { i8*, i8* }
@test_find_ft_firstline.tests = internal unnamed_addr constant [86 x %struct.anon] [%struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.23, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.39, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.46, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.47, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.48, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.49, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.50, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.51, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.52, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.53, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.54, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.55, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.56, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.57, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.59, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.60, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.61, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.46, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.62, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.63, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.64, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.65, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.66, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.67, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.68, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.69, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.70, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.71, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.72, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.73, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.74, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.75, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.76, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.77, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.78, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.79, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.80, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.41, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.81, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.82, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.83, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.84, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.52, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.85, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.86, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.87, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.88, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.89, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.90, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.89, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.91, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.92, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.93, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.94, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.95, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.96, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.97, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.98, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.58, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.99, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.100, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.101, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.102, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.103, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.104, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.105, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.106, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.107, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.108, i32 0, i32 0), i8* null }, %struct.anon { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.109, i32 0, i32 0), i8* null }]
@.str = [16 x i8] c"<!DOCTYPE html>\00"
@.str.1 = [5 x i8] c"html\00"
@.str.2 = [15 x i8] c"<!doctype HTML\00"
@.str.3 = [14 x i8] c"<!doctype htm\00"
@.str.4 = [21 x i8] c"<!DOCTYPE fontconfig\00"
@.str.5 = [4 x i8] c"xml\00"
@.str.6 = [19 x i8] c"<!DOCTYPE colormap\00"
@.str.7 = [20 x i8] c"<!DOCTYPE busconfig\00"
@.str.8 = [20 x i8] c"<!doctype busconfig\00"
@.str.9 = [39 x i8] c"<?xml version=\221.0\22 encoding=\22UTF-8\22?>\00"
@.str.10 = [10 x i8] c"%YAML 1.1\00"
@.str.11 = [5 x i8] c"yaml\00"
@.str.12 = [12 x i8] c"[wrap-file]\00"
@.str.13 = [4 x i8] c"ini\00"
@.str.14 = [11 x i8] c"[wrap-file\00"
@.str.15 = [12 x i8] c"[section] \09\00"
@.str.16 = [11 x i8] c" [section]\00"
@.str.17 = [11 x i8] c"[section \09\00"
@.str.18 = [11 x i8] c"[ section]\00"
@.str.19 = [4 x i8] c"[1]\00"
@.str.20 = [39 x i8] c"diff --git a/example.txt b/example.txt\00"
@.str.21 = [5 x i8] c"diff\00"
@.str.22 = [10 x i8] c".TH DTE 1\00"
@.str.23 = [1 x i8] zeroinitializer
@.str.24 = [2 x i8] c" \00"
@.str.25 = [7 x i8] c" <?xml\00"
@.str.26 = [7 x i8] c"\00<?xml\00"
@.str.27 = [15 x i8] c"#!/usr/bin/ash\00"
@.str.28 = [3 x i8] c"sh\00"
@.str.29 = [15 x i8] c"#!/usr/bin/awk\00"
@.str.30 = [4 x i8] c"awk\00"
@.str.31 = [16 x i8] c"#!/usr/bin/bash\00"
@.str.32 = [18 x i8] c"#!/usr/bin/bigloo\00"
@.str.33 = [7 x i8] c"scheme\00"
@.str.34 = [15 x i8] c"#!/usr/bin/ccl\00"
@.str.35 = [5 x i8] c"lisp\00"
@.str.36 = [19 x i8] c"#!/usr/bin/chicken\00"
@.str.37 = [17 x i8] c"#!/usr/bin/clisp\00"
@.str.38 = [18 x i8] c"#!/usr/bin/coffee\00"
@.str.39 = [13 x i8] c"coffeescript\00"
@.str.40 = [19 x i8] c"#!/usr/bin/crystal\00"
@.str.41 = [5 x i8] c"ruby\00"
@.str.42 = [16 x i8] c"#!/usr/bin/dash\00"
@.str.43 = [15 x i8] c"#!/usr/bin/ecl\00"
@.str.44 = [16 x i8] c"#!/usr/bin/gawk\00"
@.str.45 = [17 x i8] c"#!/usr/bin/gmake\00"
@.str.46 = [5 x i8] c"make\00"
@.str.47 = [19 x i8] c"#!/usr/bin/gnuplot\00"
@.str.48 = [8 x i8] c"gnuplot\00"
@.str.49 = [18 x i8] c"#!/usr/bin/groovy\00"
@.str.50 = [7 x i8] c"groovy\00"
@.str.51 = [16 x i8] c"#!/usr/bin/gsed\00"
@.str.52 = [4 x i8] c"sed\00"
@.str.53 = [17 x i8] c"#!/usr/bin/guile\00"
@.str.54 = [17 x i8] c"#!/usr/bin/jruby\00"
@.str.55 = [15 x i8] c"#!/usr/bin/ksh\00"
@.str.56 = [16 x i8] c"#!/usr/bin/lisp\00"
@.str.57 = [18 x i8] c"#!/usr/bin/luajit\00"
@.str.58 = [4 x i8] c"lua\00"
@.str.59 = [15 x i8] c"#!/usr/bin/lua\00"
@.str.60 = [19 x i8] c"#!/usr/bin/macruby\00"
@.str.61 = [16 x i8] c"#!/usr/bin/make\00"
@.str.62 = [16 x i8] c"#!/usr/bin/mawk\00"
@.str.63 = [16 x i8] c"#!/usr/bin/mksh\00"
@.str.64 = [16 x i8] c"#!/usr/bin/moon\00"
@.str.65 = [11 x i8] c"moonscript\00"
@.str.66 = [16 x i8] c"#!/usr/bin/nawk\00"
@.str.67 = [16 x i8] c"#!/usr/bin/node\00"
@.str.68 = [11 x i8] c"javascript\00"
@.str.69 = [22 x i8] c"#!/usr/bin/openrc-run\00"
@.str.70 = [17 x i8] c"#!/usr/bin/pdksh\00"
@.str.71 = [16 x i8] c"#!/usr/bin/perl\00"
@.str.72 = [5 x i8] c"perl\00"
@.str.73 = [15 x i8] c"#!/usr/bin/php\00"
@.str.74 = [4 x i8] c"php\00"
@.str.75 = [18 x i8] c"#!/usr/bin/python\00"
@.str.76 = [7 x i8] c"python\00"
@.str.77 = [16 x i8] c"#!/usr/bin/r6rs\00"
@.str.78 = [18 x i8] c"#!/usr/bin/racket\00"
@.str.79 = [16 x i8] c"#!/usr/bin/rake\00"
@.str.80 = [16 x i8] c"#!/usr/bin/ruby\00"
@.str.81 = [22 x i8] c"#!/usr/bin/runhaskell\00"
@.str.82 = [8 x i8] c"haskell\00"
@.str.83 = [16 x i8] c"#!/usr/bin/sbcl\00"
@.str.84 = [15 x i8] c"#!/usr/bin/sed\00"
@.str.85 = [10 x i8] c"#!/bin/sh\00"
@.str.86 = [15 x i8] c"#!/usr/bin/tcc\00"
@.str.87 = [2 x i8] c"c\00"
@.str.88 = [17 x i8] c"#!/usr/bin/tclsh\00"
@.str.89 = [4 x i8] c"tcl\00"
@.str.90 = [16 x i8] c"#!/usr/bin/wish\00"
@.str.91 = [15 x i8] c"#!/usr/bin/zsh\00"
@.str.92 = [18 x i8] c"#!/usr/bin/lua5.3\00"
@.str.93 = [19 x i8] c"#!/usr/bin/env lua\00"
@.str.94 = [22 x i8] c"#!/usr/bin/env lua5.3\00"
@.str.95 = [24 x i8] c"#! /usr/bin/env lua5.3\00"
@.str.96 = [25 x i8] c"#! /usr/bin/env lua5.3\00"
@.str.97 = [28 x i8] c"#!/usr/bin/env /usr/bin/lua\00"
@.str.98 = [7 x i8] c"#!/lua\00"
@.str.99 = [22 x i8] c"#!/usr/bin/_unhaskell\00"
@.str.100 = [22 x i8] c"#!/usr/bin/runhaskel_\00"
@.str.101 = [19 x i8] c"#!/usr/bin/unknown\00"
@.str.102 = [6 x i8] c"#!lua\00"
@.str.103 = [16 x i8] c"#!/usr/bin/ lua\00"
@.str.104 = [12 x i8] c"#!/usr/bin/\00"
@.str.105 = [15 x i8] c"#!/usr/bin/env\00"
@.str.106 = [16 x i8] c"#!/usr/bin/env \00"
@.str.107 = [17 x i8] c"#!/usr/bin/env \00"
@.str.108 = [20 x i8] c"#!/usr/bin/env/ lua\00"
@.str.109 = [8 x i8] c"#!/lua/\00"
@.str.110 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/craigbarnes/dte/refs/heads/master/test/filetype.c\00"
define void @test_find_ft_firstline() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %11, %2 ]
%4 = getelementptr inbounds [86 x %struct.anon], [86 x %struct.anon]* @test_find_ft_firstline.tests, i64 0, i64 %3, i32 0
%5 = load i8*, i8** %4
%6 = tail call i32 @strview_from_cstring(i8* %5)
%7 = tail call i8* @find_ft(i32* null, i32 %6)
%8 = getelementptr inbounds [86 x %struct.anon], [86 x %struct.anon]* @test_find_ft_firstline.tests, i64 0, i64 %3, i32 1
%9 = load i8*, i8** %8
%10 = tail call i32 @iexpect_streq(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.110, i64 0, i64 0), i32 219, i64 %3, i8* %7, i8* %9)
%11 = add nuw nsw i64 %3, 1
%12 = icmp eq i64 %11, 86
br i1 %12, label %1, label %2
}