#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*/ simple_va_fun0(int, int, ...);
int /*<<< orphan*/ simple_va_fun1(char *, char *, char *, char *, char *,
                                  char *);
int main(int argc, char *argv[]) {
  simple_va_fun0(10, -1);
  simple_va_fun0(100, 200, -1);
  simple_va_fun1("DEMO", "2333", "you", "are", "hero", "/0");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1040 <simple_va_fun0@plt>
mov    $0x64,%edi
mov    $0xc8,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1040 <simple_va_fun0@plt>
lea    0xe9c(%rip),%rdi
lea    0xe9a(%rip),%rsi
lea    0xe98(%rip),%rdx
lea    0xe95(%rip),%rcx
lea    0xe92(%rip),%r8
lea    0xe90(%rip),%r9
call   1030 <simple_va_fun1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1040 <simple_va_fun0@plt>
mov    $0x64,%edi
mov    $0xc8,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1040 <simple_va_fun0@plt>
lea    0xeb1(%rip),%rdi
lea    0xeaf(%rip),%rsi
lea    0xead(%rip),%rdx
lea    0xeaa(%rip),%rcx
lea    0xea7(%rip),%r8
lea    0xea5(%rip),%r9
call   1030 <simple_va_fun1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"DEMO\00"
@.str.1 = [5 x i8] c"2333\00"
@.str.2 = [4 x i8] c"you\00"
@.str.3 = [4 x i8] c"are\00"
@.str.4 = [5 x i8] c"hero\00"
@.str.5 = [3 x i8] c"/0\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 = call i32 (i32, i32, ...) @simple_va_fun0(i32 10, i32 -1)
%7 = call i32 (i32, i32, ...) @simple_va_fun0(i32 100, i32 200, i32 -1)
%8 = call i32 @simple_va_fun1(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"DEMO\00"
@.str.1 = [5 x i8] c"2333\00"
@.str.2 = [4 x i8] c"you\00"
@.str.3 = [4 x i8] c"are\00"
@.str.4 = [5 x i8] c"hero\00"
@.str.5 = [3 x i8] c"/0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i32, i32, ...) @simple_va_fun0(i32 10, i32 -1)
%4 = tail call i32 (i32, i32, ...) @simple_va_fun0(i32 100, i32 200, i32 -1)
%5 = tail call i32 @simple_va_fun1(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}