#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 topology {
  int dummy;
};
struct inf_context {
  int dummy;
};
struct cfg_intern {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
struct topology *topology_new();
struct topology *infer_bus_topology(struct cfg_intern *def,
                                    struct inf_context *ctx) {
  (void)def;
  (void)ctx;
  struct topology *self = topology_new();
  if (!self)
    return NULL;
  fprintf(stderr, "Bus topologies are not implemented yet\n");
  abort();
  return self;
}


x86 assembly (clang, -O0):
<infer_bus_topology>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <topology_new@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115e <infer_bus_topology+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xe92(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<infer_bus_topology>:
push   %rax
xor    %eax,%eax
call   1050 <topology_new@plt>
test   %rax,%rax
jne    1141 <infer_bus_topology+0x11>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.topology = type { i32 }
%struct.cfg_intern = type { i32 }
%struct.inf_context = type { i32 }
@stderr = global i32 0
@.str = [40 x i8] c"Bus topologies are not implemented yet\0A\00"
define %struct.topology* @infer_bus_topology(%struct.cfg_intern* %0, %struct.inf_context* %1) {
%3 = alloca %struct.cfg_intern*
%4 = alloca %struct.inf_context*
%5 = alloca %struct.topology*
store %struct.cfg_intern* %0, %struct.cfg_intern** %3
store %struct.inf_context* %1, %struct.inf_context** %4
%6 = load %struct.cfg_intern*, %struct.cfg_intern** %3
%7 = load %struct.inf_context*, %struct.inf_context** %4
%8 = call %struct.topology* (...) @topology_new()
store %struct.topology* %8, %struct.topology** %5
%9 = load %struct.topology*, %struct.topology** %5
%10 = icmp ne %struct.topology* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
ret %struct.topology* null
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.topology = type { i32 }
%struct.cfg_intern = type { i32 }
%struct.inf_context = type { i32 }
@stderr = global i32 0
@.str = [40 x i8] c"Bus topologies are not implemented yet\0A\00"
define noalias %struct.topology* @infer_bus_topology(%struct.cfg_intern* nocapture readnone %0, %struct.inf_context* nocapture readnone %1) {
%3 = tail call %struct.topology* (...) @topology_new()
%4 = icmp eq %struct.topology* %3, null
br i1 %4, label %5, label %6
5: ; preds = %2
ret %struct.topology* null
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @abort()
unreachable
}