#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*/ print(char *, int, int, int, int, int, int, int, int, int,
                         int, char *, char *, char *, char *, char *, char *,
                         char, char, char, char, char, char, char, char, char,
                         char, char, char, char);
int main() {
  print(
      "A normal string\nEscape percentage char: %%\nEscape 10 integers: %d %d "
      "%d %d %d %d %d %d %d %d\nEscape 5 strings: %s %s %s %s %s\nDo not "
      "escape parameter: %s\nEscape 13 characters: "
      "%c%c%c%c%c%c%c%c%c%c%c%c%c\nFour consecutive percentages should show 2: "
      "%%%%\nInvalid escapes: %_d%u%m%p\nAnd a perecentage at end of string: %",
      1, 2, 3, 4, 5, -5, -4, -3, -2, -1, "This", "is", "a", "parameter",
      "string",
      "this %s (percentage-s) or %d (percentage-d) and %% (double percentages) "
      "should not be escaped",
      'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xc8,%rsp
movl   $0x0,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
lea    0xfed(%rip),%r15
lea    0xfe8(%rip),%r14
lea    0xfe4(%rip),%rbx
lea    0xfdf(%rip),%r11
lea    0xfe2(%rip),%r10
lea    0xfe2(%rip),%rax
movl   $0xfffffffb,(%rsp)
movl   $0xfffffffc,0x8(%rsp)
ff
movl   $0xfffffffd,0x10(%rsp)
ff
movl   $0xfffffffe,0x18(%rsp)
ff
movl   $0xffffffff,0x20(%rsp)
ff
mov    %r15,0x28(%rsp)
mov    %r14,0x30(%rsp)
mov    %rbx,0x38(%rsp)
mov    %r11,0x40(%rsp)
mov    %r10,0x48(%rsp)
mov    %rax,0x50(%rsp)
movl   $0x48,0x58(%rsp)
movl   $0x65,0x60(%rsp)
movl   $0x6c,0x68(%rsp)
movl   $0x6c,0x70(%rsp)
movl   $0x6f,0x78(%rsp)
movl   $0x2c,0x80(%rsp)
movl   $0x20,0x88(%rsp)
movl   $0x77,0x90(%rsp)
movl   $0x6f,0x98(%rsp)
movl   $0x72,0xa0(%rsp)
movl   $0x6c,0xa8(%rsp)
movl   $0x64,0xb0(%rsp)
movl   $0x21,0xb8(%rsp)
call   1030 <print@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0x1039(%rip),%rbx
lea    0x102b(%rip),%rax
lea    0x101a(%rip),%r15
lea    0x1011(%rip),%r14
lea    0x1007(%rip),%r11
lea    0xffe(%rip),%r10
lea    0xeba(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0x21
push   $0x64
push   $0x6c
push   $0x72
push   $0x6f
push   $0x77
push   $0x20
push   $0x2c
push   $0x6f
push   $0x6c
push   $0x6c
push   $0x65
push   $0x48
push   %rbx
push   %rax
push   %r15
push   %r14
push   %r11
push   %r10
push   $0xffffffffffffffff
push   $0xfffffffffffffffe
push   $0xfffffffffffffffd
push   $0xfffffffffffffffc
push   $0xfffffffffffffffb
call   1030 <print@plt>
add    $0xc0,%rsp
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [317 x i8] c"A normal string\0AEscape percentage char: %%\0AEscape 10 integers: %d %d %d %d %d %d %d %d %d %d\0AEscape 5 strings: %s %s %s %s %s\0ADo not escape parameter: %s\0AEscape 13 characters: %c%c%c%c%c%c%c%c%c%c%c%c%c\0AFour consecutive percentages should show 2: %%%%\0AInvalid escapes: %_d%u%m%p\0AAnd a perecentage at end of string: %\00"
@.str.1 = [5 x i8] c"This\00"
@.str.2 = [3 x i8] c"is\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [10 x i8] c"parameter\00"
@.str.5 = [7 x i8] c"string\00"
@.str.6 = [94 x i8] c"this %s (percentage-s) or %d (percentage-d) and %% (double percentages) should not be escaped\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print(i8* getelementptr inbounds ([317 x i8], [317 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 -5, i32 -4, i32 -3, i32 -2, i32 -1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.6, i64 0, i64 0), i8 signext 72, i8 signext 101, i8 signext 108, i8 signext 108, i8 signext 111, i8 signext 44, i8 signext 32, i8 signext 119, i8 signext 111, i8 signext 114, i8 signext 108, i8 signext 100, i8 signext 33)
ret i32 0
}

LLVM IR (-O2):
@.str = [317 x i8] c"A normal string\0AEscape percentage char: %%\0AEscape 10 integers: %d %d %d %d %d %d %d %d %d %d\0AEscape 5 strings: %s %s %s %s %s\0ADo not escape parameter: %s\0AEscape 13 characters: %c%c%c%c%c%c%c%c%c%c%c%c%c\0AFour consecutive percentages should show 2: %%%%\0AInvalid escapes: %_d%u%m%p\0AAnd a perecentage at end of string: %\00"
@.str.1 = [5 x i8] c"This\00"
@.str.2 = [3 x i8] c"is\00"
@.str.3 = [2 x i8] c"a\00"
@.str.4 = [10 x i8] c"parameter\00"
@.str.5 = [7 x i8] c"string\00"
@.str.6 = [94 x i8] c"this %s (percentage-s) or %d (percentage-d) and %% (double percentages) should not be escaped\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([317 x i8], [317 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 -5, i32 -4, i32 -3, i32 -2, i32 -1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.6, i64 0, i64 0), i8 signext 72, i8 signext 101, i8 signext 108, i8 signext 108, i8 signext 111, i8 signext 44, i8 signext 32, i8 signext 119, i8 signext 111, i8 signext 114, i8 signext 108, i8 signext 100, i8 signext 33)
ret i32 0
}