#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*/ exec_kernel_doc(char **);
scalar_t__ isspace(char);
void singfunc(char *filename, signed char *line) {
  char *vec[200];
  int i, idx = 0;
  int startofsym = 1;
  vec[idx++] = "kernel-doc";
  vec[idx++] = "-docbook";
  for (i = 0; line[i]; i++) {
    if (isspace(line[i])) {
      line[i] = '\0';
      startofsym = 1;
      continue;
    }
    if (startofsym) {
      startofsym = 0;
      vec[idx++] = "-function";
      vec[idx++] = &line[i];
    }
  }
  vec[idx++] = filename;
  vec[idx] = NULL;
  exec_kernel_doc(vec);
}


x86 assembly (clang, -O0):
<singfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x660,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x658(%rbp)
movl   $0x1,-0x65c(%rbp)
mov    -0x658(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x658(%rbp)
cltq
lea    0xe9f(%rip),%rcx
mov    %rcx,-0x650(%rbp,%rax,8)
ff
mov    -0x658(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x658(%rbp)
cltq
lea    0xe88(%rip),%rcx
mov    %rcx,-0x650(%rbp,%rax,8)
ff
movl   $0x0,-0x654(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x654(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1261 <singfunc+0x141>
mov    -0x10(%rbp),%rax
movslq -0x654(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     11e6 <singfunc+0xc6>
mov    -0x10(%rbp),%rax
movslq -0x654(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x1,-0x65c(%rbp)
jmp    124d <singfunc+0x12d>
cmpl   $0x0,-0x65c(%rbp)
je     1248 <singfunc+0x128>
movl   $0x0,-0x65c(%rbp)
mov    -0x658(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x658(%rbp)
cltq
lea    0xdfd(%rip),%rcx
mov    %rcx,-0x650(%rbp,%rax,8)
ff
mov    -0x10(%rbp),%rcx
movslq -0x654(%rbp),%rax
add    %rax,%rcx
mov    -0x658(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x658(%rbp)
cltq
mov    %rcx,-0x650(%rbp,%rax,8)
ff
jmp    124d <singfunc+0x12d>
mov    -0x654(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x654(%rbp)
jmp    1195 <singfunc+0x75>
mov    -0x8(%rbp),%rcx
mov    -0x658(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x658(%rbp)
cltq
mov    %rcx,-0x650(%rbp,%rax,8)
ff
movslq -0x658(%rbp),%rax
movq   $0x0,-0x650(%rbp,%rax,8)
lea    -0x650(%rbp),%rdi
call   1030 <exec_kernel_doc@plt>
add    $0x660,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singfunc>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x640,%rsp
mov    %rdi,%r14
lea    0xec7(%rip),%rax
mov    %rax,(%rsp)
lea    0xec7(%rip),%rax
mov    %rax,0x8(%rsp)
mov    (%rsi),%cl
test   %cl,%cl
je     11ab <singfunc+0x8b>
mov    %rsi,%rbx
mov    $0x2,%r12d
mov    $0x1,%ebp
lea    0xeb0(%rip),%r15
jmp    1186 <singfunc+0x66>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
mov    $0x1,%eax
movzbl 0x1(%rbx),%ecx
add    $0x1,%rbx
mov    %eax,%ebp
test   %cl,%cl
je     11b1 <singfunc+0x91>
movsbl %cl,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1170 <singfunc+0x50>
xor    %eax,%eax
test   %ebp,%ebp
je     1178 <singfunc+0x58>
movslq %r12d,%rcx
mov    %r15,(%rsp,%rcx,8)
lea    0x2(%rcx),%r12d
mov    %rbx,0x8(%rsp,%rcx,8)
jmp    1178 <singfunc+0x58>
mov    $0x2,%r12d
movslq %r12d,%rax
mov    %r14,(%rsp,%rax,8)
movq   $0x0,0x8(%rsp,%rax,8)
mov    %rsp,%rdi
call   1030 <exec_kernel_doc@plt>
add    $0x640,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"kernel-doc\00"
@.str.1 = [9 x i8] c"-docbook\00"
@.str.2 = [10 x i8] c"-function\00"
define void @singfunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [200 x i8*]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %7
store i32 1, i32* %8
%9 = load i32, i32* %7
%10 = add nsw i32 %9, 1
store i32 %10, i32* %7
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %11
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = load i32, i32* %7
%14 = add nsw i32 %13, 1
store i32 %14, i32* %7
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %15
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %16
store i32 0, i32* %6
br label %17
17: ; preds = %54, %2
%18 = load i8*, i8** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = icmp ne i8 %22, 0
br i1 %23, label %24, label %57
24: ; preds = %17
%25 = load i8*, i8** %4
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = call i64 @isspace(i8 signext %29)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %37
32: ; preds = %24
%33 = load i8*, i8** %4
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
store i8 0, i8* %36
store i32 1, i32* %8
br label %54
37: ; preds = %24
%38 = load i32, i32* %8
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %53
40: ; preds = %37
store i32 0, i32* %8
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
store i32 %42, i32* %7
%43 = sext i32 %41 to i64
%44 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %43
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %44
%45 = load i8*, i8** %4
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %45, i64 %47
%49 = load i32, i32* %7
%50 = add nsw i32 %49, 1
store i32 %50, i32* %7
%51 = sext i32 %49 to i64
%52 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %51
store i8* %48, i8** %52
br label %53
53: ; preds = %40, %37
br label %54
54: ; preds = %53, %32
%55 = load i32, i32* %6
%56 = add nsw i32 %55, 1
store i32 %56, i32* %6
br label %17
57: ; preds = %17
%58 = load i8*, i8** %3
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
store i32 %60, i32* %7
%61 = sext i32 %59 to i64
%62 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %61
store i8* %58, i8** %62
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 %64
store i8* null, i8** %65
%66 = getelementptr inbounds [200 x i8*], [200 x i8*]* %5, i64 0, i64 0
%67 = call i32 @exec_kernel_doc(i8** %66)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"kernel-doc\00"
@.str.1 = [9 x i8] c"-docbook\00"
@.str.2 = [10 x i8] c"-function\00"
define void @singfunc(i8* %0, i8* %1) {
%3 = alloca [200 x i8*]
%4 = bitcast [200 x i8*]* %3 to i8*
%5 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 0
br i1 %8, label %34, label %9
9: ; preds = %2, %27
%10 = phi i64 [ %30, %27 ], [ 0, %2 ]
%11 = phi i8 [ %32, %27 ], [ %7, %2 ]
%12 = phi i8* [ %31, %27 ], [ %1, %2 ]
%13 = phi i32 [ %29, %27 ], [ 1, %2 ]
%14 = phi i32 [ %28, %27 ], [ 2, %2 ]
%15 = tail call i64 @isspace(i8 signext %11)
%16 = icmp eq i64 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %9
store i8 0, i8* %12
br label %27
18: ; preds = %9
%19 = icmp eq i32 %13, 0
br i1 %19, label %27, label %20
20: ; preds = %18
%21 = add nsw i32 %14, 1
%22 = sext i32 %14 to i64
%23 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 %22
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %23
%24 = add nsw i32 %14, 2
%25 = sext i32 %21 to i64
%26 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 %25
store i8* %12, i8** %26
br label %27
27: ; preds = %18, %20, %17
%28 = phi i32 [ %14, %17 ], [ %24, %20 ], [ %14, %18 ]
%29 = phi i32 [ 1, %17 ], [ 0, %20 ], [ 0, %18 ]
%30 = add nuw i64 %10, 1
%31 = getelementptr inbounds i8, i8* %1, i64 %30
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 0
br i1 %33, label %34, label %9
34: ; preds = %27, %2
%35 = phi i32 [ 2, %2 ], [ %28, %27 ]
%36 = add nsw i32 %35, 1
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 %37
store i8* %0, i8** %38
%39 = sext i32 %36 to i64
%40 = getelementptr inbounds [200 x i8*], [200 x i8*]* %3, i64 0, i64 %39
store i8* null, i8** %40
%41 = call i32 @exec_kernel_doc(i8** %5)
ret void
}