#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 ValueType {
  int dummy;
};
struct Value {
  int dummy;
};
struct ParseState {
  int dummy;
};
struct ExpressionStack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ExpressionStackPushValueNode(struct ParseState *,
                                                struct ExpressionStack **,
                                                struct Value *);
struct Value *VariableAllocValueFromType(struct ParseState *,
                                         struct ValueType *, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
struct Value *ExpressionStackPushValueByType(struct ParseState *Parser,
                                             struct ExpressionStack **StackTop,
                                             struct ValueType *PushType) {
  struct Value *ValueLoc =
      VariableAllocValueFromType(Parser, PushType, 0, 0, 0);
  ExpressionStackPushValueNode(Parser, StackTop, ValueLoc);
  return ValueLoc;
}


x86 assembly (clang, -O0):
<ExpressionStackPushValueByType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <VariableAllocValueFromType@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <ExpressionStackPushValueNode@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExpressionStackPushValueByType>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <VariableAllocValueFromType@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <ExpressionStackPushValueNode@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.Value = type { i32 }
%struct.ParseState = type { i32 }
%struct.ExpressionStack = type { i32 }
%struct.ValueType = type { i32 }
define %struct.Value* @ExpressionStackPushValueByType(%struct.ParseState* %0, %struct.ExpressionStack** %1, %struct.ValueType* %2) {
%4 = alloca %struct.ParseState*
%5 = alloca %struct.ExpressionStack**
%6 = alloca %struct.ValueType*
%7 = alloca %struct.Value*
store %struct.ParseState* %0, %struct.ParseState** %4
store %struct.ExpressionStack** %1, %struct.ExpressionStack*** %5
store %struct.ValueType* %2, %struct.ValueType** %6
%8 = load %struct.ParseState*, %struct.ParseState** %4
%9 = load %struct.ValueType*, %struct.ValueType** %6
%10 = call %struct.Value* @VariableAllocValueFromType(%struct.ParseState* %8, %struct.ValueType* %9, i32 0, i32 0, i32 0)
store %struct.Value* %10, %struct.Value** %7
%11 = load %struct.ParseState*, %struct.ParseState** %4
%12 = load %struct.ExpressionStack**, %struct.ExpressionStack*** %5
%13 = load %struct.Value*, %struct.Value** %7
%14 = call i32 @ExpressionStackPushValueNode(%struct.ParseState* %11, %struct.ExpressionStack** %12, %struct.Value* %13)
%15 = load %struct.Value*, %struct.Value** %7
ret %struct.Value* %15
}

LLVM IR (-O2):
%struct.Value = type { i32 }
%struct.ParseState = type { i32 }
%struct.ExpressionStack = type { i32 }
%struct.ValueType = type { i32 }
define %struct.Value* @ExpressionStackPushValueByType(%struct.ParseState* %0, %struct.ExpressionStack** %1, %struct.ValueType* %2) {
%4 = tail call %struct.Value* @VariableAllocValueFromType(%struct.ParseState* %0, %struct.ValueType* %2, i32 0, i32 0, i32 0)
%5 = tail call i32 @ExpressionStackPushValueNode(%struct.ParseState* %0, %struct.ExpressionStack** %1, %struct.Value* %4)
ret %struct.Value* %4
}