#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 atoi(char const *);
void parse(const char *line, char *key, int *len, int *oft) {
  while (*line != '\n') {
    *key++ = *line++;
    if (*line == '\x88') {
      *key = 0;
      line++;
      *len = atoi(line);
      while (*line++ != '\xaf')
        ;
      *oft = atoi(line);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     11c9 <parse+0xb9>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xffffff88,%eax
jne    11c4 <parse+0xb4>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0xffffffaf,%eax
je     11ae <parse+0x9e>
jmp    118e <parse+0x7e>
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    11c9 <parse+0xb9>
jmp    1128 <parse+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
mov    (%rdi),%al
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xa,%al
je     1174 <parse+0x64>
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0x88,%al
jne    1130 <parse+0x20>
movb   $0x0,(%rsi)
mov    %rbx,%rdi
call   1030 <atoi@plt>
mov    %eax,(%r15)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0xaf,(%rbx)
lea    0x1(%rbx),%rbx
jne    1160 <parse+0x50>
mov    %rbx,%rdi
call   1030 <atoi@plt>
mov    %eax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @parse(i8* %0, i8* %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
br label %9
9: ; preds = %42, %4
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 10
br i1 %13, label %14, label %43
14: ; preds = %9
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %5
%17 = load i8, i8* %15
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %6
store i8 %17, i8* %18
%20 = load i8*, i8** %5
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, -120
br i1 %23, label %24, label %42
24: ; preds = %14
%25 = load i8*, i8** %6
store i8 0, i8* %25
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %5
%28 = load i8*, i8** %5
%29 = call i32 @atoi(i8* %28)
%30 = load i32*, i32** %7
store i32 %29, i32* %30
br label %31
31: ; preds = %37, %24
%32 = load i8*, i8** %5
%33 = getelementptr inbounds i8, i8* %32, i32 1
store i8* %33, i8** %5
%34 = load i8, i8* %32
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, -81
br i1 %36, label %37, label %38
37: ; preds = %31
br label %31
38: ; preds = %31
%39 = load i8*, i8** %5
%40 = call i32 @atoi(i8* %39)
%41 = load i32*, i32** %8
store i32 %40, i32* %41
br label %43
42: ; preds = %14
br label %9
43: ; preds = %38, %9
ret void
}

LLVM IR (-O2):
define void @parse(i8* nocapture %0, i8* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = load i8, i8* %0
br label %6
6: ; preds = %11, %4
%7 = phi i8 [ %14, %11 ], [ %5, %4 ]
%8 = phi i8* [ %13, %11 ], [ %1, %4 ]
%9 = phi i8* [ %12, %11 ], [ %0, %4 ]
%10 = icmp eq i8 %7, 10
br i1 %10, label %26, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %8
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, -120
br i1 %15, label %16, label %6
16: ; preds = %11
store i8 0, i8* %13
%17 = getelementptr inbounds i8, i8* %9, i64 2
%18 = tail call i32 @atoi(i8* %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %19, %16
%20 = phi i8* [ %17, %16 ], [ %21, %19 ]
%21 = getelementptr inbounds i8, i8* %20, i64 1
%22 = load i8, i8* %20
%23 = icmp eq i8 %22, -81
br i1 %23, label %24, label %19
24: ; preds = %19
%25 = tail call i32 @atoi(i8* %21)
store i32 %25, i32* %3
br label %26
26: ; preds = %6, %24
ret void
}