#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
int main(int argc, char *argv[]) {
  printf("To man the world is twofold, ");
  if (argc > 1)
    printf("\n");
  write(STDOUT_FILENO, "in accordance with his twofold attitude.\n", 41);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1168 <main+0x38>
lea    0xee3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
mov    $0x29,%edx
call   1030 <write@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
call   1050 <printf@plt>
cmp    $0x2,%ebx
jl     115e <main+0x1e>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    $0x29,%edx
call   1040 <write@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"To man the world is twofold, \00"
@.str.1 = [2 x i8] c"\0A\00"
@STDOUT_FILENO = global i32 0
@.str.2 = [42 x i8] c"in accordance with his twofold attitude.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i32, i32* @STDOUT_FILENO
%13 = call i32 @write(i32 %12, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 41)
%14 = load i32, i32* @EXIT_SUCCESS
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"To man the world is twofold, \00"
@STDOUT_FILENO = global i32 0
@.str.2 = [42 x i8] c"in accordance with his twofold attitude.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @putchar(i32 10)
br label %7
7: ; preds = %5, %2
%8 = load i32, i32* @STDOUT_FILENO
%9 = tail call i32 @write(i32 %8, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 41)
%10 = load i32, i32* @EXIT_SUCCESS
%11 = tail call i32 @exit(i32 %10)
unreachable
}