#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 short_command(int, int, int, int, int /*<<< orphan*/, char const *, void *);
int /*<<< orphan*/ strlen(char const *);
int iomega_command(int priv, int fd, int mode, const char *data,
                   void *extra_data) {
  return short_command(priv, fd, 0xC, mode, data ? strlen(data) : 0, data,
                       extra_data);
}


x86 assembly (clang, -O0):
<iomega_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1167 <iomega_command+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x30(%rbp)
jmp    1171 <iomega_command+0x51>
xor    %eax,%eax
mov    %eax,-0x30(%rbp)
jmp    1171 <iomega_command+0x51>
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%r8d
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
mov    $0xc,%edx
mov    %rax,(%rsp)
call   1040 <short_command@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iomega_command>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r15
mov    %rcx,%rbx
mov    %edx,%r14d
mov    %esi,%r12d
mov    %edi,%ebp
test   %rcx,%rcx
je     114c <iomega_command+0x2c>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%r8d
jmp    114f <iomega_command+0x2f>
xor    %r8d,%r8d
mov    %r15,(%rsp)
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xc,%edx
mov    %r14d,%ecx
mov    %rbx,%r9
call   1040 <short_command@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @iomega_command(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %5
%17 = load i8*, i8** %9
%18 = call i32 @strlen(i8* %17)
br label %20
19: ; preds = %5
br label %20
20: ; preds = %19, %16
%21 = phi i32 [ %18, %16 ], [ 0, %19 ]
%22 = load i8*, i8** %9
%23 = load i8*, i8** %10
%24 = call i32 @short_command(i32 %11, i32 %12, i32 12, i32 %13, i32 %21, i8* %22, i8* %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @iomega_command(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = icmp eq i8* %3, null
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @strlen(i8* %3)
br label %9
9: ; preds = %5, %7
%10 = phi i32 [ %8, %7 ], [ 0, %5 ]
%11 = tail call i32 @short_command(i32 %0, i32 %1, i32 12, i32 %2, i32 %10, i8* %3, i8* %4)
ret i32 %11
}