#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 fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fsm_compose(struct fsm *, int /*<<< orphan*/);
int /*<<< orphan*/ fsm_concat(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fsm_cross_product(struct fsm *, int /*<<< orphan*/);
int /*<<< orphan*/ fsm_empty_string();
struct fsm *fsm_lower(int /*<<< orphan*/);
int /*<<< orphan*/ fsm_universal();
struct fsm *fsm_quotient_right(struct fsm *net1, struct fsm *net2) {
  struct fsm *Result;
  Result = fsm_lower(fsm_compose(
      net1, fsm_concat(fsm_universal(),
                       fsm_cross_product(net2, fsm_empty_string()))));
  return (Result);
}


x86 assembly (clang, -O0):
<fsm_quotient_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1050 <fsm_universal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1030 <fsm_empty_string@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1080 <fsm_cross_product@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
call   1040 <fsm_concat@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1070 <fsm_compose@plt>
mov    %eax,%edi
call   1060 <fsm_lower@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_quotient_right>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <fsm_universal@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <fsm_empty_string@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1080 <fsm_cross_product@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <fsm_concat@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1070 <fsm_compose@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <fsm_lower@plt>

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_quotient_right(%struct.fsm* %0, %struct.fsm* %1) {
%3 = alloca %struct.fsm*
%4 = alloca %struct.fsm*
%5 = alloca %struct.fsm*
store %struct.fsm* %0, %struct.fsm** %3
store %struct.fsm* %1, %struct.fsm** %4
%6 = load %struct.fsm*, %struct.fsm** %3
%7 = call i32 (...) @fsm_universal()
%8 = load %struct.fsm*, %struct.fsm** %4
%9 = call i32 (...) @fsm_empty_string()
%10 = call i32 @fsm_cross_product(%struct.fsm* %8, i32 %9)
%11 = call i32 @fsm_concat(i32 %7, i32 %10)
%12 = call i32 @fsm_compose(%struct.fsm* %6, i32 %11)
%13 = call %struct.fsm* @fsm_lower(i32 %12)
store %struct.fsm* %13, %struct.fsm** %5
%14 = load %struct.fsm*, %struct.fsm** %5
ret %struct.fsm* %14
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_quotient_right(%struct.fsm* %0, %struct.fsm* %1) {
%3 = tail call i32 (...) @fsm_universal()
%4 = tail call i32 (...) @fsm_empty_string()
%5 = tail call i32 @fsm_cross_product(%struct.fsm* %1, i32 %4)
%6 = tail call i32 @fsm_concat(i32 %3, i32 %5)
%7 = tail call i32 @fsm_compose(%struct.fsm* %0, i32 %6)
%8 = tail call %struct.fsm* @fsm_lower(i32 %7)
ret %struct.fsm* %8
}