#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*/ sprintf(char *, char *, char *, char *);
char *get_revoke_only_sys_string(char *login_host_name, char really_yn) {
  static char sys_string[1024];
  if (really_yn == 'y') {
    sprintf(sys_string,
            "echo \"revoke all on *.* from %s;\" | sql.e;"
            "echo \"drop user %s;\" | sql.e '^' mysql mysql;"
            "echo \"flush privileges;\" | sql.e '^' mysql mysql",
            login_host_name, login_host_name);
  } else {
    sprintf(
        sys_string,
        "echo \"revoke all on *.* from %s; | sql.e\" | html_paragraph_wrapper;"
        "echo \"drop user %s | sql.e '^' mysql mysql\" | "
        "html_paragraph_wrapper;"
        "echo \"flush privileges; | sql.e '^' mysql mysql\" | "
        "html_paragraph_wrapper",
        login_host_name, login_host_name);
  }
  return sys_string;
}


x86 assembly (clang, -O0):
<get_revoke_only_sys_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x79,%eax
jne    114f <get_revoke_only_sys_string+0x3f>
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0x2f02(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1030 <sprintf@plt>
jmp    116a <get_revoke_only_sys_string+0x5a>
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0x2ee2(%rip),%rdi
lea    0xf23(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ecf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_revoke_only_sys_string>:
push   %rbx
mov    %rdi,%rcx
cmp    $0x79,%sil
lea    0xee1(%rip),%rax
lea    0xf62(%rip),%rsi
cmove  %rax,%rsi
lea    0x2f0f(%rip),%rbx
mov    %rbx,%rdi
mov    %rcx,%rdx
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_revoke_only_sys_string.sys_string = internal global [1024 x i8] zeroinitializer
@.str = [136 x i8] c"echo \22revoke all on *.* from %s;\22 | sql.e;echo \22drop user %s;\22 | sql.e '^' mysql mysql;echo \22flush privileges;\22 | sql.e '^' mysql mysql\00"
@.str.1 = [210 x i8] c"echo \22revoke all on *.* from %s; | sql.e\22 | html_paragraph_wrapper;echo \22drop user %s | sql.e '^' mysql mysql\22 | html_paragraph_wrapper;echo \22flush privileges; | sql.e '^' mysql mysql\22 | html_paragraph_wrapper\00"
define i8* @get_revoke_only_sys_string(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 121
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_revoke_only_sys_string.sys_string, i64 0, i64 0), i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
br label %16
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_revoke_only_sys_string.sys_string, i64 0, i64 0), i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %14)
br label %16
16: ; preds = %12, %8
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_revoke_only_sys_string.sys_string, i64 0, i64 0)
}

LLVM IR (-O2):
@get_revoke_only_sys_string.sys_string = internal global [1024 x i8] zeroinitializer
@.str = [136 x i8] c"echo \22revoke all on *.* from %s;\22 | sql.e;echo \22drop user %s;\22 | sql.e '^' mysql mysql;echo \22flush privileges;\22 | sql.e '^' mysql mysql\00"
@.str.1 = [210 x i8] c"echo \22revoke all on *.* from %s; | sql.e\22 | html_paragraph_wrapper;echo \22drop user %s | sql.e '^' mysql mysql\22 | html_paragraph_wrapper;echo \22flush privileges; | sql.e '^' mysql mysql\22 | html_paragraph_wrapper\00"
define i8* @get_revoke_only_sys_string(i8* %0, i8 signext %1) {
%3 = icmp eq i8 %1, 121
%4 = select i1 %3, i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_revoke_only_sys_string.sys_string, i64 0, i64 0), i8* dereferenceable(1) %4, i8* %0, i8* %0)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_revoke_only_sys_string.sys_string, i64 0, i64 0)
}