#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*/ minit_bootlog();
int /*<<< orphan*/ minit_chdir();
int /*<<< orphan*/ minit_chroot();
int /*<<< orphan*/ minit_console();
int /*<<< orphan*/ minit_daemonize();
int /*<<< orphan*/ minit_enable_core();
int /*<<< orphan*/ minit_getguid();
int /*<<< orphan*/ minit_getopt(int, char **);
int /*<<< orphan*/ minit_option_getenv();
int /*<<< orphan*/ minit_option_setdefault();
int /*<<< orphan*/ minit_setguid();
int /*<<< orphan*/ minit_signal();
int /*<<< orphan*/ minit_socket();
int /*<<< orphan*/ minit_syslog();
int /*<<< orphan*/ usage();
void minit(int argc, char *argv[]) {
  if (argc == 1) {
    usage();
  }
  minit_option_setdefault();
  minit_option_getenv();
  minit_getopt(argc, argv);
  minit_syslog();
  minit_socket();
  minit_console();
  minit_signal();
  minit_chdir();
  minit_getguid();
  minit_chroot();
  minit_setguid();
  minit_enable_core();
  minit_bootlog();
  minit_daemonize();
}


x86 assembly (clang, -O0):
<minit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1210 <minit+0x20>
mov    $0x0,%al
call   10a0 <usage@plt>
mov    $0x0,%al
call   10f0 <minit_option_setdefault@plt>
mov    $0x0,%al
call   10c0 <minit_option_getenv@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <minit_getopt@plt>
mov    $0x0,%al
call   1100 <minit_syslog@plt>
mov    $0x0,%al
call   1070 <minit_socket@plt>
mov    $0x0,%al
call   1060 <minit_console@plt>
mov    $0x0,%al
call   10e0 <minit_signal@plt>
mov    $0x0,%al
call   1030 <minit_chdir@plt>
mov    $0x0,%al
call   10d0 <minit_getguid@plt>
mov    $0x0,%al
call   10b0 <minit_chroot@plt>
mov    $0x0,%al
call   1080 <minit_setguid@plt>
mov    $0x0,%al
call   1050 <minit_enable_core@plt>
mov    $0x0,%al
call   1040 <minit_bootlog@plt>
mov    $0x0,%al
call   1110 <minit_daemonize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minit>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x1,%edi
jne    1204 <minit+0x14>
xor    %eax,%eax
call   10a0 <usage@plt>
xor    %eax,%eax
call   10f0 <minit_option_setdefault@plt>
xor    %eax,%eax
call   10c0 <minit_option_getenv@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <minit_getopt@plt>
xor    %eax,%eax
call   1100 <minit_syslog@plt>
xor    %eax,%eax
call   1070 <minit_socket@plt>
xor    %eax,%eax
call   1060 <minit_console@plt>
xor    %eax,%eax
call   10e0 <minit_signal@plt>
xor    %eax,%eax
call   1030 <minit_chdir@plt>
xor    %eax,%eax
call   10d0 <minit_getguid@plt>
xor    %eax,%eax
call   10b0 <minit_chroot@plt>
xor    %eax,%eax
call   1080 <minit_setguid@plt>
xor    %eax,%eax
call   1050 <minit_enable_core@plt>
xor    %eax,%eax
call   1040 <minit_bootlog@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1110 <minit_daemonize@plt>

LLVM IR (-O0):
define void @minit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @usage()
br label %9
9: ; preds = %7, %2
%10 = call i32 (...) @minit_option_setdefault()
%11 = call i32 (...) @minit_option_getenv()
%12 = load i32, i32* %3
%13 = load i8**, i8*** %4
%14 = call i32 @minit_getopt(i32 %12, i8** %13)
%15 = call i32 (...) @minit_syslog()
%16 = call i32 (...) @minit_socket()
%17 = call i32 (...) @minit_console()
%18 = call i32 (...) @minit_signal()
%19 = call i32 (...) @minit_chdir()
%20 = call i32 (...) @minit_getguid()
%21 = call i32 (...) @minit_chroot()
%22 = call i32 (...) @minit_setguid()
%23 = call i32 (...) @minit_enable_core()
%24 = call i32 (...) @minit_bootlog()
%25 = call i32 (...) @minit_daemonize()
ret void
}

LLVM IR (-O2):
define void @minit(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = tail call i32 (...) @minit_option_setdefault()
%8 = tail call i32 (...) @minit_option_getenv()
%9 = tail call i32 @minit_getopt(i32 %0, i8** %1)
%10 = tail call i32 (...) @minit_syslog()
%11 = tail call i32 (...) @minit_socket()
%12 = tail call i32 (...) @minit_console()
%13 = tail call i32 (...) @minit_signal()
%14 = tail call i32 (...) @minit_chdir()
%15 = tail call i32 (...) @minit_getguid()
%16 = tail call i32 (...) @minit_chroot()
%17 = tail call i32 (...) @minit_setguid()
%18 = tail call i32 (...) @minit_enable_core()
%19 = tail call i32 (...) @minit_bootlog()
%20 = tail call i32 (...) @minit_daemonize()
ret void
}