void test_yes(void) {
  do {
    seatest_assert_true(path_starts_with("/home/trash", "/home/trash"),
                        __FUNCTION__, 8);
  } while (0);
  do {
    seatest_assert_true(path_starts_with("/home/trash/", "/home/trash"),
                        __FUNCTION__, 9);
  } while (0);
  do {
    seatest_assert_true(path_starts_with("/home/trash/", "/home/trash/"),
                        __FUNCTION__, 10);
  } while (0);
  do {
    seatest_assert_true(path_starts_with("/home/trash", "/home/trash/"),
                        __FUNCTION__, 11);
  } while (0);
}


x86 assembly (clang, -O0):
<test_yes>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test_yes+0x9>
lea    0xed0(%rip),%rsi
mov    %rsi,%rdi
mov    $0x0,%al
call   1040 <path_starts_with@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
jmp    1154 <test_yes+0x34>
lea    0xeba(%rip),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <path_starts_with@plt>
mov    %eax,%edi
lea    0xe9a(%rip),%rsi
mov    $0x9,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
jmp    1183 <test_yes+0x63>
lea    0xe8b(%rip),%rsi
mov    %rsi,%rdi
mov    $0x0,%al
call   1040 <path_starts_with@plt>
mov    %eax,%edi
lea    0xe6f(%rip),%rsi
mov    $0xa,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
jmp    11ae <test_yes+0x8e>
lea    0xe4b(%rip),%rdi
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1040 <path_starts_with@plt>
mov    %eax,%edi
lea    0xe40(%rip),%rsi
mov    $0xb,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_yes>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%r14
mov    %r14,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <path_starts_with@plt>
lea    0xecc(%rip),%r15
mov    %eax,%edi
mov    %r15,%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <seatest_assert_true@plt>
lea    0xebd(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <path_starts_with@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1030 <seatest_assert_true@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <path_starts_with@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    $0xa,%edx
xor    %eax,%eax
call   1030 <seatest_assert_true@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <path_starts_with@plt>
mov    %eax,%edi
mov    %r15,%rsi
mov    $0xb,%edx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <seatest_assert_true@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/home/trash\00"
@__FUNCTION__.test_yes = [9 x i8] c"test_yes\00"
@.str.1 = [13 x i8] c"/home/trash/\00"
define void @test_yes() {
br label %1
1: ; preds = %0
%2 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 8)
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
%6 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 9)
br label %8
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 10)
br label %12
12: ; preds = %9
br label %13
13: ; preds = %12
%14 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 11)
br label %16
16: ; preds = %13
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"/home/trash\00"
@__FUNCTION__.test_yes = [9 x i8] c"test_yes\00"
@.str.1 = [13 x i8] c"/home/trash/\00"
define void @test_yes() {
%1 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 8)
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 9)
%5 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 10)
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @path_starts_with to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.test_yes, i64 0, i64 0), i32 11)
ret void
}