#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*/ F_TLOCK;
int /*<<< orphan*/ F_ULOCK;
int O_CREAT;
int O_RDWR;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ cfg_destroy();
int /*<<< orphan*/ cfg_init();
int /*<<< orphan*/ close(int);
scalar_t__ daemon(int /*<<< orphan*/, int);
scalar_t__ geteuid();
scalar_t__ lockf(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ log_close();
int /*<<< orphan*/ log_init();
int /*<<< orphan*/ network_destroy();
int /*<<< orphan*/ network_init();
int /*<<< orphan*/ network_main();
int open(char *, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printlog(int /*<<< orphan*/, char *);
int /*<<< orphan*/ server_destroy();
int /*<<< orphan*/ server_init();
int /*<<< orphan*/ server_start();
int /*<<< orphan*/ server_stop();
int main(int argc, char *argv[]) {
  int lock_fd;
  if (geteuid() != 0) {
    printf("This daemon can only run as root!\n");
    return -1;
  }
  lock_fd = open("/tmp/mcserverd.lck", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
  if (lock_fd == -1) {
    printf("Unable to open lock file!\n");
    return -1;
  }
  if (!cfg_init()) {
    printf("Failed to load config file!\n");
    close(lock_fd);
    return -1;
  }
  if (!log_init()) {
    printf("Failed to initialize logging!\n");
    cfg_destroy();
    close(lock_fd);
    return -1;
  }
  if (daemon(0, 1) != 0) {
    printf("Failed to run in background!\n");
    log_close();
    cfg_destroy();
    close(lock_fd);
    return -1;
  }
  if (lockf(lock_fd, F_TLOCK, 0) != 0) {
    log_close();
    cfg_destroy();
    close(lock_fd);
    return 0;
  }
  if (!server_init()) {
    printlog(0, "Failed to initialize server!\n");
    log_close();
    cfg_destroy();
    lockf(lock_fd, F_ULOCK, 0);
    close(lock_fd);
    return -1;
  }
  if (!server_start()) {
    printlog(0, "Failed to start server!\n");
    server_destroy();
    log_close();
    cfg_destroy();
    lockf(lock_fd, F_ULOCK, 0);
    close(lock_fd);
    return -1;
  }
  network_init();
  network_main();
  network_destroy();
  server_stop();
  printlog(0, "Server exited.\n");
  server_destroy();
  log_close();
  cfg_destroy();
  lockf(lock_fd, F_ULOCK, 0);
  close(lock_fd);
  ((void)(argc));
  ((void)(argv));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <geteuid@plt>
cmp    $0x0,%rax
je     125f <main+0x3f>
lea    0xdb2(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    0x2d92(%rip),%rax
mov    (%rax),%esi
mov    0x2d69(%rip),%rax
or     (%rax),%esi
mov    0x2d40(%rip),%rax
mov    (%rax),%edx
mov    0x2d47(%rip),%rax
or     (%rax),%edx
lea    0xd99(%rip),%rdi
call   1130 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    12b4 <main+0x94>
lea    0xd93(%rip),%rdi
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    $0x0,%al
call   10c0 <cfg_init@plt>
cmp    $0x0,%eax
jne    12e4 <main+0xc4>
lea    0xd86(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    $0x0,%al
call   1030 <log_init@plt>
cmp    $0x0,%eax
jne    131b <main+0xfb>
lea    0xd73(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
xor    %edi,%edi
mov    $0x1,%esi
call   10f0 <daemon@plt>
cmp    $0x0,%rax
je     135f <main+0x13f>
lea    0xd55(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10e0 <log_close@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    -0x14(%rbp),%edi
mov    0x2c7f(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1060 <lockf@plt>
cmp    $0x0,%rax
je     139e <main+0x17e>
mov    $0x0,%al
call   10e0 <log_close@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0x0,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    $0x0,%al
call   10d0 <server_init@plt>
cmp    $0x0,%eax
jne    13f1 <main+0x1d1>
xor    %edi,%edi
lea    0xcf4(%rip),%rsi
call   1140 <printlog@plt>
mov    $0x0,%al
call   10e0 <log_close@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
mov    0x2bfc(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1060 <lockf@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    $0x0,%al
call   10a0 <server_start@plt>
cmp    $0x0,%eax
jne    144b <main+0x22b>
xor    %edi,%edi
lea    0xcbf(%rip),%rsi
call   1140 <printlog@plt>
mov    $0x0,%al
call   1090 <server_destroy@plt>
mov    $0x0,%al
call   10e0 <log_close@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
mov    0x2ba2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1060 <lockf@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14ac <main+0x28c>
mov    $0x0,%al
call   1110 <network_init@plt>
mov    $0x0,%al
call   1100 <network_main@plt>
mov    $0x0,%al
call   10b0 <network_destroy@plt>
mov    $0x0,%al
call   1040 <server_stop@plt>
xor    %edi,%edi
lea    0xc72(%rip),%rsi
call   1140 <printlog@plt>
mov    $0x0,%al
call   1090 <server_destroy@plt>
mov    $0x0,%al
call   10e0 <log_close@plt>
mov    $0x0,%al
call   1120 <cfg_destroy@plt>
mov    -0x14(%rbp),%edi
mov    0x2b3c(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1060 <lockf@plt>
mov    -0x14(%rbp),%edi
call   1080 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1070 <geteuid@plt>
test   %rax,%rax
je     1240 <main+0x20>
lea    0xe95(%rip),%rdi
call   1040 <puts@plt>
jmp    12e7 <main+0xc7>
mov    0x2db1(%rip),%rax
mov    0x2d8a(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2d5f(%rip),%rax
mov    0x2d68(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0xd95(%rip),%rdi
call   1130 <open@plt>
cmp    $0xffffffff,%eax
je     12b3 <main+0x93>
mov    %eax,%ebx
xor    %eax,%eax
call   10c0 <cfg_init@plt>
test   %eax,%eax
je     12bf <main+0x9f>
xor    %eax,%eax
call   1030 <log_init@plt>
test   %eax,%eax
je     12cd <main+0xad>
xor    %edi,%edi
mov    $0x1,%esi
call   10f0 <daemon@plt>
test   %rax,%rax
je     12f5 <main+0xd5>
lea    0xdef(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10e0 <log_close@plt>
jmp    12d9 <main+0xb9>
lea    0xdf7(%rip),%rdi
jmp    1236 <main+0x16>
lea    0xd94(%rip),%rdi
call   1040 <puts@plt>
jmp    12e0 <main+0xc0>
lea    0xda2(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1120 <cfg_destroy@plt>
mov    %ebx,%edi
call   1080 <close@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2cec(%rip),%rax
mov    (%rax),%esi
xor    %ebp,%ebp
mov    %ebx,%edi
xor    %edx,%edx
call   1060 <lockf@plt>
test   %rax,%rax
je     1325 <main+0x105>
xor    %eax,%eax
call   10e0 <log_close@plt>
xor    %eax,%eax
call   1120 <cfg_destroy@plt>
mov    %ebx,%edi
call   1080 <close@plt>
jmp    12ec <main+0xcc>
xor    %eax,%eax
call   10d0 <server_init@plt>
test   %eax,%eax
je     1390 <main+0x170>
xor    %ebp,%ebp
xor    %eax,%eax
call   10a0 <server_start@plt>
test   %eax,%eax
je     13a0 <main+0x180>
xor    %eax,%eax
call   1110 <network_init@plt>
xor    %eax,%eax
call   1100 <network_main@plt>
xor    %eax,%eax
call   10b0 <network_destroy@plt>
xor    %eax,%eax
call   1050 <server_stop@plt>
lea    0xcea(%rip),%rsi
xor    %edi,%edi
call   1140 <printlog@plt>
xor    %eax,%eax
call   1090 <server_destroy@plt>
xor    %eax,%eax
call   10e0 <log_close@plt>
xor    %eax,%eax
call   1120 <cfg_destroy@plt>
mov    0x2c4d(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
call   1060 <lockf@plt>
jmp    131c <main+0xfc>
lea    0xc7c(%rip),%rsi
xor    %edi,%edi
call   1140 <printlog@plt>
jmp    13b5 <main+0x195>
lea    0xc8a(%rip),%rsi
xor    %edi,%edi
call   1140 <printlog@plt>
xor    %eax,%eax
call   1090 <server_destroy@plt>
xor    %eax,%eax
call   10e0 <log_close@plt>
xor    %eax,%eax
call   1120 <cfg_destroy@plt>
mov    0x2c06(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
call   1060 <lockf@plt>
jmp    12e0 <main+0xc0>

LLVM IR (-O0):
@.str = [35 x i8] c"This daemon can only run as root!\0A\00"
@.str.1 = [19 x i8] c"/tmp/mcserverd.lck\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@.str.2 = [27 x i8] c"Unable to open lock file!\0A\00"
@.str.3 = [29 x i8] c"Failed to load config file!\0A\00"
@.str.4 = [31 x i8] c"Failed to initialize logging!\0A\00"
@.str.5 = [30 x i8] c"Failed to run in background!\0A\00"
@F_TLOCK = global i32 0
@.str.6 = [30 x i8] c"Failed to initialize server!\0A\00"
@F_ULOCK = global i32 0
@.str.7 = [25 x i8] c"Failed to start server!\0A\00"
@.str.8 = [16 x i8] c"Server exited.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @geteuid()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %98
11: ; preds = %2
%12 = load i32, i32* @O_CREAT
%13 = load i32, i32* @O_RDWR
%14 = or i32 %12, %13
%15 = load i32, i32* @S_IRUSR
%16 = load i32, i32* @S_IWUSR
%17 = or i32 %15, %16
%18 = call i32 @open(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %17)
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %23
21: ; preds = %11
%22 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %98
23: ; preds = %11
%24 = call i32 (...) @cfg_init()
%25 = icmp ne i32 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%28 = load i32, i32* %6
%29 = call i32 @close(i32 %28)
store i32 -1, i32* %3
br label %98
30: ; preds = %23
%31 = call i32 (...) @log_init()
%32 = icmp ne i32 %31, 0
br i1 %32, label %38, label %33
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%35 = call i32 (...) @cfg_destroy()
%36 = load i32, i32* %6
%37 = call i32 @close(i32 %36)
store i32 -1, i32* %3
br label %98
38: ; preds = %30
%39 = call i64 @daemon(i32 0, i32 1)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%43 = call i32 (...) @log_close()
%44 = call i32 (...) @cfg_destroy()
%45 = load i32, i32* %6
%46 = call i32 @close(i32 %45)
store i32 -1, i32* %3
br label %98
47: ; preds = %38
%48 = load i32, i32* %6
%49 = load i32, i32* @F_TLOCK
%50 = call i64 @lockf(i32 %48, i32 %49, i32 0)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %57
52: ; preds = %47
%53 = call i32 (...) @log_close()
%54 = call i32 (...) @cfg_destroy()
%55 = load i32, i32* %6
%56 = call i32 @close(i32 %55)
store i32 0, i32* %3
br label %98
57: ; preds = %47
%58 = call i32 (...) @server_init()
%59 = icmp ne i32 %58, 0
br i1 %59, label %69, label %60
60: ; preds = %57
%61 = call i32 @printlog(i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%62 = call i32 (...) @log_close()
%63 = call i32 (...) @cfg_destroy()
%64 = load i32, i32* %6
%65 = load i32, i32* @F_ULOCK
%66 = call i64 @lockf(i32 %64, i32 %65, i32 0)
%67 = load i32, i32* %6
%68 = call i32 @close(i32 %67)
store i32 -1, i32* %3
br label %98
69: ; preds = %57
%70 = call i32 (...) @server_start()
%71 = icmp ne i32 %70, 0
br i1 %71, label %82, label %72
72: ; preds = %69
%73 = call i32 @printlog(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%74 = call i32 (...) @server_destroy()
%75 = call i32 (...) @log_close()
%76 = call i32 (...) @cfg_destroy()
%77 = load i32, i32* %6
%78 = load i32, i32* @F_ULOCK
%79 = call i64 @lockf(i32 %77, i32 %78, i32 0)
%80 = load i32, i32* %6
%81 = call i32 @close(i32 %80)
store i32 -1, i32* %3
br label %98
82: ; preds = %69
%83 = call i32 (...) @network_init()
%84 = call i32 (...) @network_main()
%85 = call i32 (...) @network_destroy()
%86 = call i32 (...) @server_stop()
%87 = call i32 @printlog(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%88 = call i32 (...) @server_destroy()
%89 = call i32 (...) @log_close()
%90 = call i32 (...) @cfg_destroy()
%91 = load i32, i32* %6
%92 = load i32, i32* @F_ULOCK
%93 = call i64 @lockf(i32 %91, i32 %92, i32 0)
%94 = load i32, i32* %6
%95 = call i32 @close(i32 %94)
%96 = load i32, i32* %4
%97 = load i8**, i8*** %5
store i32 0, i32* %3
br label %98
98: ; preds = %82, %72, %60, %52, %41, %33, %26, %21, %9
%99 = load i32, i32* %3
ret i32 %99
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"/tmp/mcserverd.lck\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@F_TLOCK = global i32 0
@.str.6 = [30 x i8] c"Failed to initialize server!\0A\00"
@F_ULOCK = global i32 0
@.str.7 = [25 x i8] c"Failed to start server!\0A\00"
@.str.8 = [16 x i8] c"Server exited.\0A\00"
@str = [28 x i8] c"Failed to load config file!\00"
@str.9 = [30 x i8] c"Failed to initialize logging!\00"
@str.10 = [29 x i8] c"Failed to run in background!\00"
@str.11 = [26 x i8] c"Unable to open lock file!\00"
@str.12 = [34 x i8] c"This daemon can only run as root!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @geteuid()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.12, i64 0, i64 0))
br label %80
7: ; preds = %2
%8 = load i32, i32* @O_CREAT
%9 = load i32, i32* @O_RDWR
%10 = or i32 %9, %8
%11 = load i32, i32* @S_IRUSR
%12 = load i32, i32* @S_IWUSR
%13 = or i32 %12, %11
%14 = tail call i32 @open(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %13)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %7
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
br label %80
18: ; preds = %7
%19 = tail call i32 (...) @cfg_init()
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%23 = tail call i32 @close(i32 %14)
br label %80
24: ; preds = %18
%25 = tail call i32 (...) @log_init()
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.9, i64 0, i64 0))
%29 = tail call i32 (...) @cfg_destroy()
%30 = tail call i32 @close(i32 %14)
br label %80
31: ; preds = %24
%32 = tail call i64 @daemon(i32 0, i32 1)
%33 = icmp eq i64 %32, 0
br i1 %33, label %39, label %34
34: ; preds = %31
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.10, i64 0, i64 0))
%36 = tail call i32 (...) @log_close()
%37 = tail call i32 (...) @cfg_destroy()
%38 = tail call i32 @close(i32 %14)
br label %80
39: ; preds = %31
%40 = load i32, i32* @F_TLOCK
%41 = tail call i64 @lockf(i32 %14, i32 %40, i32 0)
%42 = icmp eq i64 %41, 0
br i1 %42, label %47, label %43
43: ; preds = %39
%44 = tail call i32 (...) @log_close()
%45 = tail call i32 (...) @cfg_destroy()
%46 = tail call i32 @close(i32 %14)
br label %80
47: ; preds = %39
%48 = tail call i32 (...) @server_init()
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %57
50: ; preds = %47
%51 = tail call i32 @printlog(i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%52 = tail call i32 (...) @log_close()
%53 = tail call i32 (...) @cfg_destroy()
%54 = load i32, i32* @F_ULOCK
%55 = tail call i64 @lockf(i32 %14, i32 %54, i32 0)
%56 = tail call i32 @close(i32 %14)
br label %80
57: ; preds = %47
%58 = tail call i32 (...) @server_start()
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %68
60: ; preds = %57
%61 = tail call i32 @printlog(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%62 = tail call i32 (...) @server_destroy()
%63 = tail call i32 (...) @log_close()
%64 = tail call i32 (...) @cfg_destroy()
%65 = load i32, i32* @F_ULOCK
%66 = tail call i64 @lockf(i32 %14, i32 %65, i32 0)
%67 = tail call i32 @close(i32 %14)
br label %80
68: ; preds = %57
%69 = tail call i32 (...) @network_init()
%70 = tail call i32 (...) @network_main()
%71 = tail call i32 (...) @network_destroy()
%72 = tail call i32 (...) @server_stop()
%73 = tail call i32 @printlog(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%74 = tail call i32 (...) @server_destroy()
%75 = tail call i32 (...) @log_close()
%76 = tail call i32 (...) @cfg_destroy()
%77 = load i32, i32* @F_ULOCK
%78 = tail call i64 @lockf(i32 %14, i32 %77, i32 0)
%79 = tail call i32 @close(i32 %14)
br label %80
80: ; preds = %68, %60, %50, %43, %34, %27, %21, %16, %5
%81 = phi i32 [ -1, %5 ], [ -1, %16 ], [ -1, %34 ], [ 0, %43 ], [ 0, %68 ], [ -1, %60 ], [ -1, %50 ], [ -1, %27 ], [ -1, %21 ]
ret i32 %81
}