#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 /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int main() {
  char buf[100];
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%.6u", 1234);
  assert(!strcmp(buf, "001234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6u", 1234);
  assert(!strcmp(buf, "  1234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%06u", 1234);
  assert(!strcmp(buf, "001234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%-6u", 1234);
  assert(!strcmp(buf, "1234  "));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6.5u", 1234);
  assert(!strcmp(buf, " 01234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%.6s", "1234");
  assert(!strcmp(buf, "1234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6s", "1234");
  assert(!strcmp(buf, "  1234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%06s", "1234");
  assert(!strcmp(buf, "  1234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%-6s", "1234");
  assert(!strcmp(buf, "1234  "));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6.5s", "1234");
  assert(!strcmp(buf, "  1234"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6.3f", 1.23);
  assert(!strcmp(buf, " 1.230"));
  ;
  memset(buf, 0, sizeof(buf));
  sprintf(buf, "%6.3g", 1.23);
  assert(!strcmp(buf, "  1.23"));
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x4d2,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xe61(%rip),%rsi
mov    $0x4d2,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe4e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xe23(%rip),%rsi
mov    $0x4d2,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xdfa(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xddf(%rip),%rsi
mov    $0x4d2,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xdcd(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xda2(%rip),%rsi
mov    $0x4d2,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd91(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xd66(%rip),%rsi
lea    0xd3c(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd2a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xd20(%rip),%rsi
lea    0xcf1(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xcdd(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xcd9(%rip),%rsi
lea    0xca6(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xc92(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xc93(%rip),%rsi
lea    0xc5b(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xc4d(%rip),%rsi
lea    0xc10(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xbfc(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xc08(%rip),%rsi
movsd  0xbaa(%rip),%xmm0
mov    $0x1,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xbf4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xbc9(%rip),%rsi
movsd  0xb5e(%rip),%xmm0
mov    $0x1,%al
call   1060 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xbb5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xeb1(%rip),%rsi
mov    %r14,%rdi
mov    $0x4d2,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    $0x32313030,%ebx
mov    (%rsp),%eax
xor    %ebx,%eax
mov    $0x343332,%ebp
mov    0x3(%rsp),%ecx
xor    %ebp,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xe76(%rip),%rsi
mov    %r14,%rdi
mov    $0x4d2,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    $0x32312020,%r15d
mov    (%rsp),%eax
xor    %r15d,%eax
mov    0x3(%rsp),%ecx
xor    %ebp,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xe3d(%rip),%rsi
mov    %r14,%rdi
mov    $0x4d2,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
xor    (%rsp),%ebx
mov    0x3(%rsp),%eax
xor    %ebp,%eax
xor    %edi,%edi
or     %ebx,%eax
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xe07(%rip),%rsi
mov    %r14,%rdi
mov    $0x4d2,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    $0x34333231,%r12d
mov    (%rsp),%eax
xor    %r12d,%eax
mov    $0x202034,%r13d
mov    0x3(%rsp),%ecx
xor    %r13d,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xdc8(%rip),%rsi
mov    %r14,%rdi
mov    $0x4d2,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    $0x32313020,%eax
xor    (%rsp),%eax
mov    0x3(%rsp),%ecx
xor    %ebp,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xd95(%rip),%rsi
lea    0xd6b(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    (%rsp),%eax
xor    %r12d,%eax
movzbl 0x4(%rsp),%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xd58(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    (%rsp),%eax
xor    %r15d,%eax
mov    0x3(%rsp),%ecx
xor    %ebp,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xd20(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    (%rsp),%eax
xor    %r15d,%eax
mov    0x3(%rsp),%ecx
xor    %ebp,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xce9(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
xor    (%rsp),%r12d
xor    0x3(%rsp),%r13d
xor    %edi,%edi
or     %r12d,%r13d
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xcb4(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
xor    (%rsp),%r15d
xor    0x3(%rsp),%ebp
xor    %edi,%edi
or     %r15d,%ebp
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xc81(%rip),%rsi
movsd  0xc23(%rip),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <sprintf@plt>
mov    $0x322e3120,%eax
xor    (%rsp),%eax
mov    $0x303332,%ecx
xor    0x3(%rsp),%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    0xc48(%rip),%rsi
mov    %r14,%rdi
movsd  0xbda(%rip),%xmm0
mov    $0x1,%al
call   1050 <sprintf@plt>
mov    $0x2e312020,%eax
xor    (%rsp),%eax
mov    $0x33322e,%ecx
xor    0x3(%rsp),%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.6u\00"
@.str.1 = [7 x i8] c"001234\00"
@.str.2 = [4 x i8] c"%6u\00"
@.str.3 = [7 x i8] c" 1234\00"
@.str.4 = [5 x i8] c"%06u\00"
@.str.5 = [5 x i8] c"%-6u\00"
@.str.6 = [7 x i8] c"1234 \00"
@.str.7 = [6 x i8] c"%6.5u\00"
@.str.8 = [7 x i8] c" 01234\00"
@.str.9 = [5 x i8] c"%.6s\00"
@.str.10 = [5 x i8] c"1234\00"
@.str.11 = [4 x i8] c"%6s\00"
@.str.12 = [5 x i8] c"%06s\00"
@.str.13 = [5 x i8] c"%-6s\00"
@.str.14 = [6 x i8] c"%6.5s\00"
@.str.15 = [6 x i8] c"%6.3f\00"
@.str.16 = [7 x i8] c" 1.230\00"
@.str.17 = [6 x i8] c"%6.3g\00"
@.str.18 = [7 x i8] c" 1.23\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 100)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1234)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @strcmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = call i32 @memset(i8* %13, i32 0, i32 100)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1234)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%18 = call i32 @strcmp(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%24 = call i32 @memset(i8* %23, i32 0, i32 100)
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%26 = call i32 (i8*, i8*, ...) @sprintf(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 1234)
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%34 = call i32 @memset(i8* %33, i32 0, i32 100)
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%36 = call i32 (i8*, i8*, ...) @sprintf(i8* %35, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 1234)
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
%40 = xor i1 %39, true
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%44 = call i32 @memset(i8* %43, i32 0, i32 100)
%45 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 1234)
%47 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%48 = call i32 @strcmp(i8* %47, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
%50 = xor i1 %49, true
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%54 = call i32 @memset(i8* %53, i32 0, i32 100)
%55 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%56 = call i32 (i8*, i8*, ...) @sprintf(i8* %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%64 = call i32 @memset(i8* %63, i32 0, i32 100)
%65 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%66 = call i32 (i8*, i8*, ...) @sprintf(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%67 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
%70 = xor i1 %69, true
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%74 = call i32 @memset(i8* %73, i32 0, i32 100)
%75 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%76 = call i32 (i8*, i8*, ...) @sprintf(i8* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%78 = call i32 @strcmp(i8* %77, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%79 = icmp ne i32 %78, 0
%80 = xor i1 %79, true
%81 = zext i1 %80 to i32
%82 = call i32 @assert(i32 %81)
%83 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%84 = call i32 @memset(i8* %83, i32 0, i32 100)
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%86 = call i32 (i8*, i8*, ...) @sprintf(i8* %85, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%87 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%88 = call i32 @strcmp(i8* %87, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%89 = icmp ne i32 %88, 0
%90 = xor i1 %89, true
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%94 = call i32 @memset(i8* %93, i32 0, i32 100)
%95 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%96 = call i32 (i8*, i8*, ...) @sprintf(i8* %95, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%97 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%98 = call i32 @strcmp(i8* %97, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%99 = icmp ne i32 %98, 0
%100 = xor i1 %99, true
%101 = zext i1 %100 to i32
%102 = call i32 @assert(i32 %101)
%103 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%104 = call i32 @memset(i8* %103, i32 0, i32 100)
%105 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%106 = call i32 (i8*, i8*, ...) @sprintf(i8* %105, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), double 1.230000e+00)
%107 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%108 = call i32 @strcmp(i8* %107, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%109 = icmp ne i32 %108, 0
%110 = xor i1 %109, true
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111)
%113 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%114 = call i32 @memset(i8* %113, i32 0, i32 100)
%115 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%116 = call i32 (i8*, i8*, ...) @sprintf(i8* %115, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), double 1.230000e+00)
%117 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%118 = call i32 @strcmp(i8* %117, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%119 = icmp ne i32 %118, 0
%120 = xor i1 %119, true
%121 = zext i1 %120 to i32
%122 = call i32 @assert(i32 %121)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.6u\00"
@.str.1 = [7 x i8] c"001234\00"
@.str.2 = [4 x i8] c"%6u\00"
@.str.3 = [7 x i8] c" 1234\00"
@.str.4 = [5 x i8] c"%06u\00"
@.str.5 = [5 x i8] c"%-6u\00"
@.str.6 = [7 x i8] c"1234 \00"
@.str.7 = [6 x i8] c"%6.5u\00"
@.str.8 = [7 x i8] c" 01234\00"
@.str.9 = [5 x i8] c"%.6s\00"
@.str.10 = [5 x i8] c"1234\00"
@.str.11 = [4 x i8] c"%6s\00"
@.str.12 = [5 x i8] c"%06s\00"
@.str.13 = [5 x i8] c"%-6s\00"
@.str.14 = [6 x i8] c"%6.5s\00"
@.str.15 = [6 x i8] c"%6.3f\00"
@.str.16 = [7 x i8] c" 1.230\00"
@.str.17 = [6 x i8] c"%6.3g\00"
@.str.18 = [7 x i8] c" 1.23\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i32 0, i32 100)
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1234)
%5 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 7)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @memset(i8* %2, i32 0, i32 100)
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1234)
%11 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 7)
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @memset(i8* %2, i32 0, i32 100)
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 1234)
%17 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 7)
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @memset(i8* %2, i32 0, i32 100)
%22 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 1234)
%23 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i64 7)
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i32 @memset(i8* %2, i32 0, i32 100)
%28 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 1234)
%29 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i64 7)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = call i32 @memset(i8* %2, i32 0, i32 100)
%34 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%35 = call i32 @bcmp(i8* dereferenceable(5) %2, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i64 5)
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = call i32 @memset(i8* %2, i32 0, i32 100)
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%41 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 7)
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = call i32 @memset(i8* %2, i32 0, i32 100)
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%47 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 7)
%48 = icmp eq i32 %47, 0
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = call i32 @memset(i8* %2, i32 0, i32 100)
%52 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i64 7)
%54 = icmp eq i32 %53, 0
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = call i32 @memset(i8* %2, i32 0, i32 100)
%58 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 7)
%60 = icmp eq i32 %59, 0
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = call i32 @memset(i8* %2, i32 0, i32 100)
%64 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), double 1.230000e+00)
%65 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i64 7)
%66 = icmp eq i32 %65, 0
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = call i32 @memset(i8* %2, i32 0, i32 100)
%70 = call i32 (i8*, i8*, ...) @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), double 1.230000e+00)
%71 = call i32 @bcmp(i8* dereferenceable(7) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i64 7)
%72 = icmp eq i32 %71, 0
%73 = zext i1 %72 to i32
%74 = call i32 @assert(i32 %73)
ret i32 0
}