void write_to_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",
               516, 0xffff, 0, "");
  ;
  ;
  char start = 'a' + thread_id;
  int i = 0;
  for (i = 0; i < n_bytes; i++) {
    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",
               523, 0xffff, 1, "");
  ;
  ;
}


x86 assembly (clang, -O0):
<write_to_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xed7(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x204,%edx
mov    $0xffff,%ecx
xor    %r8d,%r8d
lea    0xf54(%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    1192 <write_to_bytes+0x82>
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1162 <write_to_bytes+0x52>
lea    0xe67(%rip),%rdi
lea    0xe6f(%rip),%rsi
mov    $0x20b,%edx
mov    $0xffff,%ecx
mov    $0x1,%r8d
lea    0xee1(%rip),%r9
mov    $0x0,%al
call   1030 <_log_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_bytes>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xf6d(%rip),%rdi
lea    0xf75(%rip),%rsi
lea    0xff7(%rip),%r9
mov    $0x204,%edx
mov    $0xffff,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <_log_write@plt>
test   %ebp,%ebp
jle    12e0 <write_to_bytes+0x1d0>
add    $0x61,%r14b
mov    %ebp,%eax
cmp    $0x20,%ebp
jae    115f <write_to_bytes+0x4f>
xor    %ecx,%ecx
jmp    12b8 <write_to_bytes+0x1a8>
mov    %eax,%ecx
and    $0xffffffe0,%ecx
movzbl %r14b,%edx
movd   %edx,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddb  0xe7e(%rip),%xmm0
lea    -0x20(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x5,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x60,%rdi
jae    11a3 <write_to_bytes+0x93>
xor    %edi,%edi
jmp    1268 <write_to_bytes+0x158>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
movdqa 0xe5e(%rip),%xmm8
movdqa 0xe65(%rip),%xmm9
movdqa 0xe6c(%rip),%xmm10
movdqa 0xe74(%rip),%xmm4
movdqa 0xe7c(%rip),%xmm5
movdqa 0xe84(%rip),%xmm6
movdqa 0xe8c(%rip),%xmm7
movdqa 0xe94(%rip),%xmm1
nopl   0x0(%rax)
movdqa %xmm0,%xmm2
paddb  %xmm8,%xmm2
movdqu %xmm0,(%rbx,%rdi,1)
movdqu %xmm2,0x10(%rbx,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm10,%xmm3
movdqu %xmm2,0x20(%rbx,%rdi,1)
movdqu %xmm3,0x30(%rbx,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm5,%xmm3
movdqu %xmm2,0x40(%rbx,%rdi,1)
movdqu %xmm3,0x50(%rbx,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm7,%xmm3
movdqu %xmm2,0x60(%rbx,%rdi,1)
movdqu %xmm3,0x70(%rbx,%rdi,1)
sub    $0xffffffffffffff80,%rdi
pxor   %xmm1,%xmm0
add    $0xfffffffffffffffc,%rsi
jne    11f0 <write_to_bytes+0xe0>
test   %rdx,%rdx
je     12b0 <write_to_bytes+0x1a0>
lea    (%rdi,%rbx,1),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movdqa 0xd8d(%rip),%xmm1
movdqa 0xd95(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddb  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rsi,%rdi,1)
movdqu %xmm3,(%rsi,%rdi,1)
paddb  %xmm2,%xmm0
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1290 <write_to_bytes+0x180>
cmp    %rax,%rcx
je     12e0 <write_to_bytes+0x1d0>
add    %cl,%r14b
add    %rcx,%rbx
sub    %rcx,%rax
movzbl %r14b,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rcx,%rdx,1),%esi
mov    %sil,(%rbx,%rdx,1)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    12d0 <write_to_bytes+0x1c0>
lea    0xda9(%rip),%rdi
lea    0xdb1(%rip),%rsi
lea    0xe33(%rip),%r9
mov    $0x20b,%edx
mov    $0xffff,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_log_write@plt>

LLVM IR (-O0):
@__FUNCTION__.write_to_bytes = [15 x i8] c"write_to_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 @write_to_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 ([15 x i8], [15 x i8]* @__FUNCTION__.write_to_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 516, 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 = %25, %3
%14 = load i32, i32* %8
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %28
17: ; preds = %13
%18 = load i8, i8* %7
%19 = load i8*, i8** %4
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 %18, i8* %22
%23 = load i8, i8* %7
%24 = add i8 %23, 1
store i8 %24, i8* %7
br label %25
25: ; preds = %17
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
br label %13
28: ; preds = %13
%29 = call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.write_to_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 523, 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__.write_to_bytes = [15 x i8] c"write_to_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 @write_to_bytes(i8* nocapture writeonly %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 ([15 x i8], [15 x i8]* @__FUNCTION__.write_to_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 516, 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 %88
6: ; preds = %3
%7 = trunc i32 %2 to i8
%8 = add i8 %7, 97
%9 = zext i32 %1 to i64
%10 = icmp ult i32 %1, 32
br i1 %10, label %78, label %11
11: ; preds = %6
%12 = and i64 %9, 4294967264
%13 = trunc i64 %12 to i8
%14 = add i8 %8, %13
%15 = insertelement <16 x i8> poison, i8 %8, i64 0
%16 = shufflevector <16 x i8> %15, <16 x i8> poison, <16 x i32> zeroinitializer
%17 = add <16 x i8> %16, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
%18 = add nsw i64 %12, -32
%19 = lshr exact i64 %18, 5
%20 = add nuw nsw i64 %19, 1
%21 = and i64 %20, 3
%22 = icmp ult i64 %18, 96
br i1 %22, label %59, label %23
23: ; preds = %11
%24 = and i64 %20, 1152921504606846972
br label %25
25: ; preds = %25, %23
%26 = phi i64 [ 0, %23 ], [ %55, %25 ]
%27 = phi <16 x i8> [ %17, %23 ], [ %56, %25 ]
%28 = phi i64 [ 0, %23 ], [ %57, %25 ]
%29 = add <16 x i8> %27, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
%30 = getelementptr inbounds i8, i8* %0, i64 %26
%31 = bitcast i8* %30 to <16 x i8>*
store <16 x i8> %27, <16 x i8>* %31
%32 = getelementptr inbounds i8, i8* %30, i64 16
%33 = bitcast i8* %32 to <16 x i8>*
store <16 x i8> %29, <16 x i8>* %33
%34 = or i64 %26, 32
%35 = add <16 x i8> %27, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%36 = add <16 x i8> %27, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
%37 = getelementptr inbounds i8, i8* %0, i64 %34
%38 = bitcast i8* %37 to <16 x i8>*
store <16 x i8> %35, <16 x i8>* %38
%39 = getelementptr inbounds i8, i8* %37, i64 16
%40 = bitcast i8* %39 to <16 x i8>*
store <16 x i8> %36, <16 x i8>* %40
%41 = or i64 %26, 64
%42 = add <16 x i8> %27, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
%43 = add <16 x i8> %27, <i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80>
%44 = getelementptr inbounds i8, i8* %0, i64 %41
%45 = bitcast i8* %44 to <16 x i8>*
store <16 x i8> %42, <16 x i8>* %45
%46 = getelementptr inbounds i8, i8* %44, i64 16
%47 = bitcast i8* %46 to <16 x i8>*
store <16 x i8> %43, <16 x i8>* %47
%48 = or i64 %26, 96
%49 = add <16 x i8> %27, <i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96>
%50 = add <16 x i8> %27, <i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112>
%51 = getelementptr inbounds i8, i8* %0, i64 %48
%52 = bitcast i8* %51 to <16 x i8>*
store <16 x i8> %49, <16 x i8>* %52
%53 = getelementptr inbounds i8, i8* %51, i64 16
%54 = bitcast i8* %53 to <16 x i8>*
store <16 x i8> %50, <16 x i8>* %54
%55 = add nuw i64 %26, 128
%56 = xor <16 x i8> %27, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>
%57 = add i64 %28, 4
%58 = icmp eq i64 %57, %24
br i1 %58, label %59, label %25
59: ; preds = %25, %11
%60 = phi i64 [ 0, %11 ], [ %55, %25 ]
%61 = phi <16 x i8> [ %17, %11 ], [ %56, %25 ]
%62 = icmp eq i64 %21, 0
br i1 %62, label %76, label %63
63: ; preds = %59, %63
%64 = phi i64 [ %72, %63 ], [ %60, %59 ]
%65 = phi <16 x i8> [ %73, %63 ], [ %61, %59 ]
%66 = phi i64 [ %74, %63 ], [ 0, %59 ]
%67 = add <16 x i8> %65, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
%68 = getelementptr inbounds i8, i8* %0, i64 %64
%69 = bitcast i8* %68 to <16 x i8>*
store <16 x i8> %65, <16 x i8>* %69
%70 = getelementptr inbounds i8, i8* %68, i64 16
%71 = bitcast i8* %70 to <16 x i8>*
store <16 x i8> %67, <16 x i8>* %71
%72 = add nuw i64 %64, 32
%73 = add <16 x i8> %65, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%74 = add i64 %66, 1
%75 = icmp eq i64 %74, %21
br i1 %75, label %76, label %63
76: ; preds = %63, %59
%77 = icmp eq i64 %12, %9
br i1 %77, label %88, label %78
78: ; preds = %6, %76
%79 = phi i64 [ 0, %6 ], [ %12, %76 ]
%80 = phi i8 [ %8, %6 ], [ %14, %76 ]
br label %81
81: ; preds = %78, %81
%82 = phi i64 [ %86, %81 ], [ %79, %78 ]
%83 = phi i8 [ %85, %81 ], [ %80, %78 ]
%84 = getelementptr inbounds i8, i8* %0, i64 %82
store i8 %83, i8* %84
%85 = add i8 %83, 1
%86 = add nuw nsw i64 %82, 1
%87 = icmp eq i64 %86, %9
br i1 %87, label %88, label %81
88: ; preds = %81, %76, %3
%89 = tail call i32 (i8*, i8*, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @_log_write to i32 (i8*, i8*, i32, i32, i32, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.write_to_bytes, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 523, i32 65535, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}