#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 /*<<< orphan*/ allocRule(int /*<<< orphan*/, int /*<<< orphan*/);
char *strchr(char *, char);
int /*<<< orphan*/ strtrim(char *);
void parseRule(char *line) {
  char *ptr;
  if (line[0] == '#')
    return;
  ptr = strchr(line, '=');
  if (!ptr)
    return;
  *ptr = 0;
  allocRule(strtrim(line), strtrim(ptr + 1));
}


x86 assembly (clang, -O0):
<parseRule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1151 <parseRule+0x21>
jmp    119d <parseRule+0x6d>
mov    -0x8(%rbp),%rdi
mov    $0x3d,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <parseRule+0x43>
jmp    119d <parseRule+0x6d>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1050 <strtrim@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <strtrim@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <allocRule@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseRule>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x23,(%rdi)
je     1177 <parseRule+0x47>
mov    %rdi,%rbx
mov    $0x3d,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1177 <parseRule+0x47>
mov    %rax,%r14
movb   $0x0,(%rax)
mov    %rbx,%rdi
call   1050 <strtrim@plt>
mov    %eax,%ebx
add    $0x1,%r14
mov    %r14,%rdi
call   1050 <strtrim@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <allocRule@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @parseRule(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 35
br i1 %8, label %9, label %10
9: ; preds = %1
br label %24
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i8* @strchr(i8* %11, i8 signext 61)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %16, label %15
15: ; preds = %10
br label %24
16: ; preds = %10
%17 = load i8*, i8** %3
store i8 0, i8* %17
%18 = load i8*, i8** %2
%19 = call i32 @strtrim(i8* %18)
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 1
%22 = call i32 @strtrim(i8* %21)
%23 = call i32 @allocRule(i32 %19, i32 %22)
br label %24
24: ; preds = %16, %15, %9
ret void
}

LLVM IR (-O2):
define void @parseRule(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 35
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = tail call i8* @strchr(i8* %0, i8 signext 61)
%6 = icmp eq i8* %5, null
br i1 %6, label %12, label %7
7: ; preds = %4
store i8 0, i8* %5
%8 = tail call i32 @strtrim(i8* %0)
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = tail call i32 @strtrim(i8* %9)
%11 = tail call i32 @allocRule(i32 %8, i32 %10)
br label %12
12: ; preds = %4, %1, %7
ret void
}