#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 */
int /*<<< orphan*/ expect_false(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ expect_true(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ is_valid_filetype_name(char *);
void test_is_valid_filetype_name(void) {
  expect_true("/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",
              7, is_valid_filetype_name("abc-XYZ_128.90"));
  expect_false("/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",
               8, is_valid_filetype_name(""));
  expect_false("/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",
               9, is_valid_filetype_name("x/y"));
  expect_false("/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",
               10, is_valid_filetype_name("/"));
}


x86 assembly (clang, -O0):
<test_is_valid_filetype_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xf51(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %eax,%edx
lea    0xeb7(%rip),%rdi
mov    $0x7,%esi
call   1030 <expect_true@plt>
lea    0xf46(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %eax,%edx
lea    0xe98(%rip),%rdi
mov    $0x8,%esi
call   1040 <expect_false@plt>
lea    0xf22(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %eax,%edx
lea    0xe79(%rip),%rdi
mov    $0x9,%esi
call   1040 <expect_false@plt>
lea    0xf07(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %eax,%edx
lea    0xe5a(%rip),%rdi
mov    $0xa,%esi
call   1040 <expect_false@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_is_valid_filetype_name>:
push   %rbx
lea    0xf54(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %eax,%edx
call   1030 <expect_true@plt>
lea    0xf46(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <expect_false@plt>
lea    0xf26(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %eax,%edx
call   1040 <expect_false@plt>
lea    0xf0f(%rip),%rdi
call   1050 <is_valid_filetype_name@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <expect_false@plt>

LLVM IR (-O0):
@.str = [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"
@.str.1 = [15 x i8] c"abc-XYZ_128.90\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"x/y\00"
@.str.4 = [2 x i8] c"/\00"
define void @test_is_valid_filetype_name() {
%1 = call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @expect_true(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 7, i32 %1)
%3 = call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 8, i32 %3)
%5 = call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 9, i32 %5)
%7 = call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 10, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [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"
@.str.1 = [15 x i8] c"abc-XYZ_128.90\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"x/y\00"
@.str.4 = [2 x i8] c"/\00"
define void @test_is_valid_filetype_name() {
%1 = tail call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @expect_true(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 7, i32 %1)
%3 = tail call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 8, i32 %3)
%5 = tail call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 9, i32 %5)
%7 = tail call i32 @is_valid_filetype_name(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @expect_false(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 10, i32 %7)
ret void
}