#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 **);
void docsect(char *filename, char *line) {
  char *vec[6];
  char *s;
  for (s = line; *s; s++)
    if (*s == '\n')
      *s = '\0';
  vec[0] = "kernel-doc";
  vec[1] = "-docbook";
  vec[2] = "-function";
  vec[3] = line;
  vec[4] = filename;
  vec[5] = NULL;
  exec_kernel_doc(vec);
}


x86 assembly (clang, -O0):
<docsect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmpb   $0x0,(%rax)
je     1162 <docsect+0x52>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    114c <docsect+0x3c>
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
jmp    1151 <docsect+0x41>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1128 <docsect+0x18>
lea    0xe97(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe97(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe95(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <exec_kernel_doc@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<docsect>:
sub    $0x38,%rsp
mov    %rsi,%rax
jmp    1127 <docsect+0x17>
nopl   0x0(%rax)
movb   $0x0,(%rax)
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0xa,%cl
je     1120 <docsect+0x10>
test   %cl,%cl
jne    1123 <docsect+0x13>
lea    0xec6(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xec3(%rip),%rax
mov    %rax,0x10(%rsp)
mov    %rsi,0x18(%rsp)
mov    %rdi,0x20(%rsp)
movq   $0x0,0x28(%rsp)
mov    %rsp,%rdi
call   1030 <exec_kernel_doc@plt>
add    $0x38,%rsp
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 @docsect(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [6 x i8*]
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
store i8* %7, i8** %6
br label %8
8: ; preds = %20, %2
%9 = load i8*, i8** %6
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 10
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i8*, i8** %6
store i8 0, i8* %18
br label %19
19: ; preds = %17, %12
br label %20
20: ; preds = %19
%21 = load i8*, i8** %6
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %6
br label %8
23: ; preds = %8
%24 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %25
%26 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %26
%27 = load i8*, i8** %4
%28 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 3
store i8* %27, i8** %28
%29 = load i8*, i8** %3
%30 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 4
store i8* %29, i8** %30
%31 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 5
store i8* null, i8** %31
%32 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i64 0, i64 0
%33 = call i32 @exec_kernel_doc(i8** %32)
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 @docsect(i8* %0, i8* %1) {
%3 = alloca [6 x i8*]
%4 = bitcast [6 x i8*]* %3 to i8*
br label %5
5: ; preds = %9, %2
%6 = phi i8* [ %1, %2 ], [ %10, %9 ]
%7 = load i8, i8* %6
switch i8 %7, label %9 [
i8 0, label %11
i8 10, label %8
]
8: ; preds = %5
store i8 0, i8* %6
br label %9
9: ; preds = %5, %8
%10 = getelementptr inbounds i8, i8* %6, i64 1
br label %5
11: ; preds = %5
%12 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 3
store i8* %1, i8** %15
%16 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 4
store i8* %0, i8** %16
%17 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 5
store i8* null, i8** %17
%18 = call i32 @exec_kernel_doc(i8** %12)
ret void
}