#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*/ testuns(char *, int, char *, int, int);
int main() {
  testuns("0", 0, L"0", 0LL, 10);
  testuns("0x10", 16, L"0x10", 16LL, 0);
  testuns("0x10", 0, L"0x10", 0LL, 10);
  testuns("ABC", 0xABC, L"ABC", 0xABCLL, 16);
  testuns("011", 3, L"011", 3LL, 2);
  testuns("41", 33, L"41", 33LL, 8);
  testuns("99A", 99, L"99x", 99LL, 10);
  testuns("-99", 0xFFFFFF9D, L"-99", -99LL, 10);
  testuns("80000000", 0x80000000UL, L"80000000", 0x80000000LL, 16);
  testuns("4294967295", 0xFFFFFFFFUL, L"4294967295", 0xFFFFFFFFULL, 10);
  testuns("4294967296", 0xFFFFFFFFUL, L"4294967296", 0x100000000ULL, 10);
  testuns("-1", 0xFFFFFFFFUL, L"-1", 0xFFFFFFFFFFFFFFFFULL, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef9(%rip),%rdi
xor    %ecx,%ecx
lea    0xf89(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xebd(%rip),%rdi
mov    $0x10,%ecx
lea    0xeed(%rip),%rdx
xor    %r8d,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xea0(%rip),%rdi
xor    %ecx,%ecx
lea    0xed3(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xe88(%rip),%rdi
mov    $0xabc,%ecx
lea    0xec7(%rip),%rdx
mov    $0x10,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xe6c(%rip),%rdi
mov    $0x3,%ecx
lea    0xeb7(%rip),%rdx
mov    $0x2,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xe50(%rip),%rdi
mov    $0x21,%ecx
lea    0xea7(%rip),%rdx
mov    $0x8,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xe33(%rip),%rdi
mov    $0x63,%ecx
lea    0xe93(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xe17(%rip),%rdi
mov    $0xffffff9d,%ecx
lea    0xe83(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xdfb(%rip),%rdi
mov    $0x80000000,%ecx
lea    0xe73(%rip),%rdx
mov    $0x10,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xde4(%rip),%rdi
mov    $0xffffffff,%ecx
lea    0xe77(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
lea    0xdcf(%rip),%rdi
mov    $0xffffffff,%esi
lea    0xe83(%rip),%rdx
xor    %ecx,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xdba(%rip),%rdi
mov    $0xffffffff,%ecx
lea    0xe8f(%rip),%rdx
mov    $0xa,%r8d
mov    %ecx,%esi
call   1030 <testuns@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf04(%rip),%rdi
lea    0xf96(%rip),%rdx
xor    %esi,%esi
xor    %ecx,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xec8(%rip),%rbx
lea    0xefd(%rip),%r14
mov    %rbx,%rdi
mov    $0x10,%esi
mov    %r14,%rdx
mov    $0x10,%ecx
xor    %r8d,%r8d
call   1030 <testuns@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
xor    %ecx,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xe92(%rip),%rdi
lea    0xed6(%rip),%rdx
mov    $0xabc,%esi
mov    $0xabc,%ecx
mov    $0x10,%r8d
call   1030 <testuns@plt>
lea    0xe73(%rip),%rdi
lea    0xec3(%rip),%rdx
mov    $0x3,%esi
mov    $0x3,%ecx
mov    $0x2,%r8d
call   1030 <testuns@plt>
lea    0xe54(%rip),%rdi
lea    0xeb0(%rip),%rdx
mov    $0x21,%esi
mov    $0x21,%ecx
mov    $0x8,%r8d
call   1030 <testuns@plt>
lea    0xe34(%rip),%rdi
lea    0xe99(%rip),%rdx
mov    $0x63,%esi
mov    $0x63,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xe15(%rip),%rdi
lea    0xe86(%rip),%rdx
mov    $0xffffff9d,%esi
mov    $0xffffff9d,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xdf6(%rip),%rdi
lea    0xe73(%rip),%rdx
mov    $0x80000000,%esi
mov    $0x80000000,%ecx
mov    $0x10,%r8d
call   1030 <testuns@plt>
lea    0xddc(%rip),%rdi
lea    0xe74(%rip),%rdx
mov    $0xffffffff,%esi
mov    $0xffffffff,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xdc4(%rip),%rdi
lea    0xe7d(%rip),%rdx
mov    $0xffffffff,%esi
xor    %ecx,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
lea    0xdaf(%rip),%rdi
lea    0xe89(%rip),%rdx
mov    $0xffffffff,%esi
mov    $0xffffffff,%ecx
mov    $0xa,%r8d
call   1030 <testuns@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i32] [i32 48, i32 0]
@.str.2 = [5 x i8] c"0x10\00"
@.str.3 = [5 x i32] [i32 48, i32 120, i32 49, i32 48, i32 0]
@.str.4 = [4 x i8] c"ABC\00"
@.str.5 = [4 x i32] [i32 65, i32 66, i32 67, i32 0]
@.str.6 = [4 x i8] c"011\00"
@.str.7 = [4 x i32] [i32 48, i32 49, i32 49, i32 0]
@.str.8 = [3 x i8] c"41\00"
@.str.9 = [3 x i32] [i32 52, i32 49, i32 0]
@.str.10 = [4 x i8] c"99A\00"
@.str.11 = [4 x i32] [i32 57, i32 57, i32 120, i32 0]
@.str.12 = [4 x i8] c"-99\00"
@.str.13 = [4 x i32] [i32 45, i32 57, i32 57, i32 0]
@.str.14 = [9 x i8] c"80000000\00"
@.str.15 = [9 x i32] [i32 56, i32 48, i32 48, i32 48, i32 48, i32 48, i32 48, i32 48, i32 0]
@.str.16 = [11 x i8] c"4294967295\00"
@.str.17 = [11 x i32] [i32 52, i32 50, i32 57, i32 52, i32 57, i32 54, i32 55, i32 50, i32 57, i32 53, i32 0]
@.str.18 = [11 x i8] c"4294967296\00"
@.str.19 = [11 x i32] [i32 52, i32 50, i32 57, i32 52, i32 57, i32 54, i32 55, i32 50, i32 57, i32 54, i32 0]
@.str.20 = [3 x i8] c"-1\00"
@.str.21 = [3 x i32] [i32 45, i32 49, i32 0]
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @testuns(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i8* bitcast ([2 x i32]* @.str.1 to i8*), i32 0, i32 10)
%3 = call i32 @testuns(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 16, i8* bitcast ([5 x i32]* @.str.3 to i8*), i32 16, i32 0)
%4 = call i32 @testuns(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 0, i8* bitcast ([5 x i32]* @.str.3 to i8*), i32 0, i32 10)
%5 = call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 2748, i8* bitcast ([4 x i32]* @.str.5 to i8*), i32 2748, i32 16)
%6 = call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3, i8* bitcast ([4 x i32]* @.str.7 to i8*), i32 3, i32 2)
%7 = call i32 @testuns(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 33, i8* bitcast ([3 x i32]* @.str.9 to i8*), i32 33, i32 8)
%8 = call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 99, i8* bitcast ([4 x i32]* @.str.11 to i8*), i32 99, i32 10)
%9 = call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 -99, i8* bitcast ([4 x i32]* @.str.13 to i8*), i32 -99, i32 10)
%10 = call i32 @testuns(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i32 -2147483648, i8* bitcast ([9 x i32]* @.str.15 to i8*), i32 -2147483648, i32 16)
%11 = call i32 @testuns(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32 -1, i8* bitcast ([11 x i32]* @.str.17 to i8*), i32 -1, i32 10)
%12 = call i32 @testuns(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i32 -1, i8* bitcast ([11 x i32]* @.str.19 to i8*), i32 0, i32 10)
%13 = call i32 @testuns(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32 -1, i8* bitcast ([3 x i32]* @.str.21 to i8*), i32 -1, i32 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i32] [i32 48, i32 0]
@.str.2 = [5 x i8] c"0x10\00"
@.str.3 = [5 x i32] [i32 48, i32 120, i32 49, i32 48, i32 0]
@.str.4 = [4 x i8] c"ABC\00"
@.str.5 = [4 x i32] [i32 65, i32 66, i32 67, i32 0]
@.str.6 = [4 x i8] c"011\00"
@.str.7 = [4 x i32] [i32 48, i32 49, i32 49, i32 0]
@.str.8 = [3 x i8] c"41\00"
@.str.9 = [3 x i32] [i32 52, i32 49, i32 0]
@.str.10 = [4 x i8] c"99A\00"
@.str.11 = [4 x i32] [i32 57, i32 57, i32 120, i32 0]
@.str.12 = [4 x i8] c"-99\00"
@.str.13 = [4 x i32] [i32 45, i32 57, i32 57, i32 0]
@.str.14 = [9 x i8] c"80000000\00"
@.str.15 = [9 x i32] [i32 56, i32 48, i32 48, i32 48, i32 48, i32 48, i32 48, i32 48, i32 0]
@.str.16 = [11 x i8] c"4294967295\00"
@.str.17 = [11 x i32] [i32 52, i32 50, i32 57, i32 52, i32 57, i32 54, i32 55, i32 50, i32 57, i32 53, i32 0]
@.str.18 = [11 x i8] c"4294967296\00"
@.str.19 = [11 x i32] [i32 52, i32 50, i32 57, i32 52, i32 57, i32 54, i32 55, i32 50, i32 57, i32 54, i32 0]
@.str.20 = [3 x i8] c"-1\00"
@.str.21 = [3 x i32] [i32 45, i32 49, i32 0]
define i32 @main() {
%1 = tail call i32 @testuns(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i8* bitcast ([2 x i32]* @.str.1 to i8*), i32 0, i32 10)
%2 = tail call i32 @testuns(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 16, i8* bitcast ([5 x i32]* @.str.3 to i8*), i32 16, i32 0)
%3 = tail call i32 @testuns(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 0, i8* bitcast ([5 x i32]* @.str.3 to i8*), i32 0, i32 10)
%4 = tail call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 2748, i8* bitcast ([4 x i32]* @.str.5 to i8*), i32 2748, i32 16)
%5 = tail call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3, i8* bitcast ([4 x i32]* @.str.7 to i8*), i32 3, i32 2)
%6 = tail call i32 @testuns(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 33, i8* bitcast ([3 x i32]* @.str.9 to i8*), i32 33, i32 8)
%7 = tail call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 99, i8* bitcast ([4 x i32]* @.str.11 to i8*), i32 99, i32 10)
%8 = tail call i32 @testuns(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 -99, i8* bitcast ([4 x i32]* @.str.13 to i8*), i32 -99, i32 10)
%9 = tail call i32 @testuns(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i32 -2147483648, i8* bitcast ([9 x i32]* @.str.15 to i8*), i32 -2147483648, i32 16)
%10 = tail call i32 @testuns(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32 -1, i8* bitcast ([11 x i32]* @.str.17 to i8*), i32 -1, i32 10)
%11 = tail call i32 @testuns(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i32 -1, i8* bitcast ([11 x i32]* @.str.19 to i8*), i32 0, i32 10)
%12 = tail call i32 @testuns(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32 -1, i8* bitcast ([3 x i32]* @.str.21 to i8*), i32 -1, i32 10)
ret i32 0
}