#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 lexLookahead();
int /*<<< orphan*/ lexPushLookaheadc(char);
int /*<<< orphan*/ lexSkipLookahead();
int /*<<< orphan*/ lexSkipWhite();
void handleMoreRFC822LineBreak(int c) {
  if (c == ';') {
    int a;
    lexSkipLookahead();
    a = lexLookahead();
    while (a == ' ' || a == '\t') {
      lexSkipLookahead();
      a = lexLookahead();
    }
    if (a == '\n') {
      lexSkipLookahead();
      a = lexLookahead();
      if (a == ' ' || a == '\t') {
        lexSkipWhite();
        lexPushLookaheadc(';');
      } else {
        lexPushLookaheadc('\n');
        lexPushLookaheadc(';');
      }
    } else {
      lexPushLookaheadc(';');
    }
  }
}


x86 assembly (clang, -O0):
<handleMoreRFC822LineBreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3b,-0x4(%rbp)
jne    1212 <handleMoreRFC822LineBreak+0xd2>
mov    $0x0,%al
call   1030 <lexSkipLookahead@plt>
mov    $0x0,%al
call   1060 <lexLookahead@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117f <handleMoreRFC822LineBreak+0x3f>
cmpl   $0x9,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    118f <handleMoreRFC822LineBreak+0x4f>
jmp    11a5 <handleMoreRFC822LineBreak+0x65>
mov    $0x0,%al
call   1030 <lexSkipLookahead@plt>
mov    $0x0,%al
call   1060 <lexLookahead@plt>
mov    %eax,-0x8(%rbp)
jmp    1166 <handleMoreRFC822LineBreak+0x26>
cmpl   $0xa,-0x8(%rbp)
jne    1203 <handleMoreRFC822LineBreak+0xc3>
mov    $0x0,%al
call   1030 <lexSkipLookahead@plt>
mov    $0x0,%al
call   1060 <lexLookahead@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     11d4 <handleMoreRFC822LineBreak+0x94>
cmpl   $0x9,-0x8(%rbp)
jne    11ea <handleMoreRFC822LineBreak+0xaa>
mov    $0x0,%al
call   1040 <lexSkipWhite@plt>
mov    $0x3b,%edi
call   1050 <lexPushLookaheadc@plt>
jmp    11fe <handleMoreRFC822LineBreak+0xbe>
mov    $0xa,%edi
call   1050 <lexPushLookaheadc@plt>
mov    $0x3b,%edi
call   1050 <lexPushLookaheadc@plt>
jmp    120d <handleMoreRFC822LineBreak+0xcd>
mov    $0x3b,%edi
call   1050 <lexPushLookaheadc@plt>
jmp    1212 <handleMoreRFC822LineBreak+0xd2>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleMoreRFC822LineBreak>:
cmp    $0x3b,%edi
jne    118e <handleMoreRFC822LineBreak+0x4e>
push   %rax
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lexSkipLookahead@plt>
xor    %eax,%eax
call   1060 <lexLookahead@plt>
cmp    $0x9,%eax
je     1150 <handleMoreRFC822LineBreak+0x10>
cmp    $0x20,%eax
je     1150 <handleMoreRFC822LineBreak+0x10>
cmp    $0xa,%eax
jne    1199 <handleMoreRFC822LineBreak+0x59>
xor    %eax,%eax
call   1030 <lexSkipLookahead@plt>
xor    %eax,%eax
call   1060 <lexLookahead@plt>
cmp    $0x20,%eax
je     1185 <handleMoreRFC822LineBreak+0x45>
cmp    $0x9,%eax
jne    118f <handleMoreRFC822LineBreak+0x4f>
xor    %eax,%eax
call   1040 <lexSkipWhite@plt>
jmp    1199 <handleMoreRFC822LineBreak+0x59>
ret
mov    $0xa,%edi
call   1050 <lexPushLookaheadc@plt>
mov    $0x3b,%edi
pop    %rax
jmp    1050 <lexPushLookaheadc@plt>

LLVM IR (-O0):
define void @handleMoreRFC822LineBreak(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 59
br i1 %5, label %6, label %41
6: ; preds = %1
%7 = call i32 (...) @lexSkipLookahead()
%8 = call i32 (...) @lexLookahead()
store i32 %8, i32* %3
br label %9
9: ; preds = %17, %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 32
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ true, %9 ], [ %14, %12 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = call i32 (...) @lexSkipLookahead()
%19 = call i32 (...) @lexLookahead()
store i32 %19, i32* %3
br label %9
20: ; preds = %15
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 10
br i1 %22, label %23, label %38
23: ; preds = %20
%24 = call i32 (...) @lexSkipLookahead()
%25 = call i32 (...) @lexLookahead()
store i32 %25, i32* %3
%26 = load i32, i32* %3
%27 = icmp eq i32 %26, 32
br i1 %27, label %31, label %28
28: ; preds = %23
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 9
br i1 %30, label %31, label %34
31: ; preds = %28, %23
%32 = call i32 (...) @lexSkipWhite()
%33 = call i32 @lexPushLookaheadc(i8 signext 59)
br label %37
34: ; preds = %28
%35 = call i32 @lexPushLookaheadc(i8 signext 10)
%36 = call i32 @lexPushLookaheadc(i8 signext 59)
br label %37
37: ; preds = %34, %31
br label %40
38: ; preds = %20
%39 = call i32 @lexPushLookaheadc(i8 signext 59)
br label %40
40: ; preds = %38, %37
br label %41
41: ; preds = %40, %1
ret void
}

LLVM IR (-O2):
define void @handleMoreRFC822LineBreak(i32 %0) {
%2 = icmp eq i32 %0, 59
br i1 %2, label %3, label %16
3: ; preds = %1, %6
%4 = tail call i32 (...) @lexSkipLookahead()
%5 = tail call i32 (...) @lexLookahead()
switch i32 %5, label %14 [
i32 32, label %6
i32 9, label %6
i32 10, label %7
]
6: ; preds = %3, %3
br label %3
7: ; preds = %3
%8 = tail call i32 (...) @lexSkipLookahead()
%9 = tail call i32 (...) @lexLookahead()
switch i32 %9, label %12 [
i32 32, label %10
i32 9, label %10
]
10: ; preds = %7, %7
%11 = tail call i32 (...) @lexSkipWhite()
br label %14
12: ; preds = %7
%13 = tail call i32 @lexPushLookaheadc(i8 signext 10)
br label %14
14: ; preds = %3, %10, %12
%15 = tail call i32 @lexPushLookaheadc(i8 signext 59)
br label %16
16: ; preds = %14, %1
ret void
}