#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*/ pp_printf(char *, int, ...);
int main(int argc, char **argv) {
  pp_printf("integer %5i %5i %05i\n", 1024, 666, 53);
  pp_printf("octal   %5o %5o %05o\n", 1024, 666, 53);
  pp_printf("hex     %5x %5x %05x\n", 1024, 666, 53);
  pp_printf("HEX etc %5X %+5d %-5i\n", 1024, 666, 53);
  pp_printf("neg     %5i %05i %05x\n", -5, -10, -15);
  pp_printf("char: %c  string %s %5s %.5s\n", 65, "foo", "foo",
            "verylongstring");
  pp_printf("hour    %02d:%02d:%02d\n", 12, 9, 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)
lea    0xed3(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0xfffffffb,%esi
mov    $0xfffffff6,%edx
mov    $0xfffffff1,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x41,%esi
lea    0xec4(%rip),%rcx
lea    0xec1(%rip),%r8
mov    %rcx,%rdx
mov    $0x0,%al
call   1030 <pp_printf@plt>
lea    0xebf(%rip),%rdi
mov    $0xc,%esi
mov    $0x9,%edx
xor    %ecx,%ecx
mov    $0x0,%al
call   1030 <pp_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x400,%esi
mov    $0x29a,%edx
mov    $0x35,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xecd(%rip),%rdi
mov    $0xfffffffb,%esi
mov    $0xfffffff6,%edx
mov    $0xfffffff1,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xec7(%rip),%rdi
lea    0xede(%rip),%rcx
lea    0xedb(%rip),%r8
mov    $0x41,%esi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <pp_printf@plt>
lea    0xed4(%rip),%rdi
mov    $0xc,%esi
mov    $0x9,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <pp_printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"integer %5i %5i %05i\0A\00"
@.str.1 = [22 x i8] c"octal %5o %5o %05o\0A\00"
@.str.2 = [22 x i8] c"hex %5x %5x %05x\0A\00"
@.str.3 = [23 x i8] c"HEX etc %5X %+5d %-5i\0A\00"
@.str.4 = [23 x i8] c"neg %5i %05i %05x\0A\00"
@.str.5 = [30 x i8] c"char: %c string %s %5s %.5s\0A\00"
@.str.6 = [4 x i8] c"foo\00"
@.str.7 = [15 x i8] c"verylongstring\00"
@.str.8 = [24 x i8] c"hour %02d:%02d:%02d\0A\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 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1024, i32 666, i32 53)
%7 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 1024, i32 666, i32 53)
%8 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 1024, i32 666, i32 53)
%9 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 1024, i32 666, i32 53)
%10 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 -5, i32 -10, i32 -15)
%11 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 12, i32 9, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"integer %5i %5i %05i\0A\00"
@.str.1 = [22 x i8] c"octal %5o %5o %05o\0A\00"
@.str.2 = [22 x i8] c"hex %5x %5x %05x\0A\00"
@.str.3 = [23 x i8] c"HEX etc %5X %+5d %-5i\0A\00"
@.str.4 = [23 x i8] c"neg %5i %05i %05x\0A\00"
@.str.5 = [30 x i8] c"char: %c string %s %5s %.5s\0A\00"
@.str.6 = [4 x i8] c"foo\00"
@.str.7 = [15 x i8] c"verylongstring\00"
@.str.8 = [24 x i8] c"hour %02d:%02d:%02d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1024, i32 666, i32 53)
%4 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 1024, i32 666, i32 53)
%5 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 1024, i32 666, i32 53)
%6 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 1024, i32 666, i32 53)
%7 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 -5, i32 -10, i32 -15)
%8 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 (i8*, i32, ...) @pp_printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 12, i32 9, i32 0)
ret i32 0
}