#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 */
typedef union ghw_type {
  int dummy;
} ghw_type;
struct ghw_handler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ghw_disp_subtype_definition(struct ghw_handler *,
                                               union ghw_type *);
int /*<<< orphan*/ ghw_disp_typename(struct ghw_handler *, union ghw_type *);
scalar_t__ ghw_is_anonymous_type(struct ghw_handler *, union ghw_type *);
void ghw_disp_subtype_indication(struct ghw_handler *h, union ghw_type *t) {
  if (ghw_is_anonymous_type(h, t)) {
    ghw_disp_subtype_definition(h, t);
  } else
    ghw_disp_typename(h, t);
}


x86 assembly (clang, -O0):
<ghw_disp_subtype_indication>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <ghw_is_anonymous_type@plt>
cmp    $0x0,%rax
je     1169 <ghw_disp_subtype_indication+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ghw_disp_subtype_definition@plt>
jmp    1176 <ghw_disp_subtype_indication+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ghw_disp_typename@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ghw_disp_subtype_indication>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <ghw_is_anonymous_type@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
test   %rax,%rax
je     1156 <ghw_disp_subtype_indication+0x26>
pop    %rbx
pop    %r14
jmp    1030 <ghw_disp_subtype_definition@plt>
pop    %rbx
pop    %r14
jmp    1040 <ghw_disp_typename@plt>

LLVM IR (-O0):
%struct.ghw_handler = type { i32 }
%union.ghw_type = type { i32 }
define void @ghw_disp_subtype_indication(%struct.ghw_handler* %0, %union.ghw_type* %1) {
%3 = alloca %struct.ghw_handler*
%4 = alloca %union.ghw_type*
store %struct.ghw_handler* %0, %struct.ghw_handler** %3
store %union.ghw_type* %1, %union.ghw_type** %4
%5 = load %struct.ghw_handler*, %struct.ghw_handler** %3
%6 = load %union.ghw_type*, %union.ghw_type** %4
%7 = call i64 @ghw_is_anonymous_type(%struct.ghw_handler* %5, %union.ghw_type* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load %struct.ghw_handler*, %struct.ghw_handler** %3
%11 = load %union.ghw_type*, %union.ghw_type** %4
%12 = call i32 @ghw_disp_subtype_definition(%struct.ghw_handler* %10, %union.ghw_type* %11)
br label %17
13: ; preds = %2
%14 = load %struct.ghw_handler*, %struct.ghw_handler** %3
%15 = load %union.ghw_type*, %union.ghw_type** %4
%16 = call i32 @ghw_disp_typename(%struct.ghw_handler* %14, %union.ghw_type* %15)
br label %17
17: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
%struct.ghw_handler = type { i32 }
%union.ghw_type = type { i32 }
define void @ghw_disp_subtype_indication(%struct.ghw_handler* %0, %union.ghw_type* %1) {
%3 = tail call i64 @ghw_is_anonymous_type(%struct.ghw_handler* %0, %union.ghw_type* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @ghw_disp_subtype_definition(%struct.ghw_handler* %0, %union.ghw_type* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @ghw_disp_typename(%struct.ghw_handler* %0, %union.ghw_type* %1)
br label %9
9: ; preds = %7, %5
ret void
}