#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 confline {
  int dummy;
};
struct cnfnode {
  int dummy;
};
struct cnfmodule {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct cnfnode *create_cnfnode(char *);
int /*<<< orphan*/ destroy_confline_list(struct confline *);
int /*<<< orphan*/ parse_dhcp_top(struct confline *, struct cnfnode *);
struct confline *read_conflines(int /*<<< orphan*/ *);
struct cnfnode *parse_dhcp(struct cnfmodule *cm, FILE *fptr) {
  struct cnfnode *cn_top;
  struct confline *cl_root;
  cl_root = read_conflines(fptr);
  cn_top = create_cnfnode("(root)");
  parse_dhcp_top(cl_root, cn_top);
  destroy_confline_list(cl_root);
  return cn_top;
}


x86 assembly (clang, -O0):
<parse_dhcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <read_conflines@plt>
mov    %rax,-0x20(%rbp)
lea    0xe9c(%rip),%rdi
call   1060 <create_cnfnode@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <parse_dhcp_top@plt>
mov    -0x20(%rbp),%rdi
call   1030 <destroy_confline_list@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_dhcp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rdi
call   1040 <read_conflines@plt>
mov    %rax,%r14
lea    0xeaa(%rip),%rdi
call   1060 <create_cnfnode@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <parse_dhcp_top@plt>
mov    %r14,%rdi
call   1030 <destroy_confline_list@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cnfnode = type { i32 }
%struct.cnfmodule = type { i32 }
%struct.confline = type { i32 }
@.str = [7 x i8] c"(root)\00"
define %struct.cnfnode* @parse_dhcp(%struct.cnfmodule* %0, i32* %1) {
%3 = alloca %struct.cnfmodule*
%4 = alloca i32*
%5 = alloca %struct.cnfnode*
%6 = alloca %struct.confline*
store %struct.cnfmodule* %0, %struct.cnfmodule** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = call %struct.confline* @read_conflines(i32* %7)
store %struct.confline* %8, %struct.confline** %6
%9 = call %struct.cnfnode* @create_cnfnode(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store %struct.cnfnode* %9, %struct.cnfnode** %5
%10 = load %struct.confline*, %struct.confline** %6
%11 = load %struct.cnfnode*, %struct.cnfnode** %5
%12 = call i32 @parse_dhcp_top(%struct.confline* %10, %struct.cnfnode* %11)
%13 = load %struct.confline*, %struct.confline** %6
%14 = call i32 @destroy_confline_list(%struct.confline* %13)
%15 = load %struct.cnfnode*, %struct.cnfnode** %5
ret %struct.cnfnode* %15
}

LLVM IR (-O2):
%struct.cnfnode = type { i32 }
%struct.cnfmodule = type { i32 }
%struct.confline = type { i32 }
@.str = [7 x i8] c"(root)\00"
define %struct.cnfnode* @parse_dhcp(%struct.cnfmodule* nocapture readnone %0, i32* %1) {
%3 = tail call %struct.confline* @read_conflines(i32* %1)
%4 = tail call %struct.cnfnode* @create_cnfnode(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @parse_dhcp_top(%struct.confline* %3, %struct.cnfnode* %4)
%6 = tail call i32 @destroy_confline_list(%struct.confline* %3)
ret %struct.cnfnode* %4
}