#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 */
typedef int int32_t;

/* Variables and functions */
int U_PMR_SETRENDERINGORIGIN_get(char const *, int /*<<< orphan*/ *, int *,
                                 int *);
int /*<<< orphan*/ printf(char *, ...);
int U_PMR_SETRENDERINGORIGIN_print(const char *contents) {
  int32_t X, Y;
  int status = U_PMR_SETRENDERINGORIGIN_get(contents, NULL, &X, &Y);
  if (status) {
    printf("   +  X:%d Y:%d\n", X, Y);
  } else {
    printf("   corrupt record\n");
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMR_SETRENDERINGORIGIN_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_SETRENDERINGORIGIN_get@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1167 <U_PMR_SETRENDERINGORIGIN_print+0x47>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1175 <U_PMR_SETRENDERINGORIGIN_print+0x55>
lea    0xea3(%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_SETRENDERINGORIGIN_print>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %esi,%esi
call   1050 <U_PMR_SETRENDERINGORIGIN_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1164 <U_PMR_SETRENDERINGORIGIN_print+0x34>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1170 <U_PMR_SETRENDERINGORIGIN_print+0x40>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c" + X:%d Y:%d\0A\00"
@.str.1 = [19 x i8] c" corrupt record\0A\00"
define i32 @U_PMR_SETRENDERINGORIGIN_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_SETRENDERINGORIGIN_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 %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
br label %16
14: ; preds = %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %10
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [17 x i8] c" + X:%d Y:%d\0A\00"
@str = [18 x i8] c" corrupt record\00"
define i32 @U_PMR_SETRENDERINGORIGIN_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_SETRENDERINGORIGIN_get(i8* %0, i32* null, i32* %2, i32* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %14
12: ; preds = %1
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
ret i32 %6
}