#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 pmd_part {
  int dummy;
};
struct fmdriver_work {
  int dummy;
};
struct driver_pmd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pmd_fm_freq_out(struct fmdriver_work *, struct driver_pmd *,
                                   struct pmd_part *);
int /*<<< orphan*/ pmd_part_masked(struct pmd_part *);
void pmd_fm_freq_out_mask(struct fmdriver_work *work, struct driver_pmd *pmd,
                          struct pmd_part *part) {
  if (!pmd_part_masked(part)) {
    pmd_fm_freq_out(work, pmd, part);
  }
}


x86 assembly (clang, -O0):
<pmd_fm_freq_out_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <pmd_part_masked@plt>
cmp    $0x0,%eax
jne    1157 <pmd_fm_freq_out_mask+0x37>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <pmd_fm_freq_out@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmd_fm_freq_out_mask>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <pmd_part_masked@plt>
test   %eax,%eax
je     1140 <pmd_fm_freq_out_mask+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <pmd_fm_freq_out@plt>

LLVM IR (-O0):
%struct.fmdriver_work = type { i32 }
%struct.driver_pmd = type { i32 }
%struct.pmd_part = type { i32 }
define void @pmd_fm_freq_out_mask(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2) {
%4 = alloca %struct.fmdriver_work*
%5 = alloca %struct.driver_pmd*
%6 = alloca %struct.pmd_part*
store %struct.fmdriver_work* %0, %struct.fmdriver_work** %4
store %struct.driver_pmd* %1, %struct.driver_pmd** %5
store %struct.pmd_part* %2, %struct.pmd_part** %6
%7 = load %struct.pmd_part*, %struct.pmd_part** %6
%8 = call i32 @pmd_part_masked(%struct.pmd_part* %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %3
%11 = load %struct.fmdriver_work*, %struct.fmdriver_work** %4
%12 = load %struct.driver_pmd*, %struct.driver_pmd** %5
%13 = load %struct.pmd_part*, %struct.pmd_part** %6
%14 = call i32 @pmd_fm_freq_out(%struct.fmdriver_work* %11, %struct.driver_pmd* %12, %struct.pmd_part* %13)
br label %15
15: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
%struct.fmdriver_work = type { i32 }
%struct.driver_pmd = type { i32 }
%struct.pmd_part = type { i32 }
define void @pmd_fm_freq_out_mask(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2) {
%4 = tail call i32 @pmd_part_masked(%struct.pmd_part* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @pmd_fm_freq_out(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2)
br label %8
8: ; preds = %6, %3
ret void
}