#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EINVAL;
int SEEK_END;
int SEEK_SET;
int /*<<< orphan*/ envia(int, char *, int /*<<< orphan*/);
int errno;
int fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fseek(int /*<<< orphan*/ *, long, int);
unsigned long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, unsigned long);
int /*<<< orphan*/ sscanf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
int petic_rseek(int sockCliente, FILE *pFich, char *argOffset,
                char *argOrigen) {
  int error;
  char cadena[300];
  long offset, limitOffset;
  int origen;
  unsigned long actual;
  if (fileno(pFich) == -1) {
    fprintf(stderr, "petic_rseek(): no hay fichero abierto!\n");
    return -1;
  } else if ((argOffset == NULL) || (argOrigen == NULL) ||
             (!sscanf(argOffset, "%ld", &offset)) ||
             (!sscanf(argOrigen, "%d", &origen))) {
    error = EINVAL;
    fprintf(stderr, "petic_rseek(): esperaba 2 argumentos: offset de avance y "
                    "posicion de origen\n");
    sprintf(cadena, "%d %ld\n", error, ftell(pFich));
    envia(sockCliente, cadena, strlen(cadena));
    return -1;
  }
  if (offset < 0) {
    limitOffset = ftell(pFich) * -1;
    if (offset < limitOffset)
      offset = limitOffset;
  } else {
    actual = ftell(pFich);
    fseek(pFich, 0L, SEEK_END);
    limitOffset = ftell(pFich) - actual;
    fseek(pFich, actual, SEEK_SET);
    if (offset > limitOffset)
      offset = limitOffset;
  }
  if (fseek(pFich, offset, origen) == -1) {
    error = errno;
    perror("petic_rseek(): fseek()");
    sprintf(cadena, "%d %ld\n", error, ftell(pFich));
    envia(sockCliente, cadena, strlen(cadena));
    return -1;
  }
  error = 0;
  sprintf(cadena, "%d %ld\n", error, ftell(pFich));
  envia(sockCliente, cadena, strlen(cadena));
  return 0;
}


x86 assembly (clang, -O0):
<petic_rseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <fileno@plt>
cmp    $0xffffffff,%eax
jne    11dd <petic_rseek+0x4d>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
lea    0xe34(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14d9 <petic_rseek+0x349>
cmpq   $0x0,-0x18(%rbp)
je     1237 <petic_rseek+0xa7>
cmpq   $0x0,-0x20(%rbp)
je     1237 <petic_rseek+0xa7>
mov    -0x18(%rbp),%rdi
lea    0xe2a(%rip),%rsi
lea    -0x158(%rbp),%rdx
mov    $0x0,%al
call   1080 <sscanf@plt>
cmp    $0x0,%eax
je     1237 <petic_rseek+0xa7>
mov    -0x20(%rbp),%rdi
lea    0xe0c(%rip),%rsi
lea    -0x164(%rbp),%rdx
mov    $0x0,%al
call   1080 <sscanf@plt>
cmp    $0x0,%eax
jne    12d7 <petic_rseek+0x147>
mov    0x2d82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2d8e(%rip),%rax
mov    (%rax),%edi
lea    0xddc(%rip),%rsi
call   1050 <fprintf@plt>
lea    -0x150(%rbp),%rax
mov    %rax,-0x188(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x180(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
mov    -0x188(%rbp),%rdi
mov    -0x180(%rbp),%edx
mov    %rax,%rcx
lea    0xded(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x17c(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x178(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x17c(%rbp),%edi
mov    -0x178(%rbp),%rsi
mov    %eax,%edx
call   1030 <envia@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14d9 <petic_rseek+0x349>
jmp    12dc <petic_rseek+0x14c>
cmpq   $0x0,-0x158(%rbp)
jge    1325 <petic_rseek+0x195>
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
imul   $0xffffffffffffffff,%rax,%rax
mov    %rax,-0x160(%rbp)
mov    -0x158(%rbp),%rax
cmp    -0x160(%rbp),%rax
jge    1320 <petic_rseek+0x190>
mov    -0x160(%rbp),%rax
mov    %rax,-0x158(%rbp)
jmp    13a2 <petic_rseek+0x212>
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
mov    %rax,-0x170(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ca8(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
sub    -0x170(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x170(%rbp),%rsi
mov    0x2c54(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
mov    -0x158(%rbp),%rax
cmp    -0x160(%rbp),%rax
jle    139d <petic_rseek+0x20d>
mov    -0x160(%rbp),%rax
mov    %rax,-0x158(%rbp)
jmp    13a2 <petic_rseek+0x212>
mov    -0x10(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    -0x164(%rbp),%edx
call   1090 <fseek@plt>
cmp    $0xffffffff,%eax
jne    1458 <petic_rseek+0x2c8>
mov    0x2c08(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
lea    0xcb0(%rip),%rdi
call   10a0 <perror@plt>
lea    -0x150(%rbp),%rax
mov    %rax,-0x1a0(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x198(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
mov    -0x1a0(%rbp),%rdi
mov    -0x198(%rbp),%edx
mov    %rax,%rcx
lea    0xc6c(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x194(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x190(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x194(%rbp),%edi
mov    -0x190(%rbp),%rsi
mov    %eax,%edx
call   1030 <envia@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14d9 <petic_rseek+0x349>
movl   $0x0,-0x24(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x1b8(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x1b0(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
mov    -0x1b8(%rbp),%rdi
mov    -0x1b0(%rbp),%edx
mov    %rax,%rcx
lea    0xbe6(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1ac(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1ac(%rbp),%edi
mov    -0x1a8(%rbp),%rsi
mov    %eax,%edx
call   1030 <envia@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<petic_rseek>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x148,%rsp
mov    %rcx,%rbp
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%r14d
mov    %rsi,%rdi
call   1070 <fileno@plt>
cmp    $0xffffffff,%eax
je     12c3 <petic_rseek+0x133>
test   %rbx,%rbx
je     1268 <petic_rseek+0xd8>
test   %rbp,%rbp
je     1268 <petic_rseek+0xd8>
lea    0xe55(%rip),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
test   %eax,%eax
je     1268 <petic_rseek+0xd8>
lea    0xe3d(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbp,%rdi
xor    %eax,%eax
call   1080 <sscanf@plt>
test   %eax,%eax
je     1268 <petic_rseek+0xd8>
mov    (%rsp),%rbx
mov    %r15,%rdi
call   1060 <ftell@plt>
mov    %rax,%rbp
test   %rbx,%rbx
js     12df <petic_rseek+0x14f>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %r15,%rdi
call   1060 <ftell@plt>
mov    %rax,%rbx
sub    %rbp,%rbx
mov    0x2d86(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %rbp,%rsi
call   1090 <fseek@plt>
mov    (%rsp),%rsi
cmp    %rbx,%rsi
jle    12f2 <petic_rseek+0x162>
mov    %rbx,(%rsp)
mov    %rbx,%rsi
jmp    12f2 <petic_rseek+0x162>
mov    0x2d51(%rip),%rax
mov    (%rax),%ebx
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
lea    0xdae(%rip),%rsi
call   1050 <fprintf@plt>
mov    %r15,%rdi
call   1060 <ftell@plt>
lea    0xde7(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %ebx,%edx
mov    %rax,%rcx
call   10b0 <sprintf@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <envia@plt>
mov    $0xffffffff,%ebx
jmp    133b <petic_rseek+0x1ab>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
lea    0xd2d(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    133b <petic_rseek+0x1ab>
neg    %rbp
mov    (%rsp),%rsi
cmp    %rbp,%rsi
jge    12f2 <petic_rseek+0x162>
mov    %rbp,(%rsp)
mov    %rbp,%rsi
mov    0xc(%rsp),%edx
mov    %r15,%rdi
call   1090 <fseek@plt>
cmp    $0xffffffff,%eax
je     134b <petic_rseek+0x1bb>
mov    %r15,%rdi
call   1060 <ftell@plt>
lea    0xd6a(%rip),%rsi
lea    0x10(%rsp),%rbp
xor    %ebx,%ebx
mov    %rbp,%rdi
xor    %edx,%edx
mov    %rax,%rcx
call   10b0 <sprintf@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <envia@plt>
mov    %ebx,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c7e(%rip),%rax
mov    (%rax),%ebx
lea    0xd29(%rip),%rdi
call   10a0 <perror@plt>
jmp    1286 <petic_rseek+0xf6>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"petic_rseek(): no hay fichero abierto!\0A\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [3 x i8] c"%d\00"
@EINVAL = global i32 0
@.str.3 = [77 x i8] c"petic_rseek(): esperaba 2 argumentos: offset de avance y posicion de origen\0A\00"
@.str.4 = [8 x i8] c"%d %ld\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@errno = global i32 0
@.str.5 = [23 x i8] c"petic_rseek(): fseek()\00"
define i32 @petic_rseek(i32 %0, i32* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [300 x i8]
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
%15 = alloca i64
store i32 %0, i32* %6
store i32* %1, i32** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%16 = load i32*, i32** %7
%17 = call i32 @fileno(i32* %16)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %4
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
br label %114
22: ; preds = %4
%23 = load i8*, i8** %8
%24 = icmp eq i8* %23, null
br i1 %24, label %36, label %25
25: ; preds = %22
%26 = load i8*, i8** %9
%27 = icmp eq i8* %26, null
br i1 %27, label %36, label %28
28: ; preds = %25
%29 = load i8*, i8** %8
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %12)
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i8*, i8** %9
%34 = call i32 (i8*, i8*, ...) @sscanf(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %14)
%35 = icmp ne i32 %34, 0
br i1 %35, label %50, label %36
36: ; preds = %32, %28, %25, %22
%37 = load i32, i32* @EINVAL
store i32 %37, i32* %10
%38 = load i32, i32* @stderr
%39 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0))
%40 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%41 = load i32, i32* %10
%42 = load i32*, i32** %7
%43 = call i64 @ftell(i32* %42)
%44 = call i32 @sprintf(i8* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %41, i64 %43)
%45 = load i32, i32* %6
%46 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%47 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%48 = call i32 @strlen(i8* %47)
%49 = call i32 @envia(i32 %45, i8* %46, i32 %48)
store i32 -1, i32* %5
br label %114
50: ; preds = %32
br label %51
51: ; preds = %50
%52 = load i64, i64* %12
%53 = icmp slt i64 %52, 0
br i1 %53, label %54, label %64
54: ; preds = %51
%55 = load i32*, i32** %7
%56 = call i64 @ftell(i32* %55)
%57 = mul i64 %56, -1
store i64 %57, i64* %13
%58 = load i64, i64* %12
%59 = load i64, i64* %13
%60 = icmp slt i64 %58, %59
br i1 %60, label %61, label %63
61: ; preds = %54
%62 = load i64, i64* %13
store i64 %62, i64* %12
br label %63
63: ; preds = %61, %54
br label %84
64: ; preds = %51
%65 = load i32*, i32** %7
%66 = call i64 @ftell(i32* %65)
store i64 %66, i64* %15
%67 = load i32*, i32** %7
%68 = load i32, i32* @SEEK_END
%69 = call i32 @fseek(i32* %67, i64 0, i32 %68)
%70 = load i32*, i32** %7
%71 = call i64 @ftell(i32* %70)
%72 = load i64, i64* %15
%73 = sub i64 %71, %72
store i64 %73, i64* %13
%74 = load i32*, i32** %7
%75 = load i64, i64* %15
%76 = load i32, i32* @SEEK_SET
%77 = call i32 @fseek(i32* %74, i64 %75, i32 %76)
%78 = load i64, i64* %12
%79 = load i64, i64* %13
%80 = icmp sgt i64 %78, %79
br i1 %80, label %81, label %83
81: ; preds = %64
%82 = load i64, i64* %13
store i64 %82, i64* %12
br label %83
83: ; preds = %81, %64
br label %84
84: ; preds = %83, %63
%85 = load i32*, i32** %7
%86 = load i64, i64* %12
%87 = load i32, i32* %14
%88 = call i32 @fseek(i32* %85, i64 %86, i32 %87)
%89 = icmp eq i32 %88, -1
br i1 %89, label %90, label %103
90: ; preds = %84
%91 = load i32, i32* @errno
store i32 %91, i32* %10
%92 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%93 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%94 = load i32, i32* %10
%95 = load i32*, i32** %7
%96 = call i64 @ftell(i32* %95)
%97 = call i32 @sprintf(i8* %93, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %94, i64 %96)
%98 = load i32, i32* %6
%99 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%100 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%101 = call i32 @strlen(i8* %100)
%102 = call i32 @envia(i32 %98, i8* %99, i32 %101)
store i32 -1, i32* %5
br label %114
103: ; preds = %84
store i32 0, i32* %10
%104 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%105 = load i32, i32* %10
%106 = load i32*, i32** %7
%107 = call i64 @ftell(i32* %106)
%108 = call i32 @sprintf(i8* %104, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %105, i64 %107)
%109 = load i32, i32* %6
%110 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%111 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%112 = call i32 @strlen(i8* %111)
%113 = call i32 @envia(i32 %109, i8* %110, i32 %112)
store i32 0, i32* %5
br label %114
114: ; preds = %103, %90, %36, %19
%115 = load i32, i32* %5
ret i32 %115
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"petic_rseek(): no hay fichero abierto!\0A\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [3 x i8] c"%d\00"
@EINVAL = global i32 0
@.str.3 = [77 x i8] c"petic_rseek(): esperaba 2 argumentos: offset de avance y posicion de origen\0A\00"
@.str.4 = [8 x i8] c"%d %ld\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@errno = global i32 0
@.str.5 = [23 x i8] c"petic_rseek(): fseek()\00"
define i32 @petic_rseek(i32 %0, i32* nocapture %1, i8* %2, i8* %3) {
%5 = alloca [300 x i8]
%6 = alloca i64
%7 = alloca i32
%8 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%9 = bitcast i64* %6 to i8*
%10 = bitcast i32* %7 to i8*
%11 = tail call i32 @fileno(i32* %1)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %16
13: ; preds = %4
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %70
16: ; preds = %4
%17 = icmp eq i8* %2, null
%18 = icmp eq i8* %3, null
%19 = or i1 %17, %18
br i1 %19, label %26, label %20
20: ; preds = %16
%21 = call i32 (i8*, i8*, ...) @sscanf(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %6)
%22 = icmp eq i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = call i32 (i8*, i8*, ...) @sscanf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %34
26: ; preds = %23, %20, %16
%27 = load i32, i32* @EINVAL
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0))
%30 = call i64 @ftell(i32* %1)
%31 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %27, i64 %30)
%32 = call i32 @strlen(i8* %8)
%33 = call i32 @envia(i32 %0, i8* %8, i32 %32)
br label %70
34: ; preds = %23
%35 = load i64, i64* %6
%36 = icmp slt i64 %35, 0
%37 = call i64 @ftell(i32* %1)
br i1 %36, label %38, label %43
38: ; preds = %34
%39 = sub i64 0, %37
%40 = load i64, i64* %6
%41 = icmp slt i64 %40, %39
br i1 %41, label %42, label %53
42: ; preds = %38
store i64 %39, i64* %6
br label %53
43: ; preds = %34
%44 = load i32, i32* @SEEK_END
%45 = call i32 @fseek(i32* %1, i64 0, i32 %44)
%46 = call i64 @ftell(i32* %1)
%47 = sub i64 %46, %37
%48 = load i32, i32* @SEEK_SET
%49 = call i32 @fseek(i32* %1, i64 %37, i32 %48)
%50 = load i64, i64* %6
%51 = icmp sgt i64 %50, %47
br i1 %51, label %52, label %53
52: ; preds = %43
store i64 %47, i64* %6
br label %53
53: ; preds = %43, %52, %38, %42
%54 = phi i64 [ %50, %43 ], [ %47, %52 ], [ %40, %38 ], [ %39, %42 ]
%55 = load i32, i32* %7
%56 = call i32 @fseek(i32* %1, i64 %54, i32 %55)
%57 = icmp eq i32 %56, -1
br i1 %57, label %58, label %65
58: ; preds = %53
%59 = load i32, i32* @errno
%60 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%61 = call i64 @ftell(i32* %1)
%62 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %59, i64 %61)
%63 = call i32 @strlen(i8* %8)
%64 = call i32 @envia(i32 %0, i8* %8, i32 %63)
br label %70
65: ; preds = %53
%66 = call i64 @ftell(i32* %1)
%67 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 0, i64 %66)
%68 = call i32 @strlen(i8* %8)
%69 = call i32 @envia(i32 %0, i8* %8, i32 %68)
br label %70
70: ; preds = %65, %58, %26, %13
%71 = phi i32 [ -1, %13 ], [ -1, %26 ], [ -1, %58 ], [ 0, %65 ]
ret i32 %71
}