#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ system(char *);
void delete_table_cmd() {
  int cmdlen;
  char *cmd;
  cmd = (char *)malloc(sizeof(char) * 200);
  memset(cmd, (int)'\0', 200);
  sprintf(cmd, "rm -f %s ", "/etc/gram/gram-ssh-port-table.txt");
  fprintf(stdout, "%s\n", cmd);
  system(cmd);
  free(cmd);
}


x86 assembly (clang, -O0):
<delete_table_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc8,%edi
call   1070 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rdi
lea    0xe6f(%rip),%rsi
lea    0xe72(%rip),%rdx
call   1080 <sprintf@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <system@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_table_cmd>:
push   %rbx
mov    $0xc8,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
lea    0xe7c(%rip),%rsi
lea    0xe7f(%rip),%rdx
mov    %rbx,%rdi
call   1080 <sprintf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
mov    %rbx,%rdx
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"rm -f %s \00"
@.str.1 = [34 x i8] c"/etc/gram/gram-ssh-port-table.txt\00"
@stdout = global i32 0
@.str.2 = [4 x i8] c"%s\0A\00"
define void @delete_table_cmd() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i64 @malloc(i32 200)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @memset(i8* %5, i32 0, i32 200)
%7 = load i8*, i8** %2
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %2
%13 = call i32 @system(i8* %12)
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"rm -f %s \00"
@.str.1 = [34 x i8] c"/etc/gram/gram-ssh-port-table.txt\00"
@stdout = global i32 0
@.str.2 = [4 x i8] c"%s\0A\00"
define void @delete_table_cmd() {
%1 = tail call i64 @malloc(i32 200)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @memset(i8* %2, i32 0, i32 200)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = tail call i32 @system(i8* %2)
%8 = tail call i32 @free(i8* %2)
ret void
}