#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*/ test(char *, int, char *, int, int);
int main(void) {
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       24, "", 1, 0x00000000);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       25, "abc", 1, 0x00000061);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       26, "б", 2, 0x00000431);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       27, "￥", 3, 0x0000FFE5);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       32, "\xFF", -1, -1);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       33, "\xEF\xFF", -1, -1);
  test("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c",
       34, "\xEF\xBF\xFE", -2, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x18,%esi
lea    0xf53(%rip),%rdx
mov    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <test@plt>
lea    0xeba(%rip),%rdi
mov    $0x19,%esi
lea    0xf34(%rip),%rdx
mov    $0x1,%ecx
mov    $0x61,%r8d
call   1030 <test@plt>
lea    0xe97(%rip),%rdi
mov    $0x1a,%esi
lea    0xf15(%rip),%rdx
mov    $0x2,%ecx
mov    $0x431,%r8d
call   1030 <test@plt>
lea    0xe74(%rip),%rdi
mov    $0x1b,%esi
lea    0xef5(%rip),%rdx
mov    $0x3,%ecx
mov    $0xffe5,%r8d
call   1030 <test@plt>
lea    0xe51(%rip),%rdi
mov    $0x20,%esi
lea    0xed7(%rip),%rdx
mov    $0xffffffff,%r8d
mov    %r8d,%ecx
call   1030 <test@plt>
lea    0xe30(%rip),%rdi
mov    $0x21,%esi
lea    0xeb5(%rip),%rdx
mov    $0xffffffff,%r8d
mov    %r8d,%ecx
call   1030 <test@plt>
lea    0xe0f(%rip),%rdi
mov    $0x22,%esi
lea    0xe97(%rip),%rdx
mov    $0xfffffffe,%ecx
mov    $0xffffffff,%r8d
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xf66(%rip),%rdx
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <test@plt>
lea    0xf4b(%rip),%rdx
mov    %rbx,%rdi
mov    $0x19,%esi
mov    $0x1,%ecx
mov    $0x61,%r8d
call   1030 <test@plt>
lea    0xf30(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1a,%esi
mov    $0x2,%ecx
mov    $0x431,%r8d
call   1030 <test@plt>
lea    0xf14(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1b,%esi
mov    $0x3,%ecx
mov    $0xffe5,%r8d
call   1030 <test@plt>
lea    0xefa(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
call   1030 <test@plt>
lea    0xeda(%rip),%rdx
mov    %rbx,%rdi
mov    $0x21,%esi
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
call   1030 <test@plt>
lea    0xebe(%rip),%rdx
mov    %rbx,%rdi
mov    $0x22,%esi
mov    $0xfffffffe,%ecx
mov    $0xffffffff,%r8d
call   1030 <test@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [4 x i8] c"abc\00"
@.str.3 = [3 x i8] c"\D0\B1\00"
@.str.4 = [4 x i8] c"\EF\BF\A5\00"
@.str.5 = [2 x i8] c"\FF\00"
@.str.6 = [3 x i8] c"\EF\FF\00"
@.str.7 = [4 x i8] c"\EF\BF\FE\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0)
%3 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 97)
%4 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2, i32 1073)
%5 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3, i32 65509)
%6 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 -1, i32 -1)
%7 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -1, i32 -1)
%8 = call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 -2, i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/arsv/u2ps/refs/heads/master/test/ct_deutf.c\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [4 x i8] c"abc\00"
@.str.3 = [3 x i8] c"\D0\B1\00"
@.str.4 = [4 x i8] c"\EF\BF\A5\00"
@.str.5 = [2 x i8] c"\FF\00"
@.str.6 = [3 x i8] c"\EF\FF\00"
@.str.7 = [4 x i8] c"\EF\BF\FE\00"
define i32 @main() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0)
%2 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 97)
%3 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2, i32 1073)
%4 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3, i32 65509)
%5 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 -1, i32 -1)
%6 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -1, i32 -1)
%7 = tail call i32 @test(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 -2, i32 -1)
ret i32 0
}