int test_ft_memchr() {
  char *str = "b0cal";
  printf("%s\n", __func__ + 5);
  _it("should return the first ocurrence of c in string s");
  do {
    _begin_assert();
    if (ft_memchr(str, '0', 5) != memchr(str, '0', 5)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 144);
        _color(0);
      } while (0);
      printf("expected %p to equal %p\n\n", ft_memchr(str, '0', 5),
             memchr(str, '0', 5));
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (ft_memchr(str, 'l', 5) != memchr(str, 'l', 5)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 145);
        _color(0);
      } while (0);
      printf("expected %p to equal %p\n\n", ft_memchr(str, 'l', 5),
             memchr(str, 'l', 5));
      return 1;
    }
  } while (0);
  _it("should return null if no such byte exists within n bytes");
  do {
    _begin_assert();
    if (ft_memchr(str, '0', 0) != memchr(str, '0', 0)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 148);
        _color(0);
      } while (0);
      printf("expected %p to equal %p\n\n", ft_memchr(str, '0', 0),
             memchr(str, '0', 0));
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (ft_memchr(str, 'k', 5) != memchr(str, 'k', 5)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 149);
        _color(0);
      } while (0);
      printf("expected %p to equal %p\n\n", ft_memchr(str, 'k', 5),
             memchr(str, 'k', 5));
      return 1;
    }
  } while (0);
  do {
    _close_pending();
    printf("\n");
    return (0);
  } while (0);
}


x86 assembly (clang, -O0):
<test_ft_memchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xe71(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xe6c(%rip),%rdi
lea    0xe69(%rip),%rsi
add    $0x5,%rsi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1280 <test_ft_memchr+0x100>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xe33(%rip),%rdi
lea    0xdea(%rip),%rsi
mov    $0x90,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    -0x1c(%rbp),%esi
mov    %rax,%rdx
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1517 <test_ft_memchr+0x397>
jmp    1285 <test_ft_memchr+0x105>
jmp    128a <test_ft_memchr+0x10a>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1350 <test_ft_memchr+0x1d0>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xd63(%rip),%rdi
lea    0xd1a(%rip),%rsi
mov    $0x91,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    -0x2c(%rbp),%esi
mov    %rax,%rdx
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1517 <test_ft_memchr+0x397>
jmp    1355 <test_ft_memchr+0x1d5>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
cltq
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x30,%esi
call   1070 <memchr@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
je     1421 <test_ft_memchr+0x2a1>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xc8e(%rip),%rdi
lea    0xc45(%rip),%rsi
mov    $0x94,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x30,%esi
call   1070 <memchr@plt>
mov    -0x3c(%rbp),%esi
mov    %rax,%rdx
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1517 <test_ft_memchr+0x397>
jmp    1426 <test_ft_memchr+0x2a6>
jmp    142b <test_ft_memchr+0x2ab>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
cmp    %rcx,%rax
je     14f1 <test_ft_memchr+0x371>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xbc2(%rip),%rdi
lea    0xb79(%rip),%rsi
mov    $0x95,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
mov    -0x10(%rbp),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <ft_memchr@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
call   1070 <memchr@plt>
mov    -0x4c(%rbp),%esi
mov    %rax,%rdx
lea    0xb88(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1517 <test_ft_memchr+0x397>
jmp    14f6 <test_ft_memchr+0x376>
jmp    14fb <test_ft_memchr+0x37b>
mov    $0x0,%al
call   1050 <_close_pending@plt>
lea    0xb75(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ft_memchr>:
push   %rbx
lea    0xe73(%rip),%rdi
call   1050 <puts@plt>
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xe47(%rip),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
cltq
lea    0xe2e(%rip),%rcx
cmp    %rcx,%rax
je     1239 <test_ft_memchr+0xa9>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe56(%rip),%rdi
lea    0xe0d(%rip),%rsi
mov    $0x90,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xdeb(%rip),%rdi
mov    $0x30,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
lea    0xe35(%rip),%rdi
lea    0xdcd(%rip),%rdx
jmp    12c2 <test_ft_memchr+0x132>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xdb9(%rip),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
cltq
lea    0xda3(%rip),%rcx
cmp    %rcx,%rax
je     12d4 <test_ft_memchr+0x144>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xdc8(%rip),%rdi
lea    0xd7f(%rip),%rsi
mov    $0x91,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd5d(%rip),%rdi
mov    $0x6c,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
lea    0xda7(%rip),%rdi
lea    0xd42(%rip),%rdx
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
lea    0xda1(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xd10(%rip),%rdi
mov    $0x30,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
test   %eax,%eax
je     1348 <test_ft_memchr+0x1b8>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd2c(%rip),%rdi
lea    0xce3(%rip),%rsi
mov    $0x94,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xcc1(%rip),%rdi
mov    $0x30,%esi
xor    %edx,%edx
jmp    13b4 <test_ft_memchr+0x224>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <_begin_assert@plt>
lea    0xca8(%rip),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
test   %eax,%eax
je     13cb <test_ft_memchr+0x23b>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xcc1(%rip),%rdi
lea    0xc78(%rip),%rsi
mov    $0x95,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xc56(%rip),%rdi
mov    $0x6b,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <ft_memchr@plt>
lea    0xca0(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
jmp    12c4 <test_ft_memchr+0x134>
xor    %eax,%eax
call   1070 <_close_pending@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    12d0 <test_ft_memchr+0x140>

LLVM IR (-O0):
@.str = [6 x i8] c"b0cal\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@__func__.test_ft_memchr = [15 x i8] c"test_ft_memchr\00"
@.str.2 = [51 x i8] c"should return the first ocurrence of c in string s\00"
@.str.3 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.4 = [26 x i8] c"expected %p to equal %p\0A\0A\00"
@.str.5 = [57 x i8] c"should return null if no such byte exists within n bytes\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @test_ft_memchr() {
%1 = alloca i32
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memchr, i64 0, i64 5))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %0
%6 = call i32 (...) @_begin_assert()
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %7, i32 48, i32 5)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
%11 = load i8*, i8** %2
%12 = call i8* @memchr(i8* %11, i32 48, i64 5)
%13 = icmp ne i8* %10, %12
br i1 %13, label %14, label %26
14: ; preds = %5
%15 = call i32 (...) @_fail_test()
br label %16
16: ; preds = %14
%17 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%18 = 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_memchr, i64 0, i64 0), i32 144)
%19 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %20
20: ; preds = %16
%21 = load i8*, i8** %2
%22 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %21, i32 48, i32 5)
%23 = load i8*, i8** %2
%24 = call i8* @memchr(i8* %23, i32 48, i64 5)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %22, i8* %24)
store i32 1, i32* %1
br label %101
26: ; preds = %5
br label %27
27: ; preds = %26
br label %28
28: ; preds = %27
%29 = call i32 (...) @_begin_assert()
%30 = load i8*, i8** %2
%31 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %30, i32 108, i32 5)
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i8*
%34 = load i8*, i8** %2
%35 = call i8* @memchr(i8* %34, i32 108, i64 5)
%36 = icmp ne i8* %33, %35
br i1 %36, label %37, label %49
37: ; preds = %28
%38 = call i32 (...) @_fail_test()
br label %39
39: ; preds = %37
%40 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%41 = 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_memchr, i64 0, i64 0), i32 145)
%42 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %43
43: ; preds = %39
%44 = load i8*, i8** %2
%45 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %44, i32 108, i32 5)
%46 = load i8*, i8** %2
%47 = call i8* @memchr(i8* %46, i32 108, i64 5)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %45, i8* %47)
store i32 1, i32* %1
br label %101
49: ; preds = %28
br label %50
50: ; preds = %49
%51 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
br label %52
52: ; preds = %50
%53 = call i32 (...) @_begin_assert()
%54 = load i8*, i8** %2
%55 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %54, i32 48, i32 0)
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to i8*
%58 = load i8*, i8** %2
%59 = call i8* @memchr(i8* %58, i32 48, i64 0)
%60 = icmp ne i8* %57, %59
br i1 %60, label %61, label %73
61: ; preds = %52
%62 = call i32 (...) @_fail_test()
br label %63
63: ; preds = %61
%64 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%65 = 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_memchr, i64 0, i64 0), i32 148)
%66 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %67
67: ; preds = %63
%68 = load i8*, i8** %2
%69 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %68, i32 48, i32 0)
%70 = load i8*, i8** %2
%71 = call i8* @memchr(i8* %70, i32 48, i64 0)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %69, i8* %71)
store i32 1, i32* %1
br label %101
73: ; preds = %52
br label %74
74: ; preds = %73
br label %75
75: ; preds = %74
%76 = call i32 (...) @_begin_assert()
%77 = load i8*, i8** %2
%78 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %77, i32 107, i32 5)
%79 = sext i32 %78 to i64
%80 = inttoptr i64 %79 to i8*
%81 = load i8*, i8** %2
%82 = call i8* @memchr(i8* %81, i32 107, i64 5)
%83 = icmp ne i8* %80, %82
br i1 %83, label %84, label %96
84: ; preds = %75
%85 = call i32 (...) @_fail_test()
br label %86
86: ; preds = %84
%87 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%88 = 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_memchr, i64 0, i64 0), i32 149)
%89 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %90
90: ; preds = %86
%91 = load i8*, i8** %2
%92 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* %91, i32 107, i32 5)
%93 = load i8*, i8** %2
%94 = call i8* @memchr(i8* %93, i32 107, i64 5)
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %92, i8* %94)
store i32 1, i32* %1
br label %101
96: ; preds = %75
br label %97
97: ; preds = %96
br label %98
98: ; preds = %97
%99 = call i32 (...) @_close_pending()
%100 = 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 %101
101: ; preds = %20, %43, %67, %90, %98
%102 = load i32, i32* %1
ret i32 %102
}

LLVM IR (-O2):
@.str = [6 x i8] c"b0cal\00"
@__func__.test_ft_memchr = [15 x i8] c"test_ft_memchr\00"
@.str.2 = [51 x i8] c"should return the first ocurrence of c in string s\00"
@.str.3 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.4 = [26 x i8] c"expected %p to equal %p\0A\0A\00"
@.str.5 = [57 x i8] c"should return null if no such byte exists within n bytes\00"
define i32 @test_ft_memchr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memchr, i64 0, i64 5))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @_begin_assert()
%4 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 48, i32 5)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = icmp eq i8* %6, getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 1)
br i1 %7, label %15, label %8
8: ; preds = %0
%9 = tail call i32 (...) @_fail_test()
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%11 = 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_memchr, i64 0, i64 0), i32 144)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%13 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 48, i32 5)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 1))
br label %54
15: ; preds = %0
%16 = tail call i32 (...) @_begin_assert()
%17 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 108, i32 5)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
%20 = icmp eq i8* %19, getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 4)
br i1 %20, label %28, label %21
21: ; preds = %15
%22 = tail call i32 (...) @_fail_test()
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%24 = 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_memchr, i64 0, i64 0), i32 145)
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%26 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 108, i32 5)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 4))
br label %54
28: ; preds = %15
%29 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%30 = tail call i32 (...) @_begin_assert()
%31 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 48, i32 0)
%32 = icmp eq i32 %31, 0
br i1 %32, label %40, label %33
33: ; preds = %28
%34 = tail call i32 (...) @_fail_test()
%35 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%36 = 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_memchr, i64 0, i64 0), i32 148)
%37 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%38 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 48, i32 0)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %38, i8* null)
br label %54
40: ; preds = %28
%41 = tail call i32 (...) @_begin_assert()
%42 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 107, i32 5)
%43 = icmp eq i32 %42, 0
br i1 %43, label %51, label %44
44: ; preds = %40
%45 = tail call i32 (...) @_fail_test()
%46 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%47 = 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_memchr, i64 0, i64 0), i32 149)
%48 = tail call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
%49 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memchr to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 107, i32 5)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %49, i8* null)
br label %54
51: ; preds = %40
%52 = tail call i32 (...) @_close_pending()
%53 = tail call i32 @putchar(i32 10)
br label %54
54: ; preds = %51, %44, %33, %21, %8
%55 = phi i32 [ 1, %8 ], [ 1, %21 ], [ 1, %33 ], [ 1, %44 ], [ 0, %51 ]
ret i32 %55
}