#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 */
scalar_t__ cli_parse_line(char *);
scalar_t__ cli_read_line(char *, int);
int /*<<< orphan*/ printf(char *);
scalar_t__ read_config_file(char *, char *);
int main(int argc, char *argv[]) {
  char buffer[255 + 1];
  printf("PostMark v1.5 : 3/27/01\n");
  if (read_config_file((argc == 2) ? argv[1] : ".pmrc", buffer))
    while (cli_read_line(buffer, 255) && cli_parse_line(buffer))
      ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1183 <main+0x43>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x118(%rbp)
jmp    1196 <main+0x56>
lea    0xe8f(%rip),%rax
mov    %rax,-0x118(%rbp)
jmp    1196 <main+0x56>
mov    -0x118(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1050 <read_config_file@plt>
cmp    $0x0,%rax
je     1214 <main+0xd4>
jmp    11b8 <main+0x78>
lea    -0x110(%rbp),%rdi
mov    $0xff,%esi
call   1060 <cli_read_line@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x119(%rbp)
je     11f7 <main+0xb7>
lea    -0x110(%rbp),%rdi
call   1030 <cli_parse_line@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x119(%rbp)
mov    -0x119(%rbp),%al
test   $0x1,%al
jne    120a <main+0xca>
jmp    120f <main+0xcf>
jmp    11b8 <main+0x78>
jmp    1214 <main+0xd4>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%ebp
jne    1165 <main+0x25>
mov    0x8(%rbx),%rdi
jmp    116c <main+0x2c>
lea    0xe94(%rip),%rdi
mov    %rsp,%rsi
call   1050 <read_config_file@plt>
test   %rax,%rax
je     119f <main+0x5f>
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0xff,%esi
call   1060 <cli_read_line@plt>
test   %rax,%rax
je     119f <main+0x5f>
mov    %rbx,%rdi
call   1040 <cli_parse_line@plt>
test   %rax,%rax
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"PostMark v1.5 : 3/27/01\0A\00"
@.str.1 = [6 x i8] c".pmrc\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %10
%16 = phi i8* [ %13, %10 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %14 ]
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%18 = call i64 @read_config_file(i8* %16, i8* %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %15
br label %21
21: ; preds = %31, %20
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%23 = call i64 @cli_read_line(i8* %22, i32 255)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%27 = call i64 @cli_parse_line(i8* %26)
%28 = icmp ne i64 %27, 0
br label %29
29: ; preds = %25, %21
%30 = phi i1 [ false, %21 ], [ %28, %25 ]
br i1 %30, label %31, label %32
31: ; preds = %29
br label %21
32: ; preds = %29
br label %33
33: ; preds = %32, %15
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c".pmrc\00"
@str = [24 x i8] c"PostMark v1.5 : 3/27/01\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
br label %10
10: ; preds = %2, %7
%11 = phi i8* [ %9, %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %2 ]
%12 = call i64 @read_config_file(i8* %11, i8* %4)
%13 = icmp eq i64 %12, 0
br i1 %13, label %20, label %14
14: ; preds = %10, %17
%15 = call i64 @cli_read_line(i8* %4, i32 255)
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = call i64 @cli_parse_line(i8* %4)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %14
20: ; preds = %17, %14, %10
ret i32 0
}