#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 fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *, int *, int *,
           int *, int *, int *, int *, int *, int *, int *, int *);
int de_ascii_1050_header(FILE *f, int offs[13], int cooef[13], int sets[13]) {
  if (fscanf(f, "%d %d %d %d %d %d %d %d %d %d %d %d %d\n", offs, offs + 1,
             offs + 2, offs + 3, offs + 4, offs + 5, offs + 6, offs + 7,
             offs + 8, offs + 9, offs + 10, offs + 11, offs + 12) != 13) {
    return -1;
  }
  if (fscanf(f, "%d %d %d %d %d %d %d %d %d %d %d %d %d\n", cooef, cooef + 1,
             cooef + 2, cooef + 3, cooef + 4, cooef + 5, cooef + 6, cooef + 7,
             cooef + 8, cooef + 9, cooef + 10, cooef + 11, cooef + 12) != 13) {
    return -1;
  }
  if (fscanf(f, "%d %d %d %d %d %d %d %d %d %d %d %d %d\n", sets, sets + 1,
             sets + 2, sets + 3, sets + 4, sets + 5, sets + 6, sets + 7,
             sets + 8, sets + 9, sets + 10, sets + 11, sets + 12) != 13) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<de_ascii_1050_header>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x4,%rcx
mov    -0x40(%rbp),%r8
add    $0x8,%r8
mov    -0x40(%rbp),%r9
add    $0xc,%r9
mov    -0x40(%rbp),%rax
add    $0x10,%rax
mov    -0x40(%rbp),%r13
add    $0x14,%r13
mov    -0x40(%rbp),%r12
add    $0x18,%r12
mov    -0x40(%rbp),%r15
add    $0x1c,%r15
mov    -0x40(%rbp),%r14
add    $0x20,%r14
mov    -0x40(%rbp),%rbx
add    $0x24,%rbx
mov    -0x40(%rbp),%r11
add    $0x28,%r11
mov    -0x40(%rbp),%r10
add    $0x2c,%r10
mov    -0x40(%rbp),%rsi
add    $0x30,%rsi
mov    %rsi,-0x58(%rbp)
lea    0xe59(%rip),%rsi
mov    %rax,(%rsp)
mov    -0x58(%rbp),%rax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %rax,0x40(%rsp)
call   1030 <fscanf@plt>
cmp    $0xd,%eax
je     11f1 <de_ascii_1050_header+0xe1>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1372 <de_ascii_1050_header+0x262>
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rdx
mov    -0x48(%rbp),%rcx
add    $0x4,%rcx
mov    -0x48(%rbp),%r8
add    $0x8,%r8
mov    -0x48(%rbp),%r9
add    $0xc,%r9
mov    -0x48(%rbp),%rax
add    $0x10,%rax
mov    -0x48(%rbp),%r13
add    $0x14,%r13
mov    -0x48(%rbp),%r12
add    $0x18,%r12
mov    -0x48(%rbp),%r15
add    $0x1c,%r15
mov    -0x48(%rbp),%r14
add    $0x20,%r14
mov    -0x48(%rbp),%rbx
add    $0x24,%rbx
mov    -0x48(%rbp),%r11
add    $0x28,%r11
mov    -0x48(%rbp),%r10
add    $0x2c,%r10
mov    -0x48(%rbp),%rsi
add    $0x30,%rsi
mov    %rsi,-0x60(%rbp)
lea    0xd9c(%rip),%rsi
mov    %rax,(%rsp)
mov    -0x60(%rbp),%rax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %rax,0x40(%rsp)
call   1030 <fscanf@plt>
cmp    $0xd,%eax
je     12ae <de_ascii_1050_header+0x19e>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1372 <de_ascii_1050_header+0x262>
mov    -0x38(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x50(%rbp),%rcx
add    $0x4,%rcx
mov    -0x50(%rbp),%r8
add    $0x8,%r8
mov    -0x50(%rbp),%r9
add    $0xc,%r9
mov    -0x50(%rbp),%rax
add    $0x10,%rax
mov    -0x50(%rbp),%r13
add    $0x14,%r13
mov    -0x50(%rbp),%r12
add    $0x18,%r12
mov    -0x50(%rbp),%r15
add    $0x1c,%r15
mov    -0x50(%rbp),%r14
add    $0x20,%r14
mov    -0x50(%rbp),%rbx
add    $0x24,%rbx
mov    -0x50(%rbp),%r11
add    $0x28,%r11
mov    -0x50(%rbp),%r10
add    $0x2c,%r10
mov    -0x50(%rbp),%rsi
add    $0x30,%rsi
mov    %rsi,-0x68(%rbp)
lea    0xcdf(%rip),%rsi
mov    %rax,(%rsp)
mov    -0x68(%rbp),%rax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %rax,0x40(%rsp)
call   1030 <fscanf@plt>
cmp    $0xd,%eax
je     136b <de_ascii_1050_header+0x25b>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1372 <de_ascii_1050_header+0x262>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<de_ascii_1050_header>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,0x20(%rsp)
mov    %rdx,%rbx
mov    %rsi,%rdx
lea    0x4(%rsi),%rcx
lea    0x8(%rsi),%r8
lea    0xc(%rsi),%r9
lea    0x10(%rsi),%rax
mov    %rax,0x8(%rsp)
lea    0x14(%rsi),%r11
lea    0x18(%rsi),%r12
lea    0x1c(%rsi),%r13
lea    0x20(%rsi),%rax
lea    0x24(%rsi),%rbp
lea    0x28(%rsi),%r14
lea    0x2c(%rsi),%r15
lea    0x30(%rsi),%r10
sub    $0x8,%rsp
lea    0xe97(%rip),%rsi
mov    %rdi,0x18(%rsp)
push   %r10
push   %r15
push   %r14
push   %rbp
push   %rax
push   %r13
push   %r12
push   %r11
push   0x50(%rsp)
call   1030 <fscanf@plt>
add    $0x50,%rsp
mov    $0xffffffff,%ebp
cmp    $0xd,%eax
jne    126f <de_ascii_1050_header+0x15f>
lea    0x4(%rbx),%rcx
lea    0x8(%rbx),%r8
lea    0xc(%rbx),%r9
lea    0x10(%rbx),%rax
mov    %rax,0x8(%rsp)
lea    0x14(%rbx),%rax
mov    %rax,0x18(%rsp)
lea    0x18(%rbx),%r14
lea    0x1c(%rbx),%r15
lea    0x20(%rbx),%r12
lea    0x24(%rbx),%r13
lea    0x28(%rbx),%rax
lea    0x2c(%rbx),%r10
lea    0x30(%rbx),%r11
sub    $0x8,%rsp
lea    0xe24(%rip),%rsi
mov    0x18(%rsp),%rdi
mov    %rbx,%rdx
push   %r11
push   %r10
push   %rax
push   %r13
push   %r12
push   %r15
push   %r14
push   0x58(%rsp)
push   0x50(%rsp)
call   1030 <fscanf@plt>
add    $0x50,%rsp
cmp    $0xd,%eax
jne    126f <de_ascii_1050_header+0x15f>
mov    0x20(%rsp),%rdx
lea    0x4(%rdx),%rcx
lea    0x8(%rdx),%r8
lea    0xc(%rdx),%r9
lea    0x10(%rdx),%r10
lea    0x14(%rdx),%r11
lea    0x18(%rdx),%r14
lea    0x1c(%rdx),%r15
lea    0x20(%rdx),%r12
lea    0x24(%rdx),%r13
lea    0x28(%rdx),%rax
lea    0x2c(%rdx),%rbp
lea    0x30(%rdx),%rbx
sub    $0x8,%rsp
lea    0xdb9(%rip),%rsi
mov    0x18(%rsp),%rdi
push   %rbx
push   %rbp
push   %rax
push   %r13
push   %r12
push   %r15
push   %r14
push   %r11
push   %r10
call   1030 <fscanf@plt>
add    $0x50,%rsp
xor    %ebp,%ebp
cmp    $0xd,%eax
setne  %bpl
neg    %ebp
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"%d %d %d %d %d %d %d %d %d %d %d %d %d\0A\00"
define i32 @de_ascii_1050_header(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %7
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32*, i32** %7
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32*, i32** %7
%17 = getelementptr inbounds i32, i32* %16, i64 3
%18 = load i32*, i32** %7
%19 = getelementptr inbounds i32, i32* %18, i64 4
%20 = load i32*, i32** %7
%21 = getelementptr inbounds i32, i32* %20, i64 5
%22 = load i32*, i32** %7
%23 = getelementptr inbounds i32, i32* %22, i64 6
%24 = load i32*, i32** %7
%25 = getelementptr inbounds i32, i32* %24, i64 7
%26 = load i32*, i32** %7
%27 = getelementptr inbounds i32, i32* %26, i64 8
%28 = load i32*, i32** %7
%29 = getelementptr inbounds i32, i32* %28, i64 9
%30 = load i32*, i32** %7
%31 = getelementptr inbounds i32, i32* %30, i64 10
%32 = load i32*, i32** %7
%33 = getelementptr inbounds i32, i32* %32, i64 11
%34 = load i32*, i32** %7
%35 = getelementptr inbounds i32, i32* %34, i64 12
%36 = call i32 @fscanf(i32* %10, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %11, i32* %13, i32* %15, i32* %17, i32* %19, i32* %21, i32* %23, i32* %25, i32* %27, i32* %29, i32* %31, i32* %33, i32* %35)
%37 = icmp ne i32 %36, 13
br i1 %37, label %38, label %39
38: ; preds = %4
store i32 -1, i32* %5
br label %100
39: ; preds = %4
%40 = load i32*, i32** %6
%41 = load i32*, i32** %8
%42 = load i32*, i32** %8
%43 = getelementptr inbounds i32, i32* %42, i64 1
%44 = load i32*, i32** %8
%45 = getelementptr inbounds i32, i32* %44, i64 2
%46 = load i32*, i32** %8
%47 = getelementptr inbounds i32, i32* %46, i64 3
%48 = load i32*, i32** %8
%49 = getelementptr inbounds i32, i32* %48, i64 4
%50 = load i32*, i32** %8
%51 = getelementptr inbounds i32, i32* %50, i64 5
%52 = load i32*, i32** %8
%53 = getelementptr inbounds i32, i32* %52, i64 6
%54 = load i32*, i32** %8
%55 = getelementptr inbounds i32, i32* %54, i64 7
%56 = load i32*, i32** %8
%57 = getelementptr inbounds i32, i32* %56, i64 8
%58 = load i32*, i32** %8
%59 = getelementptr inbounds i32, i32* %58, i64 9
%60 = load i32*, i32** %8
%61 = getelementptr inbounds i32, i32* %60, i64 10
%62 = load i32*, i32** %8
%63 = getelementptr inbounds i32, i32* %62, i64 11
%64 = load i32*, i32** %8
%65 = getelementptr inbounds i32, i32* %64, i64 12
%66 = call i32 @fscanf(i32* %40, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %41, i32* %43, i32* %45, i32* %47, i32* %49, i32* %51, i32* %53, i32* %55, i32* %57, i32* %59, i32* %61, i32* %63, i32* %65)
%67 = icmp ne i32 %66, 13
br i1 %67, label %68, label %69
68: ; preds = %39
store i32 -1, i32* %5
br label %100
69: ; preds = %39
%70 = load i32*, i32** %6
%71 = load i32*, i32** %9
%72 = load i32*, i32** %9
%73 = getelementptr inbounds i32, i32* %72, i64 1
%74 = load i32*, i32** %9
%75 = getelementptr inbounds i32, i32* %74, i64 2
%76 = load i32*, i32** %9
%77 = getelementptr inbounds i32, i32* %76, i64 3
%78 = load i32*, i32** %9
%79 = getelementptr inbounds i32, i32* %78, i64 4
%80 = load i32*, i32** %9
%81 = getelementptr inbounds i32, i32* %80, i64 5
%82 = load i32*, i32** %9
%83 = getelementptr inbounds i32, i32* %82, i64 6
%84 = load i32*, i32** %9
%85 = getelementptr inbounds i32, i32* %84, i64 7
%86 = load i32*, i32** %9
%87 = getelementptr inbounds i32, i32* %86, i64 8
%88 = load i32*, i32** %9
%89 = getelementptr inbounds i32, i32* %88, i64 9
%90 = load i32*, i32** %9
%91 = getelementptr inbounds i32, i32* %90, i64 10
%92 = load i32*, i32** %9
%93 = getelementptr inbounds i32, i32* %92, i64 11
%94 = load i32*, i32** %9
%95 = getelementptr inbounds i32, i32* %94, i64 12
%96 = call i32 @fscanf(i32* %70, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %71, i32* %73, i32* %75, i32* %77, i32* %79, i32* %81, i32* %83, i32* %85, i32* %87, i32* %89, i32* %91, i32* %93, i32* %95)
%97 = icmp ne i32 %96, 13
br i1 %97, label %98, label %99
98: ; preds = %69
store i32 -1, i32* %5
br label %100
99: ; preds = %69
store i32 0, i32* %5
br label %100
100: ; preds = %99, %98, %68, %38
%101 = load i32, i32* %5
ret i32 %101
}

LLVM IR (-O2):
@.str = [40 x i8] c"%d %d %d %d %d %d %d %d %d %d %d %d %d\0A\00"
define i32 @de_ascii_1050_header(i32* nocapture %0, i32* %1, i32* %2, i32* %3) {
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = getelementptr inbounds i32, i32* %1, i64 2
%7 = getelementptr inbounds i32, i32* %1, i64 3
%8 = getelementptr inbounds i32, i32* %1, i64 4
%9 = getelementptr inbounds i32, i32* %1, i64 5
%10 = getelementptr inbounds i32, i32* %1, i64 6
%11 = getelementptr inbounds i32, i32* %1, i64 7
%12 = getelementptr inbounds i32, i32* %1, i64 8
%13 = getelementptr inbounds i32, i32* %1, i64 9
%14 = getelementptr inbounds i32, i32* %1, i64 10
%15 = getelementptr inbounds i32, i32* %1, i64 11
%16 = getelementptr inbounds i32, i32* %1, i64 12
%17 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%18 = icmp eq i32 %17, 13
br i1 %18, label %19, label %50
19: ; preds = %4
%20 = getelementptr inbounds i32, i32* %2, i64 1
%21 = getelementptr inbounds i32, i32* %2, i64 2
%22 = getelementptr inbounds i32, i32* %2, i64 3
%23 = getelementptr inbounds i32, i32* %2, i64 4
%24 = getelementptr inbounds i32, i32* %2, i64 5
%25 = getelementptr inbounds i32, i32* %2, i64 6
%26 = getelementptr inbounds i32, i32* %2, i64 7
%27 = getelementptr inbounds i32, i32* %2, i64 8
%28 = getelementptr inbounds i32, i32* %2, i64 9
%29 = getelementptr inbounds i32, i32* %2, i64 10
%30 = getelementptr inbounds i32, i32* %2, i64 11
%31 = getelementptr inbounds i32, i32* %2, i64 12
%32 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %20, i32* %21, i32* %22, i32* %23, i32* %24, i32* %25, i32* %26, i32* %27, i32* %28, i32* %29, i32* %30, i32* %31)
%33 = icmp eq i32 %32, 13
br i1 %33, label %34, label %50
34: ; preds = %19
%35 = getelementptr inbounds i32, i32* %3, i64 1
%36 = getelementptr inbounds i32, i32* %3, i64 2
%37 = getelementptr inbounds i32, i32* %3, i64 3
%38 = getelementptr inbounds i32, i32* %3, i64 4
%39 = getelementptr inbounds i32, i32* %3, i64 5
%40 = getelementptr inbounds i32, i32* %3, i64 6
%41 = getelementptr inbounds i32, i32* %3, i64 7
%42 = getelementptr inbounds i32, i32* %3, i64 8
%43 = getelementptr inbounds i32, i32* %3, i64 9
%44 = getelementptr inbounds i32, i32* %3, i64 10
%45 = getelementptr inbounds i32, i32* %3, i64 11
%46 = getelementptr inbounds i32, i32* %3, i64 12
%47 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %35, i32* %36, i32* %37, i32* %38, i32* %39, i32* %40, i32* %41, i32* %42, i32* %43, i32* %44, i32* %45, i32* %46)
%48 = icmp ne i32 %47, 13
%49 = sext i1 %48 to i32
br label %50
50: ; preds = %34, %19, %4
%51 = phi i32 [ -1, %4 ], [ -1, %19 ], [ %49, %34 ]
ret i32 %51
}