int test_ft_memset() {
  char src = 'a';
  char dst[5];
  printf("%s\n", __func__ + 5);
  _it("should write len bytes of value c to the string b");
  memset(dst, src + 1, 5);
  ft_memset(dst, src, 0);
  do {
    _begin_assert();
    if (!(dst[0] != src)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 29);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (!(dst[1] != src)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 30);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  memset(dst, src + 1, 5);
  ft_memset(dst, src, 1);
  do {
    _begin_assert();
    if (!(dst[0] == src)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 35);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (!(dst[1] != src)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 36);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  memset(dst, src + 1, 5);
  ft_memset(dst, src, 4);
  int i = -1;
  while (++i < 4)
    do {
      _begin_assert();
      if (!(dst[i] == src)) {
        _fail_test();
        do {
          _color(31);
          printf("\nfailure in %s() line %d\n", __func__, 43);
          _color(0);
        } while (0);
        return 1;
      }
    } while (0);
  do {
    _begin_assert();
    if (!(dst[4] != src)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 44);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  _it("return its first argument");
  do {
    _begin_assert();
    if (!(dst == ft_memset(dst, src, 0))) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 48);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (!(dst == ft_memset(dst, src, 1))) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 49);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (!(dst == ft_memset(dst, src, 4))) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 50);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _close_pending();
    printf("\n");
    return (0);
  } while (0);
}


x86 assembly (clang, -O0):
<test_ft_memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movb   $0x61,-0x5(%rbp)
lea    0xe6d(%rip),%rdi
lea    0xe6a(%rip),%rsi
add    $0x5,%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%edx
movzbl %al,%esi
call   1060 <memset@plt>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0xa(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1235 <test_ft_memset+0xb5>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xe38(%rip),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x1d,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    123a <test_ft_memset+0xba>
jmp    123f <test_ft_memset+0xbf>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x9(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1298 <test_ft_memset+0x118>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xdd5(%rip),%rdi
lea    0xd8d(%rip),%rsi
mov    $0x1e,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    129d <test_ft_memset+0x11d>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%edx
movzbl %al,%esi
call   1060 <memset@plt>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0xa(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
je     1322 <test_ft_memset+0x1a2>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xd4b(%rip),%rdi
lea    0xd03(%rip),%rsi
mov    $0x23,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    1327 <test_ft_memset+0x1a7>
jmp    132c <test_ft_memset+0x1ac>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x9(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1385 <test_ft_memset+0x205>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xce8(%rip),%rdi
lea    0xca0(%rip),%rsi
mov    $0x24,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    138a <test_ft_memset+0x20a>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%edx
movzbl %al,%esi
call   1060 <memset@plt>
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x4,%eax
jge    143c <test_ft_memset+0x2bc>
jmp    13d4 <test_ft_memset+0x254>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
je     1432 <test_ft_memset+0x2b2>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xc3b(%rip),%rdi
lea    0xbf3(%rip),%rsi
mov    $0x2b,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    1437 <test_ft_memset+0x2b7>
jmp    13bd <test_ft_memset+0x23d>
jmp    1441 <test_ft_memset+0x2c1>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    149a <test_ft_memset+0x31a>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xbd3(%rip),%rdi
lea    0xb8b(%rip),%rsi
mov    $0x2c,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    149f <test_ft_memset+0x31f>
lea    0xbb9(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
je     1521 <test_ft_memset+0x3a1>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xb4c(%rip),%rdi
lea    0xb04(%rip),%rsi
mov    $0x30,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    1526 <test_ft_memset+0x3a6>
jmp    152b <test_ft_memset+0x3ab>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
lea    -0xa(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
je     15a2 <test_ft_memset+0x422>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xacb(%rip),%rdi
lea    0xa83(%rip),%rsi
mov    $0x31,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    15a7 <test_ft_memset+0x427>
jmp    15ac <test_ft_memset+0x42c>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
lea    -0xa(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0xa(%rbp),%rdi
movsbl -0x5(%rbp),%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1070 <ft_memset@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
je     1623 <test_ft_memset+0x4a3>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xa4a(%rip),%rdi
lea    0xa02(%rip),%rsi
mov    $0x32,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    1649 <test_ft_memset+0x4c9>
jmp    1628 <test_ft_memset+0x4a8>
jmp    162d <test_ft_memset+0x4ad>
mov    $0x0,%al
call   1040 <_close_pending@plt>
lea    0xa22(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ft_memset>:
push   %r14
push   %rbx
push   %rax
lea    0xe6a(%rip),%rdi
call   1050 <puts@plt>
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
movl   $0x62626262,(%rsp)
movb   $0x62,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,(%rsp)
jne    1200 <test_ft_memset+0x70>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe4f(%rip),%rdi
lea    0xe07(%rip),%rsi
mov    $0x1d,%edx
jmp    1234 <test_ft_memset+0xa4>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x1(%rsp)
jne    124e <test_ft_memset+0xbe>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe19(%rip),%rdi
lea    0xdd1(%rip),%rsi
mov    $0x1e,%edx
xor    %eax,%eax
call   1070 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
mov    $0x1,%ebx
jmp    13aa <test_ft_memset+0x21a>
movb   $0x62,0x4(%rsp)
movl   $0x62626262,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%ebx
mov    $0x61,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,(%rsp)
jne    12b9 <test_ft_memset+0x129>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x1(%rsp)
jne    12e4 <test_ft_memset+0x154>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd99(%rip),%rdi
lea    0xd51(%rip),%rsi
mov    $0x24,%edx
jmp    139a <test_ft_memset+0x20a>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd6e(%rip),%rdi
lea    0xd26(%rip),%rsi
mov    $0x23,%edx
jmp    139a <test_ft_memset+0x20a>
movb   $0x62,0x4(%rsp)
movl   $0x62626262,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,(%rsp)
jne    1374 <test_ft_memset+0x1e4>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x1(%rsp)
jne    1374 <test_ft_memset+0x1e4>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x2(%rsp)
jne    1374 <test_ft_memset+0x1e4>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x3(%rsp)
jne    1374 <test_ft_memset+0x1e4>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x61,0x4(%rsp)
jne    13b4 <test_ft_memset+0x224>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xcdb(%rip),%rdi
lea    0xc93(%rip),%rsi
mov    $0x2c,%edx
jmp    139a <test_ft_memset+0x20a>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xcb3(%rip),%rdi
lea    0xc6b(%rip),%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1070 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xca0(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
mov    %r14,%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
cltq
cmp    %rax,%r14
je     1409 <test_ft_memset+0x279>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xc46(%rip),%rdi
lea    0xbfe(%rip),%rsi
mov    $0x30,%edx
jmp    139a <test_ft_memset+0x20a>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
mov    $0x1,%ebx
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
cltq
cmp    %rax,%r14
je     145b <test_ft_memset+0x2cb>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xbf7(%rip),%rdi
lea    0xbaf(%rip),%rsi
mov    $0x31,%edx
jmp    139a <test_ft_memset+0x20a>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1080 <ft_memset@plt>
cltq
cmp    %rax,%r14
je     14a8 <test_ft_memset+0x318>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xbaa(%rip),%rdi
lea    0xb62(%rip),%rsi
mov    $0x32,%edx
jmp    139a <test_ft_memset+0x20a>
xor    %eax,%eax
call   1060 <_close_pending@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
jmp    13aa <test_ft_memset+0x21a>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.test_ft_memset = [15 x i8] c"test_ft_memset\00"
@.str.1 = [50 x i8] c"should write len bytes of value c to the string b\00"
@.str.2 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.3 = [26 x i8] c"return its first argument\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @test_ft_memset() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [5 x i8]
%4 = alloca i32
store i8 97, i8* %2
%5 = 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_memset, i64 0, i64 5))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, 1
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %12, i32 %14, i32 0)
br label %16
16: ; preds = %0
%17 = call i32 (...) @_begin_assert()
%18 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %20, %22
br i1 %23, label %31, label %24
24: ; preds = %16
%25 = call i32 (...) @_fail_test()
br label %26
26: ; preds = %24
%27 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 29)
%29 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %30
30: ; preds = %26
store i32 1, i32* %1
br label %205
31: ; preds = %16
br label %32
32: ; preds = %31
br label %33
33: ; preds = %32
%34 = call i32 (...) @_begin_assert()
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 1
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = load i8, i8* %2
%39 = sext i8 %38 to i32
%40 = icmp ne i32 %37, %39
br i1 %40, label %48, label %41
41: ; preds = %33
%42 = call i32 (...) @_fail_test()
br label %43
43: ; preds = %41
%44 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 30)
%46 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %47
47: ; preds = %43
store i32 1, i32* %1
br label %205
48: ; preds = %33
br label %49
49: ; preds = %48
%50 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%51 = load i8, i8* %2
%52 = sext i8 %51 to i32
%53 = add nsw i32 %52, 1
%54 = trunc i32 %53 to i8
%55 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%56 = load i8, i8* %2
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %55, i32 %57, i32 1)
br label %59
59: ; preds = %49
%60 = call i32 (...) @_begin_assert()
%61 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = load i8, i8* %2
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %63, %65
br i1 %66, label %74, label %67
67: ; preds = %59
%68 = call i32 (...) @_fail_test()
br label %69
69: ; preds = %67
%70 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 35)
%72 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %73
73: ; preds = %69
store i32 1, i32* %1
br label %205
74: ; preds = %59
br label %75
75: ; preds = %74
br label %76
76: ; preds = %75
%77 = call i32 (...) @_begin_assert()
%78 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 1
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = load i8, i8* %2
%82 = sext i8 %81 to i32
%83 = icmp ne i32 %80, %82
br i1 %83, label %91, label %84
84: ; preds = %76
%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.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 36)
%89 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %90
90: ; preds = %86
store i32 1, i32* %1
br label %205
91: ; preds = %76
br label %92
92: ; preds = %91
%93 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%94 = load i8, i8* %2
%95 = sext i8 %94 to i32
%96 = add nsw i32 %95, 1
%97 = trunc i32 %96 to i8
%98 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%99 = load i8, i8* %2
%100 = sext i8 %99 to i32
%101 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %98, i32 %100, i32 4)
store i32 -1, i32* %4
br label %102
102: ; preds = %125, %92
%103 = load i32, i32* %4
%104 = add nsw i32 %103, 1
store i32 %104, i32* %4
%105 = icmp slt i32 %104, 4
br i1 %105, label %106, label %126
106: ; preds = %102
br label %107
107: ; preds = %106
%108 = call i32 (...) @_begin_assert()
%109 = load i32, i32* %4
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %110
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = load i8, i8* %2
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %113, %115
br i1 %116, label %124, label %117
117: ; preds = %107
%118 = call i32 (...) @_fail_test()
br label %119
119: ; preds = %117
%120 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 43)
%122 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %123
123: ; preds = %119
store i32 1, i32* %1
br label %205
124: ; preds = %107
br label %125
125: ; preds = %124
br label %102
126: ; preds = %102
br label %127
127: ; preds = %126
%128 = call i32 (...) @_begin_assert()
%129 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 4
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = load i8, i8* %2
%133 = sext i8 %132 to i32
%134 = icmp ne i32 %131, %133
br i1 %134, label %142, label %135
135: ; preds = %127
%136 = call i32 (...) @_fail_test()
br label %137
137: ; preds = %135
%138 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 44)
%140 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %141
141: ; preds = %137
store i32 1, i32* %1
br label %205
142: ; preds = %127
br label %143
143: ; preds = %142
%144 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %145
145: ; preds = %143
%146 = call i32 (...) @_begin_assert()
%147 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%148 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%149 = load i8, i8* %2
%150 = sext i8 %149 to i32
%151 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %148, i32 %150, i32 0)
%152 = sext i32 %151 to i64
%153 = inttoptr i64 %152 to i8*
%154 = icmp eq i8* %147, %153
br i1 %154, label %162, label %155
155: ; preds = %145
%156 = call i32 (...) @_fail_test()
br label %157
157: ; preds = %155
%158 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 48)
%160 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %161
161: ; preds = %157
store i32 1, i32* %1
br label %205
162: ; preds = %145
br label %163
163: ; preds = %162
br label %164
164: ; preds = %163
%165 = call i32 (...) @_begin_assert()
%166 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%167 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%168 = load i8, i8* %2
%169 = sext i8 %168 to i32
%170 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %167, i32 %169, i32 1)
%171 = sext i32 %170 to i64
%172 = inttoptr i64 %171 to i8*
%173 = icmp eq i8* %166, %172
br i1 %173, label %181, label %174
174: ; preds = %164
%175 = call i32 (...) @_fail_test()
br label %176
176: ; preds = %174
%177 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 49)
%179 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %180
180: ; preds = %176
store i32 1, i32* %1
br label %205
181: ; preds = %164
br label %182
182: ; preds = %181
br label %183
183: ; preds = %182
%184 = call i32 (...) @_begin_assert()
%185 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%186 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%187 = load i8, i8* %2
%188 = sext i8 %187 to i32
%189 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %186, i32 %188, i32 4)
%190 = sext i32 %189 to i64
%191 = inttoptr i64 %190 to i8*
%192 = icmp eq i8* %185, %191
br i1 %192, label %200, label %193
193: ; preds = %183
%194 = call i32 (...) @_fail_test()
br label %195
195: ; preds = %193
%196 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 50)
%198 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %199
199: ; preds = %195
store i32 1, i32* %1
br label %205
200: ; preds = %183
br label %201
201: ; preds = %200
br label %202
202: ; preds = %201
%203 = call i32 (...) @_close_pending()
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %205
205: ; preds = %30, %47, %73, %90, %123, %141, %161, %180, %199, %202
%206 = load i32, i32* %1
ret i32 %206
}

LLVM IR (-O2):
@__func__.test_ft_memset = [15 x i8] c"test_ft_memset\00"
@.str.1 = [50 x i8] c"should write len bytes of value c to the string b\00"
@.str.2 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.3 = [26 x i8] c"return its first argument\00"
define i32 @test_ft_memset() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 5))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 0)
%6 = call i32 (...) @_begin_assert()
%7 = load i8, i8* %2
%8 = icmp eq i8 %7, 97
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = call i32 (...) @_fail_test()
%11 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 29)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
14: ; preds = %0
%15 = call i32 (...) @_begin_assert()
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 97
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = call i32 (...) @_fail_test()
%21 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 30)
%23 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
24: ; preds = %14
%25 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 1)
%26 = call i32 (...) @_begin_assert()
%27 = load i8, i8* %2
%28 = icmp eq i8 %27, 97
br i1 %28, label %34, label %29
29: ; preds = %24
%30 = call i32 (...) @_fail_test()
%31 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 35)
%33 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
34: ; preds = %24
%35 = call i32 (...) @_begin_assert()
%36 = load i8, i8* %16
%37 = icmp eq i8 %36, 97
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = call i32 (...) @_fail_test()
%40 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 36)
%42 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
43: ; preds = %34
%44 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 4)
%45 = call i32 (...) @_begin_assert()
%46 = load i8, i8* %2
%47 = icmp eq i8 %46, 97
br i1 %47, label %48, label %62
48: ; preds = %43
%49 = call i32 (...) @_begin_assert()
%50 = load i8, i8* %16
%51 = icmp eq i8 %50, 97
br i1 %51, label %52, label %62
52: ; preds = %48
%53 = call i32 (...) @_begin_assert()
%54 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 2
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 97
br i1 %56, label %57, label %62
57: ; preds = %52
%58 = call i32 (...) @_begin_assert()
%59 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 3
%60 = load i8, i8* %59
%61 = icmp eq i8 %60, 97
br i1 %61, label %67, label %62
62: ; preds = %57, %52, %48, %43
%63 = call i32 (...) @_fail_test()
%64 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 43)
%66 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
67: ; preds = %57
%68 = call i32 (...) @_begin_assert()
%69 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 4
%70 = load i8, i8* %69
%71 = icmp eq i8 %70, 97
br i1 %71, label %72, label %77
72: ; preds = %67
%73 = call i32 (...) @_fail_test()
%74 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 44)
%76 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
77: ; preds = %67
%78 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%79 = call i32 (...) @_begin_assert()
%80 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 0)
%81 = sext i32 %80 to i64
%82 = inttoptr i64 %81 to i8*
%83 = icmp eq i8* %2, %82
br i1 %83, label %89, label %84
84: ; preds = %77
%85 = call i32 (...) @_fail_test()
%86 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 48)
%88 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
89: ; preds = %77
%90 = call i32 (...) @_begin_assert()
%91 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 1)
%92 = sext i32 %91 to i64
%93 = inttoptr i64 %92 to i8*
%94 = icmp eq i8* %2, %93
br i1 %94, label %100, label %95
95: ; preds = %89
%96 = call i32 (...) @_fail_test()
%97 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 49)
%99 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
100: ; preds = %89
%101 = call i32 (...) @_begin_assert()
%102 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @ft_memset to i32 (i8*, i32, i32, ...)*)(i8* %2, i32 97, i32 4)
%103 = sext i32 %102 to i64
%104 = inttoptr i64 %103 to i8*
%105 = icmp eq i8* %2, %104
br i1 %105, label %111, label %106
106: ; preds = %100
%107 = call i32 (...) @_fail_test()
%108 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.test_ft_memset, i64 0, i64 0), i32 50)
%110 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %114
111: ; preds = %100
%112 = call i32 (...) @_close_pending()
%113 = call i32 @putchar(i32 10)
br label %114
114: ; preds = %62, %72, %84, %95, %106, %111, %38, %29, %19, %9
%115 = phi i32 [ 1, %38 ], [ 1, %29 ], [ 1, %19 ], [ 1, %9 ], [ 1, %62 ], [ 0, %111 ], [ 1, %106 ], [ 1, %95 ], [ 1, %84 ], [ 1, %72 ]
ret i32 %115
}