#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 strlen(char *);
int econfig_isComment(char *line) {
  if (strlen(line) < 1) {
    return 1;
  }
  switch (line[0]) {
  case '/':
    if (strlen(line) < 2 || line[1] != '/') {
      return 0;
    }
  case '#':
  case ';':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<econfig_isComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jge    113a <econfig_isComment+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    11bb <econfig_isComment+0xab>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x23,%eax
je     11a8 <econfig_isComment+0x98>
jmp    1152 <econfig_isComment+0x42>
mov    -0x14(%rbp),%eax
sub    $0x2f,%eax
je     1174 <econfig_isComment+0x64>
jmp    1163 <econfig_isComment+0x53>
mov    -0x14(%rbp),%eax
sub    $0x3b,%eax
je     11a8 <econfig_isComment+0x98>
jmp    11b4 <econfig_isComment+0xa4>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     1197 <econfig_isComment+0x87>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
je     11a3 <econfig_isComment+0x93>
movl   $0x0,-0x4(%rbp)
jmp    11bb <econfig_isComment+0xab>
jmp    11a8 <econfig_isComment+0x98>
movl   $0x1,-0x4(%rbp)
jmp    11bb <econfig_isComment+0xab>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<econfig_isComment>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    $0x1,%ebp
test   %eax,%eax
jle    1150 <econfig_isComment+0x40>
movsbl (%rbx),%eax
cmp    $0x23,%eax
je     114b <econfig_isComment+0x3b>
cmp    $0x3b,%eax
je     114b <econfig_isComment+0x3b>
xor    %ebp,%ebp
cmp    $0x2f,%eax
jne    1150 <econfig_isComment+0x40>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     1150 <econfig_isComment+0x40>
cmpb   $0x2f,0x1(%rbx)
jne    1150 <econfig_isComment+0x40>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @econfig_isComment(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %27
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
switch i32 %12, label %26 [
i32 47, label %13
i32 35, label %25
i32 59, label %25
]
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i32 @strlen(i8* %14)
%16 = icmp slt i32 %15, 2
br i1 %16, label %23, label %17
17: ; preds = %13
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 47
br i1 %22, label %23, label %24
23: ; preds = %17, %13
store i32 0, i32* %2
br label %27
24: ; preds = %17
br label %25
25: ; preds = %8, %8, %24
store i32 1, i32* %2
br label %27
26: ; preds = %8
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %23, %7
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @econfig_isComment(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %15, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
switch i32 %6, label %15 [
i32 47, label %7
i32 35, label %14
i32 59, label %14
]
7: ; preds = %4
%8 = tail call i32 @strlen(i8* %0)
%9 = icmp slt i32 %8, 2
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 47
br i1 %13, label %14, label %15
14: ; preds = %10, %4, %4
br label %15
15: ; preds = %4, %7, %10, %1, %14
%16 = phi i32 [ 1, %14 ], [ 1, %1 ], [ 0, %10 ], [ 0, %7 ], [ 0, %4 ]
ret i32 %16
}