#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void ut_change_EOL1toEOL2(char *beg, char *end) {
  if (!(beg < end)) {
    fprintf(stderr,
            "\nASSERT %s:%d: ******* Assertion "
            "beg<end"
            " failed! ******* \n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Amineahd/utrac/refs/heads/master/src/"
            "ut_recognition1.c",
            195);
  }
  if (!(*end == 0x0)) {
    fprintf(stderr,
            "\nASSERT %s:%d: ******* Assertion "
            "*end==UT_EOL_CHAR"
            " failed! ******* \n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Amineahd/utrac/refs/heads/master/src/"
            "ut_recognition1.c",
            196);
  }
  char *scan = beg;
  for (;;) {
    if (*scan == 0x0) {
      if (scan == end)
        return;
      *scan = 0xD;
    }
    scan++;
  }
}


x86 assembly (clang, -O0):
<ut_change_EOL1toEOL2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     114f <ut_change_EOL1toEOL2+0x3f>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
lea    0xef6(%rip),%rdx
mov    $0xc3,%ecx
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1180 <ut_change_EOL1toEOL2+0x70>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xf5d(%rip),%rsi
lea    0xec5(%rip),%rdx
mov    $0xc4,%ecx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11b3 <ut_change_EOL1toEOL2+0xa3>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    11ac <ut_change_EOL1toEOL2+0x9c>
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x18(%rbp),%rax
movb   $0xd,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1188 <ut_change_EOL1toEOL2+0x78>

x86 assembly (clang, -O2):
<ut_change_EOL1toEOL2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmp    %rsi,%rdi
jb     1140 <ut_change_EOL1toEOL2+0x30>
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
lea    0xf05(%rip),%rdx
mov    $0xc3,%ecx
call   1030 <fprintf@plt>
cmpb   $0x0,(%r14)
je     1174 <ut_change_EOL1toEOL2+0x64>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xf76(%rip),%rsi
lea    0xede(%rip),%rdx
mov    $0xc4,%ecx
call   1030 <fprintf@plt>
jmp    1174 <ut_change_EOL1toEOL2+0x64>
nopl   0x0(%rax)
add    $0x1,%rbx
cmpb   $0x0,(%rbx)
jne    1170 <ut_change_EOL1toEOL2+0x60>
cmp    %r14,%rbx
je     1183 <ut_change_EOL1toEOL2+0x73>
movb   $0xd,(%rbx)
jmp    1170 <ut_change_EOL1toEOL2+0x60>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"\0AASSERT %s:%d: ******* Assertion beg<end failed! ******* \0A\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Amineahd/utrac/refs/heads/master/src/ut_recognition1.c\00"
@.str.2 = [69 x i8] c"\0AASSERT %s:%d: ******* Assertion *end==UT_EOL_CHAR failed! ******* \0A\00"
define void @ut_change_EOL1toEOL2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = icmp ult i8* %6, %7
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 195)
br label %12
12: ; preds = %9, %2
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 196)
br label %20
20: ; preds = %17, %12
%21 = load i8*, i8** %3
store i8* %21, i8** %5
br label %22
22: ; preds = %34, %20
%23 = load i8*, i8** %5
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %22
%28 = load i8*, i8** %5
%29 = load i8*, i8** %4
%30 = icmp eq i8* %28, %29
br i1 %30, label %31, label %32
31: ; preds = %27
ret void
32: ; preds = %27
%33 = load i8*, i8** %5
store i8 13, i8* %33
br label %34
34: ; preds = %32, %22
%35 = load i8*, i8** %5
%36 = getelementptr inbounds i8, i8* %35, i32 1
store i8* %36, i8** %5
br label %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"\0AASSERT %s:%d: ******* Assertion beg<end failed! ******* \0A\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Amineahd/utrac/refs/heads/master/src/ut_recognition1.c\00"
@.str.2 = [69 x i8] c"\0AASSERT %s:%d: ******* Assertion *end==UT_EOL_CHAR failed! ******* \0A\00"
define void @ut_change_EOL1toEOL2(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 195)
br label %7
7: ; preds = %4, %2
%8 = load i8, i8* %1
%9 = icmp eq i8 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 196)
br label %13
13: ; preds = %10, %7
br label %14
14: ; preds = %13, %22
%15 = phi i8* [ %23, %22 ], [ %0, %13 ]
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = icmp eq i8* %15, %1
br i1 %19, label %20, label %21
20: ; preds = %18
ret void
21: ; preds = %18
store i8 13, i8* %15
br label %22
22: ; preds = %21, %14
%23 = getelementptr inbounds i8, i8* %15, i64 1
br label %14
}