#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 */

/* Variables and functions */
int /*<<< orphan*/ GP_create(short, char *, char *);
scalar_t__ getParLong(long *);
char *getString();
int /*<<< orphan*/ isNString(int);
int /*<<< orphan*/ messErr(int);
void IF_gplot_newM(void) {
  char *t, *f;
  long n;
  if (getParLong(&n)) {
    if (!isNString(2)) {
      messErr(6);
      return;
    }
    t = getString();
    f = getString();
    GP_create(0 | (short)n, t, f);
  }
}


x86 assembly (clang, -O0):
<IF_gplot_newM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
call   1060 <getParLong@plt>
cmp    $0x0,%rax
je     11bb <IF_gplot_newM+0x6b>
mov    $0x2,%edi
call   1040 <isNString@plt>
cmp    $0x0,%eax
jne    118d <IF_gplot_newM+0x3d>
mov    $0x6,%edi
call   1050 <messErr@plt>
jmp    11bb <IF_gplot_newM+0x6b>
mov    $0x0,%al
call   1030 <getString@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getString@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
cwtl
or     $0x0,%eax
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movswl %ax,%edi
call   1070 <GP_create@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_gplot_newM>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
call   1060 <getParLong@plt>
test   %rax,%rax
je     119f <IF_gplot_newM+0x4f>
mov    $0x2,%edi
call   1040 <isNString@plt>
test   %eax,%eax
je     1195 <IF_gplot_newM+0x45>
xor    %eax,%eax
call   1030 <getString@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getString@plt>
movswl 0x8(%rsp),%edi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1070 <GP_create@plt>
jmp    119f <IF_gplot_newM+0x4f>
mov    $0x6,%edi
call   1050 <messErr@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @IF_gplot_newM() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i64
%4 = call i64 @getParLong(i64* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %22
6: ; preds = %0
%7 = call i32 @isNString(i32 2)
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = call i32 @messErr(i32 6)
br label %22
11: ; preds = %6
%12 = call i8* (...) @getString()
store i8* %12, i8** %1
%13 = call i8* (...) @getString()
store i8* %13, i8** %2
%14 = load i64, i64* %3
%15 = trunc i64 %14 to i16
%16 = sext i16 %15 to i32
%17 = or i32 0, %16
%18 = trunc i32 %17 to i16
%19 = load i8*, i8** %1
%20 = load i8*, i8** %2
%21 = call i32 @GP_create(i16 signext %18, i8* %19, i8* %20)
br label %22
22: ; preds = %9, %11, %0
ret void
}

LLVM IR (-O2):
define void @IF_gplot_newM() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @getParLong(i64* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %0
%6 = call i32 @isNString(i32 2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @messErr(i32 6)
br label %16
10: ; preds = %5
%11 = call i8* (...) @getString()
%12 = call i8* (...) @getString()
%13 = load i64, i64* %1
%14 = trunc i64 %13 to i16
%15 = call i32 @GP_create(i16 signext %14, i8* %11, i8* %12)
br label %16
16: ; preds = %0, %10, %8
ret void
}