#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 mntent {
  char *mnt_fsname;
  char *mnt_dir;
  char *mnt_type;
  char *mnt_opts;
  int /*<<< orphan*/ mnt_passno;
  int /*<<< orphan*/ mnt_freq;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *__strsep(char **, char *);
char *decode_name(char *);
int /*<<< orphan*/ *fgets_unlocked(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
int sscanf(char *, char *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
char *strchr(char *, char);
int strspn(char *, char *);
struct mntent *__getmntent_r(FILE *stream, struct mntent *mp, char *buffer,
                             int bufsiz) {
  char *cp;
  char *head;
  flockfile(stream);
  do {
    char *end_ptr;
    if (fgets_unlocked(buffer, bufsiz, stream) == NULL) {
      funlockfile(stream);
      return NULL;
    }
    end_ptr = strchr(buffer, '\n');
    if (end_ptr != NULL)
      *end_ptr = '\0';
    else {
      char tmp[1024];
      while (fgets_unlocked(tmp, sizeof tmp, stream) != NULL)
        if (strchr(tmp, '\n') != NULL)
          break;
    }
    head = buffer + strspn(buffer, " \t");
  } while (head[0] == '\0' || head[0] == '#');
  cp = __strsep(&head, " \t");
  mp->mnt_fsname = cp != NULL ? decode_name(cp) : (char *)"";
  if (head)
    head += strspn(head, " \t");
  cp = __strsep(&head, " \t");
  mp->mnt_dir = cp != NULL ? decode_name(cp) : (char *)"";
  if (head)
    head += strspn(head, " \t");
  cp = __strsep(&head, " \t");
  mp->mnt_type = cp != NULL ? decode_name(cp) : (char *)"";
  if (head)
    head += strspn(head, " \t");
  cp = __strsep(&head, " \t");
  mp->mnt_opts = cp != NULL ? decode_name(cp) : (char *)"";
  switch (head ? sscanf(head, " %d %d ", &mp->mnt_freq, &mp->mnt_passno) : 0) {
  case 0:
    mp->mnt_freq = 0;
  case 1:
    mp->mnt_passno = 0;
  case 2:
    break;
  }
  funlockfile(stream);
  return mp;
}


x86 assembly (clang, -O0):
<__getmntent_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x480,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <flockfile@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1090 <fgets_unlocked@plt>
cmp    $0x0,%rax
jne    11d3 <__getmntent_r+0x53>
mov    -0x10(%rbp),%rdi
call   1030 <funlockfile@plt>
movq   $0x0,-0x8(%rbp)
jmp    1539 <__getmntent_r+0x3b9>
mov    -0x20(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     11fc <__getmntent_r+0x7c>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
jmp    124a <__getmntent_r+0xca>
jmp    1201 <__getmntent_r+0x81>
lea    -0x440(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x400,%esi
call   1090 <fgets_unlocked@plt>
cmp    $0x0,%rax
je     1245 <__getmntent_r+0xc5>
lea    -0x440(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1240 <__getmntent_r+0xc0>
jmp    1245 <__getmntent_r+0xc5>
jmp    1201 <__getmntent_r+0x81>
jmp    124a <__getmntent_r+0xca>
mov    -0x20(%rbp),%rax
mov    %rax,-0x448(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xda0(%rip),%rsi
call   1070 <strspn@plt>
mov    %eax,%ecx
mov    -0x448(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x449(%rbp)
je     12a3 <__getmntent_r+0x123>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0x449(%rbp)
mov    -0x449(%rbp),%al
test   $0x1,%al
jne    11a3 <__getmntent_r+0x23>
lea    -0x38(%rbp),%rdi
lea    0xd44(%rip),%rsi
call   1080 <__strsep@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12e5 <__getmntent_r+0x165>
mov    -0x30(%rbp),%rdi
call   1050 <decode_name@plt>
mov    %rax,-0x458(%rbp)
jmp    12f8 <__getmntent_r+0x178>
lea    0xd16(%rip),%rax
mov    %rax,-0x458(%rbp)
jmp    12f8 <__getmntent_r+0x178>
mov    -0x458(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x38(%rbp)
je     1331 <__getmntent_r+0x1b1>
mov    -0x38(%rbp),%rdi
lea    0xce4(%rip),%rsi
call   1070 <strspn@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
lea    0xcc4(%rip),%rsi
call   1080 <__strsep@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1365 <__getmntent_r+0x1e5>
mov    -0x30(%rbp),%rdi
call   1050 <decode_name@plt>
mov    %rax,-0x460(%rbp)
jmp    1378 <__getmntent_r+0x1f8>
lea    0xc96(%rip),%rax
mov    %rax,-0x460(%rbp)
jmp    1378 <__getmntent_r+0x1f8>
mov    -0x460(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
cmpq   $0x0,-0x38(%rbp)
je     13b2 <__getmntent_r+0x232>
mov    -0x38(%rbp),%rdi
lea    0xc63(%rip),%rsi
call   1070 <strspn@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
lea    0xc43(%rip),%rsi
call   1080 <__strsep@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     13e6 <__getmntent_r+0x266>
mov    -0x30(%rbp),%rdi
call   1050 <decode_name@plt>
mov    %rax,-0x468(%rbp)
jmp    13f9 <__getmntent_r+0x279>
lea    0xc15(%rip),%rax
mov    %rax,-0x468(%rbp)
jmp    13f9 <__getmntent_r+0x279>
mov    -0x468(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
cmpq   $0x0,-0x38(%rbp)
je     1433 <__getmntent_r+0x2b3>
mov    -0x38(%rbp),%rdi
lea    0xbe2(%rip),%rsi
call   1070 <strspn@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
lea    0xbc2(%rip),%rsi
call   1080 <__strsep@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1467 <__getmntent_r+0x2e7>
mov    -0x30(%rbp),%rdi
call   1050 <decode_name@plt>
mov    %rax,-0x470(%rbp)
jmp    147a <__getmntent_r+0x2fa>
lea    0xb94(%rip),%rax
mov    %rax,-0x470(%rbp)
jmp    147a <__getmntent_r+0x2fa>
mov    -0x470(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x18(%rax)
cmpq   $0x0,-0x38(%rbp)
je     14bf <__getmntent_r+0x33f>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rdx
add    $0x24,%rdx
mov    -0x18(%rbp),%rcx
add    $0x20,%rcx
lea    0xb54(%rip),%rsi
call   10a0 <sscanf@plt>
mov    %eax,-0x474(%rbp)
jmp    14cc <__getmntent_r+0x34c>
xor    %eax,%eax
mov    %eax,-0x474(%rbp)
jmp    14cc <__getmntent_r+0x34c>
mov    -0x474(%rbp),%eax
mov    %eax,-0x478(%rbp)
test   %eax,%eax
je     150d <__getmntent_r+0x38d>
jmp    14e5 <__getmntent_r+0x365>
mov    -0x478(%rbp),%eax
sub    $0x1,%eax
je     1518 <__getmntent_r+0x398>
jmp    14f9 <__getmntent_r+0x379>
mov    -0x478(%rbp),%eax
sub    $0x2,%eax
je     1523 <__getmntent_r+0x3a3>
jmp    1528 <__getmntent_r+0x3a8>
mov    -0x18(%rbp),%rax
movl   $0x0,0x24(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,0x20(%rax)
jmp    1528 <__getmntent_r+0x3a8>
mov    -0x10(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x480,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getmntent_r>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %ecx,%r15d
mov    %rdx,%rbp
mov    %rsi,%r14
mov    %rdi,%r12
call   1060 <flockfile@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12,%rdx
call   1090 <fgets_unlocked@plt>
test   %rax,%rax
je     1276 <__getmntent_r+0xf6>
lea    0x10(%rsp),%rbx
lea    0xe3b(%rip),%r13
jmp    11e7 <__getmntent_r+0x67>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12,%rdx
call   1090 <fgets_unlocked@plt>
test   %rax,%rax
je     1276 <__getmntent_r+0xf6>
mov    %rbp,%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1200 <__getmntent_r+0x80>
movb   $0x0,(%rax)
jmp    1230 <__getmntent_r+0xb0>
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %r12,%rdx
call   1090 <fgets_unlocked@plt>
test   %rax,%rax
je     1230 <__getmntent_r+0xb0>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1200 <__getmntent_r+0x80>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r13,%rsi
call   1070 <strspn@plt>
cltq
lea    (%rax,%rbp,1),%rcx
mov    %rcx,0x8(%rsp)
mov    0x0(%rbp,%rax,1),%al
cmp    $0x23,%al
je     11d0 <__getmntent_r+0x50>
test   %al,%al
je     11d0 <__getmntent_r+0x50>
lea    0xda3(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1080 <__strsep@plt>
test   %rax,%rax
je     1296 <__getmntent_r+0x116>
mov    %rax,%rdi
call   1050 <decode_name@plt>
jmp    129d <__getmntent_r+0x11d>
xor    %r14d,%r14d
mov    %r12,%rdi
call   1030 <funlockfile@plt>
mov    %r14,%rax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd65(%rip),%rax
mov    %rax,(%r14)
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     12c3 <__getmntent_r+0x143>
lea    0xd4f(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strspn@plt>
cltq
add    %rbx,%rax
mov    %rax,0x8(%rsp)
lea    0xd36(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1080 <__strsep@plt>
test   %rax,%rax
je     12e3 <__getmntent_r+0x163>
mov    %rax,%rdi
call   1050 <decode_name@plt>
jmp    12ea <__getmntent_r+0x16a>
lea    0xd18(%rip),%rax
mov    %rax,0x8(%r14)
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     1311 <__getmntent_r+0x191>
lea    0xd01(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strspn@plt>
cltq
add    %rbx,%rax
mov    %rax,0x8(%rsp)
lea    0xce8(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1080 <__strsep@plt>
test   %rax,%rax
je     1331 <__getmntent_r+0x1b1>
mov    %rax,%rdi
call   1050 <decode_name@plt>
jmp    1338 <__getmntent_r+0x1b8>
lea    0xcca(%rip),%rax
mov    %rax,0x10(%r14)
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     135f <__getmntent_r+0x1df>
lea    0xcb3(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strspn@plt>
cltq
add    %rbx,%rax
mov    %rax,0x8(%rsp)
lea    0xc9a(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1080 <__strsep@plt>
test   %rax,%rax
je     137f <__getmntent_r+0x1ff>
mov    %rax,%rdi
call   1050 <decode_name@plt>
jmp    1386 <__getmntent_r+0x206>
lea    0xc7c(%rip),%rax
mov    %rax,0x18(%r14)
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     13b5 <__getmntent_r+0x235>
lea    0x24(%r14),%rdx
lea    0x20(%r14),%rcx
lea    0xc60(%rip),%rsi
call   10a0 <sscanf@plt>
cmp    $0x1,%eax
je     13bd <__getmntent_r+0x23d>
test   %eax,%eax
jne    1279 <__getmntent_r+0xf9>
movl   $0x0,0x24(%r14)
movl   $0x0,0x20(%r14)
jmp    1279 <__getmntent_r+0xf9>

LLVM IR (-O0):
%struct.mntent = type { i8*, i8*, i8*, i8*, i32, i32 }
@.str = [3 x i8] c" \09\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [8 x i8] c" %d %d \00"
define %struct.mntent* @__getmntent_r(i32* %0, %struct.mntent* %1, i8* %2, i32 %3) {
%5 = alloca %struct.mntent*
%6 = alloca i32*
%7 = alloca %struct.mntent*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca [1024 x i8]
store i32* %0, i32** %6
store %struct.mntent* %1, %struct.mntent** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%14 = load i32*, i32** %6
%15 = call i32 @flockfile(i32* %14)
br label %16
16: ; preds = %63, %4
%17 = load i8*, i8** %8
%18 = load i32, i32* %9
%19 = load i32*, i32** %6
%20 = call i32* @fgets_unlocked(i8* %17, i32 %18, i32* %19)
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = load i32*, i32** %6
%24 = call i32 @funlockfile(i32* %23)
store %struct.mntent* null, %struct.mntent** %5
br label %160
25: ; preds = %16
%26 = load i8*, i8** %8
%27 = call i8* @strchr(i8* %26, i8 signext 10)
store i8* %27, i8** %12
%28 = load i8*, i8** %12
%29 = icmp ne i8* %28, null
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = load i8*, i8** %12
store i8 0, i8* %31
br label %45
32: ; preds = %25
br label %33
33: ; preds = %43, %32
%34 = getelementptr inbounds [1024 x i8], [1024 x i8]* %13, i64 0, i64 0
%35 = load i32*, i32** %6
%36 = call i32* @fgets_unlocked(i8* %34, i32 1024, i32* %35)
%37 = icmp ne i32* %36, null
br i1 %37, label %38, label %44
38: ; preds = %33
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %13, i64 0, i64 0
%40 = call i8* @strchr(i8* %39, i8 signext 10)
%41 = icmp ne i8* %40, null
br i1 %41, label %42, label %43
42: ; preds = %38
br label %44
43: ; preds = %38
br label %33
44: ; preds = %42, %33
br label %45
45: ; preds = %44, %30
%46 = load i8*, i8** %8
%47 = load i8*, i8** %8
%48 = call i32 @strspn(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %46, i64 %49
store i8* %50, i8** %11
br label %51
51: ; preds = %45
%52 = load i8*, i8** %11
%53 = getelementptr inbounds i8, i8* %52, i64 0
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 0
br i1 %56, label %63, label %57
57: ; preds = %51
%58 = load i8*, i8** %11
%59 = getelementptr inbounds i8, i8* %58, i64 0
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 35
br label %63
63: ; preds = %57, %51
%64 = phi i1 [ true, %51 ], [ %62, %57 ]
br i1 %64, label %16, label %65
65: ; preds = %63
%66 = call i8* @__strsep(i8** %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %66, i8** %10
%67 = load i8*, i8** %10
%68 = icmp ne i8* %67, null
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = load i8*, i8** %10
%71 = call i8* @decode_name(i8* %70)
br label %73
72: ; preds = %65
br label %73
73: ; preds = %72, %69
%74 = phi i8* [ %71, %69 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %72 ]
%75 = load %struct.mntent*, %struct.mntent** %7
%76 = getelementptr inbounds %struct.mntent, %struct.mntent* %75, i32 0, i32 0
store i8* %74, i8** %76
%77 = load i8*, i8** %11
%78 = icmp ne i8* %77, null
br i1 %78, label %79, label %85
79: ; preds = %73
%80 = load i8*, i8** %11
%81 = call i32 @strspn(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%82 = load i8*, i8** %11
%83 = sext i32 %81 to i64
%84 = getelementptr inbounds i8, i8* %82, i64 %83
store i8* %84, i8** %11
br label %85
85: ; preds = %79, %73
%86 = call i8* @__strsep(i8** %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %86, i8** %10
%87 = load i8*, i8** %10
%88 = icmp ne i8* %87, null
br i1 %88, label %89, label %92
89: ; preds = %85
%90 = load i8*, i8** %10
%91 = call i8* @decode_name(i8* %90)
br label %93
92: ; preds = %85
br label %93
93: ; preds = %92, %89
%94 = phi i8* [ %91, %89 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %92 ]
%95 = load %struct.mntent*, %struct.mntent** %7
%96 = getelementptr inbounds %struct.mntent, %struct.mntent* %95, i32 0, i32 1
store i8* %94, i8** %96
%97 = load i8*, i8** %11
%98 = icmp ne i8* %97, null
br i1 %98, label %99, label %105
99: ; preds = %93
%100 = load i8*, i8** %11
%101 = call i32 @strspn(i8* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%102 = load i8*, i8** %11
%103 = sext i32 %101 to i64
%104 = getelementptr inbounds i8, i8* %102, i64 %103
store i8* %104, i8** %11
br label %105
105: ; preds = %99, %93
%106 = call i8* @__strsep(i8** %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %106, i8** %10
%107 = load i8*, i8** %10
%108 = icmp ne i8* %107, null
br i1 %108, label %109, label %112
109: ; preds = %105
%110 = load i8*, i8** %10
%111 = call i8* @decode_name(i8* %110)
br label %113
112: ; preds = %105
br label %113
113: ; preds = %112, %109
%114 = phi i8* [ %111, %109 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %112 ]
%115 = load %struct.mntent*, %struct.mntent** %7
%116 = getelementptr inbounds %struct.mntent, %struct.mntent* %115, i32 0, i32 2
store i8* %114, i8** %116
%117 = load i8*, i8** %11
%118 = icmp ne i8* %117, null
br i1 %118, label %119, label %125
119: ; preds = %113
%120 = load i8*, i8** %11
%121 = call i32 @strspn(i8* %120, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%122 = load i8*, i8** %11
%123 = sext i32 %121 to i64
%124 = getelementptr inbounds i8, i8* %122, i64 %123
store i8* %124, i8** %11
br label %125
125: ; preds = %119, %113
%126 = call i8* @__strsep(i8** %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %126, i8** %10
%127 = load i8*, i8** %10
%128 = icmp ne i8* %127, null
br i1 %128, label %129, label %132
129: ; preds = %125
%130 = load i8*, i8** %10
%131 = call i8* @decode_name(i8* %130)
br label %133
132: ; preds = %125
br label %133
133: ; preds = %132, %129
%134 = phi i8* [ %131, %129 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %132 ]
%135 = load %struct.mntent*, %struct.mntent** %7
%136 = getelementptr inbounds %struct.mntent, %struct.mntent* %135, i32 0, i32 3
store i8* %134, i8** %136
%137 = load i8*, i8** %11
%138 = icmp ne i8* %137, null
br i1 %138, label %139, label %146
139: ; preds = %133
%140 = load i8*, i8** %11
%141 = load %struct.mntent*, %struct.mntent** %7
%142 = getelementptr inbounds %struct.mntent, %struct.mntent* %141, i32 0, i32 5
%143 = load %struct.mntent*, %struct.mntent** %7
%144 = getelementptr inbounds %struct.mntent, %struct.mntent* %143, i32 0, i32 4
%145 = call i32 @sscanf(i8* %140, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %142, i32* %144)
br label %147
146: ; preds = %133
br label %147
147: ; preds = %146, %139
%148 = phi i32 [ %145, %139 ], [ 0, %146 ]
switch i32 %148, label %156 [
i32 0, label %149
i32 1, label %152
i32 2, label %155
]
149: ; preds = %147
%150 = load %struct.mntent*, %struct.mntent** %7
%151 = getelementptr inbounds %struct.mntent, %struct.mntent* %150, i32 0, i32 5
store i32 0, i32* %151
br label %152
152: ; preds = %147, %149
%153 = load %struct.mntent*, %struct.mntent** %7
%154 = getelementptr inbounds %struct.mntent, %struct.mntent* %153, i32 0, i32 4
store i32 0, i32* %154
br label %155
155: ; preds = %147, %152
br label %156
156: ; preds = %147, %155
%157 = load i32*, i32** %6
%158 = call i32 @funlockfile(i32* %157)
%159 = load %struct.mntent*, %struct.mntent** %7
store %struct.mntent* %159, %struct.mntent** %5
br label %160
160: ; preds = %156, %22
%161 = load %struct.mntent*, %struct.mntent** %5
ret %struct.mntent* %161
}

LLVM IR (-O2):
%struct.mntent = type { i8*, i8*, i8*, i8*, i32, i32 }
@.str = [3 x i8] c" \09\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [8 x i8] c" %d %d \00"
define %struct.mntent* @__getmntent_r(i32* nocapture %0, %struct.mntent* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca [1024 x i8]
%7 = bitcast i8** %5 to i8*
%8 = tail call i32 @flockfile(i32* %0)
%9 = call i32* @fgets_unlocked(i8* %2, i32 %3, i32* %0)
%10 = icmp eq i32* %9, null
br i1 %10, label %93, label %11
11: ; preds = %4
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
br label %13
13: ; preds = %11, %30
%14 = call i8* @strchr(i8* dereferenceable(1) %2, i8 signext 10)
%15 = icmp eq i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %13
store i8 0, i8* %14
br label %25
17: ; preds = %13
br label %18
18: ; preds = %21, %17
%19 = call i32* @fgets_unlocked(i8* %12, i32 1024, i32* %0)
%20 = icmp eq i32* %19, null
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = call i8* @strchr(i8* %12, i8 signext 10)
%23 = icmp eq i8* %22, null
br i1 %23, label %18, label %24
24: ; preds = %18, %21
br label %25
25: ; preds = %24, %16
%26 = call i32 @strspn(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %2, i64 %27
store i8* %28, i8** %5
%29 = load i8, i8* %28
switch i8 %29, label %33 [
i8 0, label %30
i8 35, label %30
]
30: ; preds = %25, %25
%31 = call i32* @fgets_unlocked(i8* %2, i32 %3, i32* %0)
%32 = icmp eq i32* %31, null
br i1 %32, label %93, label %13
33: ; preds = %25
%34 = call i8* @__strsep(i8** %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%35 = icmp eq i8* %34, null
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = call i8* @decode_name(i8* %34)
br label %38
38: ; preds = %33, %36
%39 = phi i8* [ %37, %36 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %33 ]
%40 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 0
store i8* %39, i8** %40
%41 = load i8*, i8** %5
%42 = icmp eq i8* %41, null
br i1 %42, label %47, label %43
43: ; preds = %38
%44 = call i32 @strspn(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %41, i64 %45
store i8* %46, i8** %5
br label %47
47: ; preds = %43, %38
%48 = call i8* @__strsep(i8** %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%49 = icmp eq i8* %48, null
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = call i8* @decode_name(i8* %48)
br label %52
52: ; preds = %47, %50
%53 = phi i8* [ %51, %50 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %47 ]
%54 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 1
store i8* %53, i8** %54
%55 = load i8*, i8** %5
%56 = icmp eq i8* %55, null
br i1 %56, label %61, label %57
57: ; preds = %52
%58 = call i32 @strspn(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %55, i64 %59
store i8* %60, i8** %5
br label %61
61: ; preds = %57, %52
%62 = call i8* @__strsep(i8** %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%63 = icmp eq i8* %62, null
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = call i8* @decode_name(i8* %62)
br label %66
66: ; preds = %61, %64
%67 = phi i8* [ %65, %64 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %61 ]
%68 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 2
store i8* %67, i8** %68
%69 = load i8*, i8** %5
%70 = icmp eq i8* %69, null
br i1 %70, label %75, label %71
71: ; preds = %66
%72 = call i32 @strspn(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %69, i64 %73
store i8* %74, i8** %5
br label %75
75: ; preds = %71, %66
%76 = call i8* @__strsep(i8** %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%77 = icmp eq i8* %76, null
br i1 %77, label %80, label %78
78: ; preds = %75
%79 = call i8* @decode_name(i8* %76)
br label %80
80: ; preds = %75, %78
%81 = phi i8* [ %79, %78 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %75 ]
%82 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 3
store i8* %81, i8** %82
%83 = load i8*, i8** %5
%84 = icmp eq i8* %83, null
br i1 %84, label %89, label %85
85: ; preds = %80
%86 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 5
%87 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 4
%88 = call i32 @sscanf(i8* %83, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %86, i32* %87)
switch i32 %88, label %93 [
i32 0, label %89
i32 1, label %91
]
89: ; preds = %80, %85
%90 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 5
store i32 0, i32* %90
br label %91
91: ; preds = %85, %89
%92 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 4
store i32 0, i32* %92
br label %93
93: ; preds = %30, %91, %85, %4
%94 = phi %struct.mntent* [ null, %4 ], [ %1, %85 ], [ %1, %91 ], [ null, %30 ]
%95 = call i32 @funlockfile(i32* %0)
ret %struct.mntent* %94
}