#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*/ System(char *);
int /*<<< orphan*/ iptables_addpost(char *, char const *, char const *,
                                    char const *);
int /*<<< orphan*/ iptables_addpre(char *, char const *, char const *,
                                   char const *);
void iptables_add(const char *Vip, const char *Sip, const char *Sport,
                  const char *Fip) {
  char cmd[1024 + 1];
  iptables_addpre(cmd, Vip, Sip, Sport);
  System(cmd);
  iptables_addpost(cmd, Fip, Sip, Sport);
  System(cmd);
}


x86 assembly (clang, -O0):
<iptables_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <iptables_addpre@plt>
lea    -0x430(%rbp),%rdi
call   1050 <System@plt>
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <iptables_addpost@plt>
lea    -0x430(%rbp),%rdi
call   1050 <System@plt>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iptables_add>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1040 <iptables_addpre@plt>
mov    %r12,%rdi
call   1050 <System@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1030 <iptables_addpost@plt>
mov    %r12,%rdi
call   1050 <System@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @iptables_add(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [1025 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i32 @iptables_addpre(i8* %10, i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%16 = call i32 @System(i8* %15)
%17 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%18 = load i8*, i8** %8
%19 = load i8*, i8** %6
%20 = load i8*, i8** %7
%21 = call i32 @iptables_addpost(i8* %17, i8* %18, i8* %19, i8* %20)
%22 = getelementptr inbounds [1025 x i8], [1025 x i8]* %9, i64 0, i64 0
%23 = call i32 @System(i8* %22)
ret void
}

LLVM IR (-O2):
define void @iptables_add(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [1025 x i8]
%6 = getelementptr inbounds [1025 x i8], [1025 x i8]* %5, i64 0, i64 0
%7 = call i32 @iptables_addpre(i8* %6, i8* %0, i8* %1, i8* %2)
%8 = call i32 @System(i8* %6)
%9 = call i32 @iptables_addpost(i8* %6, i8* %3, i8* %1, i8* %2)
%10 = call i32 @System(i8* %6)
ret void
}