#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*/ U_PMF_PATHPOINTTYPE_ENUM_print(int);
int U_PMF_PATHPOINTTYPE_get(char const *, int *, int *, char const *);
int /*<<< orphan*/ printf(char *, ...);
int U_PMF_PATHPOINTTYPE_print(const char *contents, const char *blimit) {
  int Flags, Type;
  int status = U_PMF_PATHPOINTTYPE_get(contents, &Flags, &Type, blimit);
  if (status) {
    printf("{Flags:%X Type:", Flags);
    (void)U_PMF_PATHPOINTTYPE_ENUM_print(Type);
    printf("}");
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_PATHPOINTTYPE_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <U_PMF_PATHPOINTTYPE_get@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1189 <U_PMF_PATHPOINTTYPE_print+0x59>
mov    -0x14(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
call   1050 <U_PMF_PATHPOINTTYPE_ENUM_print@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_PATHPOINTTYPE_print>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rcx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <U_PMF_PATHPOINTTYPE_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1182 <U_PMF_PATHPOINTTYPE_print+0x42>
mov    0xc(%rsp),%esi
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%edi
call   1060 <U_PMF_PATHPOINTTYPE_ENUM_print@plt>
mov    $0x7d,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"{Flags:%X Type:\00"
@.str.1 = [2 x i8] c"}\00"
define i32 @U_PMF_PATHPOINTTYPE_print(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @U_PMF_PATHPOINTTYPE_get(i8* %8, i32* %5, i32* %6, i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i32, i32* %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %6
%17 = call i32 @U_PMF_PATHPOINTTYPE_ENUM_print(i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %13, %2
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@.str = [16 x i8] c"{Flags:%X Type:\00"
define i32 @U_PMF_PATHPOINTTYPE_print(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @U_PMF_PATHPOINTTYPE_get(i8* %0, i32* %3, i32* %4, i8* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %4
%13 = call i32 @U_PMF_PATHPOINTTYPE_ENUM_print(i32 %12)
%14 = call i32 @putchar(i32 125)
br label %15
15: ; preds = %9, %2
ret i32 %7
}