#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*/ printf(char *, ...);
void usage(char *name, int service, int querier) {
  printf("Usage: %s [-d|-D] [-q|-Q] [-s <switch>] [-b <bridge>]\n", name);
  printf(" -d or -D	run in background%s or in foreground%s\n",
         service ? " (default)" : "", service ? "" : " (default)");
  printf(" -q or -Q	enable%s or disable%s querier\n",
         querier ? " (default)" : "", querier ? "" : " (default)");
  printf(" -s <switch>	switch interface\n");
  printf(" -b <bridge>	bridge interface, if switch interface is bridged\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%ecx
lea    0xef8(%rip),%rsi
lea    0xf24(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0xc(%rbp),%ecx
lea    0xf13(%rip),%rdx
lea    0xed9(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%ecx
lea    0xeba(%rip),%rsi
lea    0xee6(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0x10(%rbp),%ecx
lea    0xed5(%rip),%rdx
lea    0xe9b(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
lea    0xef3(%rip),%rbp
lea    0xf1f(%rip),%rbx
mov    %rbx,%rsi
cmove  %rbp,%rsi
mov    %rbp,%rdx
cmove  %rbx,%rdx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
mov    %rbx,%rsi
cmove  %rbp,%rsi
cmove  %rbx,%rbp
lea    0xef9(%rip),%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: %s [-d|-D] [-q|-Q] [-s <switch>] [-b <bridge>]\0A\00"
@.str.1 = [50 x i8] c" -d or -D\09run in background%s or in foreground%s\0A\00"
@.str.2 = [11 x i8] c" (default)\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [41 x i8] c" -q or -Q\09enable%s or disable%s querier\0A\00"
@.str.5 = [31 x i8] c" -s <switch>\09switch interface\0A\00"
@.str.6 = [63 x i8] c" -b <bridge>\09bridge interface, if switch interface is bridged\0A\00"
define void @usage(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %12, i8* %16)
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%22 = load i32, i32* %6
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* %21, i8* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Usage: %s [-d|-D] [-q|-Q] [-s <switch>] [-b <bridge>]\0A\00"
@.str.1 = [50 x i8] c" -d or -D\09run in background%s or in foreground%s\0A\00"
@.str.2 = [11 x i8] c" (default)\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [41 x i8] c" -q or -Q\09enable%s or disable%s querier\0A\00"
@str = [30 x i8] c" -s <switch>\09switch interface\00"
@str.7 = [62 x i8] c" -b <bridge>\09bridge interface, if switch interface is bridged\00"
define void @usage(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = icmp eq i32 %1, 0
%6 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%7 = select i1 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %7)
%9 = icmp eq i32 %2, 0
%10 = select i1 %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%11 = select i1 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8* %10, i8* %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.7, i64 0, i64 0))
ret void
}