#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 */
const char *skip_line(const char *in) {
  while (in && *in && *in != '\n')
    in++;
  return (in && *in == '\n') ? ++in : NULL;
}


x86 assembly (clang, -O0):
<skip_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113d <skip_line+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     113d <skip_line+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    114d <skip_line+0x4d>
jmp    115e <skip_line+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_line+0x8>
cmpq   $0x0,-0x8(%rbp)
je     118e <skip_line+0x8e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    118e <skip_line+0x8e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    %rax,-0x18(%rbp)
jmp    1199 <skip_line+0x99>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1199 <skip_line+0x99>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_line>:
test   %rdi,%rdi
je     112b <skip_line+0x2b>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rdi
movzbl -0x1(%rdi),%ecx
test   %cl,%cl
je     1121 <skip_line+0x21>
cmp    $0xa,%cl
jne    1110 <skip_line+0x10>
xor    %eax,%eax
cmp    $0xa,%cl
cmove  %rdi,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @skip_line(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %18, %1
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 10
br label %16
16: ; preds = %11, %6, %3
%17 = phi i1 [ false, %6 ], [ false, %3 ], [ %15, %11 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %3
21: ; preds = %16
%22 = load i8*, i8** %2
%23 = icmp ne i8* %22, null
br i1 %23, label %24, label %32
24: ; preds = %21
%25 = load i8*, i8** %2
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %32
29: ; preds = %24
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %2
br label %33
32: ; preds = %24, %21
br label %33
33: ; preds = %32, %29
%34 = phi i8* [ %31, %29 ], [ null, %32 ]
ret i8* %34
}

LLVM IR (-O2):
define i8* @skip_line(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %6
%4 = phi i8* [ %7, %6 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %8
i8 10, label %8
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %3, %3
%9 = icmp eq i8 %5, 10
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = select i1 %9, i8* %10, i8* null
br label %12
12: ; preds = %1, %8
%13 = phi i8* [ %11, %8 ], [ null, %1 ]
ret i8* %13
}