#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*/ do_cmd_macro_aux(char *);
int /*<<< orphan*/ inkey_ex();
int /*<<< orphan*/ macro_add(char *, char *);
int /*<<< orphan*/ prt(char *, int, int /*<<< orphan*/);
void macro_remove(void *unused, const char *title) {
  char pat[1024];
  prt("Command: Remove a macro", 16, 0);
  prt("Trigger: ", 18, 0);
  do_cmd_macro_aux(pat);
  macro_add(pat, pat);
  prt("", 0, 0);
  prt("Removed a macro.  Press any key to continue.", 19, 0);
  (void)inkey_ex();
}


x86 assembly (clang, -O0):
<macro_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea6(%rip),%rdi
mov    $0x10,%esi
xor    %edx,%edx
call   1050 <prt@plt>
lea    0xeab(%rip),%rdi
mov    $0x12,%esi
xor    %edx,%edx
call   1050 <prt@plt>
lea    -0x410(%rbp),%rdi
call   1030 <do_cmd_macro_aux@plt>
lea    -0x410(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1060 <macro_add@plt>
lea    0xe82(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1050 <prt@plt>
lea    0xe73(%rip),%rdi
mov    $0x13,%esi
xor    %edx,%edx
call   1050 <prt@plt>
mov    $0x0,%al
call   1040 <inkey_ex@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macro_remove>:
push   %rbx
sub    $0x400,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x10,%esi
xor    %edx,%edx
call   1050 <prt@plt>
lea    0xeb6(%rip),%rdi
mov    $0x12,%esi
xor    %edx,%edx
call   1050 <prt@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <do_cmd_macro_aux@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1060 <macro_add@plt>
lea    0xe96(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <prt@plt>
lea    0xe87(%rip),%rdi
mov    $0x13,%esi
xor    %edx,%edx
call   1050 <prt@plt>
xor    %eax,%eax
call   1040 <inkey_ex@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Command: Remove a macro\00"
@.str.1 = [10 x i8] c"Trigger: \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [45 x i8] c"Removed a macro. Press any key to continue.\00"
define void @macro_remove(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i32 @prt(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 16, i32 0)
%7 = call i32 @prt(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 0)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%9 = call i32 @do_cmd_macro_aux(i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @macro_add(i8* %10, i8* %11)
%13 = call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%14 = call i32 @prt(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 19, i32 0)
%15 = call i32 (...) @inkey_ex()
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Command: Remove a macro\00"
@.str.1 = [10 x i8] c"Trigger: \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [45 x i8] c"Removed a macro. Press any key to continue.\00"
define void @macro_remove(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @prt(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 16, i32 0)
%6 = tail call i32 @prt(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 0)
%7 = call i32 @do_cmd_macro_aux(i8* %4)
%8 = call i32 @macro_add(i8* %4, i8* %4)
%9 = call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%10 = call i32 @prt(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 19, i32 0)
%11 = call i32 (...) @inkey_ex()
ret void
}