#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 atoi(char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, int, int, int, int);
int syscall(int, char *, char *, int, int, int, int);
int main(int argc, char **argv) {
  printf("%s,%s,%s,%d,%d,%d,%d\n", argv[0], argv[1], argv[2], atoi(argv[3]),
         atoi(argv[4]), atoi(argv[5]), atoi(argv[6]));
  return syscall(316, argv[1], argv[2], atoi(argv[3]), atoi(argv[4]),
                 atoi(argv[5]), atoi(argv[6]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x58(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x34(%rbp),%r10d
lea    0xe3b(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x13c,%edi
mov    %eax,(%rsp)
call   1040 <syscall@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rsi),%rax
mov    %rax,(%rsp)
mov    0x8(%rsi),%r15
mov    0x10(%rsi),%r12
mov    0x18(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%r13d
mov    0x20(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x28(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%r14d
mov    0x30(%rbx),%rdi
call   1050 <atoi@plt>
lea    0xe80(%rip),%rdi
mov    (%rsp),%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13d,%r8d
mov    %ebp,%r9d
push   %rax
push   %r14
call   1030 <printf@plt>
add    $0x10,%rsp
mov    0x8(%rbx),%r15
mov    0x10(%rbx),%r14
mov    0x18(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%r12d
mov    0x20(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%r13d
mov    0x28(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x30(%rbx),%rdi
call   1050 <atoi@plt>
sub    $0x8,%rsp
mov    $0x13c,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r12d,%ecx
mov    %r13d,%r8d
mov    %ebp,%r9d
push   %rax
call   1040 <syscall@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%s,%s,%s,%d,%d,%d,%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 3
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 4
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 5
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 6
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %11, i8* %14, i32 %18, i32 %22, i32 %26, i32 %30)
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 3
%40 = load i8*, i8** %39
%41 = call i32 @atoi(i8* %40)
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 4
%44 = load i8*, i8** %43
%45 = call i32 @atoi(i8* %44)
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 5
%48 = load i8*, i8** %47
%49 = call i32 @atoi(i8* %48)
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 6
%52 = load i8*, i8** %51
%53 = call i32 @atoi(i8* %52)
%54 = call i32 @syscall(i32 316, i8* %34, i8* %37, i32 %41, i32 %45, i32 %49, i32 %53)
ret i32 %54
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s,%s,%s,%d,%d,%d,%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %1, i64 3
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 4
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 5
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = getelementptr inbounds i8*, i8** %1, i64 6
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5, i8* %7, i32 %10, i32 %13, i32 %16, i32 %19)
%21 = load i8*, i8** %4
%22 = load i8*, i8** %6
%23 = load i8*, i8** %8
%24 = tail call i32 @atoi(i8* %23)
%25 = load i8*, i8** %11
%26 = tail call i32 @atoi(i8* %25)
%27 = load i8*, i8** %14
%28 = tail call i32 @atoi(i8* %27)
%29 = load i8*, i8** %17
%30 = tail call i32 @atoi(i8* %29)
%31 = tail call i32 @syscall(i32 316, i8* %21, i8* %22, i32 %24, i32 %26, i32 %28, i32 %30)
ret i32 %31
}