#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*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main(void) {
  char command1[] =
      "python makeShapefile.py; rm test.* ; rm m.txt ; python extractPoints.py "
      "GSHHS_c_L1.shp polygon.shp test 5 > m.txt ; cat m.txt";
  char command2[] = "rm shpTest.geo; python makeGeoFile.py test.shp shpTest";
  char command3[] = "gmsh -2 shpTest.geo>t.txt ; rm t.txt";
  char command4[] = "gmsh shpTest.msh";
  system(command1);
  system(command2);
  printf("Meshing...\n");
  system(command3);
  printf("done...\n");
  system(command4);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x7e,%edx
call   1050 <memcpy@plt>
lea    -0xd0(%rbp),%rdi
lea    0xf18(%rip),%rsi
mov    $0x37,%edx
call   1050 <memcpy@plt>
lea    -0x100(%rbp),%rdi
lea    0xf40(%rip),%rsi
mov    $0x25,%edx
call   1050 <memcpy@plt>
mov    0xf5f(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xf59(%rip),%rax
mov    %rax,-0x118(%rbp)
mov    0xf54(%rip),%al
mov    %al,-0x110(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <system@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <system@plt>
lea    0xf30(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
lea    0xf24(%rip),%rdi
call   1040 <printf@plt>
lea    -0x120(%rbp),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x118,%rsp
movups 0xf40(%rip),%xmm0
movups %xmm0,0xfe(%rsp)
movaps 0xf23(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf04(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe88(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xe69(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movabs $0x74736554706873,%rax
mov    %rax,0x7f(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movabs $0x7478742e74206d,%rax
mov    %rax,0x3d(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x90(%rsp),%rdi
call   1040 <system@plt>
lea    0x50(%rsp),%rdi
call   1040 <system@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0x20(%rsp),%rdi
call   1040 <system@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1040 <system@plt>
mov    $0x1,%eax
add    $0x118,%rsp
ret

LLVM IR (-O0):
@__const.main.command1 = [126 x i8] c"python makeShapefile.py; rm test.* ; rm m.txt ; python extractPoints.py GSHHS_c_L1.shp polygon.shp test 5 > m.txt ; cat m.txt\00"
@__const.main.command2 = [55 x i8] c"rm shpTest.geo; python makeGeoFile.py test.shp shpTest\00"
@__const.main.command3 = [37 x i8] c"gmsh -2 shpTest.geo>t.txt ; rm t.txt\00"
@__const.main.command4 = [17 x i8] c"gmsh shpTest.msh\00"
@.str = [12 x i8] c"Meshing...\0A\00"
@.str.1 = [9 x i8] c"done...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [126 x i8]
%3 = alloca [55 x i8]
%4 = alloca [37 x i8]
%5 = alloca [17 x i8]
store i32 0, i32* %1
%6 = bitcast [126 x i8]* %2 to i8*
%7 = bitcast [55 x i8]* %3 to i8*
%8 = bitcast [37 x i8]* %4 to i8*
%9 = bitcast [17 x i8]* %5 to i8*
%10 = getelementptr inbounds [126 x i8], [126 x i8]* %2, i64 0, i64 0
%11 = call i32 @system(i8* %10)
%12 = getelementptr inbounds [55 x i8], [55 x i8]* %3, i64 0, i64 0
%13 = call i32 @system(i8* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [37 x i8], [37 x i8]* %4, i64 0, i64 0
%16 = call i32 @system(i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%18 = getelementptr inbounds [17 x i8], [17 x i8]* %5, i64 0, i64 0
%19 = call i32 @system(i8* %18)
ret i32 1
}

LLVM IR (-O2):
@__const.main.command1 = [126 x i8] c"python makeShapefile.py; rm test.* ; rm m.txt ; python extractPoints.py GSHHS_c_L1.shp polygon.shp test 5 > m.txt ; cat m.txt\00"
@__const.main.command2 = [55 x i8] c"rm shpTest.geo; python makeGeoFile.py test.shp shpTest\00"
@__const.main.command3 = [37 x i8] c"gmsh -2 shpTest.geo>t.txt ; rm t.txt\00"
@__const.main.command4 = [17 x i8] c"gmsh shpTest.msh\00"
@str = [11 x i8] c"Meshing...\00"
@str.2 = [8 x i8] c"done...\00"
define i32 @main() {
%1 = alloca [126 x i8]
%2 = alloca [55 x i8]
%3 = alloca [37 x i8]
%4 = alloca [17 x i8]
%5 = getelementptr inbounds [126 x i8], [126 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [37 x i8], [37 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [17 x i8], [17 x i8]* %4, i64 0, i64 0
%9 = call i32 @system(i8* %5)
%10 = call i32 @system(i8* %6)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%12 = call i32 @system(i8* %7)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
%14 = call i32 @system(i8* %8)
ret i32 1
}