#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 */
scalar_t__ fnmatch(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char szFirst[] = "Import_20150324.txt";
  char szSecond[] = "{re,}Import_20150324.txt";
  if (fnmatch("{re,}Import_*.txt", szFirst, 0) == 0) {
    printf("%s is match {re,}Import_*txt.\n", szFirst);
  }
  if (fnmatch("{re,}Import_*.txt", szSecond, 0) == 0) {
    printf("%s is match {re,}Import_*.txt.\n", szSecond);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebe(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebc(%rip),%al
mov    %al,-0x38(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xeaf(%rip),%rdi
xor    %edx,%edx
call   1040 <fnmatch@plt>
cmp    $0x0,%rax
jne    11ab <main+0x8b>
lea    -0x30(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xe83(%rip),%rdi
xor    %edx,%edx
call   1040 <fnmatch@plt>
cmp    $0x0,%rax
jne    11d7 <main+0xb7>
lea    -0x50(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x747874,0x10(%rsp)
movups 0xeeb(%rip),%xmm0
movups %xmm0,0x29(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xee3(%rip),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <fnmatch@plt>
test   %rax,%rax
jne    1174 <main+0x54>
lea    0xedf(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %edx,%edx
call   1040 <fnmatch@plt>
test   %rax,%rax
jne    119d <main+0x7d>
lea    0xed7(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.szFirst = [20 x i8] c"Import_20150324.txt\00"
@__const.main.szSecond = [25 x i8] c"{re,}Import_20150324.txt\00"
@.str = [18 x i8] c"{re,}Import_*.txt\00"
@.str.1 = [31 x i8] c"%s is match {re,}Import_*txt.\0A\00"
@.str.2 = [32 x i8] c"%s is match {re,}Import_*.txt.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i8]
%7 = alloca [25 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [20 x i8]* %6 to i8*
%9 = bitcast [25 x i8]* %7 to i8*
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%11 = call i64 @fnmatch(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %10, i32 0)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %13, %2
%17 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%18 = call i64 @fnmatch(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %17, i32 0)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%22 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %20, %16
ret i32 0
}

LLVM IR (-O2):
@__const.main.szFirst = [20 x i8] c"Import_20150324.txt\00"
@__const.main.szSecond = [25 x i8] c"{re,}Import_20150324.txt\00"
@.str = [18 x i8] c"{re,}Import_*.txt\00"
@.str.1 = [31 x i8] c"%s is match {re,}Import_*txt.\0A\00"
@.str.2 = [32 x i8] c"%s is match {re,}Import_*.txt.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x i8]
%4 = alloca [25 x i8]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 0
%7 = call i64 @fnmatch(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %5, i32 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %11
11: ; preds = %9, %2
%12 = call i64 @fnmatch(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6, i32 0)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %6)
br label %16
16: ; preds = %14, %11
ret i32 0
}