#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 typ {
  int dummy;
};
struct out {
  int dummy;
};
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_typ_data(struct out *, struct module const *,
                                  struct typ const *, int);
int /*<<< orphan*/ print_typ_function(struct out *, struct module const *,
                                      struct typ const *);
scalar_t__ typ_is_function(struct typ const *);
void bare_print_typ_actual(struct out *out, const struct module *mod,
                           const struct typ *typ) {
  if (typ_is_function(typ)) {
    print_typ_function(out, mod, typ);
  } else {
    print_typ_data(out, mod, typ, 1);
  }
}


x86 assembly (clang, -O0):
<bare_print_typ_actual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <typ_is_function@plt>
cmp    $0x0,%rax
je     116d <bare_print_typ_actual+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <print_typ_function@plt>
jmp    1183 <bare_print_typ_actual+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <print_typ_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bare_print_typ_actual>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <typ_is_function@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
test   %rax,%rax
je     115e <bare_print_typ_actual+0x2e>
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <print_typ_function@plt>
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <print_typ_data@plt>

LLVM IR (-O0):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.typ = type { i32 }
define void @bare_print_typ_actual(%struct.out* %0, %struct.module* %1, %struct.typ* %2) {
%4 = alloca %struct.out*
%5 = alloca %struct.module*
%6 = alloca %struct.typ*
store %struct.out* %0, %struct.out** %4
store %struct.module* %1, %struct.module** %5
store %struct.typ* %2, %struct.typ** %6
%7 = load %struct.typ*, %struct.typ** %6
%8 = call i64 @typ_is_function(%struct.typ* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load %struct.out*, %struct.out** %4
%12 = load %struct.module*, %struct.module** %5
%13 = load %struct.typ*, %struct.typ** %6
%14 = call i32 @print_typ_function(%struct.out* %11, %struct.module* %12, %struct.typ* %13)
br label %20
15: ; preds = %3
%16 = load %struct.out*, %struct.out** %4
%17 = load %struct.module*, %struct.module** %5
%18 = load %struct.typ*, %struct.typ** %6
%19 = call i32 @print_typ_data(%struct.out* %16, %struct.module* %17, %struct.typ* %18, i32 1)
br label %20
20: ; preds = %15, %10
ret void
}

LLVM IR (-O2):
%struct.out = type { i32 }
%struct.module = type { i32 }
%struct.typ = type { i32 }
define void @bare_print_typ_actual(%struct.out* %0, %struct.module* %1, %struct.typ* %2) {
%4 = tail call i64 @typ_is_function(%struct.typ* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @print_typ_function(%struct.out* %0, %struct.module* %1, %struct.typ* %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @print_typ_data(%struct.out* %0, %struct.module* %1, %struct.typ* %2, i32 1)
br label %10
10: ; preds = %8, %6
ret void
}