#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 */
char *trim(char *);
void parse_param(char *line, char **key, char **value) {
  *key = line;
  while (*line != '=')
    line++;
  *line = '\0';
  *value = line + 1;
  *key = trim(*key);
  *value = trim(*value);
}


x86 assembly (clang, -O0):
<parse_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1150 <parse_param+0x40>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112f <parse_param+0x1f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <trim@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <trim@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_param>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,(%rsi)
nopl   (%rax)
cmpb   $0x3d,(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <parse_param+0x10>
movb   $0x0,-0x1(%rdi)
mov    %rdi,(%r14)
mov    (%rbx),%rdi
call   1030 <trim@plt>
mov    %rax,(%rbx)
mov    (%r14),%rdi
call   1030 <trim@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @parse_param(i8* %0, i8** nocapture %1, i8** nocapture %2) {
store i8* %0, i8** %1
br label %4
4: ; preds = %4, %3
%5 = phi i8* [ %0, %3 ], [ %8, %4 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 61
%8 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %7, label %9, label %4
9: ; preds = %4
store i8 0, i8* %5
store i8* %8, i8** %2
%10 = load i8*, i8** %1
%11 = tail call i8* @trim(i8* %10)
store i8* %11, i8** %1
%12 = load i8*, i8** %2
%13 = tail call i8* @trim(i8* %12)
store i8* %13, i8** %2
ret void
}