#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*/ InterpretArg(char *, char *);
int command_Interpret(char *, int, char **);
int /*<<< orphan*/ strncpy(char *, char *, int);
int command_Expand_Interpret(char *buff, int nb, char *argv[40], int offset) {
  char buff2[512 - offset];
  InterpretArg(buff, buff2);
  strncpy(buff, buff2, 512 - offset - 1);
  buff[512 - offset - 1] = '\0';
  return command_Interpret(buff, nb, argv);
}


x86 assembly (clang, -O0):
<command_Expand_Interpret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    $0x200,%eax
sub    %ecx,%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x38(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <InterpretArg@plt>
mov    -0x38(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    $0x200,%edx
sub    -0x1c(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    $0x200,%ecx
sub    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1050 <command_Interpret@plt>
mov    -0x28(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_Expand_Interpret>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r12d
mov    %rdx,-0x30(%rbp)
mov    %esi,%r15d
mov    %rdi,%r13
mov    $0x200,%eax
sub    %ecx,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rsi
call   1040 <InterpretArg@plt>
mov    $0x1ff,%r14d
sub    %r12d,%r14d
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <strncpy@plt>
movslq %r14d,%rax
movb   $0x0,0x0(%r13,%rax,1)
mov    %r13,%rdi
mov    %r15d,%esi
mov    -0x30(%rbp),%rdx
call   1050 <command_Interpret@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @command_Expand_Interpret(i8* %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%11 = load i32, i32* %8
%12 = sub nsw i32 512, %11
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %9
%15 = alloca i8, i64 %13
store i64 %13, i64* %10
%16 = load i8*, i8** %5
%17 = call i32 @InterpretArg(i8* %16, i8* %15)
%18 = load i8*, i8** %5
%19 = load i32, i32* %8
%20 = sub nsw i32 512, %19
%21 = sub nsw i32 %20, 1
%22 = call i32 @strncpy(i8* %18, i8* %15, i32 %21)
%23 = load i8*, i8** %5
%24 = load i32, i32* %8
%25 = sub nsw i32 512, %24
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %23, i64 %27
store i8 0, i8* %28
%29 = load i8*, i8** %5
%30 = load i32, i32* %6
%31 = load i8**, i8*** %7
%32 = call i32 @command_Interpret(i8* %29, i32 %30, i8** %31)
%33 = load i8*, i8** %9
ret i32 %32
}

LLVM IR (-O2):
define i32 @command_Expand_Interpret(i8* %0, i32 %1, i8** %2, i32 %3) {
%5 = sub nsw i32 512, %3
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = call i32 @InterpretArg(i8* %0, i8* %7)
%9 = sub i32 511, %3
%10 = call i32 @strncpy(i8* %0, i8* %7, i32 %9)
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 0, i8* %12
%13 = call i32 @command_Interpret(i8* %0, i32 %1, i8** %2)
ret i32 %13
}