#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 *, unsigned int, ...);
int main() {
  int variable1 = -10;
  unsigned int variable2 = 15;
  int variable11 = 0x7;
  printf("Value of %%10d: %10d\n", 1);
  printf("Value of %%-10d: %-10d\n", 2);
  printf("Value of %%+d and %%+d: %+d and %+d\n", variable1, variable2);
  printf("Value of %% d and %% d: % d and % d\n", variable1, variable2);
  printf("Value of %%#g and %%#x: %#g and %#x\n", variable2, variable11);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xfffffff6,-0x4(%rbp)
movl   $0xf,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0xfffffff6,%esi
mov    $0xf,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0xfffffff6,%esi
mov    $0xf,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0xf,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Value of %%10d: %10d\0A\00"
@.str.1 = [24 x i8] c"Value of %%-10d: %-10d\0A\00"
@.str.2 = [37 x i8] c"Value of %%+d and %%+d: %+d and %+d\0A\00"
@.str.3 = [37 x i8] c"Value of %% d and %% d: % d and % d\0A\00"
@.str.4 = [37 x i8] c"Value of %%#g and %%#x: %#g and %#x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 -10, i32* %1
store i32 15, i32* %2
store i32 7, i32* %3
%4 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Value of %%10d: %10d\0A\00"
@.str.1 = [24 x i8] c"Value of %%-10d: %-10d\0A\00"
@.str.2 = [37 x i8] c"Value of %%+d and %%+d: %+d and %+d\0A\00"
@.str.3 = [37 x i8] c"Value of %% d and %% d: % d and % d\0A\00"
@.str.4 = [37 x i8] c"Value of %%#g and %%#x: %#g and %#x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 2)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 -10, i32 15)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 -10, i32 15)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 15, i32 7)
ret i32 0
}