void test_bytes(char *string, int n_bytes, int thread_id) {
  if ((__builtin_expect(!!((0xffff) <= 0xffff), 0)))
    _log_write(__FUNCTION__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/ashish-17/wfmalloc/refs/"
               "heads/master/src/main.c",
               527, 0xffff, 0, "");
  ;
  ;
  char start = 'a' + thread_id;
  int i = 0;
  for (i = 0; i < n_bytes; i++) {
    assert(string[i] == start);
    start++;
  }
  if ((__builtin_expect(!!((0xffff) <= 0xffff), 0)))
    _log_write(__FUNCTION__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/ashish-17/wfmalloc/refs/"
               "heads/master/src/main.c",
               534, 0xffff, 1, "");
  ;
  ;
}


x86 assembly (clang, -O0):
<test_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xec7(%rip),%rdi
lea    0xecb(%rip),%rsi
mov    $0x20f,%edx
mov    $0xffff,%ecx
xor    %r8d,%r8d
lea    0xf40(%rip),%r9
mov    $0x0,%al
call   1030 <_log_write@plt>
mov    -0x10(%rbp),%eax
add    $0x61,%eax
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b5 <test_bytes+0x95>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1172 <test_bytes+0x52>
lea    0xe44(%rip),%rdi
lea    0xe48(%rip),%rsi
mov    $0x216,%edx
mov    $0xffff,%ecx
mov    $0x1,%r8d
lea    0xeba(%rip),%r9
mov    $0x0,%al
call   1030 <_log_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bytes>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r15d
mov    %esi,%r14d
mov    %rdi,%r12
lea    0xec8(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xf4e(%rip),%r9
mov    $0x20f,%edx
mov    $0xffff,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <_log_write@plt>
test   %r14d,%r14d
jle    118d <test_bytes+0x6d>
add    $0x61,%r15b
mov    %r14d,%r14d
movzbl %r15b,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
lea    (%rbx,%rbp,1),%eax
xor    %edi,%edi
cmp    (%r12,%rbp,1),%al
sete   %dil
xor    %eax,%eax
call   1040 <assert@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1170 <test_bytes+0x50>
lea    0xe6c(%rip),%rdi
lea    0xe70(%rip),%rsi
lea    0xef2(%rip),%r9
mov    $0x216,%edx
mov    $0xffff,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <_log_write@plt>

LLVM IR (-O0):
@__FUNCTION__.test_bytes = [11 x i8] c"test_bytes\00"
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ashish-17/wfmalloc/refs/heads/master/src/main.c\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test_bytes(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 527, i32 65535, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %6
%11 = add nsw i32 97, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %7
store i32 0, i32* %8
store i32 0, i32* %8
br label %13
13: ; preds = %31, %3
%14 = load i32, i32* %8
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %34
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = load i8, i8* %7
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %23, %25
%27 = zext i1 %26 to i32
%28 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %27)
%29 = load i8, i8* %7
%30 = add i8 %29, 1
store i8 %30, i8* %7
br label %31
31: ; preds = %17
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %13
34: ; preds = %13
%35 = call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 534, i32 65535, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.test_bytes = [11 x i8] c"test_bytes\00"
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ashish-17/wfmalloc/refs/heads/master/src/main.c\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test_bytes(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 527, i32 65535, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = trunc i32 %2 to i8
%8 = add i8 %7, 97
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %6, %10
%11 = phi i64 [ 0, %6 ], [ %19, %10 ]
%12 = phi i8 [ %8, %6 ], [ %18, %10 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %11
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, %12
%16 = zext i1 %15 to i32
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %16)
%18 = add i8 %12, 1
%19 = add nuw nsw i64 %11, 1
%20 = icmp eq i64 %19, %9
br i1 %20, label %21, label %10
21: ; preds = %10, %3
%22 = tail call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 534, i32 65535, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}