#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 */
void SOC_INIT() {
  extern int iargc_();
  extern char *strdup();
  extern void SOC_INIT2();
  extern void getarg_();
  int argc, i, lenarg, lenmax = 200;
  char *argv[256 + 7], arg[200];
  argc = iargc_() + 1;
  for (i = 0; i < argc; i++) {
    getarg_(&i, arg, lenmax);
    for (lenarg = lenmax - 2; lenarg && (arg[lenarg] == ' '); lenarg--)
      ;
    lenarg++;
    arg[lenarg] = (int)NULL;
    argv[i] = strdup(arg);
  }
  argv[argc] = NULL;
  SOC_INIT2(argc, argv);
}


x86 assembly (clang, -O0):
<SOC_INIT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x930,%rsp
movl   $0xc8,-0x10(%rbp)
mov    $0x0,%al
call   1050 <iargc_@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121e <SOC_INIT+0xde>
lea    -0x920(%rbp),%rsi
mov    -0x10(%rbp),%edx
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <getarg_@plt>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x921(%rbp)
je     11ba <SOC_INIT+0x7a>
movslq -0xc(%rbp),%rax
movsbl -0x920(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
sete   %al
mov    %al,-0x921(%rbp)
mov    -0x921(%rbp),%al
test   $0x1,%al
jne    11cd <SOC_INIT+0x8d>
jmp    11e0 <SOC_INIT+0xa0>
jmp    11d2 <SOC_INIT+0x92>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1190 <SOC_INIT+0x50>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
movb   $0x0,-0x920(%rbp,%rax,1)
lea    -0x920(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
mov    %rcx,-0x850(%rbp,%rax,8)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <SOC_INIT+0x26>
movslq -0x4(%rbp),%rax
movq   $0x0,-0x850(%rbp,%rax,8)
mov    -0x4(%rbp),%edi
lea    -0x850(%rbp),%rsi
mov    $0x0,%al
call   1030 <SOC_INIT2@plt>
add    $0x930,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SOC_INIT>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x918,%rsp
xor    %eax,%eax
call   1050 <iargc_@plt>
mov    %eax,%ebx
lea    0x1(%rbx),%ebp
movl   $0x0,0xc(%rsp)
test   %eax,%eax
js     122b <SOC_INIT+0xeb>
lea    0xc(%rsp),%r14
lea    0x10(%rsp),%r15
jmp    11ae <SOC_INIT+0x6e>
add    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
add    $0x1,%eax
cltq
movb   $0x0,0x10(%rsp,%rax,1)
mov    %r15,%rdi
call   1060 <strdup@plt>
movslq 0xc(%rsp),%rcx
mov    %rax,0xe0(%rsp,%rcx,8)
lea    0x1(%rcx),%eax
mov    %eax,0xc(%rsp)
cmp    %ebx,%ecx
jge    122b <SOC_INIT+0xeb>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0xc8,%edx
xor    %eax,%eax
call   1040 <getarg_@plt>
mov    $0xc6,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x20,0x10(%rsp,%rax,1)
jne    1180 <SOC_INIT+0x40>
cmpb   $0x20,0xf(%rsp,%rax,1)
jne    1175 <SOC_INIT+0x35>
cmpb   $0x20,0xe(%rsp,%rax,1)
jne    1207 <SOC_INIT+0xc7>
cmpb   $0x20,0xd(%rsp,%rax,1)
jne    1210 <SOC_INIT+0xd0>
cmpb   $0x20,0xc(%rsp,%rax,1)
jne    1219 <SOC_INIT+0xd9>
cmpb   $0x20,0xb(%rsp,%rax,1)
jne    1222 <SOC_INIT+0xe2>
add    $0xfffffffffffffffa,%rax
jne    11d0 <SOC_INIT+0x90>
xor    %eax,%eax
jmp    1180 <SOC_INIT+0x40>
add    $0xfffffffffffffffe,%rax
jmp    1180 <SOC_INIT+0x40>
add    $0xfffffffffffffffd,%rax
jmp    1180 <SOC_INIT+0x40>
add    $0xfffffffffffffffc,%rax
jmp    1180 <SOC_INIT+0x40>
add    $0xfffffffffffffffb,%rax
jmp    1180 <SOC_INIT+0x40>
movslq %ebp,%rdi
movq   $0x0,0xe0(%rsp,%rdi,8)
lea    0xe0(%rsp),%rsi
xor    %eax,%eax
call   1030 <SOC_INIT2@plt>
add    $0x918,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @SOC_INIT() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [263 x i8*]
%6 = alloca [200 x i8]
store i32 200, i32* %4
%7 = call i32 (...) @iargc_()
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
store i32 0, i32* %2
br label %9
9: ; preds = %45, %0
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %48
13: ; preds = %9
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%15 = load i32, i32* %4
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 2
store i32 %17, i32* %3
br label %18
18: ; preds = %31, %13
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 32
br label %28
28: ; preds = %21, %18
%29 = phi i1 [ false, %18 ], [ %27, %21 ]
br i1 %29, label %30, label %34
30: ; preds = %28
br label %31
31: ; preds = %30
%32 = load i32, i32* %3
%33 = add nsw i32 %32, -1
store i32 %33, i32* %3
br label %18
34: ; preds = %28
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
%37 = load i32, i32* %3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 %38
store i8 0, i8* %39
%40 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%41 = call i8* @strdup(i8* %40)
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [263 x i8*], [263 x i8*]* %5, i64 0, i64 %43
store i8* %41, i8** %44
br label %45
45: ; preds = %34
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
br label %9
48: ; preds = %9
%49 = load i32, i32* %1
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [263 x i8*], [263 x i8*]* %5, i64 0, i64 %50
store i8* null, i8** %51
%52 = load i32, i32* %1
%53 = getelementptr inbounds [263 x i8*], [263 x i8*]* %5, i64 0, i64 0
ret void
}

LLVM IR (-O2):
define void @SOC_INIT() {
%1 = alloca i32
%2 = alloca [263 x i8*]
%3 = alloca [200 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [263 x i8*]* %2 to i8*
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%7 = tail call i32 (...) @iargc_()
%8 = add nsw i32 %7, 1
store i32 0, i32* %1
%9 = icmp slt i32 %7, 0
br i1 %9, label %56, label %10
10: ; preds = %0, %44
br label %11
11: ; preds = %41, %10
%12 = phi i64 [ 198, %10 ], [ %42, %41 ]
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 32
br i1 %15, label %16, label %44
16: ; preds = %11
%17 = add nsw i64 %12, -1
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 32
br i1 %20, label %21, label %44
21: ; preds = %16
%22 = add nsw i64 %12, -2
%23 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 32
br i1 %25, label %26, label %44
26: ; preds = %21
%27 = add nsw i64 %12, -3
%28 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 32
br i1 %30, label %31, label %44
31: ; preds = %26
%32 = add nsw i64 %12, -4
%33 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = icmp eq i8 %34, 32
br i1 %35, label %36, label %44
36: ; preds = %31
%37 = add nsw i64 %12, -5
%38 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = icmp eq i8 %39, 32
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = add nsw i64 %12, -6
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %11
44: ; preds = %41, %36, %31, %26, %21, %16, %11
%45 = phi i64 [ %12, %11 ], [ %17, %16 ], [ %22, %21 ], [ %27, %26 ], [ %32, %31 ], [ %37, %36 ], [ 0, %41 ]
%46 = shl i64 %45, 32
%47 = add i64 %46, 4294967296
%48 = ashr exact i64 %47, 32
%49 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %48
store i8 0, i8* %49
%50 = call i8* @strdup(i8* %6)
%51 = load i32, i32* %1
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [263 x i8*], [263 x i8*]* %2, i64 0, i64 %52
store i8* %50, i8** %53
%54 = add nsw i32 %51, 1
store i32 %54, i32* %1
%55 = icmp slt i32 %51, %7
br i1 %55, label %10, label %56
56: ; preds = %44, %0
%57 = sext i32 %8 to i64
%58 = getelementptr inbounds [263 x i8*], [263 x i8*]* %2, i64 0, i64 %57
store i8* null, i8** %58
%59 = getelementptr inbounds [263 x i8*], [263 x i8*]* %2, i64 0, i64 0
ret void
}