#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_PrattProver_Node {
  int dummy;
};
struct Cyc_PrattProver_Graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_PrattProver_set_dist(struct Cyc_PrattProver_Graph *,
                                            struct Cyc_PrattProver_Node *,
                                            struct Cyc_PrattProver_Node *, int,
                                            int);
struct Cyc_PrattProver_Node *
Cyc_PrattProver_term2node(struct Cyc_PrattProver_Graph *, void *);
void Cyc_PrattProver_set_distance(struct Cyc_PrattProver_Graph *g, void *it,
                                  void *jt, int dist, int is_signed) {
  struct Cyc_PrattProver_Node *i = Cyc_PrattProver_term2node(g, it);
  struct Cyc_PrattProver_Node *j = Cyc_PrattProver_term2node(g, jt);
  Cyc_PrattProver_set_dist(g, i, j, dist, is_signed);
}


x86 assembly (clang, -O0):
<Cyc_PrattProver_set_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Cyc_PrattProver_term2node@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <Cyc_PrattProver_term2node@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   1040 <Cyc_PrattProver_set_dist@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_PrattProver_set_distance>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %rdx,%r12
mov    %rdi,%rbp
call   1030 <Cyc_PrattProver_term2node@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
mov    %r12,%rsi
call   1030 <Cyc_PrattProver_term2node@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <Cyc_PrattProver_set_dist@plt>

LLVM IR (-O0):
%struct.Cyc_PrattProver_Graph = type { i32 }
%struct.Cyc_PrattProver_Node = type { i32 }
define void @Cyc_PrattProver_set_distance(%struct.Cyc_PrattProver_Graph* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca %struct.Cyc_PrattProver_Graph*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.Cyc_PrattProver_Node*
%12 = alloca %struct.Cyc_PrattProver_Node*
store %struct.Cyc_PrattProver_Graph* %0, %struct.Cyc_PrattProver_Graph** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%13 = load %struct.Cyc_PrattProver_Graph*, %struct.Cyc_PrattProver_Graph** %6
%14 = load i8*, i8** %7
%15 = call %struct.Cyc_PrattProver_Node* @Cyc_PrattProver_term2node(%struct.Cyc_PrattProver_Graph* %13, i8* %14)
store %struct.Cyc_PrattProver_Node* %15, %struct.Cyc_PrattProver_Node** %11
%16 = load %struct.Cyc_PrattProver_Graph*, %struct.Cyc_PrattProver_Graph** %6
%17 = load i8*, i8** %8
%18 = call %struct.Cyc_PrattProver_Node* @Cyc_PrattProver_term2node(%struct.Cyc_PrattProver_Graph* %16, i8* %17)
store %struct.Cyc_PrattProver_Node* %18, %struct.Cyc_PrattProver_Node** %12
%19 = load %struct.Cyc_PrattProver_Graph*, %struct.Cyc_PrattProver_Graph** %6
%20 = load %struct.Cyc_PrattProver_Node*, %struct.Cyc_PrattProver_Node** %11
%21 = load %struct.Cyc_PrattProver_Node*, %struct.Cyc_PrattProver_Node** %12
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = call i32 @Cyc_PrattProver_set_dist(%struct.Cyc_PrattProver_Graph* %19, %struct.Cyc_PrattProver_Node* %20, %struct.Cyc_PrattProver_Node* %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
%struct.Cyc_PrattProver_Graph = type { i32 }
%struct.Cyc_PrattProver_Node = type { i32 }
define void @Cyc_PrattProver_set_distance(%struct.Cyc_PrattProver_Graph* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call %struct.Cyc_PrattProver_Node* @Cyc_PrattProver_term2node(%struct.Cyc_PrattProver_Graph* %0, i8* %1)
%7 = tail call %struct.Cyc_PrattProver_Node* @Cyc_PrattProver_term2node(%struct.Cyc_PrattProver_Graph* %0, i8* %2)
%8 = tail call i32 @Cyc_PrattProver_set_dist(%struct.Cyc_PrattProver_Graph* %0, %struct.Cyc_PrattProver_Node* %6, %struct.Cyc_PrattProver_Node* %7, i32 %3, i32 %4)
ret void
}