#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 */
struct Fm {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fm_compile(struct Fm *, char *);
struct Fm *fm_create();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  struct Fm *fm = fm_create();
  fm_compile(fm, ": SUM ( a b -- c ) 10 60 + .\" HELLO\n\" ; SUM . . ");
  fprintf(stdout, "\n");
  system("pause");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <fm_create@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1040 <fm_compile@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1060 <fprintf@plt>
lea    0xea6(%rip),%rdi
call   1030 <system@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fm_create@plt>
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
call   1040 <fm_compile@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1060 <fprintf@plt>
lea    0xec0(%rip),%rdi
call   1030 <system@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Fm = type { i32 }
@.str = [49 x i8] c": SUM ( a b -- c ) 10 60 + .\22 HELLO\0A\22 ; SUM . . \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [6 x i8] c"pause\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.Fm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call %struct.Fm* (...) @fm_create()
store %struct.Fm* %7, %struct.Fm** %6
%8 = load %struct.Fm*, %struct.Fm** %6
%9 = call i32 @fm_compile(%struct.Fm* %8, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
%struct.Fm = type { i32 }
@.str = [49 x i8] c": SUM ( a b -- c ) 10 60 + .\22 HELLO\0A\22 ; SUM . . \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [6 x i8] c"pause\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.Fm* (...) @fm_create()
%4 = tail call i32 @fm_compile(%struct.Fm* %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}