#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__ isspace(char);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
char *CheckParam(char *line, char *token) {
  char *ret;
  if (strncmp(line, token, strlen(token)) == 0) {
    ret = line + strlen(token);
    while (isspace(*ret))
      ret++;
    if (*ret == '=') {
      ret++;
    }
  } else {
    ret = NULL;
  }
  return (ret);
}


x86 assembly (clang, -O0):
<CheckParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11db <CheckParam+0xab>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     11ba <CheckParam+0x8a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1193 <CheckParam+0x63>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
jne    11d6 <CheckParam+0xa6>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11e3 <CheckParam+0xb3>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckParam>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1158 <CheckParam+0x28>
xor    %eax,%eax
jmp    118d <CheckParam+0x5d>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
lea    (%rax,%r14,1),%rbx
add    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1050 <isspace@plt>
test   %rax,%rax
jne    1170 <CheckParam+0x40>
xor    %eax,%eax
cmpb   $0x3d,(%rbx)
sete   %al
add    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @CheckParam(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %21
6: ; preds = %2
%7 = tail call i32 @strlen(i8* %1)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
br label %10
10: ; preds = %10, %6
%11 = phi i8* [ %9, %6 ], [ %15, %10 ]
%12 = load i8, i8* %11
%13 = tail call i64 @isspace(i8 signext %12)
%14 = icmp eq i64 %13, 0
%15 = getelementptr inbounds i8, i8* %11, i64 1
br i1 %14, label %16, label %10
16: ; preds = %10
%17 = load i8, i8* %11
%18 = icmp eq i8 %17, 61
%19 = zext i1 %18 to i64
%20 = getelementptr i8, i8* %11, i64 %19
br label %21
21: ; preds = %16, %2
%22 = phi i8* [ %20, %16 ], [ null, %2 ]
ret i8* %22
}