#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 */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ getflags(int, int, int);
int /*<<< orphan*/ numberToString(int, int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main(void) {
  int testint;
  unsigned testuint;
  int64_t testint64;
  uint64_t testuint64;
  char buffer[32];
  testint = 0xFFFFFFFF;
  testuint = 0xFFFFFFFF;
  testint64 = 0xFFFFFFFFFFFFFFFFL;
  testuint64 = 0xFFFFFFFFFFFFFFFFUL;
  int base = 10;
  int pad = 0;
  int lowerhex = 0;
  puts(numberToString((int64_t)testint, base, buffer, 16,
                      getflags(1, pad, lowerhex)));
  puts(numberToString(testint64, base, buffer, 0, getflags(1, pad, lowerhex)));
  puts(numberToString((uint64_t)testuint, base, buffer, 16,
                      getflags(0, pad, lowerhex)));
  puts(numberToString(testuint64, base, buffer, 0, getflags(0, pad, lowerhex)));
  pad = 1;
  puts(numberToString((int64_t)testint, base, buffer, 0,
                      getflags(1, pad, lowerhex)));
  puts(numberToString(testint64, base, buffer, 20, getflags(1, pad, lowerhex)));
  puts(numberToString((uint64_t)testuint, base, buffer, 0,
                      getflags(0, pad, lowerhex)));
  puts(
      numberToString(testuint64, base, buffer, 20, getflags(0, pad, lowerhex)));
  pad = 0;
  puts(numberToString((int64_t)0, 2, buffer, 0, getflags(1, pad, lowerhex)));
  puts(numberToString((uint64_t)0, 8, buffer, 0, getflags(0, pad, lowerhex)));
  puts(numberToString(0, 10, buffer, 20, getflags(1, pad, lowerhex)));
  puts(numberToString(0, 16, buffer, 20, getflags(0, pad, lowerhex)));
  pad = 1;
  puts(numberToString((int64_t)0, 2, buffer, 0, getflags(1, pad, lowerhex)));
  puts(numberToString((uint64_t)0, 8, buffer, 0, getflags(0, pad, lowerhex)));
  puts(numberToString(0, 10, buffer, 20, getflags(1, pad, lowerhex)));
  puts(numberToString(0, 16, buffer, 20, getflags(0, pad, lowerhex)));
  pad = 1;
  lowerhex = 1;
  puts(numberToString((int64_t)0, 2, buffer, 0, getflags(1, pad, lowerhex)));
  puts(numberToString((uint64_t)0, 8, buffer, 0, getflags(0, pad, lowerhex)));
  puts(numberToString(0xff, 16, buffer, 20, getflags(1, pad, lowerhex)));
  puts(numberToString(0xff, 16, buffer, 20, getflags(0, pad, lowerhex)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0xa,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x12c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x130(%rbp),%edi
mov    -0x12c(%rbp),%esi
mov    -0x128(%rbp),%rdx
mov    %eax,%r8d
mov    $0x10,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x11c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x120(%rbp),%edi
mov    -0x11c(%rbp),%esi
mov    -0x118(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x110(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x10c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x110(%rbp),%edi
mov    -0x10c(%rbp),%esi
mov    -0x108(%rbp),%rdx
mov    %eax,%r8d
mov    $0x10,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xfc(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x100(%rbp),%edi
mov    -0xfc(%rbp),%esi
mov    -0xf8(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
movl   $0x1,-0x48(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xf0(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xec(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0xf0(%rbp),%edi
mov    -0xec(%rbp),%esi
mov    -0xe8(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xe0(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xdc(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0xe0(%rbp),%edi
mov    -0xdc(%rbp),%esi
mov    -0xd8(%rbp),%rdx
mov    %eax,%r8d
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xcc(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0xd0(%rbp),%edi
mov    -0xcc(%rbp),%esi
mov    -0xc8(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xbc(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0xc0(%rbp),%edi
mov    -0xbc(%rbp),%esi
mov    -0xb8(%rbp),%rdx
mov    %eax,%r8d
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
movl   $0x0,-0x48(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0xb0(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x2,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0xa8(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x8,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0xa0(%rbp),%rdx
mov    %eax,%r8d
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x98(%rbp),%rdx
mov    %eax,%r8d
xor    %edi,%edi
mov    $0x10,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
movl   $0x1,-0x48(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x90(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x2,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x88(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x8,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x80(%rbp),%rdx
mov    %eax,%r8d
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x78(%rbp),%rdx
mov    %eax,%r8d
xor    %edi,%edi
mov    $0x10,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
movl   $0x1,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x70(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x2,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x68(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
mov    $0x8,%esi
mov    %ecx,%edi
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    $0x1,%edi
call   1050 <getflags@plt>
mov    -0x60(%rbp),%rdx
mov    %eax,%r8d
mov    $0xff,%edi
mov    $0x10,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
xor    %edi,%edi
call   1050 <getflags@plt>
mov    -0x58(%rbp),%rdx
mov    %eax,%r8d
mov    $0xff,%edi
mov    $0x10,%esi
mov    $0x14,%ecx
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    %rsp,%rbx
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x10,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x10,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
mov    $0xffffffff,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x10,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x10,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <getflags@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <getflags@plt>
mov    $0xff,%edi
mov    $0x10,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1050 <getflags@plt>
mov    $0xff,%edi
mov    $0x10,%esi
mov    %rbx,%rdx
mov    $0x14,%ecx
mov    %eax,%r8d
call   1030 <numberToString@plt>
mov    %eax,%edi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [32 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 -1, i32* %3
store i32 -1, i32* %4
store i32 -1, i32* %5
store i32 10, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%10 = load i32, i32* %2
%11 = load i32, i32* %7
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @getflags(i32 1, i32 %13, i32 %14)
%16 = call i32 @numberToString(i32 %10, i32 %11, i8* %12, i32 16, i32 %15)
%17 = call i32 @puts(i32 %16)
%18 = load i32, i32* %4
%19 = load i32, i32* %7
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = call i32 @getflags(i32 1, i32 %21, i32 %22)
%24 = call i32 @numberToString(i32 %18, i32 %19, i8* %20, i32 0, i32 %23)
%25 = call i32 @puts(i32 %24)
%26 = load i32, i32* %3
%27 = load i32, i32* %7
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%29 = load i32, i32* %8
%30 = load i32, i32* %9
%31 = call i32 @getflags(i32 0, i32 %29, i32 %30)
%32 = call i32 @numberToString(i32 %26, i32 %27, i8* %28, i32 16, i32 %31)
%33 = call i32 @puts(i32 %32)
%34 = load i32, i32* %5
%35 = load i32, i32* %7
%36 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%37 = load i32, i32* %8
%38 = load i32, i32* %9
%39 = call i32 @getflags(i32 0, i32 %37, i32 %38)
%40 = call i32 @numberToString(i32 %34, i32 %35, i8* %36, i32 0, i32 %39)
%41 = call i32 @puts(i32 %40)
store i32 1, i32* %8
%42 = load i32, i32* %2
%43 = load i32, i32* %7
%44 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%45 = load i32, i32* %8
%46 = load i32, i32* %9
%47 = call i32 @getflags(i32 1, i32 %45, i32 %46)
%48 = call i32 @numberToString(i32 %42, i32 %43, i8* %44, i32 0, i32 %47)
%49 = call i32 @puts(i32 %48)
%50 = load i32, i32* %4
%51 = load i32, i32* %7
%52 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%53 = load i32, i32* %8
%54 = load i32, i32* %9
%55 = call i32 @getflags(i32 1, i32 %53, i32 %54)
%56 = call i32 @numberToString(i32 %50, i32 %51, i8* %52, i32 20, i32 %55)
%57 = call i32 @puts(i32 %56)
%58 = load i32, i32* %3
%59 = load i32, i32* %7
%60 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%61 = load i32, i32* %8
%62 = load i32, i32* %9
%63 = call i32 @getflags(i32 0, i32 %61, i32 %62)
%64 = call i32 @numberToString(i32 %58, i32 %59, i8* %60, i32 0, i32 %63)
%65 = call i32 @puts(i32 %64)
%66 = load i32, i32* %5
%67 = load i32, i32* %7
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%69 = load i32, i32* %8
%70 = load i32, i32* %9
%71 = call i32 @getflags(i32 0, i32 %69, i32 %70)
%72 = call i32 @numberToString(i32 %66, i32 %67, i8* %68, i32 20, i32 %71)
%73 = call i32 @puts(i32 %72)
store i32 0, i32* %8
%74 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%75 = load i32, i32* %8
%76 = load i32, i32* %9
%77 = call i32 @getflags(i32 1, i32 %75, i32 %76)
%78 = call i32 @numberToString(i32 0, i32 2, i8* %74, i32 0, i32 %77)
%79 = call i32 @puts(i32 %78)
%80 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%81 = load i32, i32* %8
%82 = load i32, i32* %9
%83 = call i32 @getflags(i32 0, i32 %81, i32 %82)
%84 = call i32 @numberToString(i32 0, i32 8, i8* %80, i32 0, i32 %83)
%85 = call i32 @puts(i32 %84)
%86 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%87 = load i32, i32* %8
%88 = load i32, i32* %9
%89 = call i32 @getflags(i32 1, i32 %87, i32 %88)
%90 = call i32 @numberToString(i32 0, i32 10, i8* %86, i32 20, i32 %89)
%91 = call i32 @puts(i32 %90)
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%93 = load i32, i32* %8
%94 = load i32, i32* %9
%95 = call i32 @getflags(i32 0, i32 %93, i32 %94)
%96 = call i32 @numberToString(i32 0, i32 16, i8* %92, i32 20, i32 %95)
%97 = call i32 @puts(i32 %96)
store i32 1, i32* %8
%98 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%99 = load i32, i32* %8
%100 = load i32, i32* %9
%101 = call i32 @getflags(i32 1, i32 %99, i32 %100)
%102 = call i32 @numberToString(i32 0, i32 2, i8* %98, i32 0, i32 %101)
%103 = call i32 @puts(i32 %102)
%104 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%105 = load i32, i32* %8
%106 = load i32, i32* %9
%107 = call i32 @getflags(i32 0, i32 %105, i32 %106)
%108 = call i32 @numberToString(i32 0, i32 8, i8* %104, i32 0, i32 %107)
%109 = call i32 @puts(i32 %108)
%110 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%111 = load i32, i32* %8
%112 = load i32, i32* %9
%113 = call i32 @getflags(i32 1, i32 %111, i32 %112)
%114 = call i32 @numberToString(i32 0, i32 10, i8* %110, i32 20, i32 %113)
%115 = call i32 @puts(i32 %114)
%116 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%117 = load i32, i32* %8
%118 = load i32, i32* %9
%119 = call i32 @getflags(i32 0, i32 %117, i32 %118)
%120 = call i32 @numberToString(i32 0, i32 16, i8* %116, i32 20, i32 %119)
%121 = call i32 @puts(i32 %120)
store i32 1, i32* %8
store i32 1, i32* %9
%122 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%123 = load i32, i32* %8
%124 = load i32, i32* %9
%125 = call i32 @getflags(i32 1, i32 %123, i32 %124)
%126 = call i32 @numberToString(i32 0, i32 2, i8* %122, i32 0, i32 %125)
%127 = call i32 @puts(i32 %126)
%128 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%129 = load i32, i32* %8
%130 = load i32, i32* %9
%131 = call i32 @getflags(i32 0, i32 %129, i32 %130)
%132 = call i32 @numberToString(i32 0, i32 8, i8* %128, i32 0, i32 %131)
%133 = call i32 @puts(i32 %132)
%134 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%135 = load i32, i32* %8
%136 = load i32, i32* %9
%137 = call i32 @getflags(i32 1, i32 %135, i32 %136)
%138 = call i32 @numberToString(i32 255, i32 16, i8* %134, i32 20, i32 %137)
%139 = call i32 @puts(i32 %138)
%140 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%141 = load i32, i32* %8
%142 = load i32, i32* %9
%143 = call i32 @getflags(i32 0, i32 %141, i32 %142)
%144 = call i32 @numberToString(i32 255, i32 16, i8* %140, i32 20, i32 %143)
%145 = call i32 @puts(i32 %144)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @getflags(i32 1, i32 0, i32 0)
%4 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 16, i32 %3)
%5 = call i32 @puts(i32 %4)
%6 = call i32 @getflags(i32 1, i32 0, i32 0)
%7 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 0, i32 %6)
%8 = call i32 @puts(i32 %7)
%9 = call i32 @getflags(i32 0, i32 0, i32 0)
%10 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 16, i32 %9)
%11 = call i32 @puts(i32 %10)
%12 = call i32 @getflags(i32 0, i32 0, i32 0)
%13 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 0, i32 %12)
%14 = call i32 @puts(i32 %13)
%15 = call i32 @getflags(i32 1, i32 1, i32 0)
%16 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 0, i32 %15)
%17 = call i32 @puts(i32 %16)
%18 = call i32 @getflags(i32 1, i32 1, i32 0)
%19 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 20, i32 %18)
%20 = call i32 @puts(i32 %19)
%21 = call i32 @getflags(i32 0, i32 1, i32 0)
%22 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 0, i32 %21)
%23 = call i32 @puts(i32 %22)
%24 = call i32 @getflags(i32 0, i32 1, i32 0)
%25 = call i32 @numberToString(i32 -1, i32 10, i8* %2, i32 20, i32 %24)
%26 = call i32 @puts(i32 %25)
%27 = call i32 @getflags(i32 1, i32 0, i32 0)
%28 = call i32 @numberToString(i32 0, i32 2, i8* %2, i32 0, i32 %27)
%29 = call i32 @puts(i32 %28)
%30 = call i32 @getflags(i32 0, i32 0, i32 0)
%31 = call i32 @numberToString(i32 0, i32 8, i8* %2, i32 0, i32 %30)
%32 = call i32 @puts(i32 %31)
%33 = call i32 @getflags(i32 1, i32 0, i32 0)
%34 = call i32 @numberToString(i32 0, i32 10, i8* %2, i32 20, i32 %33)
%35 = call i32 @puts(i32 %34)
%36 = call i32 @getflags(i32 0, i32 0, i32 0)
%37 = call i32 @numberToString(i32 0, i32 16, i8* %2, i32 20, i32 %36)
%38 = call i32 @puts(i32 %37)
%39 = call i32 @getflags(i32 1, i32 1, i32 0)
%40 = call i32 @numberToString(i32 0, i32 2, i8* %2, i32 0, i32 %39)
%41 = call i32 @puts(i32 %40)
%42 = call i32 @getflags(i32 0, i32 1, i32 0)
%43 = call i32 @numberToString(i32 0, i32 8, i8* %2, i32 0, i32 %42)
%44 = call i32 @puts(i32 %43)
%45 = call i32 @getflags(i32 1, i32 1, i32 0)
%46 = call i32 @numberToString(i32 0, i32 10, i8* %2, i32 20, i32 %45)
%47 = call i32 @puts(i32 %46)
%48 = call i32 @getflags(i32 0, i32 1, i32 0)
%49 = call i32 @numberToString(i32 0, i32 16, i8* %2, i32 20, i32 %48)
%50 = call i32 @puts(i32 %49)
%51 = call i32 @getflags(i32 1, i32 1, i32 1)
%52 = call i32 @numberToString(i32 0, i32 2, i8* %2, i32 0, i32 %51)
%53 = call i32 @puts(i32 %52)
%54 = call i32 @getflags(i32 0, i32 1, i32 1)
%55 = call i32 @numberToString(i32 0, i32 8, i8* %2, i32 0, i32 %54)
%56 = call i32 @puts(i32 %55)
%57 = call i32 @getflags(i32 1, i32 1, i32 1)
%58 = call i32 @numberToString(i32 255, i32 16, i8* %2, i32 20, i32 %57)
%59 = call i32 @puts(i32 %58)
%60 = call i32 @getflags(i32 0, i32 1, i32 1)
%61 = call i32 @numberToString(i32 255, i32 16, i8* %2, i32 20, i32 %60)
%62 = call i32 @puts(i32 %61)
ret i32 0
}