#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 *, char *, ...);
main(void) {
  int x = 1;
  int y = 2;
  printf("%s : %d\n", "math( sub, , y)", (-y));
  printf("%s : %s\n", "EMPTY", "");
  printf("%s : %s\n", "APPEND( CON, 1)", "CON1");
  printf("%s : %s\n", "APPEND( CON, )", "CON");
  printf("%s : %s\n", "APPEND( , )", "");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
xor    %edx,%edx
sub    -0xc(%rbp),%edx
lea    0xec7(%rip),%rdi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0xecd(%rip),%rsi
lea    0xeac(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    0xeb7(%rip),%rsi
lea    0xec0(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
lea    0xeb0(%rip),%rsi
lea    0xeb8(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe77(%rip),%rdi
lea    0xea7(%rip),%rsi
lea    0xe58(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0xfffffffe,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rbx
lea    0xee6(%rip),%rsi
lea    0xec5(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rsi
lea    0xeda(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rsi
lea    0xed6(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s : %d\0A\00"
@.str.1 = [16 x i8] c"math( sub, , y)\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
@.str.3 = [6 x i8] c"EMPTY\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [16 x i8] c"APPEND( CON, 1)\00"
@.str.6 = [5 x i8] c"CON1\00"
@.str.7 = [15 x i8] c"APPEND( CON, )\00"
@.str.8 = [4 x i8] c"CON\00"
@.str.9 = [12 x i8] c"APPEND( , )\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = sub nsw i32 0, %4
%6 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s : %d\0A\00"
@.str.1 = [16 x i8] c"math( sub, , y)\00"
@.str.2 = [9 x i8] c"%s : %s\0A\00"
@.str.3 = [6 x i8] c"EMPTY\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [16 x i8] c"APPEND( CON, 1)\00"
@.str.6 = [5 x i8] c"CON1\00"
@.str.7 = [15 x i8] c"APPEND( CON, )\00"
@.str.8 = [4 x i8] c"CON\00"
@.str.9 = [12 x i8] c"APPEND( , )\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 -2)
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%4 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}