#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 int16_t;

/* Variables and functions */
int U_PMF_RECT_get(char const **, int *, int *, int *, int *, char const *);
int /*<<< orphan*/ printf(char *, int, int, int, int);
int U_PMF_RECT_print(const char **contents, const char *blimit) {
  int16_t X, Y, Width, Height;
  int status = U_PMF_RECT_get(contents, &X, &Y, &Width, &Height, blimit);
  if (status) {
    printf("{UL{%d,%d},WH{%d,%d}}", X, Y, Width, Height);
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_RECT_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r9
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1040 <U_PMF_RECT_get@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1173 <U_PMF_RECT_print+0x53>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_RECT_print>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r9
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1040 <U_PMF_RECT_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1161 <U_PMF_RECT_print+0x41>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"{UL{%d,%d},WH{%d,%d}}\00"
define i32 @U_PMF_RECT_print(i8** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = call i32 @U_PMF_RECT_get(i8** %0, i32* %3, i32* %4, i32* %5, i32* %6, i8* %1)
%12 = icmp eq i32 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16, i32 %17)
br label %19
19: ; preds = %13, %2
ret i32 %11
}