#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 setup_iptables() {
  system("iptables -t nat -A prerouting_rule -m state --state "
         "NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 67 -j ACCEPT");
  system("iptables -t nat -A prerouting_rule -m state --state "
         "NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 67 -j ACCEPT");
  system("iptables -t nat -A prerouting_rule -m state --state "
         "NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 53 -j ACCEPT");
  system("iptables -t nat -A prerouting_rule -m state --state "
         "NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 53 -j ACCEPT");
  return 1;
}


x86 assembly (clang, -O0):
<setup_iptables>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xf49(%rip),%rdi
call   1030 <system@plt>
lea    0xfad(%rip),%rdi
call   1030 <system@plt>
lea    0x1011(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_iptables>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xf4c(%rip),%rdi
call   1030 <system@plt>
lea    0xfb0(%rip),%rdi
call   1030 <system@plt>
lea    0x1014(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 67 -j ACCEPT\00"
@.str.1 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 67 -j ACCEPT\00"
@.str.2 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 53 -j ACCEPT\00"
@.str.3 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 53 -j ACCEPT\00"
define i32 @setup_iptables() {
%1 = call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 67 -j ACCEPT\00"
@.str.1 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 67 -j ACCEPT\00"
@.str.2 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p udp --dport 53 -j ACCEPT\00"
@.str.3 = [112 x i8] c"iptables -t nat -A prerouting_rule -m state --state NEW,ESTABLISHED,RELATED,INVALID -p tcp --dport 53 -j ACCEPT\00"
define i32 @setup_iptables() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}