#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*/ assert(int);
int /*<<< orphan*/ indent_newline();
int /*<<< orphan*/ indent_newline_conditional();
int /*<<< orphan*/ indent_string(char *);
int /*<<< orphan*/ vrml_finish_node();
int /*<<< orphan*/ vrml_g(double);
int /*<<< orphan*/ vrml_node(char *);
void vrml_navigationinfo(double speed, char *type) {
  assert(speed > 0.0);
  indent_newline();
  vrml_node("NavigationInfo");
  if (speed != 1.0) {
    indent_string("speed");
    vrml_g(speed);
  }
  if (type) {
    indent_newline_conditional();
    indent_string("type");
    indent_string(type);
  }
  vrml_finish_node();
}


x86 assembly (clang, -O0):
<vrml_navigationinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    $0x0,%al
call   1040 <indent_newline@plt>
lea    0xe60(%rip),%rdi
call   1050 <vrml_node@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xe46(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11cf <vrml_navigationinfo+0x5f>
jp     11cf <vrml_navigationinfo+0x5f>
jmp    11e5 <vrml_navigationinfo+0x75>
lea    0xe41(%rip),%rdi
call   1060 <indent_string@plt>
movsd  -0x8(%rbp),%xmm0
call   1080 <vrml_g@plt>
cmpq   $0x0,-0x10(%rbp)
je     120c <vrml_navigationinfo+0x9c>
mov    $0x0,%al
call   1030 <indent_newline_conditional@plt>
lea    0xe1f(%rip),%rdi
call   1060 <indent_string@plt>
mov    -0x10(%rbp),%rdi
call   1060 <indent_string@plt>
mov    $0x0,%al
call   1090 <vrml_finish_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrml_navigationinfo>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1070 <assert@plt>
xor    %eax,%eax
call   1040 <indent_newline@plt>
lea    0xe69(%rip),%rdi
call   1050 <vrml_node@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xe4e(%rip),%xmm0
jne    11b6 <vrml_navigationinfo+0x46>
jnp    11cd <vrml_navigationinfo+0x5d>
lea    0xe5a(%rip),%rdi
call   1060 <indent_string@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <vrml_g@plt>
test   %rbx,%rbx
je     11ed <vrml_navigationinfo+0x7d>
xor    %eax,%eax
call   1030 <indent_newline_conditional@plt>
lea    0xe3d(%rip),%rdi
call   1060 <indent_string@plt>
mov    %rbx,%rdi
call   1060 <indent_string@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1090 <vrml_finish_node@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"NavigationInfo\00"
@.str.1 = [6 x i8] c"speed\00"
@.str.2 = [5 x i8] c"type\00"
define void @vrml_navigationinfo(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 (...) @indent_newline()
%10 = call i32 @vrml_node(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = load double, double* %3
%12 = fcmp une double %11, 1.000000e+00
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = call i32 @indent_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%15 = load double, double* %3
%16 = call i32 @vrml_g(double %15)
br label %17
17: ; preds = %13, %2
%18 = load i8*, i8** %4
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 (...) @indent_newline_conditional()
%22 = call i32 @indent_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%23 = load i8*, i8** %4
%24 = call i32 @indent_string(i8* %23)
br label %25
25: ; preds = %20, %17
%26 = call i32 (...) @vrml_finish_node()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"NavigationInfo\00"
@.str.1 = [6 x i8] c"speed\00"
@.str.2 = [5 x i8] c"type\00"
define void @vrml_navigationinfo(double %0, i8* %1) {
%3 = fcmp ogt double %0, 0.000000e+00
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 (...) @indent_newline()
%7 = tail call i32 @vrml_node(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = fcmp une double %0, 1.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @indent_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @vrml_g(double %0)
br label %12
12: ; preds = %9, %2
%13 = icmp eq i8* %1, null
br i1 %13, label %18, label %14
14: ; preds = %12
%15 = tail call i32 (...) @indent_newline_conditional()
%16 = tail call i32 @indent_string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @indent_string(i8* %1)
br label %18
18: ; preds = %14, %12
%19 = tail call i32 (...) @vrml_finish_node()
ret void
}