#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*/ printInt_wx(int);
int /*<<< orphan*/ printf(char *);
void print_wx(int a, int b, int c, int d) {
  int e = a - b + d;
  printInt_wx(a);
  printf("-");
  printInt_wx(b);
  printf("=");
  printInt_wx(c);
  printf(", ");
  printInt_wx(c);
  printf("+");
  printInt_wx(d);
  printf("=");
  printInt_wx(e);
  printf(" => ");
}


x86 assembly (clang, -O0):
<print_wx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   1030 <printInt_wx@plt>
lea    0xe56(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_wx>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebp
mov    %edi,%ebx
sub    %esi,%ebx
add    %ecx,%ebx
call   1040 <printInt_wx@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1040 <printInt_wx@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    %r15d,%edi
call   1040 <printInt_wx@plt>
lea    0xe8c(%rip),%rdi
call   1050 <printf@plt>
mov    %r15d,%edi
call   1040 <printInt_wx@plt>
mov    $0x2b,%edi
call   1030 <putchar@plt>
mov    %r14d,%edi
call   1040 <printInt_wx@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1040 <printInt_wx@plt>
lea    0xe58(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"=\00"
@.str.2 = [3 x i8] c", \00"
@.str.3 = [2 x i8] c"+\00"
@.str.4 = [5 x i8] c" => \00"
define void @print_wx(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %8
%14 = add nsw i32 %12, %13
store i32 %14, i32* %9
%15 = load i32, i32* %5
%16 = call i32 @printInt_wx(i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* %6
%19 = call i32 @printInt_wx(i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %7
%22 = call i32 @printInt_wx(i32 %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* %7
%25 = call i32 @printInt_wx(i32 %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%27 = load i32, i32* %8
%28 = call i32 @printInt_wx(i32 %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%30 = load i32, i32* %9
%31 = call i32 @printInt_wx(i32 %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c", \00"
@.str.4 = [5 x i8] c" => \00"
define void @print_wx(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %0, %1
%6 = add nsw i32 %5, %3
%7 = tail call i32 @printInt_wx(i32 %0)
%8 = tail call i32 @putchar(i32 45)
%9 = tail call i32 @printInt_wx(i32 %1)
%10 = tail call i32 @putchar(i32 61)
%11 = tail call i32 @printInt_wx(i32 %2)
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @printInt_wx(i32 %2)
%14 = tail call i32 @putchar(i32 43)
%15 = tail call i32 @printInt_wx(i32 %3)
%16 = tail call i32 @putchar(i32 61)
%17 = tail call i32 @printInt_wx(i32 %6)
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
ret void
}