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

/* Variables and functions */
struct Cyc_AP_T *Cyc_AP_div(struct Cyc_AP_T *, struct Cyc_AP_T *);
struct Cyc_AP_T *Cyc_AP_gcd(struct Cyc_AP_T *, struct Cyc_AP_T *);
struct Cyc_AP_T *Cyc_AP_mul(struct Cyc_AP_T *, struct Cyc_AP_T *);
struct Cyc_AP_T *Cyc_AP_lcm(struct Cyc_AP_T *x, struct Cyc_AP_T *y) {
  struct Cyc_AP_T *_T0;
  struct Cyc_AP_T *_T1;
  struct Cyc_AP_T *_T2;
  struct Cyc_AP_T *_T3;
  struct Cyc_AP_T *_T4;
  _T0 = x;
  _T1 = y;
  _T2 = Cyc_AP_gcd(x, y);
  _T3 = Cyc_AP_div(_T1, _T2);
  _T4 = Cyc_AP_mul(_T0, _T3);
  return _T4;
}


x86 assembly (clang, -O0):
<Cyc_AP_lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Cyc_AP_gcd@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <Cyc_AP_div@plt>
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <Cyc_AP_mul@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_AP_lcm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <Cyc_AP_gcd@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <Cyc_AP_div@plt>
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <Cyc_AP_mul@plt>

LLVM IR (-O0):
%struct.Cyc_AP_T = type { i32 }
define %struct.Cyc_AP_T* @Cyc_AP_lcm(%struct.Cyc_AP_T* %0, %struct.Cyc_AP_T* %1) {
%3 = alloca %struct.Cyc_AP_T*
%4 = alloca %struct.Cyc_AP_T*
%5 = alloca %struct.Cyc_AP_T*
%6 = alloca %struct.Cyc_AP_T*
%7 = alloca %struct.Cyc_AP_T*
%8 = alloca %struct.Cyc_AP_T*
%9 = alloca %struct.Cyc_AP_T*
store %struct.Cyc_AP_T* %0, %struct.Cyc_AP_T** %3
store %struct.Cyc_AP_T* %1, %struct.Cyc_AP_T** %4
%10 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %3
store %struct.Cyc_AP_T* %10, %struct.Cyc_AP_T** %5
%11 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %4
store %struct.Cyc_AP_T* %11, %struct.Cyc_AP_T** %6
%12 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %3
%13 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %4
%14 = call %struct.Cyc_AP_T* @Cyc_AP_gcd(%struct.Cyc_AP_T* %12, %struct.Cyc_AP_T* %13)
store %struct.Cyc_AP_T* %14, %struct.Cyc_AP_T** %7
%15 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %6
%16 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %7
%17 = call %struct.Cyc_AP_T* @Cyc_AP_div(%struct.Cyc_AP_T* %15, %struct.Cyc_AP_T* %16)
store %struct.Cyc_AP_T* %17, %struct.Cyc_AP_T** %8
%18 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %5
%19 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %8
%20 = call %struct.Cyc_AP_T* @Cyc_AP_mul(%struct.Cyc_AP_T* %18, %struct.Cyc_AP_T* %19)
store %struct.Cyc_AP_T* %20, %struct.Cyc_AP_T** %9
%21 = load %struct.Cyc_AP_T*, %struct.Cyc_AP_T** %9
ret %struct.Cyc_AP_T* %21
}

LLVM IR (-O2):
%struct.Cyc_AP_T = type { i32 }
define %struct.Cyc_AP_T* @Cyc_AP_lcm(%struct.Cyc_AP_T* %0, %struct.Cyc_AP_T* %1) {
%3 = tail call %struct.Cyc_AP_T* @Cyc_AP_gcd(%struct.Cyc_AP_T* %0, %struct.Cyc_AP_T* %1)
%4 = tail call %struct.Cyc_AP_T* @Cyc_AP_div(%struct.Cyc_AP_T* %1, %struct.Cyc_AP_T* %3)
%5 = tail call %struct.Cyc_AP_T* @Cyc_AP_mul(%struct.Cyc_AP_T* %0, %struct.Cyc_AP_T* %4)
ret %struct.Cyc_AP_T* %5
}