#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*/ DymosimError(char *);
int /*<<< orphan*/ DymosimErrorLev(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
void AssertModelicaF4(int b, const char *bs, const char *x, int lev, int *hi) {
  if (!b) {
    char buf[1000];
    if (lev == 1) {
      if (hi) {
        if (*hi == 1)
          return;
        *hi = 1;
      }
      sprintf(buf, "  %.400s\n  Failed condition: %.400s\n", x, bs);
      DymosimErrorLev(buf, 1);
    } else {
      sprintf(buf, "  %.400s\n  Failed condition: %.400s\n", x, bs);
      DymosimError(buf);
    }
  }
}


x86 assembly (clang, -O0):
<AssertModelicaF4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11e5 <AssertModelicaF4+0xb5>
cmpl   $0x1,-0x1c(%rbp)
jne    11b9 <AssertModelicaF4+0x89>
cmpq   $0x0,-0x28(%rbp)
je     1188 <AssertModelicaF4+0x58>
mov    -0x28(%rbp),%rax
cmpl   $0x1,(%rax)
jne    117e <AssertModelicaF4+0x4e>
jmp    11e5 <AssertModelicaF4+0xb5>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
lea    -0x410(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe62(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x410(%rbp),%rdi
mov    $0x1,%esi
call   1030 <DymosimErrorLev@plt>
jmp    11e0 <AssertModelicaF4+0xb0>
lea    -0x410(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe31(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <DymosimError@plt>
jmp    11e5 <AssertModelicaF4+0xb5>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssertModelicaF4>:
test   %edi,%edi
je     1135 <AssertModelicaF4+0x5>
ret
push   %rbx
sub    $0x3f0,%rsp
mov    %rsi,%rax
cmp    $0x1,%ecx
jne    117b <AssertModelicaF4+0x4b>
test   %r8,%r8
je     1157 <AssertModelicaF4+0x27>
cmpl   $0x1,(%r8)
je     1198 <AssertModelicaF4+0x68>
movl   $0x1,(%r8)
lea    0xea2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rcx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <DymosimErrorLev@plt>
jmp    1198 <AssertModelicaF4+0x68>
lea    0xe7e(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rcx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <DymosimError@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c" %.400s\0A Failed condition: %.400s\0A\00"
define void @AssertModelicaF4(i32 %0, i8* %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca [1000 x i8]
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%12 = load i32, i32* %6
%13 = icmp ne i32 %12, 0
br i1 %13, label %42, label %14
14: ; preds = %5
%15 = load i32, i32* %9
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %34
17: ; preds = %14
%18 = load i32*, i32** %10
%19 = icmp ne i32* %18, null
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32*, i32** %10
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %25
24: ; preds = %20
br label %42
25: ; preds = %20
%26 = load i32*, i32** %10
store i32 1, i32* %26
br label %27
27: ; preds = %25, %17
%28 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%29 = load i8*, i8** %8
%30 = load i8*, i8** %7
%31 = call i32 @sprintf(i8* %28, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %29, i8* %30)
%32 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%33 = call i32 @DymosimErrorLev(i8* %32, i32 1)
br label %41
34: ; preds = %14
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%36 = load i8*, i8** %8
%37 = load i8*, i8** %7
%38 = call i32 @sprintf(i8* %35, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %36, i8* %37)
%39 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%40 = call i32 @DymosimError(i8* %39)
br label %41
41: ; preds = %34, %27
br label %42
42: ; preds = %24, %41, %5
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c" %.400s\0A Failed condition: %.400s\0A\00"
define void @AssertModelicaF4(i32 %0, i8* %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca [1000 x i8]
%7 = icmp eq i32 %0, 0
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%10 = icmp eq i32 %3, 1
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = icmp eq i32* %4, null
br i1 %12, label %17, label %13
13: ; preds = %11
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %23, label %16
16: ; preds = %13
store i32 1, i32* %4
br label %17
17: ; preds = %16, %11
%18 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %1)
%19 = call i32 @DymosimErrorLev(i8* %9, i32 1)
br label %23
20: ; preds = %8
%21 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %1)
%22 = call i32 @DymosimError(i8* %9)
br label %23
23: ; preds = %17, %20, %13
br label %24
24: ; preds = %23, %5
ret void
}