void test_path_has_separators_of_multiple_slashes_ok(void) {
  const char *const path = "/slashes///here";
  const char *const last = get_last_path_component(path);
  do {
    seatest_assert_string_equal(path + 11, last, __FUNCTION__, 55);
  } while (0);
  do {
    seatest_assert_true(path + 11 == last, __FUNCTION__, 56);
  } while (0);
}


x86 assembly (clang, -O0):
<test_path_has_separators_of_multiple_slashes_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <get_last_path_component@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9e(%rip),%rdi
add    $0xb,%rdi
lea    0xea3(%rip),%rdx
mov    $0x37,%ecx
mov    $0x0,%al
call   1050 <seatest_assert_string_equal@plt>
jmp    117e <test_path_has_separators_of_multiple_slashes_ok+0x4e>
lea    0xe7b(%rip),%rax
add    $0xb,%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe74(%rip),%rsi
mov    $0x38,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_path_has_separators_of_multiple_slashes_ok>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <get_last_path_component@plt>
movslq %eax,%rbx
lea    0xebe(%rip),%r14
lea    0xebc(%rip),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x37,%ecx
xor    %eax,%eax
call   1050 <seatest_assert_string_equal@plt>
xor    %edi,%edi
cmp    %r14,%rbx
sete   %dil
mov    %r15,%rsi
mov    $0x38,%edx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <seatest_assert_true@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"/slashes///here\00"
@__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok = [48 x i8] c"test_path_has_separators_of_multiple_slashes_ok\00"
define void @test_path_has_separators_of_multiple_slashes_ok() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @get_last_path_component to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i32 0))
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
br label %6
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i64 11), i8* %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok, i64 0, i64 0), i32 55)
br label %9
9: ; preds = %6
br label %10
10: ; preds = %9
%11 = load i8*, i8** %2
%12 = icmp eq i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i32 0, i64 11), %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 ([48 x i8], [48 x i8]* @__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok, i64 0, i64 0), i32 56)
br label %15
15: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"/slashes///here\00"
@__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok = [48 x i8] c"test_path_has_separators_of_multiple_slashes_ok\00"
define void @test_path_has_separators_of_multiple_slashes_ok() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @get_last_path_component to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 11), i8* %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok, i64 0, i64 0), i32 55)
%5 = icmp eq i8* %3, getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 11)
%6 = zext i1 %5 to i32
%7 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @__FUNCTION__.test_path_has_separators_of_multiple_slashes_ok, i64 0, i64 0), i32 56)
ret void
}