void test_hello_world() {
  char *s = "hello world!";
  do {
    seatest_assert_string_equal("hello world!", s, __FUNCTION__, 8);
  } while (0);
  do {
    seatest_assert_string_contains("hello", s, __FUNCTION__, 9);
  } while (0);
  do {
    seatest_assert_string_doesnt_contain("goodbye", s, __FUNCTION__, 10);
  } while (0);
  do {
    seatest_assert_string_ends_with("!", s, __FUNCTION__, 11);
  } while (0);
  do {
    seatest_assert_string_starts_with("hell", s, __FUNCTION__, 12);
  } while (0);
}


x86 assembly (clang, -O0):
<test_hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe92(%rip),%rdi
lea    0xe98(%rip),%rdx
mov    $0x8,%ecx
mov    $0x0,%al
call   1050 <seatest_assert_string_equal@plt>
jmp    1186 <test_hello_world+0x36>
mov    -0x8(%rbp),%rsi
lea    0xe8d(%rip),%rdi
lea    0xe75(%rip),%rdx
mov    $0x9,%ecx
mov    $0x0,%al
call   1040 <seatest_assert_string_contains@plt>
jmp    11a9 <test_hello_world+0x59>
mov    -0x8(%rbp),%rsi
lea    0xe70(%rip),%rdi
lea    0xe52(%rip),%rdx
mov    $0xa,%ecx
mov    $0x0,%al
call   1060 <seatest_assert_string_doesnt_contain@plt>
jmp    11cc <test_hello_world+0x7c>
mov    -0x8(%rbp),%rsi
lea    0xe34(%rip),%rdi
lea    0xe2f(%rip),%rdx
mov    $0xb,%ecx
mov    $0x0,%al
call   1070 <seatest_assert_string_ends_with@plt>
jmp    11ef <test_hello_world+0x9f>
mov    -0x8(%rbp),%rsi
lea    0xe32(%rip),%rdi
lea    0xe0c(%rip),%rdx
mov    $0xc,%ecx
mov    $0x0,%al
call   1030 <seatest_assert_string_starts_with@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_hello_world>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%rbx
lea    0xeab(%rip),%r14
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x8,%ecx
xor    %eax,%eax
call   1050 <seatest_assert_string_equal@plt>
lea    0xea0(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x9,%ecx
xor    %eax,%eax
call   1040 <seatest_assert_string_contains@plt>
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0xa,%ecx
xor    %eax,%eax
call   1060 <seatest_assert_string_doesnt_contain@plt>
lea    0xe5b(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0xb,%ecx
xor    %eax,%eax
call   1070 <seatest_assert_string_ends_with@plt>
lea    0xe63(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0xc,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <seatest_assert_string_starts_with@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
@__FUNCTION__.test_hello_world = [17 x i8] c"test_hello_world\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [8 x i8] c"goodbye\00"
@.str.3 = [2 x i8] c"!\00"
@.str.4 = [5 x i8] c"hell\00"
define void @test_hello_world() {
%1 = alloca i8*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
br label %2
2: ; preds = %0
%3 = load i8*, i8** %1
%4 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 8)
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i8*, i8** %1
%8 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_contains to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 9)
br label %9
9: ; preds = %6
br label %10
10: ; preds = %9
%11 = load i8*, i8** %1
%12 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_doesnt_contain to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 10)
br label %13
13: ; preds = %10
br label %14
14: ; preds = %13
%15 = load i8*, i8** %1
%16 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_ends_with to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 11)
br label %17
17: ; preds = %14
br label %18
18: ; preds = %17
%19 = load i8*, i8** %1
%20 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_starts_with to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %19, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 12)
br label %21
21: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
@__FUNCTION__.test_hello_world = [17 x i8] c"test_hello_world\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [8 x i8] c"goodbye\00"
@.str.3 = [2 x i8] c"!\00"
@.str.4 = [5 x i8] c"hell\00"
define void @test_hello_world() {
%1 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 8)
%2 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_contains to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 9)
%3 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_doesnt_contain to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 10)
%4 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_ends_with to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 11)
%5 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_starts_with to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.test_hello_world, i64 0, i64 0), i32 12)
ret void
}