#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*/ F_FstC(char *, char **);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int F_GetV(char *str, char *v) {
  int i;
  char *n;
  for (i = 0; i < strlen(str); i++)
    if (str[i] == '=') {
      F_FstC(str + i + 1, &n);
      strcpy(v, n);
      v[strlen(v) - 1] = 0;
      return 1;
    }
  return 0;
}


x86 assembly (clang, -O0):
<F_GetV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    11dd <F_GetV+0xad>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
jne    11ca <F_GetV+0x9a>
mov    -0x10(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
add    $0x1,%rdi
lea    -0x28(%rbp),%rsi
call   1050 <F_FstC@plt>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x1,-0x4(%rbp)
jmp    11e4 <F_GetV+0xb4>
jmp    11cf <F_GetV+0x9f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1147 <F_GetV+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F_GetV>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    116a <F_GetV+0x3a>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
cmpb   $0x3d,(%r15,%rbx,1)
je     116e <F_GetV+0x3e>
add    $0x1,%rbx
mov    %r15,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1150 <F_GetV+0x20>
xor    %eax,%eax
jmp    11a2 <F_GetV+0x72>
lea    (%r15,%rbx,1),%rdi
add    $0x1,%rdi
lea    0x8(%rsp),%rsi
call   1050 <F_FstC@plt>
mov    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r14,1)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @F_GetV(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %38, %2
%9 = load i32, i32* %6
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %41
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 61
br i1 %20, label %21, label %37
21: ; preds = %13
%22 = load i8*, i8** %4
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = call i32 @F_FstC(i8* %26, i8** %7)
%28 = load i8*, i8** %5
%29 = load i8*, i8** %7
%30 = call i32 @strcpy(i8* %28, i8* %29)
%31 = load i8*, i8** %5
%32 = load i8*, i8** %5
%33 = call i32 @strlen(i8* %32)
%34 = sub nsw i32 %33, 1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %31, i64 %35
store i8 0, i8* %36
store i32 1, i32* %3
br label %42
37: ; preds = %13
br label %38
38: ; preds = %37
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
br label %8
41: ; preds = %8
store i32 0, i32* %3
br label %42
42: ; preds = %41, %21
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
define i32 @F_GetV(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %2, %23
%8 = phi i64 [ %24, %23 ], [ 0, %2 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 61
br i1 %11, label %12, label %23
12: ; preds = %7
%13 = and i64 %8, 4294967295
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = call i32 @F_FstC(i8* %15, i8** %3)
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %1, i8* %17)
%19 = call i32 @strlen(i8* %1)
%20 = add nsw i32 %19, -1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %1, i64 %21
store i8 0, i8* %22
br label %28
23: ; preds = %7
%24 = add nuw nsw i64 %8, 1
%25 = tail call i32 @strlen(i8* %0)
%26 = sext i32 %25 to i64
%27 = icmp slt i64 %24, %26
br i1 %27, label %7, label %28
28: ; preds = %23, %2, %12
%29 = phi i32 [ 1, %12 ], [ 0, %2 ], [ 0, %23 ]
ret i32 %29
}