#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_LineNumber();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char const *, char *);
int osmType_function(const char *_tag_, int _type_, const char *version) {
  if (_type_ & 1) {
    if (!version || strcmp(version, "0.6"))
      do {
        fprintf(stderr,
                "XML Parser: Error on line %llu: "
                "Invalid value for 'version' (only '0.6' accepted)"
                " in <%s> tag.\n",
                ParseXML_LineNumber(), _tag_);
        return (1);
      } while (0);
  }
  return (0);
}


x86 assembly (clang, -O0):
<osmType_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11b6 <osmType_function+0x86>
cmpq   $0x0,-0x20(%rbp)
je     1177 <osmType_function+0x47>
mov    -0x20(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11b1 <osmType_function+0x81>
jmp    117c <osmType_function+0x4c>
mov    0x2e5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1050 <ParseXML_LineNumber@plt>
mov    -0x24(%rbp),%edi
mov    %rax,%rdx
mov    -0x10(%rbp),%rcx
lea    0xe64(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11bd <osmType_function+0x8d>
jmp    11b6 <osmType_function+0x86>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osmType_function>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   $0x1,%sil
je     1180 <osmType_function+0x50>
mov    %rdi,%rbx
test   %rdx,%rdx
je     1157 <osmType_function+0x27>
lea    0xeb6(%rip),%rsi
mov    %rdx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1180 <osmType_function+0x50>
mov    0x2e82(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1050 <ParseXML_LineNumber@plt>
lea    0xe96(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1040 <fprintf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"0.6\00"
@stderr = global i32 0
@.str.1 = [96 x i8] c"XML Parser: Error on line %llu: Invalid value for 'version' (only '0.6' accepted) in <%s> tag.\0A\00"
define i32 @osmType_function(i8* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %6
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i8*, i8** %7
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %14, %11
br label %19
19: ; preds = %18
%20 = load i32, i32* @stderr
%21 = call i8* (...) @ParseXML_LineNumber()
%22 = load i8*, i8** %5
%23 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i8* %21, i8* %22)
store i32 1, i32* %4
br label %27
24: ; No predecessors!
br label %25
25: ; preds = %24, %14
br label %26
26: ; preds = %25, %3
store i32 0, i32* %4
br label %27
27: ; preds = %26, %19
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
@.str = [4 x i8] c"0.6\00"
@stderr = global i32 0
@.str.1 = [96 x i8] c"XML Parser: Error on line %llu: Invalid value for 'version' (only '0.6' accepted) in <%s> tag.\0A\00"
define i32 @osmType_function(i8* %0, i32 %1, i8* %2) {
%4 = and i32 %1, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3
%7 = icmp eq i8* %2, null
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %6, %8
%12 = load i32, i32* @stderr
%13 = tail call i8* (...) @ParseXML_LineNumber()
%14 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %0)
br label %15
15: ; preds = %3, %8, %11
%16 = phi i32 [ 1, %11 ], [ 0, %8 ], [ 0, %3 ]
ret i32 %16
}