#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 U_PMR_SETANTIALIASMODE_get(char const *, int /*<<< orphan*/ *, int *,
                               int *);
int /*<<< orphan*/ printf(char *, ...);
int U_PMR_SETANTIALIASMODE_print(const char *contents) {
  int SMenum, aatype;
  int status = U_PMR_SETANTIALIASMODE_get(contents, NULL, &SMenum, &aatype);
  if (status) {
    printf("   +  SMenum:%d AntiAlias:%c\n", SMenum, (aatype ? 'Y' : 'N'));
  } else {
    printf("   corrupt record\n");
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMR_SETANTIALIASMODE_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <U_PMR_SETANTIALIASMODE_get@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1177 <U_PMR_SETANTIALIASMODE_print+0x57>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
mov    $0x4e,%edx
mov    $0x59,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1185 <U_PMR_SETANTIALIASMODE_print+0x65>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMR_SETANTIALIASMODE_print>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %esi,%esi
call   1050 <U_PMR_SETANTIALIASMODE_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1172 <U_PMR_SETANTIALIASMODE_print+0x42>
mov    0xc(%rsp),%esi
cmpl   $0x0,0x8(%rsp)
mov    $0x4e,%eax
mov    $0x59,%edx
cmove  %eax,%edx
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    117e <U_PMR_SETANTIALIASMODE_print+0x4e>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c" + SMenum:%d AntiAlias:%c\0A\00"
@.str.1 = [19 x i8] c" corrupt record\0A\00"
define i32 @U_PMR_SETANTIALIASMODE_print(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @U_PMR_SETANTIALIASMODE_get(i8* %6, i32* null, i32* %3, i32* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 89, i32 78
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %15)
br label %19
17: ; preds = %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %10
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@.str = [30 x i8] c" + SMenum:%d AntiAlias:%c\0A\00"
@str = [18 x i8] c" corrupt record\00"
define i32 @U_PMR_SETANTIALIASMODE_print(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @U_PMR_SETANTIALIASMODE_get(i8* %0, i32* null, i32* %2, i32* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 78, i32 89
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %12)
br label %16
14: ; preds = %1
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %14, %8
ret i32 %6
}