int test_ft_strlen() {
  char *s;
  printf("%s\n", __func__ + 5);
  _it("should compute the length of the string s");
  s = "";
  do {
    _begin_assert();
    if ((int)ft_strlen(s) != (int)strlen(s)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 52);
        _color(0);
      } while (0);
      printf("expected %i to equal %i\n\n", (int)ft_strlen(s), (int)strlen(s));
      return 1;
    }
  } while (0);
  s = "asdagewshd";
  do {
    _begin_assert();
    if ((int)ft_strlen(s) != (int)strlen(s)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 54);
        _color(0);
      } while (0);
      printf("expected %i to equal %i\n\n", (int)ft_strlen(s), (int)strlen(s));
      return 1;
    }
  } while (0);
  do {
    _close_pending();
    printf("\n");
    return (0);
  } while (0);
}


x86 assembly (clang, -O0):
<test_ft_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe71(%rip),%rdi
lea    0xe6e(%rip),%rsi
add    $0x5,%rsi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <ft_strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
je     1252 <test_ft_strlen+0xd2>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xe3d(%rip),%rdi
lea    0xdfd(%rip),%rsi
mov    $0x34,%edx
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <ft_strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1320 <test_ft_strlen+0x1a0>
jmp    1257 <test_ft_strlen+0xd7>
lea    0xe13(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <ft_strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rcx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
je     12fa <test_ft_strlen+0x17a>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xd95(%rip),%rdi
lea    0xd55(%rip),%rsi
mov    $0x36,%edx
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <ft_strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1320 <test_ft_strlen+0x1a0>
jmp    12ff <test_ft_strlen+0x17f>
jmp    1304 <test_ft_strlen+0x184>
mov    $0x0,%al
call   1050 <_close_pending@plt>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ft_strlen>:
push   %rbx
lea    0xe6d(%rip),%rdi
call   1050 <puts@plt>
lea    0xe6b(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1060 <ft_strlen@plt>
test   %eax,%eax
je     1218 <test_ft_strlen+0x88>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe5b(%rip),%rdi
lea    0xe1b(%rip),%rsi
mov    $0x34,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe6b(%rip),%rdi
xor    %eax,%eax
call   1060 <ft_strlen@plt>
lea    0xe44(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
jmp    1299 <test_ft_strlen+0x109>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xe45(%rip),%rdi
xor    %eax,%eax
call   1060 <ft_strlen@plt>
cmp    $0xa,%eax
jne    1247 <test_ft_strlen+0xb7>
xor    %eax,%eax
call   1070 <_close_pending@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    12a5 <test_ft_strlen+0x115>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xdd8(%rip),%rdi
lea    0xd98(%rip),%rsi
mov    $0x36,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xde9(%rip),%rdi
xor    %eax,%eax
call   1060 <ft_strlen@plt>
lea    0xdc1(%rip),%rdi
mov    %eax,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.test_ft_strlen = [15 x i8] c"test_ft_strlen\00"
@.str.1 = [42 x i8] c"should compute the length of the string s\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.4 = [26 x i8] c"expected %i to equal %i\0A\0A\00"
@.str.5 = [11 x i8] c"asdagewshd\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @test_ft_strlen() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 5))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %5
5: ; preds = %0
%6 = call i32 (...) @_begin_assert()
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %7)
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = trunc i64 %10 to i32
%12 = icmp ne i32 %8, %11
br i1 %12, label %13, label %26
13: ; preds = %5
%14 = call i32 (...) @_fail_test()
br label %15
15: ; preds = %13
%16 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 0), i32 52)
%18 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %19
19: ; preds = %15
%20 = load i8*, i8** %2
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %20)
%22 = load i8*, i8** %2
%23 = call i64 @strlen(i8* %22)
%24 = trunc i64 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %21, i32 %24)
store i32 1, i32* %1
br label %54
26: ; preds = %5
br label %27
27: ; preds = %26
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %28
28: ; preds = %27
%29 = call i32 (...) @_begin_assert()
%30 = load i8*, i8** %2
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %30)
%32 = load i8*, i8** %2
%33 = call i64 @strlen(i8* %32)
%34 = trunc i64 %33 to i32
%35 = icmp ne i32 %31, %34
br i1 %35, label %36, label %49
36: ; preds = %28
%37 = call i32 (...) @_fail_test()
br label %38
38: ; preds = %36
%39 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 0), i32 54)
%41 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %42
42: ; preds = %38
%43 = load i8*, i8** %2
%44 = call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* %43)
%45 = load i8*, i8** %2
%46 = call i64 @strlen(i8* %45)
%47 = trunc i64 %46 to i32
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %44, i32 %47)
store i32 1, i32* %1
br label %54
49: ; preds = %28
br label %50
50: ; preds = %49
br label %51
51: ; preds = %50
%52 = call i32 (...) @_close_pending()
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %1
br label %54
54: ; preds = %19, %42, %51
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@__func__.test_ft_strlen = [15 x i8] c"test_ft_strlen\00"
@.str.1 = [42 x i8] c"should compute the length of the string s\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.4 = [26 x i8] c"expected %i to equal %i\0A\0A\00"
@.str.5 = [11 x i8] c"asdagewshd\00"
define i32 @test_ft_strlen() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 5))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @_begin_assert()
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0
%7 = tail call i32 (...) @_fail_test()
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 0), i32 52)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 0)
br label %27
13: ; preds = %0
%14 = tail call i32 (...) @_begin_assert()
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%16 = icmp eq i32 %15, 10
br i1 %16, label %24, label %17
17: ; preds = %13
%18 = tail call i32 (...) @_fail_test()
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_strlen, i64 0, i64 0), i32 54)
%21 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%22 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_strlen to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %22, i32 10)
br label %27
24: ; preds = %13
%25 = tail call i32 (...) @_close_pending()
%26 = tail call i32 @putchar(i32 10)
br label %27
27: ; preds = %24, %17, %6
%28 = phi i32 [ 1, %6 ], [ 1, %17 ], [ 0, %24 ]
ret i32 %28
}