#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 *);
scalar_t__ test_stdarg(char *, ...);
scalar_t__ test_stdarg_unsigned(char *, ...);
int main() {
  int errors = 0;
  char c = 12;
  short s = 123;
  long l = 1234;
  int i = 12345;
  long long ll = 123456;
  float f = 123456.7;
  double d = 123456.78;
  char mc = -12;
  short ms = -123;
  long ml = -1234;
  int mi = -12345;
  long long mll = -123456;
  float mf = -123456.7;
  double md = -123456.78;
  errors += test_stdarg("pcpsplpipLpfpd", &c, c, &s, s, &l, l, &i, i, &ll, ll,
                        &f, f, &d, d);
  errors += test_stdarg("pcpsplpipLpfpd", &mc, mc, &ms, ms, &ml, ml, &mi, mi,
                        &mll, mll, &mf, mf, &md, md);
  errors += test_stdarg("pdpfpLpiplpspc", &d, d, &f, f, &ll, ll, &i, i, &l, l,
                        &s, s, &c, c);
  errors += test_stdarg("pdpfpLpiplpspc", &md, md, &mf, mf, &mll, mll, &mi, mi,
                        &ml, ml, &ms, ms, &mc, mc);
  errors +=
      test_stdarg_unsigned("pcpsplpipL", &c, c, &s, s, &l, l, &i, i, &ll, ll);
  errors += test_stdarg_unsigned("pcpsplpipL", &mc, mc, &ms, ms, &ml, ml, &mi,
                                 mi, &mll, mll);
  errors +=
      test_stdarg_unsigned("pLpiplpspc", &ll, ll, &i, i, &l, l, &s, s, &c, c);
  errors += test_stdarg_unsigned("pLpiplpspc", &mll, mll, &mi, mi, &ml, ml, &ms,
                                 ms, &mc, mc);
  if (errors == 0) {
    printf("stdarg 001 : SUCCESS\n");
    return 0;
  } else {
    printf("stdarg 001 : FAILED\n");
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa0,%rsp
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movb   $0xc,-0x29(%rbp)
movw   $0x7b,-0x2c(%rbp)
movq   $0x4d2,-0x38(%rbp)
movl   $0x3039,-0x3c(%rbp)
movq   $0x1e240,-0x48(%rbp)
movss  0xe9b(%rip),%xmm0
movss  %xmm0,-0x4c(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movb   $0xf4,-0x59(%rbp)
movw   $0xff85,-0x5c(%rbp)
movq   $0xfffffffffffffb2e,-0x68(%rbp)
ff
movl   $0xffffcfc7,-0x6c(%rbp)
movq   $0xfffffffffffe1dc0,-0x78(%rbp)
ff
movss  0xe5c(%rip),%xmm0
movss  %xmm0,-0x7c(%rbp)
movsd  0xe3f(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsbl -0x29(%rbp),%edx
movswl -0x2c(%rbp),%r8d
mov    -0x38(%rbp),%r12
mov    -0x3c(%rbp),%r14d
mov    -0x48(%rbp),%r11
movss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x58(%rbp),%xmm1
lea    0xe25(%rip),%rdi
lea    -0x29(%rbp),%rsi
lea    -0x2c(%rbp),%rcx
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%r15
lea    -0x48(%rbp),%rbx
lea    -0x4c(%rbp),%r10
lea    -0x58(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x2,%al
call   1050 <test_stdarg@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
movsbl -0x59(%rbp),%edx
movswl -0x5c(%rbp),%r8d
mov    -0x68(%rbp),%r12
mov    -0x6c(%rbp),%r14d
mov    -0x78(%rbp),%r11
movss  -0x7c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
lea    0xda6(%rip),%rdi
lea    -0x59(%rbp),%rsi
lea    -0x5c(%rbp),%rcx
lea    -0x68(%rbp),%r9
lea    -0x6c(%rbp),%r15
lea    -0x78(%rbp),%rbx
lea    -0x7c(%rbp),%r10
lea    -0x88(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x2,%al
call   1050 <test_stdarg@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
movsd  -0x58(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x48(%rbp),%r8
mov    -0x3c(%rbp),%r12d
mov    -0x38(%rbp),%r14
movswl -0x2c(%rbp),%r11d
movsbl -0x29(%rbp),%eax
lea    0xd36(%rip),%rdi
lea    -0x58(%rbp),%rsi
lea    -0x4c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
lea    -0x3c(%rbp),%r9
lea    -0x38(%rbp),%r15
lea    -0x2c(%rbp),%rbx
lea    -0x29(%rbp),%r10
mov    %r12d,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x2,%al
call   1050 <test_stdarg@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movss  -0x7c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x78(%rbp),%r8
mov    -0x6c(%rbp),%r12d
mov    -0x68(%rbp),%r14
movswl -0x5c(%rbp),%r11d
movsbl -0x59(%rbp),%eax
lea    0xcb8(%rip),%rdi
lea    -0x88(%rbp),%rsi
lea    -0x7c(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x6c(%rbp),%r9
lea    -0x68(%rbp),%r15
lea    -0x5c(%rbp),%rbx
lea    -0x59(%rbp),%r10
mov    %r12d,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x2,%al
call   1050 <test_stdarg@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
movsbl -0x29(%rbp),%edx
movswl -0x2c(%rbp),%r8d
mov    -0x38(%rbp),%r14
mov    -0x3c(%rbp),%r11d
mov    -0x48(%rbp),%rax
lea    0xc57(%rip),%rdi
lea    -0x29(%rbp),%rsi
lea    -0x2c(%rbp),%rcx
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%rbx
lea    -0x48(%rbp),%r10
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1040 <test_stdarg_unsigned@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
movsbl -0x59(%rbp),%edx
movswl -0x5c(%rbp),%r8d
mov    -0x68(%rbp),%r14
mov    -0x6c(%rbp),%r11d
mov    -0x78(%rbp),%rax
lea    0xbfb(%rip),%rdi
lea    -0x59(%rbp),%rsi
lea    -0x5c(%rbp),%rcx
lea    -0x68(%rbp),%r9
lea    -0x6c(%rbp),%rbx
lea    -0x78(%rbp),%r10
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1040 <test_stdarg_unsigned@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x48(%rbp),%rdx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r14
movswl -0x2c(%rbp),%r11d
movsbl -0x29(%rbp),%eax
lea    0xb94(%rip),%rdi
lea    -0x48(%rbp),%rsi
lea    -0x3c(%rbp),%rcx
lea    -0x38(%rbp),%r9
lea    -0x2c(%rbp),%rbx
lea    -0x29(%rbp),%r10
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x0,%al
call   1040 <test_stdarg_unsigned@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x78(%rbp),%rdx
mov    -0x6c(%rbp),%r8d
mov    -0x68(%rbp),%r14
movswl -0x5c(%rbp),%r11d
movsbl -0x59(%rbp),%eax
lea    0xb39(%rip),%rdi
lea    -0x78(%rbp),%rsi
lea    -0x6c(%rbp),%rcx
lea    -0x68(%rbp),%r9
lea    -0x5c(%rbp),%rbx
lea    -0x59(%rbp),%r10
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x0,%al
call   1040 <test_stdarg_unsigned@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    1553 <main+0x423>
lea    0xaff(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
jmp    1566 <main+0x436>
lea    0xafd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movb   $0xc,0x2(%rsp)
movw   $0x7b,0x4(%rsp)
movq   $0x4d2,0x18(%rsp)
movl   $0x3039,0xc(%rsp)
movq   $0x1e240,0x28(%rsp)
movl   $0x47f1205a,0x24(%rsp)
47
movabs $0x40fe240c7ae147ae,%rax
24 fe 40
mov    %rax,0x40(%rsp)
movb   $0xf4,0x3(%rsp)
movw   $0xff85,0x6(%rsp)
movq   $0xfffffffffffffb2e,0x30(%rsp)
ff ff
movl   $0xffffcfc7,0x8(%rsp)
ff
movq   $0xfffffffffffe1dc0,0x10(%rsp)
fe ff
movl   $0xc7f1205a,0x20(%rsp)
c7
movabs $0xc0fe240c7ae147ae,%rax
24 fe c0
mov    %rax,0x38(%rsp)
sub    $0x8,%rsp
lea    0x48(%rsp),%rbx
lea    0x2c(%rsp),%rbp
lea    0x30(%rsp),%r15
lea    0x14(%rsp),%r13
lea    0xe49(%rip),%r12
lea    0xa(%rsp),%rsi
lea    0xc(%rsp),%rcx
lea    0x20(%rsp),%r9
movsd  0xe12(%rip),%xmm0
movsd  0xe12(%rip),%xmm1
mov    %r12,%rdi
mov    $0xc,%edx
mov    $0x7b,%r8d
mov    $0x2,%al
push   %rbx
push   %rbp
push   $0x1e240
push   %r15
push   $0x3039
push   %r13
push   $0x4d2
call   1050 <test_stdarg@plt>
add    $0x40,%rsp
mov    %rax,%r14
sub    $0x8,%rsp
lea    0x40(%rsp),%rbx
lea    0x28(%rsp),%rbp
lea    0x18(%rsp),%r11
lea    0x10(%rsp),%r10
lea    0xb(%rsp),%rsi
lea    0xe(%rsp),%rcx
lea    0x38(%rsp),%r9
movsd  0xdba(%rip),%xmm0
movsd  0xdba(%rip),%xmm1
mov    %r12,%rdi
mov    $0xfffffff4,%edx
mov    $0xffffff85,%r8d
mov    $0x2,%al
push   %rbx
push   %rbp
push   $0xfffffffffffe1dc0
push   %r11
push   $0xffffffffffffcfc7
push   %r10
mov    %r10,%r12
push   $0xfffffffffffffb2e
call   1050 <test_stdarg@plt>
add    $0x40,%rsp
mov    %rax,%rbx
add    %r14d,%ebx
movsd  0x40(%rsp),%xmm0
movss  0x24(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    0x28(%rsp),%r8
mov    0xc(%rsp),%r10d
movswl 0x4(%rsp),%r11d
movsbl 0x2(%rsp),%ebp
sub    $0x8,%rsp
lea    0xd6a(%rip),%r14
mov    %r14,%rdi
lea    0x48(%rsp),%rsi
lea    0x2c(%rsp),%rdx
mov    %r15,%rcx
mov    %r13,%r9
mov    $0x2,%al
push   %rbp
lea    0x12(%rsp),%rbp
push   %rbp
push   %r11
lea    0x24(%rsp),%rbp
push   %rbp
push   0x40(%rsp)
lea    0x48(%rsp),%rbp
push   %rbp
push   %r10
call   1050 <test_stdarg@plt>
add    $0x40,%rsp
mov    %rax,%rbp
add    %ebx,%ebp
movsd  0x38(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%r10d
movswl 0x6(%rsp),%r11d
movsbl 0x3(%rsp),%ebx
sub    $0x8,%rsp
mov    %r14,%rdi
lea    0x40(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x18(%rsp),%rcx
mov    %r12,%r9
mov    $0x2,%al
push   %rbx
lea    0x13(%rsp),%r12
push   %r12
push   %r11
lea    0x26(%rsp),%r13
push   %r13
push   0x58(%rsp)
lea    0x60(%rsp),%r15
push   %r15
push   %r10
call   1050 <test_stdarg@plt>
add    $0x40,%rsp
mov    %rax,%rbx
add    %ebp,%ebx
movsbl 0x2(%rsp),%edx
movswl 0x4(%rsp),%r8d
mov    0xc(%rsp),%r10d
sub    $0x8,%rsp
lea    0xcb4(%rip),%r14
mov    %r14,%rdi
lea    0xa(%rsp),%rsi
lea    0xc(%rsp),%rcx
lea    0x20(%rsp),%r9
xor    %eax,%eax
push   0x30(%rsp)
lea    0x38(%rsp),%rbp
push   %rbp
push   %r10
lea    0x2c(%rsp),%rbp
push   %rbp
push   0x40(%rsp)
call   1040 <test_stdarg_unsigned@plt>
add    $0x30,%rsp
mov    %rax,%rbp
add    %ebx,%ebp
movsbl 0x3(%rsp),%edx
movswl 0x6(%rsp),%r8d
mov    0x8(%rsp),%r10d
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r13,%rcx
mov    %r15,%r9
xor    %eax,%eax
push   0x18(%rsp)
lea    0x20(%rsp),%rbx
push   %rbx
push   %r10
lea    0x28(%rsp),%rbx
push   %rbx
push   0x58(%rsp)
call   1040 <test_stdarg_unsigned@plt>
add    $0x30,%rsp
mov    %rax,%rbx
add    %ebp,%ebx
mov    0x28(%rsp),%rdx
mov    0xc(%rsp),%r8d
movswl 0x4(%rsp),%r10d
movsbl 0x2(%rsp),%ebp
sub    $0x8,%rsp
lea    0xc0b(%rip),%r14
mov    %r14,%rdi
lea    0x30(%rsp),%rsi
lea    0x14(%rsp),%rcx
lea    0x20(%rsp),%r9
xor    %eax,%eax
push   %rbp
lea    0x12(%rsp),%rbp
push   %rbp
push   %r10
lea    0x24(%rsp),%rbp
push   %rbp
push   0x40(%rsp)
call   1040 <test_stdarg_unsigned@plt>
add    $0x30,%rsp
mov    %rax,%rbp
add    %ebx,%ebp
mov    0x10(%rsp),%rdx
mov    0x8(%rsp),%r8d
movswl 0x6(%rsp),%r10d
movsbl 0x3(%rsp),%ebx
sub    $0x8,%rsp
mov    %r14,%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    %r15,%r9
xor    %eax,%eax
push   %rbx
push   %r12
push   %r10
push   %r13
push   0x58(%rsp)
call   1040 <test_stdarg_unsigned@plt>
add    $0x30,%rsp
xor    %ebx,%ebx
add    %ebp,%eax
setne  %bl
lea    0xbb3(%rip),%rax
lea    0xb98(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"pcpsplpipLpfpd\00"
@.str.1 = [15 x i8] c"pdpfpLpiplpspc\00"
@.str.2 = [11 x i8] c"pcpsplpipL\00"
@.str.3 = [11 x i8] c"pLpiplpspc\00"
@.str.4 = [22 x i8] c"stdarg 001 : SUCCESS\0A\00"
@.str.5 = [21 x i8] c"stdarg 001 : FAILED\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i16
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca float
%9 = alloca double
%10 = alloca i8
%11 = alloca i16
%12 = alloca i64
%13 = alloca i32
%14 = alloca i64
%15 = alloca float
%16 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store i8 12, i8* %3
store i16 123, i16* %4
store i64 1234, i64* %5
store i32 12345, i32* %6
store i64 123456, i64* %7
store float 0x40FE240B40000000, float* %8
store double 0x40FE240C7AE147AE, double* %9
store i8 -12, i8* %10
store i16 -123, i16* %11
store i64 -1234, i64* %12
store i32 -12345, i32* %13
store i64 -123456, i64* %14
store float 0xC0FE240B40000000, float* %15
store double 0xC0FE240C7AE147AE, double* %16
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = load i16, i16* %4
%20 = sext i16 %19 to i32
%21 = load i64, i64* %5
%22 = load i32, i32* %6
%23 = load i64, i64* %7
%24 = load float, float* %8
%25 = fpext float %24 to double
%26 = load double, double* %9
%27 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %18, i16* %4, i32 %20, i64* %5, i64 %21, i32* %6, i32 %22, i64* %7, i64 %23, float* %8, double %25, double* %9, double %26)
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = add nsw i64 %29, %27
%31 = trunc i64 %30 to i32
store i32 %31, i32* %2
%32 = load i8, i8* %10
%33 = sext i8 %32 to i32
%34 = load i16, i16* %11
%35 = sext i16 %34 to i32
%36 = load i64, i64* %12
%37 = load i32, i32* %13
%38 = load i64, i64* %14
%39 = load float, float* %15
%40 = fpext float %39 to double
%41 = load double, double* %16
%42 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %33, i16* %11, i32 %35, i64* %12, i64 %36, i32* %13, i32 %37, i64* %14, i64 %38, float* %15, double %40, double* %16, double %41)
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = add nsw i64 %44, %42
%46 = trunc i64 %45 to i32
store i32 %46, i32* %2
%47 = load double, double* %9
%48 = load float, float* %8
%49 = fpext float %48 to double
%50 = load i64, i64* %7
%51 = load i32, i32* %6
%52 = load i64, i64* %5
%53 = load i16, i16* %4
%54 = sext i16 %53 to i32
%55 = load i8, i8* %3
%56 = sext i8 %55 to i32
%57 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double* %9, double %47, float* %8, double %49, i64* %7, i64 %50, i32* %6, i32 %51, i64* %5, i64 %52, i16* %4, i32 %54, i8* %3, i32 %56)
%58 = load i32, i32* %2
%59 = sext i32 %58 to i64
%60 = add nsw i64 %59, %57
%61 = trunc i64 %60 to i32
store i32 %61, i32* %2
%62 = load double, double* %16
%63 = load float, float* %15
%64 = fpext float %63 to double
%65 = load i64, i64* %14
%66 = load i32, i32* %13
%67 = load i64, i64* %12
%68 = load i16, i16* %11
%69 = sext i16 %68 to i32
%70 = load i8, i8* %10
%71 = sext i8 %70 to i32
%72 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double* %16, double %62, float* %15, double %64, i64* %14, i64 %65, i32* %13, i32 %66, i64* %12, i64 %67, i16* %11, i32 %69, i8* %10, i32 %71)
%73 = load i32, i32* %2
%74 = sext i32 %73 to i64
%75 = add nsw i64 %74, %72
%76 = trunc i64 %75 to i32
store i32 %76, i32* %2
%77 = load i8, i8* %3
%78 = sext i8 %77 to i32
%79 = load i16, i16* %4
%80 = sext i16 %79 to i32
%81 = load i64, i64* %5
%82 = load i32, i32* %6
%83 = load i64, i64* %7
%84 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %3, i32 %78, i16* %4, i32 %80, i64* %5, i64 %81, i32* %6, i32 %82, i64* %7, i64 %83)
%85 = load i32, i32* %2
%86 = sext i32 %85 to i64
%87 = add nsw i64 %86, %84
%88 = trunc i64 %87 to i32
store i32 %88, i32* %2
%89 = load i8, i8* %10
%90 = sext i8 %89 to i32
%91 = load i16, i16* %11
%92 = sext i16 %91 to i32
%93 = load i64, i64* %12
%94 = load i32, i32* %13
%95 = load i64, i64* %14
%96 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 %90, i16* %11, i32 %92, i64* %12, i64 %93, i32* %13, i32 %94, i64* %14, i64 %95)
%97 = load i32, i32* %2
%98 = sext i32 %97 to i64
%99 = add nsw i64 %98, %96
%100 = trunc i64 %99 to i32
store i32 %100, i32* %2
%101 = load i64, i64* %7
%102 = load i32, i32* %6
%103 = load i64, i64* %5
%104 = load i16, i16* %4
%105 = sext i16 %104 to i32
%106 = load i8, i8* %3
%107 = sext i8 %106 to i32
%108 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64* %7, i64 %101, i32* %6, i32 %102, i64* %5, i64 %103, i16* %4, i32 %105, i8* %3, i32 %107)
%109 = load i32, i32* %2
%110 = sext i32 %109 to i64
%111 = add nsw i64 %110, %108
%112 = trunc i64 %111 to i32
store i32 %112, i32* %2
%113 = load i64, i64* %14
%114 = load i32, i32* %13
%115 = load i64, i64* %12
%116 = load i16, i16* %11
%117 = sext i16 %116 to i32
%118 = load i8, i8* %10
%119 = sext i8 %118 to i32
%120 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64* %14, i64 %113, i32* %13, i32 %114, i64* %12, i64 %115, i16* %11, i32 %117, i8* %10, i32 %119)
%121 = load i32, i32* %2
%122 = sext i32 %121 to i64
%123 = add nsw i64 %122, %120
%124 = trunc i64 %123 to i32
store i32 %124, i32* %2
%125 = load i32, i32* %2
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %0
%128 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %131
129: ; preds = %0
%130 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %1
br label %131
131: ; preds = %129, %127
%132 = load i32, i32* %1
ret i32 %132
}

LLVM IR (-O2):
@.str = [15 x i8] c"pcpsplpipLpfpd\00"
@.str.1 = [15 x i8] c"pdpfpLpiplpspc\00"
@.str.2 = [11 x i8] c"pcpsplpipL\00"
@.str.3 = [11 x i8] c"pLpiplpspc\00"
@str = [20 x i8] c"stdarg 001 : FAILED\00"
@str.6 = [21 x i8] c"stdarg 001 : SUCCESS\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i16
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca double
%8 = alloca i8
%9 = alloca i16
%10 = alloca i64
%11 = alloca i32
%12 = alloca i64
%13 = alloca float
%14 = alloca double
store i8 12, i8* %1
%15 = bitcast i16* %2 to i8*
store i16 123, i16* %2
%16 = bitcast i64* %3 to i8*
store i64 1234, i64* %3
%17 = bitcast i32* %4 to i8*
store i32 12345, i32* %4
%18 = bitcast i64* %5 to i8*
store i64 123456, i64* %5
%19 = bitcast float* %6 to i8*
store float 0x40FE240B40000000, float* %6
%20 = bitcast double* %7 to i8*
store double 0x40FE240C7AE147AE, double* %7
store i8 -12, i8* %8
%21 = bitcast i16* %9 to i8*
store i16 -123, i16* %9
%22 = bitcast i64* %10 to i8*
store i64 -1234, i64* %10
%23 = bitcast i32* %11 to i8*
store i32 -12345, i32* %11
%24 = bitcast i64* %12 to i8*
store i64 -123456, i64* %12
%25 = bitcast float* %13 to i8*
store float 0xC0FE240B40000000, float* %13
%26 = bitcast double* %14 to i8*
store double 0xC0FE240C7AE147AE, double* %14
%27 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1, i32 12, i16* %2, i32 123, i64* %3, i64 1234, i32* %4, i32 12345, i64* %5, i64 123456, float* %6, double 0x40FE240B40000000, double* %7, double 0x40FE240C7AE147AE)
%28 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i32 -12, i16* %9, i32 -123, i64* %10, i64 -1234, i32* %11, i32 -12345, i64* %12, i64 -123456, float* %13, double 0xC0FE240B40000000, double* %14, double 0xC0FE240C7AE147AE)
%29 = add i64 %28, %27
%30 = load double, double* %7
%31 = load float, float* %6
%32 = fpext float %31 to double
%33 = load i64, i64* %5
%34 = load i32, i32* %4
%35 = load i64, i64* %3
%36 = load i16, i16* %2
%37 = sext i16 %36 to i32
%38 = load i8, i8* %1
%39 = sext i8 %38 to i32
%40 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double* %7, double %30, float* %6, double %32, i64* %5, i64 %33, i32* %4, i32 %34, i64* %3, i64 %35, i16* %2, i32 %37, i8* %1, i32 %39)
%41 = add i64 %29, %40
%42 = load double, double* %14
%43 = load float, float* %13
%44 = fpext float %43 to double
%45 = load i64, i64* %12
%46 = load i32, i32* %11
%47 = load i64, i64* %10
%48 = load i16, i16* %9
%49 = sext i16 %48 to i32
%50 = load i8, i8* %8
%51 = sext i8 %50 to i32
%52 = call i64 (i8*, ...) @test_stdarg(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double* %14, double %42, float* %13, double %44, i64* %12, i64 %45, i32* %11, i32 %46, i64* %10, i64 %47, i16* %9, i32 %49, i8* %8, i32 %51)
%53 = add i64 %41, %52
%54 = load i8, i8* %1
%55 = sext i8 %54 to i32
%56 = load i16, i16* %2
%57 = sext i16 %56 to i32
%58 = load i64, i64* %3
%59 = load i32, i32* %4
%60 = load i64, i64* %5
%61 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %1, i32 %55, i16* %2, i32 %57, i64* %3, i64 %58, i32* %4, i32 %59, i64* %5, i64 %60)
%62 = add i64 %53, %61
%63 = load i8, i8* %8
%64 = sext i8 %63 to i32
%65 = load i16, i16* %9
%66 = sext i16 %65 to i32
%67 = load i64, i64* %10
%68 = load i32, i32* %11
%69 = load i64, i64* %12
%70 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %8, i32 %64, i16* %9, i32 %66, i64* %10, i64 %67, i32* %11, i32 %68, i64* %12, i64 %69)
%71 = add i64 %62, %70
%72 = load i64, i64* %5
%73 = load i32, i32* %4
%74 = load i64, i64* %3
%75 = load i16, i16* %2
%76 = sext i16 %75 to i32
%77 = load i8, i8* %1
%78 = sext i8 %77 to i32
%79 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64* %5, i64 %72, i32* %4, i32 %73, i64* %3, i64 %74, i16* %2, i32 %76, i8* %1, i32 %78)
%80 = add i64 %71, %79
%81 = load i64, i64* %12
%82 = load i32, i32* %11
%83 = load i64, i64* %10
%84 = load i16, i16* %9
%85 = sext i16 %84 to i32
%86 = load i8, i8* %8
%87 = sext i8 %86 to i32
%88 = call i64 (i8*, ...) @test_stdarg_unsigned(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64* %12, i64 %81, i32* %11, i32 %82, i64* %10, i64 %83, i16* %9, i32 %85, i8* %8, i32 %87)
%89 = add i64 %80, %88
%90 = trunc i64 %89 to i32
%91 = icmp eq i32 %90, 0
%92 = select i1 %91, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%93 = xor i1 %91, true
%94 = zext i1 %93 to i32
%95 = call i32 @puts(i8* dereferenceable(1) %92)
ret i32 %94
}