#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 */
char *EnvGetDefgenericName(void *, void *);
int /*<<< orphan*/ EnvGetDefmethodDescription(void *, char *, int, void *,
                                              long);
scalar_t__ EnvGetDefmethodWatch(void *, void *, long);
int /*<<< orphan*/ EnvPrintRouter(void *, char const *, char *);
void PrintMethodWatchFlag(void *theEnv, const char *logName, void *theGeneric,
                          long theMethod) {
  char buf[60];
  EnvPrintRouter(theEnv, logName, EnvGetDefgenericName(theEnv, theGeneric));
  EnvPrintRouter(theEnv, logName, " ");
  EnvGetDefmethodDescription(theEnv, buf, 59, theGeneric, theMethod);
  EnvPrintRouter(theEnv, logName, buf);
  if (EnvGetDefmethodWatch(theEnv, theGeneric, theMethod))
    EnvPrintRouter(theEnv, logName, " = on\n");
  else
    EnvPrintRouter(theEnv, logName, " = off\n");
}


x86 assembly (clang, -O0):
<PrintMethodWatchFlag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <EnvGetDefgenericName@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    %rax,%rdx
call   1030 <EnvPrintRouter@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe6c(%rip),%rdx
call   1030 <EnvPrintRouter@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x3b,%edx
call   1050 <EnvGetDefmethodDescription@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1030 <EnvPrintRouter@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <EnvGetDefmethodWatch@plt>
cmp    $0x0,%rax
je     11f8 <PrintMethodWatchFlag+0xb8>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe14(%rip),%rdx
call   1030 <EnvPrintRouter@plt>
jmp    120c <PrintMethodWatchFlag+0xcc>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe02(%rip),%rdx
call   1030 <EnvPrintRouter@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintMethodWatchFlag>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rsi
call   1060 <EnvGetDefgenericName@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <EnvPrintRouter@plt>
lea    0xe8a(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <EnvPrintRouter@plt>
mov    %rsp,%r13
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x3b,%edx
mov    %r12,%rcx
mov    %r15,%r8
call   1050 <EnvGetDefmethodDescription@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1030 <EnvPrintRouter@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1040 <EnvGetDefmethodWatch@plt>
test   %rax,%rax
lea    0xe49(%rip),%rax
lea    0xe3b(%rip),%rdx
cmove  %rax,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <EnvPrintRouter@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [7 x i8] c" = on\0A\00"
@.str.2 = [8 x i8] c" = off\0A\00"
define void @PrintMethodWatchFlag(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca [60 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i8*, i8** %5
%13 = load i8*, i8** %7
%14 = call i8* @EnvGetDefgenericName(i8* %12, i8* %13)
%15 = call i32 @EnvPrintRouter(i8* %10, i8* %11, i8* %14)
%16 = load i8*, i8** %5
%17 = load i8*, i8** %6
%18 = call i32 @EnvPrintRouter(i8* %16, i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %5
%20 = getelementptr inbounds [60 x i8], [60 x i8]* %9, i64 0, i64 0
%21 = load i8*, i8** %7
%22 = load i64, i64* %8
%23 = call i32 @EnvGetDefmethodDescription(i8* %19, i8* %20, i32 59, i8* %21, i64 %22)
%24 = load i8*, i8** %5
%25 = load i8*, i8** %6
%26 = getelementptr inbounds [60 x i8], [60 x i8]* %9, i64 0, i64 0
%27 = call i32 @EnvPrintRouter(i8* %24, i8* %25, i8* %26)
%28 = load i8*, i8** %5
%29 = load i8*, i8** %7
%30 = load i64, i64* %8
%31 = call i64 @EnvGetDefmethodWatch(i8* %28, i8* %29, i64 %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %4
%34 = load i8*, i8** %5
%35 = load i8*, i8** %6
%36 = call i32 @EnvPrintRouter(i8* %34, i8* %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %41
37: ; preds = %4
%38 = load i8*, i8** %5
%39 = load i8*, i8** %6
%40 = call i32 @EnvPrintRouter(i8* %38, i8* %39, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %41
41: ; preds = %37, %33
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [7 x i8] c" = on\0A\00"
@.str.2 = [8 x i8] c" = off\0A\00"
define void @PrintMethodWatchFlag(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca [60 x i8]
%6 = getelementptr inbounds [60 x i8], [60 x i8]* %5, i64 0, i64 0
%7 = tail call i8* @EnvGetDefgenericName(i8* %0, i8* %2)
%8 = tail call i32 @EnvPrintRouter(i8* %0, i8* %1, i8* %7)
%9 = tail call i32 @EnvPrintRouter(i8* %0, i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @EnvGetDefmethodDescription(i8* %0, i8* %6, i32 59, i8* %2, i64 %3)
%11 = call i32 @EnvPrintRouter(i8* %0, i8* %1, i8* %6)
%12 = call i64 @EnvGetDefmethodWatch(i8* %0, i8* %2, i64 %3)
%13 = icmp eq i64 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%15 = call i32 @EnvPrintRouter(i8* %0, i8* %1, i8* %14)
ret void
}