#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*/ abort();
int printf(char *, ...);
int main() {
  if (printf("%5c\n", 'a') != 6) {
    abort();
  }
  if (printf("%20d\n", 1) != 21) {
    abort();
  }
  if (printf("%20d\n", 12312312) != 21) {
    abort();
  }
  if (printf("%3d\n", 2) != 4) {
    abort();
  }
  if (printf("%3d\n", 221) != 4) {
    abort();
  }
  if (printf("%3d\n", -221) != 5) {
    abort();
  }
  if (printf("%3d\n", 5221) != 5) {
    abort();
  }
  if (printf("%0d\n", 5221) != 5) {
    abort();
  }
  if (printf("%3ld\n", 221L) != 4) {
    abort();
  }
  if (printf("%3ld\n", -221L) != 5) {
    abort();
  }
  if (printf("%3ld\n", 5221L) != 5) {
    abort();
  }
  if (printf("%5s\n", "a") != 6) {
    abort();
  }
  if (printf("%5s\n", "asdfg") != 6) {
    abort();
  }
  if (printf("%5s\n", "asdfgasdf") != 10) {
    abort();
  }
  if (printf("%30f\n", 324.324) != 31) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xedd(%rip),%rdi
mov    $0x61,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x6,%eax
je     1147 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xebf(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x15,%eax
je     116a <main+0x4a>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe9c(%rip),%rdi
mov    $0xbbdef8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x15,%eax
je     118d <main+0x6d>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe7f(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x4,%eax
je     11b0 <main+0x90>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe5c(%rip),%rdi
mov    $0xdd,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x4,%eax
je     11d3 <main+0xb3>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe39(%rip),%rdi
mov    $0xffffff23,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x5,%eax
je     11f6 <main+0xd6>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe16(%rip),%rdi
mov    $0x1465,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x5,%eax
je     1219 <main+0xf9>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xdf8(%rip),%rdi
mov    $0x1465,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x5,%eax
je     123c <main+0x11c>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xdda(%rip),%rdi
mov    $0xdd,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x4,%eax
je     125f <main+0x13f>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xdb7(%rip),%rdi
mov    $0xffffffffffffff23,%rsi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x5,%eax
je     1284 <main+0x164>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xd92(%rip),%rdi
mov    $0x1465,%esi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x5,%eax
je     12a7 <main+0x187>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xd75(%rip),%rdi
lea    0xd73(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x6,%eax
je     12cc <main+0x1ac>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xd50(%rip),%rdi
lea    0xd50(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0x6,%eax
je     12f1 <main+0x1d1>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xd2b(%rip),%rdi
lea    0xd31(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
cmp    $0xa,%eax
je     1316 <main+0x1f6>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xd1d(%rip),%rdi
movsd  0xcdb(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0x1f,%eax
je     133c <main+0x21c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x6,%eax
jne    12c0 <main+0x1a0>
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x15,%eax
jne    12c0 <main+0x1a0>
lea    0xead(%rip),%rdi
mov    $0xbbdef8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x15,%eax
jne    12c0 <main+0x1a0>
lea    0xe97(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%eax
jne    12c0 <main+0x1a0>
lea    0xe7b(%rip),%rdi
mov    $0xdd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%eax
jne    12c0 <main+0x1a0>
lea    0xe5f(%rip),%rdi
mov    $0xffffff23,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%eax
jne    12c0 <main+0x1a0>
lea    0xe43(%rip),%rdi
mov    $0x1465,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%eax
jne    12c0 <main+0x1a0>
lea    0xe2c(%rip),%rdi
mov    $0x1465,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%eax
jne    12c0 <main+0x1a0>
lea    0xe15(%rip),%rdi
mov    $0xdd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%eax
jne    12c0 <main+0x1a0>
lea    0xdf9(%rip),%rdi
mov    $0xffffffffffffff23,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%eax
jne    12c0 <main+0x1a0>
lea    0xddb(%rip),%rdi
mov    $0x1465,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x5,%eax
jne    12c0 <main+0x1a0>
lea    0xdc9(%rip),%rdi
lea    0xdc7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x6,%eax
jne    12c0 <main+0x1a0>
lea    0xdaf(%rip),%rdi
lea    0xdaf(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x6,%eax
jne    12c0 <main+0x1a0>
lea    0xd95(%rip),%rdi
lea    0xd9b(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xa,%eax
jne    12c0 <main+0x1a0>
lea    0xd92(%rip),%rdi
movsd  0xd50(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0x1f,%eax
jne    12c0 <main+0x1a0>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%5c\0A\00"
@.str.1 = [6 x i8] c"%20d\0A\00"
@.str.2 = [5 x i8] c"%3d\0A\00"
@.str.3 = [5 x i8] c"%0d\0A\00"
@.str.4 = [6 x i8] c"%3ld\0A\00"
@.str.5 = [5 x i8] c"%5s\0A\00"
@.str.6 = [2 x i8] c"a\00"
@.str.7 = [6 x i8] c"asdfg\00"
@.str.8 = [10 x i8] c"asdfgasdf\00"
@.str.9 = [6 x i8] c"%30f\0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 97)
%2 = icmp ne i32 %1, 6
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = icmp ne i32 %6, 21
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 12312312)
%12 = icmp ne i32 %11, 21
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%17 = icmp ne i32 %16, 4
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 221)
%22 = icmp ne i32 %21, 4
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 -221)
%27 = icmp ne i32 %26, 5
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5221)
%32 = icmp ne i32 %31, 5
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 5221)
%37 = icmp ne i32 %36, 5
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 221)
%42 = icmp ne i32 %41, 4
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 -221)
%47 = icmp ne i32 %46, 5
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (...) @abort()
unreachable
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 5221)
%52 = icmp ne i32 %51, 5
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 (...) @abort()
unreachable
55: ; preds = %50
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%57 = icmp ne i32 %56, 6
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 (...) @abort()
unreachable
60: ; preds = %55
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp ne i32 %61, 6
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 (...) @abort()
unreachable
65: ; preds = %60
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp ne i32 %66, 10
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (...) @abort()
unreachable
70: ; preds = %65
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), double 3.243240e+02)
%72 = icmp ne i32 %71, 31
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 (...) @abort()
unreachable
75: ; preds = %70
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%5c\0A\00"
@.str.1 = [6 x i8] c"%20d\0A\00"
@.str.2 = [5 x i8] c"%3d\0A\00"
@.str.3 = [5 x i8] c"%0d\0A\00"
@.str.4 = [6 x i8] c"%3ld\0A\00"
@.str.5 = [5 x i8] c"%5s\0A\00"
@.str.6 = [2 x i8] c"a\00"
@.str.7 = [6 x i8] c"asdfg\00"
@.str.8 = [10 x i8] c"asdfgasdf\00"
@.str.9 = [6 x i8] c"%30f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 97)
%2 = icmp eq i32 %1, 6
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = icmp eq i32 %6, 21
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 12312312)
%12 = icmp eq i32 %11, 21
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%17 = icmp eq i32 %16, 4
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 221)
%22 = icmp eq i32 %21, 4
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 -221)
%27 = icmp eq i32 %26, 5
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5221)
%32 = icmp eq i32 %31, 5
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 5221)
%37 = icmp eq i32 %36, 5
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 221)
%42 = icmp eq i32 %41, 4
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 -221)
%47 = icmp eq i32 %46, 5
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 (...) @abort()
unreachable
50: ; preds = %45
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 5221)
%52 = icmp eq i32 %51, 5
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 (...) @abort()
unreachable
55: ; preds = %50
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%57 = icmp eq i32 %56, 6
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 (...) @abort()
unreachable
60: ; preds = %55
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp eq i32 %61, 6
br i1 %62, label %65, label %63
63: ; preds = %60
%64 = tail call i32 (...) @abort()
unreachable
65: ; preds = %60
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp eq i32 %66, 10
br i1 %67, label %70, label %68
68: ; preds = %65
%69 = tail call i32 (...) @abort()
unreachable
70: ; preds = %65
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), double 3.243240e+02)
%72 = icmp eq i32 %71, 31
br i1 %72, label %75, label %73
73: ; preds = %70
%74 = tail call i32 (...) @abort()
unreachable
75: ; preds = %70
ret i32 0
}