#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 */
char *ParseXML_Encode_Safe_XML(char const *);
int /*<<< orphan*/ printf(char *, char *, ...);
int boundsType_function(const char *_tag_, int _type_, const char *minlat,
                        const char *minlon, const char *maxlat,
                        const char *maxlon, const char *origin) {
  printf("  <%s%s", (_type_ == 2) ? "/" : "", _tag_);
  if (minlat)
    printf(" minlat=\"%s\"", ParseXML_Encode_Safe_XML(minlat));
  if (minlon)
    printf(" minlon=\"%s\"", ParseXML_Encode_Safe_XML(minlon));
  if (maxlat)
    printf(" maxlat=\"%s\"", ParseXML_Encode_Safe_XML(maxlat));
  if (maxlon)
    printf(" maxlon=\"%s\"", ParseXML_Encode_Safe_XML(maxlon));
  if (origin)
    printf(" origin=\"%s\"", ParseXML_Encode_Safe_XML(origin));
  printf("%s>\n", (_type_ == (1 | 2)) ? " /" : "");
  return (0);
}


x86 assembly (clang, -O0):
<boundsType_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xf00(%rip),%rsi
lea    0xefb(%rip),%rax
cmp    $0x2,%ecx
cmove  %rax,%rsi
mov    -0x8(%rbp),%rdx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x18(%rbp)
je     1192 <boundsType_function+0x72>
mov    -0x18(%rbp),%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
mov    %rax,%rsi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
je     11b7 <boundsType_function+0x97>
mov    -0x20(%rbp),%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
mov    %rax,%rsi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x28(%rbp)
je     11dc <boundsType_function+0xbc>
mov    -0x28(%rbp),%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
mov    %rax,%rsi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1201 <boundsType_function+0xe1>
mov    -0x30(%rbp),%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
mov    %rax,%rsi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,0x10(%rbp)
je     1226 <boundsType_function+0x106>
mov    0x10(%rbp),%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
mov    %rax,%rsi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%ecx
lea    0xe1d(%rip),%rsi
lea    0xe17(%rip),%rax
cmp    $0x3,%ecx
cmove  %rax,%rsi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boundsType_function>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,%rbp
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rdx
cmp    $0x2,%esi
lea    0xf08(%rip),%rsi
lea    0xeff(%rip),%r13
cmovne %r13,%rsi
lea    0xea7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbx,%rbx
je     117e <boundsType_function+0x5e>
mov    %rbx,%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
lea    0xe94(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbp,%rbp
je     119c <boundsType_function+0x7c>
mov    %rbp,%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
lea    0xe83(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
test   %r12,%r12
je     11ba <boundsType_function+0x9a>
mov    %r12,%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
lea    0xe72(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x40(%rsp),%rbp
test   %r15,%r15
je     11dd <boundsType_function+0xbd>
mov    %r15,%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
lea    0xe5c(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
test   %rbp,%rbp
je     11fb <boundsType_function+0xdb>
mov    %rbp,%rdi
call   1040 <ParseXML_Encode_Safe_XML@plt>
lea    0xe4b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x3,%r14d
lea    0xe48(%rip),%rax
cmove  %rax,%r13
lea    0xe38(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c" <%s%s\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [13 x i8] c" minlat=\22%s\22\00"
@.str.4 = [13 x i8] c" minlon=\22%s\22\00"
@.str.5 = [13 x i8] c" maxlat=\22%s\22\00"
@.str.6 = [13 x i8] c" maxlon=\22%s\22\00"
@.str.7 = [13 x i8] c" origin=\22%s\22\00"
@.str.8 = [5 x i8] c"%s>\0A\00"
@.str.9 = [3 x i8] c" /\00"
define i32 @boundsType_function(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%15 = load i32, i32* %9
%16 = icmp eq i32 %15, 2
%17 = zext i1 %16 to i64
%18 = select i1 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%19 = load i8*, i8** %8
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %19)
%21 = load i8*, i8** %10
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %27
23: ; preds = %7
%24 = load i8*, i8** %10
%25 = call i8* @ParseXML_Encode_Safe_XML(i8* %24)
%26 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %23, %7
%28 = load i8*, i8** %11
%29 = icmp ne i8* %28, null
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load i8*, i8** %11
%32 = call i8* @ParseXML_Encode_Safe_XML(i8* %31)
%33 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %30, %27
%35 = load i8*, i8** %12
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %41
37: ; preds = %34
%38 = load i8*, i8** %12
%39 = call i8* @ParseXML_Encode_Safe_XML(i8* %38)
%40 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %39)
br label %41
41: ; preds = %37, %34
%42 = load i8*, i8** %13
%43 = icmp ne i8* %42, null
br i1 %43, label %44, label %48
44: ; preds = %41
%45 = load i8*, i8** %13
%46 = call i8* @ParseXML_Encode_Safe_XML(i8* %45)
%47 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %44, %41
%49 = load i8*, i8** %14
%50 = icmp ne i8* %49, null
br i1 %50, label %51, label %55
51: ; preds = %48
%52 = load i8*, i8** %14
%53 = call i8* @ParseXML_Encode_Safe_XML(i8* %52)
%54 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* %53)
br label %55
55: ; preds = %51, %48
%56 = load i32, i32* %9
%57 = icmp eq i32 %56, 3
%58 = zext i1 %57 to i64
%59 = select i1 %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%60 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %59)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c" <%s%s\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [13 x i8] c" minlat=\22%s\22\00"
@.str.4 = [13 x i8] c" minlon=\22%s\22\00"
@.str.5 = [13 x i8] c" maxlat=\22%s\22\00"
@.str.6 = [13 x i8] c" maxlon=\22%s\22\00"
@.str.7 = [13 x i8] c" origin=\22%s\22\00"
@.str.8 = [5 x i8] c"%s>\0A\00"
@.str.9 = [3 x i8] c" /\00"
define i32 @boundsType_function(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = icmp eq i32 %1, 2
%9 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%10 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %0)
%11 = icmp eq i8* %2, null
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = tail call i8* @ParseXML_Encode_Safe_XML(i8* %2)
%14 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %7
%16 = icmp eq i8* %3, null
br i1 %16, label %20, label %17
17: ; preds = %15
%18 = tail call i8* @ParseXML_Encode_Safe_XML(i8* %3)
%19 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %17, %15
%21 = icmp eq i8* %4, null
br i1 %21, label %25, label %22
22: ; preds = %20
%23 = tail call i8* @ParseXML_Encode_Safe_XML(i8* %4)
%24 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %23)
br label %25
25: ; preds = %22, %20
%26 = icmp eq i8* %5, null
br i1 %26, label %30, label %27
27: ; preds = %25
%28 = tail call i8* @ParseXML_Encode_Safe_XML(i8* %5)
%29 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %27, %25
%31 = icmp eq i8* %6, null
br i1 %31, label %35, label %32
32: ; preds = %30
%33 = tail call i8* @ParseXML_Encode_Safe_XML(i8* %6)
%34 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* %33)
br label %35
35: ; preds = %32, %30
%36 = icmp eq i32 %1, 3
%37 = select i1 %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%38 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %37)
ret i32 0
}