void test_after_eq_value_completion(void) {
  char buf[] = "vifminfo=op";
  const char *start;
  char *completed;
  vle_compl_reset();
  complete_options(buf, &start);
  do {
    seatest_assert_true(start == buf + 9, __FUNCTION__, 168);
  } while (0);
  completed = vle_compl_next();
  do {
    seatest_assert_string_equal("options", completed, __FUNCTION__, 171);
  } while (0);
  free(completed);
  completed = vle_compl_next();
  do {
    seatest_assert_string_equal("options", completed, __FUNCTION__, 175);
  } while (0);
  free(completed);
}


x86 assembly (clang, -O0):
<test_after_eq_value_completion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xe91(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xe8f(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <vle_compl_reset@plt>
lea    -0xc(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <complete_options@plt>
mov    -0x18(%rbp),%rax
lea    -0xc(%rbp),%rcx
add    $0x9,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe5c(%rip),%rsi
mov    $0xa8,%edx
mov    $0x0,%al
call   1050 <seatest_assert_true@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe57(%rip),%rdi
lea    0xe31(%rip),%rdx
mov    $0xab,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_string_equal@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1040 <vle_compl_next@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe23(%rip),%rdi
lea    0xdfd(%rip),%rdx
mov    $0xaf,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_string_equal@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_after_eq_value_completion>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
movabs $0x6f666e696d666976,%rax
6e 66 6f
mov    %rax,0x8(%rsp)
movl   $0x706f3d,0x10(%rsp)
xor    %eax,%eax
call   1080 <vle_compl_reset@plt>
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1060 <complete_options@plt>
lea    0x11(%rsp),%rax
xor    %edi,%edi
cmp    %rax,0x18(%rsp)
sete   %dil
lea    0xe5d(%rip),%r14
mov    %r14,%rsi
mov    $0xa8,%edx
xor    %eax,%eax
call   1050 <seatest_assert_true@plt>
xor    %eax,%eax
call   1040 <vle_compl_next@plt>
movslq %eax,%rbx
lea    0xe5c(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0xab,%ecx
xor    %eax,%eax
call   1070 <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    %r14,%rdx
mov    $0xaf,%ecx
xor    %eax,%eax
call   1070 <seatest_assert_string_equal@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.test_after_eq_value_completion.buf = [12 x i8] c"vifminfo=op\00"
@__FUNCTION__.test_after_eq_value_completion = [31 x i8] c"test_after_eq_value_completion\00"
@.str = [8 x i8] c"options\00"
define void @test_after_eq_value_completion() {
%1 = alloca [12 x i8]
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast [12 x i8]* %1 to i8*
%5 = call i32 (...) @vle_compl_reset()
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @complete_options to i32 (i8*, i8**, ...)*)(i8* %6, i8** %2)
br label %8
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds i8, i8* %10, i64 9
%12 = icmp eq i8* %9, %11
%13 = zext i1 %12 to i32
%14 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %13, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 168)
br label %15
15: ; preds = %8
%16 = call i32 (...) @vle_compl_next()
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %3
br label %19
19: ; preds = %15
%20 = load i8*, i8** %3
%21 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %20, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 171)
br label %22
22: ; preds = %19
%23 = load i8*, i8** %3
%24 = call i32 (...) @vle_compl_next()
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i8*
store i8* %26, i8** %3
br label %27
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %28, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 175)
br label %30
30: ; preds = %27
%31 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@__const.test_after_eq_value_completion.buf = [12 x i8] c"vifminfo=op\00"
@__FUNCTION__.test_after_eq_value_completion = [31 x i8] c"test_after_eq_value_completion\00"
@.str = [8 x i8] c"options\00"
define void @test_after_eq_value_completion() {
%1 = alloca [12 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
%5 = tail call i32 (...) @vle_compl_reset()
%6 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @complete_options to i32 (i8*, i8**, ...)*)(i8* %3, i8** %2)
%7 = load i8*, i8** %2
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 9
%9 = icmp eq i8* %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %10, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 168)
%12 = call i32 (...) @vle_compl_next()
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
%15 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %14, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 171)
%16 = call i32 (...) @vle_compl_next()
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
%19 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %18, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__FUNCTION__.test_after_eq_value_completion, i64 0, i64 0), i32 175)
ret void
}