int test_ft_bzero() {
  char dst[5];
  printf("%s\n", __func__ + 5);
  _it("should write n zeroed bytes to the string s");
  memset(dst, 1, 5);
  ft_bzero(dst, 0);
  do {
    _begin_assert();
    if (!(dst[0] != 0)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 66);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  memset(dst, 1, 5);
  ft_bzero(dst, 1);
  do {
    _begin_assert();
    if (!(dst[0] == 0)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 71);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _begin_assert();
    if (!(dst[1] != 0)) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 72);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  memset(dst, 1, 5);
  ft_bzero(dst, 2);
  do {
    _begin_assert();
    if (!(!dst[0] && !dst[1] && dst[2])) {
      _fail_test();
      do {
        _color(31);
        printf("\nfailure in %s() line %d\n", __func__, 77);
        _color(0);
      } while (0);
      return 1;
    }
  } while (0);
  do {
    _close_pending();
    printf("\n");
    return (0);
  } while (0);
}


x86 assembly (clang, -O0):
<test_ft_bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe71(%rip),%rdi
lea    0xe6e(%rip),%rsi
add    $0x5,%rsi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1090 <_it@plt>
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <memset@plt>
lea    -0x9(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <ft_bzero@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1225 <test_ft_bzero+0xa5>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xe41(%rip),%rdi
lea    0xe00(%rip),%rsi
mov    $0x42,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    13bb <test_ft_bzero+0x23b>
jmp    122a <test_ft_bzero+0xaa>
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <memset@plt>
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <ft_bzero@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
je     12a3 <test_ft_bzero+0x123>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xdc3(%rip),%rdi
lea    0xd82(%rip),%rsi
mov    $0x47,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    13bb <test_ft_bzero+0x23b>
jmp    12a8 <test_ft_bzero+0x128>
jmp    12ad <test_ft_bzero+0x12d>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
movsbl -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    1303 <test_ft_bzero+0x183>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xd63(%rip),%rdi
lea    0xd22(%rip),%rsi
mov    $0x48,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    13bb <test_ft_bzero+0x23b>
jmp    1308 <test_ft_bzero+0x188>
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <memset@plt>
lea    -0x9(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <ft_bzero@plt>
mov    $0x0,%al
call   1030 <_begin_assert@plt>
cmpb   $0x0,-0x9(%rbp)
jne    1353 <test_ft_bzero+0x1d3>
cmpb   $0x0,-0x8(%rbp)
jne    1353 <test_ft_bzero+0x1d3>
movsbl -0x7(%rbp),%eax
cmp    $0x0,%eax
jne    1395 <test_ft_bzero+0x215>
mov    $0x0,%al
call   10a0 <_fail_test@plt>
mov    $0x1f,%edi
mov    $0x0,%al
call   1080 <_color@plt>
lea    0xcd1(%rip),%rdi
lea    0xc90(%rip),%rsi
mov    $0x4d,%edx
mov    $0x0,%al
call   1060 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <_color@plt>
movl   $0x1,-0x4(%rbp)
jmp    13bb <test_ft_bzero+0x23b>
jmp    139a <test_ft_bzero+0x21a>
jmp    139f <test_ft_bzero+0x21f>
mov    $0x0,%al
call   1050 <_close_pending@plt>
lea    0xca9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ft_bzero>:
push   %rbx
sub    $0x10,%rsp
lea    0xe69(%rip),%rdi
call   1050 <puts@plt>
lea    0xe66(%rip),%rdi
xor    %eax,%eax
call   10a0 <_it@plt>
movl   $0x1010101,0x8(%rsp)
01
movb   $0x1,0xc(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <ft_bzero@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x0,0x8(%rsp)
je     1241 <test_ft_bzero+0xb1>
movb   $0x1,0xc(%rsp)
movl   $0x1010101,0x8(%rsp)
01
lea    0x8(%rsp),%rdi
mov    $0x1,%ebx
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <ft_bzero@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x0,0x8(%rsp)
je     1284 <test_ft_bzero+0xf4>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xe17(%rip),%rdi
lea    0xdd6(%rip),%rsi
mov    $0x47,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
jmp    127c <test_ft_bzero+0xec>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xddf(%rip),%rdi
lea    0xd9e(%rip),%rsi
mov    $0x42,%edx
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1090 <_color@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x0,0x9(%rsp)
je     12e1 <test_ft_bzero+0x151>
movb   $0x1,0xc(%rsp)
movl   $0x1010101,0x8(%rsp)
01
lea    0x8(%rsp),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <ft_bzero@plt>
xor    %eax,%eax
call   1040 <_begin_assert@plt>
cmpb   $0x0,0x8(%rsp)
jne    130c <test_ft_bzero+0x17c>
cmpb   $0x0,0x9(%rsp)
jne    130c <test_ft_bzero+0x17c>
cmpb   $0x0,0xa(%rsp)
je     130c <test_ft_bzero+0x17c>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <_close_pending@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    127c <test_ft_bzero+0xec>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd3f(%rip),%rdi
lea    0xcfe(%rip),%rsi
mov    $0x48,%edx
jmp    122f <test_ft_bzero+0x9f>
xor    %eax,%eax
call   10b0 <_fail_test@plt>
mov    $0x1f,%edi
xor    %eax,%eax
call   1090 <_color@plt>
lea    0xd14(%rip),%rdi
lea    0xcd3(%rip),%rsi
mov    $0x4d,%edx
jmp    122f <test_ft_bzero+0x9f>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.test_ft_bzero = [14 x i8] c"test_ft_bzero\00"
@.str.1 = [44 x i8] c"should write n zeroed bytes to the string s\00"
@.str.2 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @test_ft_bzero() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 5))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %6, i32 0)
br label %8
8: ; preds = %0
%9 = call i32 (...) @_begin_assert()
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %21, label %14
14: ; preds = %8
%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.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 66)
%19 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %20
20: ; preds = %16
store i32 1, i32* %1
br label %85
21: ; preds = %8
br label %22
22: ; preds = %21
%23 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%24 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%25 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %24, i32 1)
br label %26
26: ; preds = %22
%27 = call i32 (...) @_begin_assert()
%28 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 0
br i1 %31, label %39, label %32
32: ; preds = %26
%33 = call i32 (...) @_fail_test()
br label %34
34: ; preds = %32
%35 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 71)
%37 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %38
38: ; preds = %34
store i32 1, i32* %1
br label %85
39: ; preds = %26
br label %40
40: ; preds = %39
br label %41
41: ; preds = %40
%42 = call i32 (...) @_begin_assert()
%43 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 1
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp ne i32 %45, 0
br i1 %46, label %54, label %47
47: ; preds = %41
%48 = call i32 (...) @_fail_test()
br label %49
49: ; preds = %47
%50 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 72)
%52 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %53
53: ; preds = %49
store i32 1, i32* %1
br label %85
54: ; preds = %41
br label %55
55: ; preds = %54
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%57 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%58 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %57, i32 2)
br label %59
59: ; preds = %55
%60 = call i32 (...) @_begin_assert()
%61 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%62 = load i8, i8* %61
%63 = icmp ne i8 %62, 0
br i1 %63, label %73, label %64
64: ; preds = %59
%65 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 1
%66 = load i8, i8* %65
%67 = icmp ne i8 %66, 0
br i1 %67, label %73, label %68
68: ; preds = %64
%69 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 2
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp ne i32 %71, 0
br i1 %72, label %80, label %73
73: ; preds = %68, %64, %59
%74 = call i32 (...) @_fail_test()
br label %75
75: ; preds = %73
%76 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 77)
%78 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %79
79: ; preds = %75
store i32 1, i32* %1
br label %85
80: ; preds = %68
br label %81
81: ; preds = %80
br label %82
82: ; preds = %81
%83 = call i32 (...) @_close_pending()
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %85
85: ; preds = %20, %38, %53, %79, %82
%86 = load i32, i32* %1
ret i32 %86
}

LLVM IR (-O2):
@__func__.test_ft_bzero = [14 x i8] c"test_ft_bzero\00"
@.str.1 = [44 x i8] c"should write n zeroed bytes to the string s\00"
@.str.2 = [26 x i8] c"\0Afailure in %s() line %d\0A\00"
define i32 @test_ft_bzero() {
%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 ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 5))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_it to i32 (i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %2, i32 0)
%6 = call i32 (...) @_begin_assert()
%7 = load i8, i8* %2
%8 = icmp eq i8 %7, 0
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 ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 66)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %54
14: ; preds = %0
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %2, i32 1)
%16 = call i32 (...) @_begin_assert()
%17 = load i8, i8* %2
%18 = icmp eq i8 %17, 0
br i1 %18, label %24, label %19
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 ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 71)
%23 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %54
24: ; preds = %14
%25 = call i32 (...) @_begin_assert()
%26 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 0
br i1 %28, label %29, label %34
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 ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 72)
%33 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %54
34: ; preds = %24
%35 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @ft_bzero to i32 (i8*, i32, ...)*)(i8* %2, i32 2)
%36 = call i32 (...) @_begin_assert()
%37 = load i8, i8* %2
%38 = icmp eq i8 %37, 0
%39 = load i8, i8* %26
%40 = icmp eq i8 %39, 0
%41 = select i1 %38, i1 %40, i1 false
%42 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 2
%43 = load i8, i8* %42
%44 = icmp ne i8 %43, 0
%45 = select i1 %41, i1 %44, i1 false
br i1 %45, label %51, label %46
46: ; preds = %34
%47 = call i32 (...) @_fail_test()
%48 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 31)
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.test_ft_bzero, i64 0, i64 0), i32 77)
%50 = call i32 (i32, ...) bitcast (i32 (...)* @_color to i32 (i32, ...)*)(i32 0)
br label %54
51: ; preds = %34
%52 = call i32 (...) @_close_pending()
%53 = call i32 @putchar(i32 10)
br label %54
54: ; preds = %51, %46, %29, %19, %9
%55 = phi i32 [ 0, %51 ], [ 1, %46 ], [ 1, %29 ], [ 1, %19 ], [ 1, %9 ]
ret i32 %55
}