void test_two_matches(void) {
  char *buf;
  do {
    seatest_assert_int_equal(0, vle_compl_add_match("mountpoint"), __FUNCTION__,
                             238);
  } while (0);
  vle_compl_finish_group();
  do {
    seatest_assert_int_equal(0, vle_compl_add_match("mount"), __FUNCTION__,
                             240);
  } while (0);
  vle_compl_finish_group();
  do {
    seatest_assert_int_equal(0, vle_compl_add_last_match("mount"), __FUNCTION__,
                             243);
  } while (0);
  buf = vle_compl_next();
  do {
    seatest_assert_string_equal("mountpoint", buf, __FUNCTION__, 246);
  } while (0);
  free(buf);
  buf = vle_compl_next();
  do {
    seatest_assert_string_equal("mount", buf, __FUNCTION__, 250);
  } while (0);
  free(buf);
  buf = vle_compl_next();
  do {
    seatest_assert_string_equal("mount", buf, __FUNCTION__, 254);
  } while (0);
  free(buf);
  buf = vle_compl_next();
  do {
    seatest_assert_string_equal("mountpoint", buf, __FUNCTION__, 258);
  } while (0);
  free(buf);
}


x86 assembly (clang, -O0):
<test_two_matches>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1080 <vle_compl_add_match@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xe7a(%rip),%rdx
mov    $0xee,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_int_equal@plt>
mov    $0x0,%al
call   1050 <vle_compl_finish_group@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1080 <vle_compl_add_match@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xe4e(%rip),%rdx
mov    $0xf0,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_int_equal@plt>
mov    $0x0,%al
call   1050 <vle_compl_finish_group@plt>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1090 <vle_compl_add_last_match@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xe22(%rip),%rdx
mov    $0xf3,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_int_equal@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xdf3(%rip),%rdi
lea    0xdf7(%rip),%rdx
mov    $0xf6,%ecx
mov    $0x0,%al
call   1060 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xddb(%rip),%rdi
lea    0xdc3(%rip),%rdx
mov    $0xfa,%ecx
mov    $0x0,%al
call   1060 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xda7(%rip),%rdi
lea    0xd8f(%rip),%rdx
mov    $0xfe,%ecx
mov    $0x0,%al
call   1060 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xd57(%rip),%rdi
lea    0xd5b(%rip),%rdx
mov    $0x102,%ecx
mov    $0x0,%al
call   1060 <seatest_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_two_matches>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xe81(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1080 <vle_compl_add_match@plt>
lea    0xe7b(%rip),%r12
xor    %edi,%edi
mov    %eax,%esi
mov    %r12,%rdx
mov    $0xee,%ecx
xor    %eax,%eax
call   1070 <seatest_assert_int_equal@plt>
xor    %eax,%eax
call   1050 <vle_compl_finish_group@plt>
lea    0xe6b(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <vle_compl_add_match@plt>
xor    %edi,%edi
mov    %eax,%esi
mov    %r12,%rdx
mov    $0xf0,%ecx
xor    %eax,%eax
call   1070 <seatest_assert_int_equal@plt>
xor    %eax,%eax
call   1050 <vle_compl_finish_group@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <vle_compl_add_last_match@plt>
xor    %edi,%edi
mov    %eax,%esi
mov    %r12,%rdx
mov    $0xf3,%ecx
xor    %eax,%eax
call   1070 <seatest_assert_int_equal@plt>
xor    %eax,%eax
call   1040 <vle_compl_next@plt>
movslq %eax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0xf6,%ecx
xor    %eax,%eax
call   1060 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1040 <vle_compl_next@plt>
movslq %eax,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0xfa,%ecx
xor    %eax,%eax
call   1060 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1040 <vle_compl_next@plt>
movslq %eax,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0xfe,%ecx
xor    %eax,%eax
call   1060 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   1040 <vle_compl_next@plt>
movslq %eax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0x102,%ecx
xor    %eax,%eax
call   1060 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"mountpoint\00"
@__FUNCTION__.test_two_matches = [17 x i8] c"test_two_matches\00"
@.str.1 = [6 x i8] c"mount\00"
define void @test_two_matches() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 238)
br label %5
5: ; preds = %2
%6 = call i32 (...) @vle_compl_finish_group()
br label %7
7: ; preds = %5
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 240)
br label %10
10: ; preds = %7
%11 = call i32 (...) @vle_compl_finish_group()
br label %12
12: ; preds = %10
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_last_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 243)
br label %15
15: ; preds = %12
%16 = call i32 (...) @vle_compl_next()
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %1
br label %19
19: ; preds = %15
%20 = load i8*, i8** %1
%21 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %20, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 246)
br label %22
22: ; preds = %19
%23 = load i8*, i8** %1
%24 = call i32 (...) @vle_compl_next()
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i8*
store i8* %26, i8** %1
br label %27
27: ; preds = %22
%28 = load i8*, i8** %1
%29 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %28, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 250)
br label %30
30: ; preds = %27
%31 = load i8*, i8** %1
%32 = call i32 (...) @vle_compl_next()
%33 = sext i32 %32 to i64
%34 = inttoptr i64 %33 to i8*
store i8* %34, i8** %1
br label %35
35: ; preds = %30
%36 = load i8*, i8** %1
%37 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 254)
br label %38
38: ; preds = %35
%39 = load i8*, i8** %1
%40 = call i32 (...) @vle_compl_next()
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i8*
store i8* %42, i8** %1
br label %43
43: ; preds = %38
%44 = load i8*, i8** %1
%45 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 258)
br label %46
46: ; preds = %43
%47 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"mountpoint\00"
@__FUNCTION__.test_two_matches = [17 x i8] c"test_two_matches\00"
@.str.1 = [6 x i8] c"mount\00"
define void @test_two_matches() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 238)
%3 = tail call i32 (...) @vle_compl_finish_group()
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 240)
%6 = tail call i32 (...) @vle_compl_finish_group()
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vle_compl_add_last_match to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 243)
%9 = tail call i32 (...) @vle_compl_next()
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 246)
tail call void @free(i8* %11)
%13 = tail call i32 (...) @vle_compl_next()
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
%16 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 250)
tail call void @free(i8* %15)
%17 = tail call i32 (...) @vle_compl_next()
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
%20 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %19, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 254)
tail call void @free(i8* %19)
%21 = tail call i32 (...) @vle_compl_next()
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
%24 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %23, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_two_matches, i64 0, i64 0), i32 258)
tail call void @free(i8* %23)
ret void
}