#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 *, ...);
int /*<<< orphan*/ system(char *);
int main() {
  char *a = "Hello user! This is a Quine written in C!";
  char *b = "\n";
  char *c = "#include <stdio.h> int main() { char *a = %c%s%c; char *b = "
            "%c%c%c%c; char *c = %c%s%c; printf(a); printf(b); printf(b); "
            "printf(c, 34, a, 34, 34, 92, 110, 34, 34, c, 34, 34, 34); "
            "printf(b); printf(b); system(%cpause%c); return 0; }";
  printf(a);
  printf(b);
  printf(b);
  printf(c, 34, a, 34, 34, 92, 110, 34, 34, c, 34, 34, 34);
  printf(b);
  printf(b);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xee9(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xee0(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    $0x22,%r8d
mov    $0x5c,%r9d
mov    %r8d,%esi
mov    %r8d,%ecx
movl   $0x6e,(%rsp)
movl   $0x22,0x8(%rsp)
movl   $0x22,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0x22,0x20(%rsp)
movl   $0x22,0x28(%rsp)
movl   $0x22,0x30(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf2d(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
sub    $0x8,%rsp
lea    0xec9(%rip),%rdi
mov    $0x22,%esi
mov    %rbx,%rdx
mov    $0x22,%ecx
mov    $0x22,%r8d
mov    $0x5c,%r9d
xor    %eax,%eax
push   $0x22
push   $0x22
push   $0x22
push   %rdi
push   $0x22
push   $0x22
push   $0x6e
call   1050 <printf@plt>
add    $0x40,%rsp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf65(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Hello user! This is a Quine written in C!\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [232 x i8] c"#include <stdio.h> int main() { char *a = %c%s%c; char *b = %c%c%c%c; char *c = %c%s%c; printf(a); printf(b); printf(b); printf(c, 34, a, 34, 34, 92, 110, 34, 34, c, 34, 34, 34); printf(b); printf(b); system(%cpause%c); return 0; }\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([232 x i8], [232 x i8]* @.str.2, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) @printf(i8* %11, i32 34, i8* %12, i32 34, i32 34, i32 92, i32 110, i32 34, i32 34, i8* %13, i32 34, i32 34, i32 34)
%15 = load i8*, i8** %3
%16 = call i32 (i8*, ...) @printf(i8* %15)
%17 = load i8*, i8** %3
%18 = call i32 (i8*, ...) @printf(i8* %17)
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"Hello user! This is a Quine written in C!\00"
@.str.2 = [232 x i8] c"#include <stdio.h> int main() { char *a = %c%s%c; char *b = %c%c%c%c; char *c = %c%s%c; printf(a); printf(b); printf(b); printf(c, 34, a, 34, 34, 92, 110, 34, 34, c, 34, 34, 34); printf(b); printf(b); system(%cpause%c); return 0; }\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([232 x i8], [232 x i8]* @.str.2, i64 0, i64 0), i32 34, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 34, i32 34, i32 92, i32 110, i32 34, i32 34, i8* getelementptr inbounds ([232 x i8], [232 x i8]* @.str.2, i64 0, i64 0), i32 34, i32 34, i32 34)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}