#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 param {
  int dummy;
};
struct map_param {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ comp_Jboundaries(struct map_param *);
int /*<<< orphan*/ quantize_jah(struct param *, struct map_param *, int *);
int /*<<< orphan*/ read_map_file(struct param *, struct map_param *);
void comp_Jah(struct param *pptr, struct map_param *mptr, int *mapset) {
  static int first_call = (1 == 1);
  char *funcname;
  funcname = "comp_Jah";
  if (first_call == (1 == 1)) {
    read_map_file(pptr, mptr);
    comp_Jboundaries(mptr);
    first_call = (1 == 0);
  }
  quantize_jah(pptr, mptr, mapset);
}


x86 assembly (clang, -O0):
<comp_Jah>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xeb5(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x1,0x2ee2(%rip)
jne    117c <comp_Jah+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <read_map_file@plt>
mov    -0x10(%rbp),%rdi
call   1040 <comp_Jboundaries@plt>
movl   $0x0,0x2ebc(%rip)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <quantize_jah@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_Jah>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
cmpb   $0x0,0x2ef7(%rip)
jne    1161 <comp_Jah+0x31>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <read_map_file@plt>
mov    %rbx,%rdi
call   1040 <comp_Jboundaries@plt>
movb   $0x1,0x2edb(%rip)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <quantize_jah@plt>

LLVM IR (-O0):
%struct.param = type { i32 }
%struct.map_param = type { i32 }
@comp_Jah.first_call = internal global i32 1
@.str = [9 x i8] c"comp_Jah\00"
define void @comp_Jah(%struct.param* %0, %struct.map_param* %1, i32* %2) {
%4 = alloca %struct.param*
%5 = alloca %struct.map_param*
%6 = alloca i32*
%7 = alloca i8*
store %struct.param* %0, %struct.param** %4
store %struct.map_param* %1, %struct.map_param** %5
store i32* %2, i32** %6
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i32, i32* @comp_Jah.first_call
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load %struct.param*, %struct.param** %4
%12 = load %struct.map_param*, %struct.map_param** %5
%13 = call i32 @read_map_file(%struct.param* %11, %struct.map_param* %12)
%14 = load %struct.map_param*, %struct.map_param** %5
%15 = call i32 @comp_Jboundaries(%struct.map_param* %14)
store i32 0, i32* @comp_Jah.first_call
br label %16
16: ; preds = %10, %3
%17 = load %struct.param*, %struct.param** %4
%18 = load %struct.map_param*, %struct.map_param** %5
%19 = load i32*, i32** %6
%20 = call i32 @quantize_jah(%struct.param* %17, %struct.map_param* %18, i32* %19)
ret void
}

LLVM IR (-O2):
%struct.param = type { i32 }
%struct.map_param = type { i32 }
@comp_Jah.first_call = internal unnamed_addr global i1 false
define void @comp_Jah(%struct.param* %0, %struct.map_param* %1, i32* %2) {
%4 = load i1, i1* @comp_Jah.first_call
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @read_map_file(%struct.param* %0, %struct.map_param* %1)
%7 = tail call i32 @comp_Jboundaries(%struct.map_param* %1)
store i1 true, i1* @comp_Jah.first_call
br label %8
8: ; preds = %5, %3
%9 = tail call i32 @quantize_jah(%struct.param* %0, %struct.map_param* %1, i32* %2)
ret void
}