#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 */
struct struct_automata {
  int dummy;
};

/* Variables and functions */
int *____func_in_input(struct struct_automata *, char *, int /*<<< orphan*/);
int *___func_in_input(struct struct_automata *p, char *s, char buf[], int i) {
  if (i >= 64 && *s != '\0')
    return NULL;
  if (*s == '\0') {
    buf[i] = -1;
    return ____func_in_input(p, buf, 0);
  }
  buf[i] = *s;
  return ___func_in_input(p, s + 1, buf, i + 1);
}


x86 assembly (clang, -O0):
<___func_in_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x40,-0x24(%rbp)
jl     115e <___func_in_input+0x3e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <___func_in_input+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    11c2 <___func_in_input+0xa2>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1192 <___func_in_input+0x72>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0xff,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <____func_in_input@plt>
mov    %rax,-0x8(%rbp)
jmp    11c2 <___func_in_input+0xa2>
mov    -0x18(%rbp),%rax
mov    (%rax),%dl
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
call   1040 <___func_in_input@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<___func_in_input>:
cmp    $0x3f,%ecx
jg     1152 <___func_in_input+0x42>
movslq %ecx,%r8
add    %rdx,%r8
mov    %ecx,%r9d
add    $0xffffffffffffffc0,%r9
xor    %r11d,%r11d
xor    %r10d,%r10d
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%r11,1),%eax
test   %al,%al
je     115a <___func_in_input+0x4a>
mov    %al,(%r8,%r11,1)
add    $0xffffffffffffffff,%r10
add    $0x1,%r11
cmp    %r10d,%r9d
jne    1130 <___func_in_input+0x20>
sub    %r10,%rsi
mov    $0x40,%ecx
cmpb   $0x0,(%rsi)
je     115d <___func_in_input+0x4d>
xor    %eax,%eax
ret
sub    %r10d,%ecx
movslq %ecx,%rax
movb   $0xff,(%rdx,%rax,1)
mov    %rdx,%rsi
xor    %edx,%edx
jmp    1030 <____func_in_input@plt>

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

LLVM IR (-O2):
%struct.struct_automata = type { i32 }
define i32* @___func_in_input(%struct.struct_automata* %0, i8* nocapture %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %3, 63
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = sext i32 %3 to i64
br label %13
8: ; preds = %25, %4
%9 = phi i8* [ %1, %4 ], [ %27, %25 ]
%10 = phi i32 [ %3, %4 ], [ 64, %25 ]
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %20, label %31
13: ; preds = %6, %25
%14 = phi i64 [ %7, %6 ], [ %28, %25 ]
%15 = phi i8* [ %1, %6 ], [ %27, %25 ]
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %13
%19 = trunc i64 %14 to i32
br label %20
20: ; preds = %18, %8
%21 = phi i32 [ %10, %8 ], [ %19, %18 ]
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %2, i64 %22
store i8 -1, i8* %23
%24 = tail call i32* @____func_in_input(%struct.struct_automata* %0, i8* %2, i32 0)
br label %31
25: ; preds = %13
%26 = getelementptr inbounds i8, i8* %2, i64 %14
store i8 %16, i8* %26
%27 = getelementptr inbounds i8, i8* %15, i64 1
%28 = add nsw i64 %14, 1
%29 = trunc i64 %28 to i32
%30 = icmp eq i32 %29, 64
br i1 %30, label %8, label %13
31: ; preds = %8, %20
%32 = phi i32* [ %24, %20 ], [ null, %8 ]
ret i32* %32
}