#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 /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hdoip_lib_res(char *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ hoic_canvas(int, int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int hdoip_cli_canvas(int fd, int fdr, char **argv, int argc) {
  uint32_t width, height, fps;
  if (!(hdoip_lib_res(argv[0], &width, &height, &fps))) {
    hoic_canvas(fd, width, height, fps);
  }
  return 0;
}


x86 assembly (clang, -O0):
<hdoip_cli_canvas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <hdoip_lib_res@plt>
cmp    $0x0,%eax
jne    1167 <hdoip_cli_canvas+0x47>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1030 <hoic_canvas@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdoip_cli_canvas>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    (%rdx),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <hdoip_lib_res@plt>
test   %eax,%eax
jne    1155 <hdoip_cli_canvas+0x35>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
mov    %ebx,%edi
call   1030 <hoic_canvas@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hdoip_cli_canvas(i32 %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%12 = load i8**, i8*** %7
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @hdoip_lib_res(i8* %14, i32* %9, i32* %10, i32* %11)
%16 = icmp ne i32 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %4
%18 = load i32, i32* %5
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = call i32 @hoic_canvas(i32 %18, i32 %19, i32 %20, i32 %21)
br label %23
23: ; preds = %17, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @hdoip_cli_canvas(i32 %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32* %5 to i8*
%9 = bitcast i32* %6 to i8*
%10 = bitcast i32* %7 to i8*
%11 = load i8*, i8** %2
%12 = call i32 @hdoip_lib_res(i8* %11, i32* %5, i32* %6, i32* %7)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @hoic_canvas(i32 %0, i32 %15, i32 %16, i32 %17)
br label %19
19: ; preds = %14, %4
ret i32 0
}