#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*/ test_one_match(char *, char *);
void test_matches(void) {
  test_one_match("foo.bar.epub", "application/epub+zip");
  test_one_match("core", "application/x-core");
  test_one_match("README.in", "text/x-readme");
  test_one_match("README.gz", "application/x-gzip");
  test_one_match("blabla.cs", "text/x-csharp");
  test_one_match("blabla.f90", "text/x-fortran");
  test_one_match("blabla.F95", "text/x-fortran");
  test_one_match("tarball.tar.gz", "application/x-compressed-tar");
  test_one_match("file.gz", "application/x-gzip");
  test_one_match("file.tar.lzo", "application/x-tzo");
  test_one_match("file.lzo", "application/x-lzop");
}


x86 assembly (clang, -O0):
<test_matches>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf02(%rip),%rdi
lea    0xeed(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xef4(%rip),%rdi
lea    0xef7(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xef9(%rip),%rdi
lea    0xefc(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf03(%rip),%rdi
lea    0xf06(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf08(%rip),%rdi
lea    0xf0c(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf0f(%rip),%rdi
lea    0xef9(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf07(%rip),%rdi
lea    0xf0f(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf20(%rip),%rdi
lea    0xe9d(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf15(%rip),%rdi
lea    0xf1b(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf21(%rip),%rdi
lea    0xf23(%rip),%rsi
call   1030 <test_one_match@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_matches>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf02(%rip),%rdi
lea    0xeed(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xef4(%rip),%rdi
lea    0xef7(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xef9(%rip),%rdi
lea    0xefc(%rip),%r14
mov    %r14,%rsi
call   1030 <test_one_match@plt>
lea    0xf00(%rip),%rdi
lea    0xf03(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf05(%rip),%rdi
lea    0xf09(%rip),%rbx
mov    %rbx,%rsi
call   1030 <test_one_match@plt>
lea    0xf09(%rip),%rdi
mov    %rbx,%rsi
call   1030 <test_one_match@plt>
lea    0xf05(%rip),%rdi
lea    0xf0d(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf1e(%rip),%rdi
mov    %r14,%rsi
call   1030 <test_one_match@plt>
lea    0xf17(%rip),%rdi
lea    0xf1d(%rip),%rsi
call   1030 <test_one_match@plt>
lea    0xf23(%rip),%rdi
lea    0xf25(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <test_one_match@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"foo.bar.epub\00"
@.str.1 = [21 x i8] c"application/epub+zip\00"
@.str.2 = [5 x i8] c"core\00"
@.str.3 = [19 x i8] c"application/x-core\00"
@.str.4 = [10 x i8] c"README.in\00"
@.str.5 = [14 x i8] c"text/x-readme\00"
@.str.6 = [10 x i8] c"README.gz\00"
@.str.7 = [19 x i8] c"application/x-gzip\00"
@.str.8 = [10 x i8] c"blabla.cs\00"
@.str.9 = [14 x i8] c"text/x-csharp\00"
@.str.10 = [11 x i8] c"blabla.f90\00"
@.str.11 = [15 x i8] c"text/x-fortran\00"
@.str.12 = [11 x i8] c"blabla.F95\00"
@.str.13 = [15 x i8] c"tarball.tar.gz\00"
@.str.14 = [29 x i8] c"application/x-compressed-tar\00"
@.str.15 = [8 x i8] c"file.gz\00"
@.str.16 = [13 x i8] c"file.tar.lzo\00"
@.str.17 = [18 x i8] c"application/x-tzo\00"
@.str.18 = [9 x i8] c"file.lzo\00"
@.str.19 = [19 x i8] c"application/x-lzop\00"
define void @test_matches() {
%1 = call i32 @test_one_match(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_one_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%4 = call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%5 = call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%6 = call i32 @test_one_match(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
%7 = call i32 @test_one_match(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
%8 = call i32 @test_one_match(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%9 = call i32 @test_one_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @test_one_match(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%11 = call i32 @test_one_match(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"foo.bar.epub\00"
@.str.1 = [21 x i8] c"application/epub+zip\00"
@.str.2 = [5 x i8] c"core\00"
@.str.3 = [19 x i8] c"application/x-core\00"
@.str.4 = [10 x i8] c"README.in\00"
@.str.5 = [14 x i8] c"text/x-readme\00"
@.str.6 = [10 x i8] c"README.gz\00"
@.str.7 = [19 x i8] c"application/x-gzip\00"
@.str.8 = [10 x i8] c"blabla.cs\00"
@.str.9 = [14 x i8] c"text/x-csharp\00"
@.str.10 = [11 x i8] c"blabla.f90\00"
@.str.11 = [15 x i8] c"text/x-fortran\00"
@.str.12 = [11 x i8] c"blabla.F95\00"
@.str.13 = [15 x i8] c"tarball.tar.gz\00"
@.str.14 = [29 x i8] c"application/x-compressed-tar\00"
@.str.15 = [8 x i8] c"file.gz\00"
@.str.16 = [13 x i8] c"file.tar.lzo\00"
@.str.17 = [18 x i8] c"application/x-tzo\00"
@.str.18 = [9 x i8] c"file.lzo\00"
@.str.19 = [19 x i8] c"application/x-lzop\00"
define void @test_matches() {
%1 = tail call i32 @test_one_match(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_one_match(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 @test_one_match(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%6 = tail call i32 @test_one_match(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
%7 = tail call i32 @test_one_match(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
%8 = tail call i32 @test_one_match(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%9 = tail call i32 @test_one_match(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @test_one_match(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0))
%11 = tail call i32 @test_one_match(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0))
ret void
}