#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 */
struct ipr_dev {
  int dummy;
};

/* Variables and functions */
char *__print_device(struct ipr_dev *, int /*<<< orphan*/ *,
                     int /*<<< orphan*/ *, int, int, int, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                     int, int /*<<< orphan*/, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
void printf_path_status(struct ipr_dev *dev) {
  char *buf =
      __print_device(dev, NULL, NULL, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0);
  if (buf) {
    printf("%s", buf);
    free(buf);
  }
}


x86 assembly (clang, -O0):
<printf_path_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%r9d
xor    %eax,%eax
mov    %rdx,%rsi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x1,0x20(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x30(%rsp)
movl   $0x0,0x38(%rsp)
movl   $0x0,0x40(%rsp)
call   1050 <__print_device@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11c9 <printf_path_status+0x99>
mov    -0x10(%rbp),%rsi
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_path_status>:
push   %rbx
sub    $0x8,%rsp
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x1
push   $0x0
push   $0x0
push   $0x0
push   $0x0
call   1050 <__print_device@plt>
add    $0x50,%rsp
test   %rax,%rax
je     1185 <printf_path_status+0x55>
mov    %rax,%rbx
lea    0xe8c(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.ipr_dev = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @printf_path_status(%struct.ipr_dev* %0) {
%2 = alloca %struct.ipr_dev*
%3 = alloca i8*
store %struct.ipr_dev* %0, %struct.ipr_dev** %2
%4 = load %struct.ipr_dev*, %struct.ipr_dev** %2
%5 = call i8* @__print_device(%struct.ipr_dev* %4, i32* null, i32* null, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.ipr_dev = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @printf_path_status(%struct.ipr_dev* %0) {
%2 = tail call i8* @__print_device(%struct.ipr_dev* %0, i32* null, i32* null, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = tail call i32 @free(i8* %2)
br label %7
7: ; preds = %4, %1
ret void
}