void test_arrays_equal() {
  unsigned char expected_bytes[] = {1, 2, 3};
  unsigned char buffer[5];
  int i;
  for (i = 0; i < 5; i++)
    buffer[i] = i + 1;
  do {
    int seatest_count;
    for (seatest_count = 0; seatest_count < 3; seatest_count++) {
      char s_seatest[100000];
      sprintf(s_seatest, "Expected %d to be %d at position %d",
              buffer[seatest_count], expected_bytes[seatest_count],
              seatest_count);
      seatest_simple_test_result(
          (expected_bytes[seatest_count] == buffer[seatest_count]), s_seatest,
          __FUNCTION__, 19);
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_arrays_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186b0,%rsp
mov    0xece(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    116e <test_arrays_equal+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %al,%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x8(%rbp,%rax,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <test_arrays_equal+0x26>
jmp    1173 <test_arrays_equal+0x53>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    11f3 <test_arrays_equal+0xd3>
lea    -0x186b0(%rbp),%rdi
movslq -0x10(%rbp),%rax
movzbl -0x8(%rbp,%rax,1),%edx
movslq -0x10(%rbp),%rax
movzbl -0x3(%rbp,%rax,1),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe5b(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
movslq -0x10(%rbp),%rax
movzbl -0x3(%rbp,%rax,1),%eax
movslq -0x10(%rbp),%rcx
movzbl -0x8(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    -0x186b0(%rbp),%rsi
lea    0xe4e(%rip),%rdx
mov    $0x13,%ecx
mov    $0x0,%al
call   1030 <seatest_simple_test_result@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117a <test_arrays_equal+0x5a>
jmp    11f8 <test_arrays_equal+0xd8>
add    $0x186b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_arrays_equal>:
push   %r15
push   %r14
push   %rbx
sub    $0x186a0,%rsp
lea    0xecd(%rip),%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xecd(%rip),%r15
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x13,%ecx
xor    %eax,%eax
call   1030 <seatest_simple_test_result@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x13,%ecx
xor    %eax,%eax
call   1030 <seatest_simple_test_result@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
mov    $0x3,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x13,%ecx
xor    %eax,%eax
call   1030 <seatest_simple_test_result@plt>
add    $0x186a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.test_arrays_equal.expected_bytes = [3 x i8] c"\01\02\03"
@.str = [36 x i8] c"Expected %d to be %d at position %d\00"
@__FUNCTION__.test_arrays_equal = [18 x i8] c"test_arrays_equal\00"
define void @test_arrays_equal() {
%1 = alloca [3 x i8]
%2 = alloca [5 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100000 x i8]
%6 = bitcast [3 x i8]* %1 to i8*
store i32 0, i32* %3
br label %7
7: ; preds = %17, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = trunc i32 %12 to i8
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 %15
store i8 %13, i8* %16
br label %17
17: ; preds = %10
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %7
20: ; preds = %7
br label %21
21: ; preds = %20
store i32 0, i32* %4
br label %22
22: ; preds = %53, %21
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 3
br i1 %24, label %25, label %56
25: ; preds = %22
%26 = getelementptr inbounds [100000 x i8], [100000 x i8]* %5, i64 0, i64 0
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = load i32, i32* %4
%38 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %31, i32 %36, i32 %37)
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = load i32, i32* %4
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = icmp eq i32 %43, %48
%50 = zext i1 %49 to i32
%51 = getelementptr inbounds [100000 x i8], [100000 x i8]* %5, i64 0, i64 0
%52 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 %50, i8* %51, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.test_arrays_equal, i64 0, i64 0), i32 19)
br label %53
53: ; preds = %25
%54 = load i32, i32* %4
%55 = add nsw i32 %54, 1
store i32 %55, i32* %4
br label %22
56: ; preds = %22
br label %57
57: ; preds = %56
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Expected %d to be %d at position %d\00"
@__FUNCTION__.test_arrays_equal = [18 x i8] c"test_arrays_equal\00"
define void @test_arrays_equal() {
%1 = alloca [100000 x i8]
%2 = getelementptr inbounds [100000 x i8], [100000 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
%4 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.test_arrays_equal, i64 0, i64 0), i32 19)
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 2, i32 2, i32 1)
%6 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.test_arrays_equal, i64 0, i64 0), i32 19)
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 3, i32 3, i32 2)
%8 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.test_arrays_equal, i64 0, i64 0), i32 19)
ret void
}