#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 /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ _defaults_rc_skip_spaces(int /*<<< orphan*/ *);
int /*<<< orphan*/ assert(char *);
scalar_t__ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
char *malloc(int);
int _defaults_rc_read_line(FILE *stream, char **key, char **val, int *type,
                           long *vstart, long *vend) {
  int tok;
  int key_len;
  int val_len;
  int i;
  long key_start;
  long val_start;
  long last_non_space;
  long start_line;
  if (key)
    *key = NULL;
  if (val)
    *val = NULL;
  start_line = ftell(stream);
  _defaults_rc_skip_spaces(stream);
  key_start = ftell(stream);
  tok = fgetc(stream);
  if (feof(stream)) {
    if (type)
      *type = 2;
    fseek(stream, start_line, SEEK_SET);
    return 0;
  }
  if (tok == '#') {
    if (type)
      *type = 3;
    fseek(stream, start_line, SEEK_SET);
    return 0;
  } else if (tok == '\n') {
    if (type)
      *type = 2;
    fseek(stream, start_line, SEEK_SET);
    return 0;
  } else {
    key_len = 0;
    do {
      key_len++;
      tok = fgetc(stream);
      if (feof(stream) || tok == '\n') {
        return 1;
      }
    } while (tok != ' ' && tok != '=' && tok != '\t');
    if (tok != '=') {
      _defaults_rc_skip_spaces(stream);
      tok = fgetc(stream);
      if (tok != '=') {
        return 1;
      }
    }
    _defaults_rc_skip_spaces(stream);
    val_start = ftell(stream);
    val_len = 0;
    last_non_space = 0;
    while (!feof(stream)) {
      tok = fgetc(stream);
      if (tok != '\n' && !feof(stream)) {
        val_len++;
        if (tok != ' ' && tok != '\t') {
          last_non_space = val_len;
        }
      } else {
        break;
      }
    }
    val_len = last_non_space;
    if (key) {
      *key = malloc(sizeof(char *) * (key_len + 1));
      assert(*key);
      fseek(stream, key_start, SEEK_SET);
      for (i = 0; i < key_len; i++) {
        (*key)[i] = (char)fgetc(stream);
      }
      (*key)[key_len] = '\0';
    }
    if (val) {
      *val = malloc(sizeof(char *) * (val_len + 1));
      assert(*val);
      fseek(stream, val_start, SEEK_SET);
      for (i = 0; i < val_len; i++) {
        (*val)[i] = (char)fgetc(stream);
      }
      (*val)[val_len] = '\0';
    }
    if (vstart)
      *vstart = val_start;
    if (vend)
      *vend = val_start + val_len;
    if (type)
      *type = 1;
    fseek(stream, start_line, SEEK_SET);
    return 0;
  }
}


x86 assembly (clang, -O0):
<_defaults_rc_read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11a6 <_defaults_rc_read_line+0x36>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     11bc <_defaults_rc_read_line+0x4c>
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
je     1235 <_defaults_rc_read_line+0xc5>
cmpq   $0x0,-0x28(%rbp)
je     1213 <_defaults_rc_read_line+0xa3>
mov    -0x28(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    0x2dbe(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x4(%rbp)
jmp    15a1 <_defaults_rc_read_line+0x431>
cmpl   $0x23,-0x3c(%rbp)
jne    1276 <_defaults_rc_read_line+0x106>
cmpq   $0x0,-0x28(%rbp)
je     1254 <_defaults_rc_read_line+0xe4>
mov    -0x28(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    0x2d7d(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x4(%rbp)
jmp    15a1 <_defaults_rc_read_line+0x431>
cmpl   $0xa,-0x3c(%rbp)
jne    12b7 <_defaults_rc_read_line+0x147>
cmpq   $0x0,-0x28(%rbp)
je     1295 <_defaults_rc_read_line+0x125>
mov    -0x28(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    0x2d3c(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x4(%rbp)
jmp    15a1 <_defaults_rc_read_line+0x431>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
jne    12f0 <_defaults_rc_read_line+0x180>
cmpl   $0xa,-0x3c(%rbp)
jne    12fc <_defaults_rc_read_line+0x18c>
movl   $0x1,-0x4(%rbp)
jmp    15a1 <_defaults_rc_read_line+0x431>
jmp    1301 <_defaults_rc_read_line+0x191>
xor    %eax,%eax
cmpl   $0x20,-0x3c(%rbp)
mov    %al,-0x69(%rbp)
je     1329 <_defaults_rc_read_line+0x1b9>
xor    %eax,%eax
cmpl   $0x3d,-0x3c(%rbp)
mov    %al,-0x69(%rbp)
je     1329 <_defaults_rc_read_line+0x1b9>
cmpl   $0x9,-0x3c(%rbp)
setne  %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    12be <_defaults_rc_read_line+0x14e>
cmpl   $0x3d,-0x3c(%rbp)
je     136e <_defaults_rc_read_line+0x1fe>
mov    -0x10(%rbp),%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x3d,-0x3c(%rbp)
je     1369 <_defaults_rc_read_line+0x1f9>
movl   $0x1,-0x4(%rbp)
jmp    15a1 <_defaults_rc_read_line+0x431>
jmp    136e <_defaults_rc_read_line+0x1fe>
mov    -0x10(%rbp),%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    -0x10(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x44(%rbp)
movq   $0x0,-0x60(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13b2 <_defaults_rc_read_line+0x242>
jmp    140f <_defaults_rc_read_line+0x29f>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xa,-0x3c(%rbp)
je     1405 <_defaults_rc_read_line+0x295>
mov    -0x10(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
jne    1405 <_defaults_rc_read_line+0x295>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x20,-0x3c(%rbp)
je     1400 <_defaults_rc_read_line+0x290>
cmpl   $0x9,-0x3c(%rbp)
je     1400 <_defaults_rc_read_line+0x290>
movslq -0x44(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    140a <_defaults_rc_read_line+0x29a>
jmp    140f <_defaults_rc_read_line+0x29f>
jmp    1393 <_defaults_rc_read_line+0x223>
mov    -0x60(%rbp),%rax
mov    %eax,-0x44(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     14a9 <_defaults_rc_read_line+0x339>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2b87(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    149a <_defaults_rc_read_line+0x32a>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x48(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1467 <_defaults_rc_read_line+0x2f7>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x40(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
cmpq   $0x0,-0x20(%rbp)
je     153c <_defaults_rc_read_line+0x3cc>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    0x2af4(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    152d <_defaults_rc_read_line+0x3bd>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,%dl
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x48(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    14fa <_defaults_rc_read_line+0x38a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x44(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
cmpq   $0x0,-0x30(%rbp)
je     1552 <_defaults_rc_read_line+0x3e2>
mov    -0x58(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x38(%rbp)
je     156f <_defaults_rc_read_line+0x3ff>
mov    -0x58(%rbp),%rcx
movslq -0x44(%rbp),%rax
add    %rax,%rcx
mov    -0x38(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     1584 <_defaults_rc_read_line+0x414>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    0x2a4d(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_defaults_rc_read_line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x40(%rsp)
mov    %r8,%r13
mov    %rcx,%r14
mov    %rdi,%rbx
test   %rsi,%rsi
je     1198 <_defaults_rc_read_line+0x28>
movq   $0x0,(%rsi)
mov    %rsi,0x18(%rsp)
test   %rdx,%rdx
je     11a9 <_defaults_rc_read_line+0x39>
movq   $0x0,(%rdx)
mov    %rdx,0x38(%rsp)
mov    %rbx,%rdi
call   1050 <ftell@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    %rbx,%rdi
call   1050 <ftell@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rax,%rax
je     1219 <_defaults_rc_read_line+0xa9>
mov    $0x2,%eax
test   %r14,%r14
je     11f0 <_defaults_rc_read_line+0x80>
mov    %eax,(%r14)
mov    0x2de9(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1090 <fseek@plt>
xor    %r15d,%r15d
mov    %r15d,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,0x8(%rsp)
cmp    $0xa,%ebp
je     11e3 <_defaults_rc_read_line+0x73>
cmp    $0x23,%ebp
jne    122f <_defaults_rc_read_line+0xbf>
mov    $0x3,%eax
jmp    11e8 <_defaults_rc_read_line+0x78>
mov    %r13,0x20(%rsp)
mov    %r15,0x28(%rsp)
mov    %r14,0x30(%rsp)
xor    %r12d,%r12d
mov    $0x8,%r13d
mov    0x8(%rsp),%rbp
mov    $0x1,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1060 <feof@plt>
cmp    $0xa,%r14d
je     1207 <_defaults_rc_read_line+0x97>
test   %rax,%rax
jne    1207 <_defaults_rc_read_line+0x97>
add    $0x8,%r13d
add    $0x1,%r12d
cmp    $0x9,%r14d
je     1298 <_defaults_rc_read_line+0x128>
cmp    $0x3d,%r14d
je     12b1 <_defaults_rc_read_line+0x141>
cmp    $0x20,%r14d
jne    1260 <_defaults_rc_read_line+0xf0>
mov    %rbx,%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    $0x3d,%eax
jne    1207 <_defaults_rc_read_line+0x97>
mov    %rbx,%rdi
call   1070 <_defaults_rc_skip_spaces@plt>
mov    %rbx,%rdi
call   1050 <ftell@plt>
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rax,%rax
je     12e0 <_defaults_rc_read_line+0x170>
xor    %eax,%eax
mov    %rax,(%rsp)
mov    0x18(%rsp),%r14
jmp    1342 <_defaults_rc_read_line+0x1d2>
mov    $0x1,%r15d
xor    %eax,%eax
mov    %rax,(%rsp)
mov    0x18(%rsp),%r14
jmp    1309 <_defaults_rc_read_line+0x199>
mov    0x8(%rsp),%rbp
mov    %rbx,%rdi
call   1060 <feof@plt>
add    $0x1,%r15
test   %rax,%rax
jne    1342 <_defaults_rc_read_line+0x1d2>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    $0xa,%eax
je     133d <_defaults_rc_read_line+0x1cd>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rax,%rax
jne    133d <_defaults_rc_read_line+0x1cd>
cmp    $0x9,%ebp
je     12f3 <_defaults_rc_read_line+0x183>
cmp    $0x20,%ebp
mov    0x8(%rsp),%rbp
je     12f8 <_defaults_rc_read_line+0x188>
mov    %r15,%rax
mov    %r15,(%rsp)
jmp    12f8 <_defaults_rc_read_line+0x188>
mov    0x8(%rsp),%rbp
test   %r14,%r14
je     139f <_defaults_rc_read_line+0x22f>
mov    %r13d,%edi
call   1080 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
call   1040 <assert@plt>
mov    0x2c7f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <fseek@plt>
mov    %r12d,%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    (%r14),%rcx
mov    %al,(%rcx,%rbp,1)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1380 <_defaults_rc_read_line+0x210>
mov    (%r14),%rax
movb   $0x0,(%rax,%r15,1)
mov    0x38(%rsp),%r14
test   %r14,%r14
mov    0x20(%rsp),%r13
je     1423 <_defaults_rc_read_line+0x2b3>
mov    (%rsp),%rbp
mov    %rbp,%r15
shl    $0x20,%r15
movabs $0x100000000,%rdi
add    %r15,%rdi
shr    $0x1d,%rdi
call   1080 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
call   1040 <assert@plt>
mov    0x2bff(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
call   1090 <fseek@plt>
test   %ebp,%ebp
jle    1417 <_defaults_rc_read_line+0x2a7>
mov    (%rsp),%r12d
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    (%r14),%rcx
mov    %al,(%rcx,%rbp,1)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1400 <_defaults_rc_read_line+0x290>
mov    (%r14),%rax
sar    $0x20,%r15
movb   $0x0,(%rax,%r15,1)
test   %r13,%r13
je     1431 <_defaults_rc_read_line+0x2c1>
mov    0x10(%rsp),%rax
mov    %rax,0x0(%r13)
mov    0x40(%rsp),%rcx
test   %rcx,%rcx
mov    0x28(%rsp),%r15
je     144c <_defaults_rc_read_line+0x2dc>
movslq (%rsp),%rax
add    0x10(%rsp),%rax
mov    %rax,(%rcx)
mov    $0x1,%eax
mov    0x30(%rsp),%r14
jmp    11e8 <_defaults_rc_read_line+0x78>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @_defaults_rc_read_line(i32* %0, i8** %1, i8** %2, i32* %3, i64* %4, i64* %5) {
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i8**
%10 = alloca i8**
%11 = alloca i32*
%12 = alloca i64*
%13 = alloca i64*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
store i32* %0, i32** %8
store i8** %1, i8*** %9
store i8** %2, i8*** %10
store i32* %3, i32** %11
store i64* %4, i64** %12
store i64* %5, i64** %13
%22 = load i8**, i8*** %9
%23 = icmp ne i8** %22, null
br i1 %23, label %24, label %26
24: ; preds = %6
%25 = load i8**, i8*** %9
store i8* null, i8** %25
br label %26
26: ; preds = %24, %6
%27 = load i8**, i8*** %10
%28 = icmp ne i8** %27, null
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = load i8**, i8*** %10
store i8* null, i8** %30
br label %31
31: ; preds = %29, %26
%32 = load i32*, i32** %8
%33 = call i64 @ftell(i32* %32)
store i64 %33, i64* %21
%34 = load i32*, i32** %8
%35 = call i32 @_defaults_rc_skip_spaces(i32* %34)
%36 = load i32*, i32** %8
%37 = call i64 @ftell(i32* %36)
store i64 %37, i64* %18
%38 = load i32*, i32** %8
%39 = call i32 @fgetc(i32* %38)
store i32 %39, i32* %14
%40 = load i32*, i32** %8
%41 = call i64 @feof(i32* %40)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %31
%44 = load i32*, i32** %11
%45 = icmp ne i32* %44, null
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = load i32*, i32** %11
store i32 2, i32* %47
br label %48
48: ; preds = %46, %43
%49 = load i32*, i32** %8
%50 = load i64, i64* %21
%51 = load i32, i32* @SEEK_SET
%52 = call i32 @fseek(i32* %49, i64 %50, i32 %51)
store i32 0, i32* %7
br label %256
53: ; preds = %31
%54 = load i32, i32* %14
%55 = icmp eq i32 %54, 35
br i1 %55, label %56, label %66
56: ; preds = %53
%57 = load i32*, i32** %11
%58 = icmp ne i32* %57, null
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = load i32*, i32** %11
store i32 3, i32* %60
br label %61
61: ; preds = %59, %56
%62 = load i32*, i32** %8
%63 = load i64, i64* %21
%64 = load i32, i32* @SEEK_SET
%65 = call i32 @fseek(i32* %62, i64 %63, i32 %64)
store i32 0, i32* %7
br label %256
66: ; preds = %53
%67 = load i32, i32* %14
%68 = icmp eq i32 %67, 10
br i1 %68, label %69, label %79
69: ; preds = %66
%70 = load i32*, i32** %11
%71 = icmp ne i32* %70, null
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = load i32*, i32** %11
store i32 2, i32* %73
br label %74
74: ; preds = %72, %69
%75 = load i32*, i32** %8
%76 = load i64, i64* %21
%77 = load i32, i32* @SEEK_SET
%78 = call i32 @fseek(i32* %75, i64 %76, i32 %77)
store i32 0, i32* %7
br label %256
79: ; preds = %66
store i32 0, i32* %15
br label %80
80: ; preds = %102, %79
%81 = load i32, i32* %15
%82 = add nsw i32 %81, 1
store i32 %82, i32* %15
%83 = load i32*, i32** %8
%84 = call i32 @fgetc(i32* %83)
store i32 %84, i32* %14
%85 = load i32*, i32** %8
%86 = call i64 @feof(i32* %85)
%87 = icmp ne i64 %86, 0
br i1 %87, label %91, label %88
88: ; preds = %80
%89 = load i32, i32* %14
%90 = icmp eq i32 %89, 10
br i1 %90, label %91, label %92
91: ; preds = %88, %80
store i32 1, i32* %7
br label %256
92: ; preds = %88
br label %93
93: ; preds = %92
%94 = load i32, i32* %14
%95 = icmp ne i32 %94, 32
br i1 %95, label %96, label %102
96: ; preds = %93
%97 = load i32, i32* %14
%98 = icmp ne i32 %97, 61
br i1 %98, label %99, label %102
99: ; preds = %96
%100 = load i32, i32* %14
%101 = icmp ne i32 %100, 9
br label %102
102: ; preds = %99, %96, %93
%103 = phi i1 [ false, %96 ], [ false, %93 ], [ %101, %99 ]
br i1 %103, label %80, label %104
104: ; preds = %102
%105 = load i32, i32* %14
%106 = icmp ne i32 %105, 61
br i1 %106, label %107, label %116
107: ; preds = %104
%108 = load i32*, i32** %8
%109 = call i32 @_defaults_rc_skip_spaces(i32* %108)
%110 = load i32*, i32** %8
%111 = call i32 @fgetc(i32* %110)
store i32 %111, i32* %14
%112 = load i32, i32* %14
%113 = icmp ne i32 %112, 61
br i1 %113, label %114, label %115
114: ; preds = %107
store i32 1, i32* %7
br label %256
115: ; preds = %107
br label %116
116: ; preds = %115, %104
%117 = load i32*, i32** %8
%118 = call i32 @_defaults_rc_skip_spaces(i32* %117)
%119 = load i32*, i32** %8
%120 = call i64 @ftell(i32* %119)
store i64 %120, i64* %19
store i32 0, i32* %16
store i64 0, i64* %20
br label %121
121: ; preds = %148, %116
%122 = load i32*, i32** %8
%123 = call i64 @feof(i32* %122)
%124 = icmp ne i64 %123, 0
%125 = xor i1 %124, true
br i1 %125, label %126, label %149
126: ; preds = %121
%127 = load i32*, i32** %8
%128 = call i32 @fgetc(i32* %127)
store i32 %128, i32* %14
%129 = load i32, i32* %14
%130 = icmp ne i32 %129, 10
br i1 %130, label %131, label %147
131: ; preds = %126
%132 = load i32*, i32** %8
%133 = call i64 @feof(i32* %132)
%134 = icmp ne i64 %133, 0
br i1 %134, label %147, label %135
135: ; preds = %131
%136 = load i32, i32* %16
%137 = add nsw i32 %136, 1
store i32 %137, i32* %16
%138 = load i32, i32* %14
%139 = icmp ne i32 %138, 32
br i1 %139, label %140, label %146
140: ; preds = %135
%141 = load i32, i32* %14
%142 = icmp ne i32 %141, 9
br i1 %142, label %143, label %146
143: ; preds = %140
%144 = load i32, i32* %16
%145 = sext i32 %144 to i64
store i64 %145, i64* %20
br label %146
146: ; preds = %143, %140, %135
br label %148
147: ; preds = %131, %126
br label %149
148: ; preds = %146
br label %121
149: ; preds = %147, %121
%150 = load i64, i64* %20
%151 = trunc i64 %150 to i32
store i32 %151, i32* %16
%152 = load i8**, i8*** %9
%153 = icmp ne i8** %152, null
br i1 %153, label %154, label %191
154: ; preds = %149
%155 = load i32, i32* %15
%156 = add nsw i32 %155, 1
%157 = sext i32 %156 to i64
%158 = mul i64 8, %157
%159 = trunc i64 %158 to i32
%160 = call i8* @malloc(i32 %159)
%161 = load i8**, i8*** %9
store i8* %160, i8** %161
%162 = load i8**, i8*** %9
%163 = load i8*, i8** %162
%164 = call i32 @assert(i8* %163)
%165 = load i32*, i32** %8
%166 = load i64, i64* %18
%167 = load i32, i32* @SEEK_SET
%168 = call i32 @fseek(i32* %165, i64 %166, i32 %167)
store i32 0, i32* %17
br label %169
169: ; preds = %182, %154
%170 = load i32, i32* %17
%171 = load i32, i32* %15
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %185
173: ; preds = %169
%174 = load i32*, i32** %8
%175 = call i32 @fgetc(i32* %174)
%176 = trunc i32 %175 to i8
%177 = load i8**, i8*** %9
%178 = load i8*, i8** %177
%179 = load i32, i32* %17
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i8, i8* %178, i64 %180
store i8 %176, i8* %181
br label %182
182: ; preds = %173
%183 = load i32, i32* %17
%184 = add nsw i32 %183, 1
store i32 %184, i32* %17
br label %169
185: ; preds = %169
%186 = load i8**, i8*** %9
%187 = load i8*, i8** %186
%188 = load i32, i32* %15
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i8, i8* %187, i64 %189
store i8 0, i8* %190
br label %191
191: ; preds = %185, %149
%192 = load i8**, i8*** %10
%193 = icmp ne i8** %192, null
br i1 %193, label %194, label %231
194: ; preds = %191
%195 = load i32, i32* %16
%196 = add nsw i32 %195, 1
%197 = sext i32 %196 to i64
%198 = mul i64 8, %197
%199 = trunc i64 %198 to i32
%200 = call i8* @malloc(i32 %199)
%201 = load i8**, i8*** %10
store i8* %200, i8** %201
%202 = load i8**, i8*** %10
%203 = load i8*, i8** %202
%204 = call i32 @assert(i8* %203)
%205 = load i32*, i32** %8
%206 = load i64, i64* %19
%207 = load i32, i32* @SEEK_SET
%208 = call i32 @fseek(i32* %205, i64 %206, i32 %207)
store i32 0, i32* %17
br label %209
209: ; preds = %222, %194
%210 = load i32, i32* %17
%211 = load i32, i32* %16
%212 = icmp slt i32 %210, %211
br i1 %212, label %213, label %225
213: ; preds = %209
%214 = load i32*, i32** %8
%215 = call i32 @fgetc(i32* %214)
%216 = trunc i32 %215 to i8
%217 = load i8**, i8*** %10
%218 = load i8*, i8** %217
%219 = load i32, i32* %17
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8, i8* %218, i64 %220
store i8 %216, i8* %221
br label %222
222: ; preds = %213
%223 = load i32, i32* %17
%224 = add nsw i32 %223, 1
store i32 %224, i32* %17
br label %209
225: ; preds = %209
%226 = load i8**, i8*** %10
%227 = load i8*, i8** %226
%228 = load i32, i32* %16
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i8, i8* %227, i64 %229
store i8 0, i8* %230
br label %231
231: ; preds = %225, %191
%232 = load i64*, i64** %12
%233 = icmp ne i64* %232, null
br i1 %233, label %234, label %237
234: ; preds = %231
%235 = load i64, i64* %19
%236 = load i64*, i64** %12
store i64 %235, i64* %236
br label %237
237: ; preds = %234, %231
%238 = load i64*, i64** %13
%239 = icmp ne i64* %238, null
br i1 %239, label %240, label %246
240: ; preds = %237
%241 = load i64, i64* %19
%242 = load i32, i32* %16
%243 = sext i32 %242 to i64
%244 = add nsw i64 %241, %243
%245 = load i64*, i64** %13
store i64 %244, i64* %245
br label %246
246: ; preds = %240, %237
%247 = load i32*, i32** %11
%248 = icmp ne i32* %247, null
br i1 %248, label %249, label %251
249: ; preds = %246
%250 = load i32*, i32** %11
store i32 1, i32* %250
br label %251
251: ; preds = %249, %246
%252 = load i32*, i32** %8
%253 = load i64, i64* %21
%254 = load i32, i32* @SEEK_SET
%255 = call i32 @fseek(i32* %252, i64 %253, i32 %254)
store i32 0, i32* %7
br label %256
256: ; preds = %251, %114, %91, %74, %61, %48
%257 = load i32, i32* %7
ret i32 %257
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @_defaults_rc_read_line(i32* %0, i8** %1, i8** %2, i32* writeonly %3, i64* writeonly %4, i64* writeonly %5) {
%7 = icmp eq i8** %1, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i8* null, i8** %1
br label %9
9: ; preds = %8, %6
%10 = icmp eq i8** %2, null
br i1 %10, label %12, label %11
11: ; preds = %9
store i8* null, i8** %2
br label %12
12: ; preds = %11, %9
%13 = tail call i64 @ftell(i32* %0)
%14 = tail call i32 @_defaults_rc_skip_spaces(i32* %0)
%15 = tail call i64 @ftell(i32* %0)
%16 = tail call i32 @fgetc(i32* %0)
%17 = tail call i64 @feof(i32* %0)
%18 = icmp eq i64 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %12
%20 = icmp eq i32* %3, null
br i1 %20, label %119, label %117
21: ; preds = %12
switch i32 %16, label %26 [
i32 35, label %22
i32 10, label %24
]
22: ; preds = %21
%23 = icmp eq i32* %3, null
br i1 %23, label %119, label %117
24: ; preds = %21
%25 = icmp eq i32* %3, null
br i1 %25, label %119, label %117
26: ; preds = %21, %34
%27 = phi i32 [ %28, %34 ], [ 0, %21 ]
%28 = add nuw i32 %27, 1
%29 = tail call i32 @fgetc(i32* %0)
%30 = tail call i64 @feof(i32* %0)
%31 = icmp ne i64 %30, 0
%32 = icmp eq i32 %29, 10
%33 = or i1 %32, %31
br i1 %33, label %122, label %34
34: ; preds = %26
switch i32 %29, label %26 [
i32 61, label %39
i32 9, label %35
i32 32, label %35
]
35: ; preds = %34, %34
%36 = tail call i32 @_defaults_rc_skip_spaces(i32* %0)
%37 = tail call i32 @fgetc(i32* %0)
%38 = icmp eq i32 %37, 61
br i1 %38, label %39, label %122
39: ; preds = %34, %35
%40 = tail call i32 @_defaults_rc_skip_spaces(i32* %0)
%41 = tail call i64 @ftell(i32* %0)
%42 = tail call i64 @feof(i32* %0)
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %59
44: ; preds = %39, %55
%45 = phi i64 [ %53, %55 ], [ 0, %39 ]
%46 = phi i64 [ %56, %55 ], [ 0, %39 ]
%47 = tail call i32 @fgetc(i32* %0)
%48 = icmp eq i32 %47, 10
br i1 %48, label %59, label %49
49: ; preds = %44
%50 = tail call i64 @feof(i32* %0)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %49
%53 = add nuw i64 %45, 1
switch i32 %47, label %54 [
i32 32, label %55
i32 9, label %55
]
54: ; preds = %52
br label %55
55: ; preds = %52, %52, %54
%56 = phi i64 [ %53, %54 ], [ %46, %52 ], [ %46, %52 ]
%57 = tail call i64 @feof(i32* %0)
%58 = icmp eq i64 %57, 0
br i1 %58, label %44, label %59
59: ; preds = %55, %49, %44, %39
%60 = phi i64 [ 0, %39 ], [ %46, %44 ], [ %46, %49 ], [ %56, %55 ]
%61 = trunc i64 %60 to i32
br i1 %7, label %81, label %62
62: ; preds = %59
%63 = shl i32 %27, 3
%64 = add i32 %63, 16
%65 = tail call i8* @malloc(i32 %64)
store i8* %65, i8** %1
%66 = tail call i32 @assert(i8* %65)
%67 = load i32, i32* @SEEK_SET
%68 = tail call i32 @fseek(i32* %0, i64 %15, i32 %67)
%69 = zext i32 %28 to i64
br label %70
70: ; preds = %62, %70
%71 = phi i64 [ 0, %62 ], [ %76, %70 ]
%72 = tail call i32 @fgetc(i32* %0)
%73 = trunc i32 %72 to i8
%74 = load i8*, i8** %1
%75 = getelementptr inbounds i8, i8* %74, i64 %71
store i8 %73, i8* %75
%76 = add nuw nsw i64 %71, 1
%77 = icmp eq i64 %76, %69
br i1 %77, label %78, label %70
78: ; preds = %70
%79 = load i8*, i8** %1
%80 = getelementptr inbounds i8, i8* %79, i64 %69
store i8 0, i8* %80
br label %81
81: ; preds = %78, %59
br i1 %10, label %106, label %82
82: ; preds = %81
%83 = shl i64 %60, 32
%84 = add i64 %83, 4294967296
%85 = lshr exact i64 %84, 29
%86 = trunc i64 %85 to i32
%87 = tail call i8* @malloc(i32 %86)
store i8* %87, i8** %2
%88 = tail call i32 @assert(i8* %87)
%89 = load i32, i32* @SEEK_SET
%90 = tail call i32 @fseek(i32* %0, i64 %41, i32 %89)
%91 = icmp sgt i32 %61, 0
br i1 %91, label %92, label %102
92: ; preds = %82
%93 = and i64 %60, 4294967295
br label %94
94: ; preds = %92, %94
%95 = phi i64 [ 0, %92 ], [ %100, %94 ]
%96 = tail call i32 @fgetc(i32* %0)
%97 = trunc i32 %96 to i8
%98 = load i8*, i8** %2
%99 = getelementptr inbounds i8, i8* %98, i64 %95
store i8 %97, i8* %99
%100 = add nuw nsw i64 %95, 1
%101 = icmp eq i64 %100, %93
br i1 %101, label %102, label %94
102: ; preds = %94, %82
%103 = load i8*, i8** %2
%104 = ashr exact i64 %83, 32
%105 = getelementptr inbounds i8, i8* %103, i64 %104
store i8 0, i8* %105
br label %106
106: ; preds = %102, %81
%107 = icmp eq i64* %4, null
br i1 %107, label %109, label %108
108: ; preds = %106
store i64 %41, i64* %4
br label %109
109: ; preds = %108, %106
%110 = icmp eq i64* %5, null
br i1 %110, label %115, label %111
111: ; preds = %109
%112 = shl i64 %60, 32
%113 = ashr exact i64 %112, 32
%114 = add nsw i64 %113, %41
store i64 %114, i64* %5
br label %115
115: ; preds = %111, %109
%116 = icmp eq i32* %3, null
br i1 %116, label %119, label %117
117: ; preds = %115, %24, %22, %19
%118 = phi i32 [ 2, %19 ], [ 3, %22 ], [ 2, %24 ], [ 1, %115 ]
store i32 %118, i32* %3
br label %119
119: ; preds = %117, %115, %24, %22, %19
%120 = load i32, i32* @SEEK_SET
%121 = tail call i32 @fseek(i32* %0, i64 %13, i32 %120)
br label %122
122: ; preds = %26, %119, %35
%123 = phi i32 [ 1, %35 ], [ 0, %119 ], [ 1, %26 ]
ret i32 %123
}