#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_PMF_IE_LEVELS_get(char const *, int *, int *, int *, char const *);
int /*<<< orphan*/ printf(char *, int, int, int);
int U_PMF_IE_LEVELS_print(const char *contents, const char *blimit) {
  int32_t Highlight, Midtone, Shadow;
  int status =
      U_PMF_IE_LEVELS_get(contents, &Highlight, &Midtone, &Shadow, blimit);
  if (status) {
    printf("LevelEffect Highlight:%d Midtone:%d Shadow:%d\n", Highlight,
           Midtone, Shadow);
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_IE_LEVELS_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%r8
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <U_PMF_IE_LEVELS_get@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     116b <U_PMF_IE_LEVELS_print+0x4b>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_IE_LEVELS_print>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r8
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <U_PMF_IE_LEVELS_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     115a <U_PMF_IE_LEVELS_print+0x3a>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [47 x i8] c"LevelEffect Highlight:%d Midtone:%d Shadow:%d\0A\00"
define i32 @U_PMF_IE_LEVELS_print(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @U_PMF_IE_LEVELS_get(i8* %0, i32* %3, i32* %4, i32* %5, i8* %1)
%10 = icmp eq i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
br label %16
16: ; preds = %11, %2
ret i32 %9
}