#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 iw_csdescr {
  int dummy;
};
struct iw_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ iw_process_cols_to_intermediate(struct iw_context *, int,
                                                   struct iw_csdescr const *);
int /*<<< orphan*/
iw_process_rows_intermediate_to_final(struct iw_context *, int,
                                      struct iw_csdescr const *);
int iw_process_one_channel(struct iw_context *ctx, int intermed_channel,
                           const struct iw_csdescr *in_csdescr,
                           const struct iw_csdescr *out_csdescr) {
  if (!iw_process_cols_to_intermediate(ctx, intermed_channel, in_csdescr)) {
    return 0;
  }
  if (!iw_process_rows_intermediate_to_final(ctx, intermed_channel,
                                             out_csdescr)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<iw_process_one_channel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <iw_process_cols_to_intermediate@plt>
cmp    $0x0,%eax
jne    115c <iw_process_one_channel+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1188 <iw_process_one_channel+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1030 <iw_process_rows_intermediate_to_final@plt>
cmp    $0x0,%eax
jne    1181 <iw_process_one_channel+0x61>
movl   $0x0,-0x4(%rbp)
jmp    1188 <iw_process_one_channel+0x68>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_process_one_channel>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <iw_process_cols_to_intermediate@plt>
test   %eax,%eax
je     114d <iw_process_one_channel+0x2d>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <iw_process_rows_intermediate_to_final@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
jmp    114f <iw_process_one_channel+0x2f>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.iw_context = type { i32 }
%struct.iw_csdescr = type { i32 }
define i32 @iw_process_one_channel(%struct.iw_context* %0, i32 %1, %struct.iw_csdescr* %2, %struct.iw_csdescr* %3) {
%5 = alloca i32
%6 = alloca %struct.iw_context*
%7 = alloca i32
%8 = alloca %struct.iw_csdescr*
%9 = alloca %struct.iw_csdescr*
store %struct.iw_context* %0, %struct.iw_context** %6
store i32 %1, i32* %7
store %struct.iw_csdescr* %2, %struct.iw_csdescr** %8
store %struct.iw_csdescr* %3, %struct.iw_csdescr** %9
%10 = load %struct.iw_context*, %struct.iw_context** %6
%11 = load i32, i32* %7
%12 = load %struct.iw_csdescr*, %struct.iw_csdescr** %8
%13 = call i32 @iw_process_cols_to_intermediate(%struct.iw_context* %10, i32 %11, %struct.iw_csdescr* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %4
store i32 0, i32* %5
br label %24
16: ; preds = %4
%17 = load %struct.iw_context*, %struct.iw_context** %6
%18 = load i32, i32* %7
%19 = load %struct.iw_csdescr*, %struct.iw_csdescr** %9
%20 = call i32 @iw_process_rows_intermediate_to_final(%struct.iw_context* %17, i32 %18, %struct.iw_csdescr* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %16
store i32 0, i32* %5
br label %24
23: ; preds = %16
store i32 1, i32* %5
br label %24
24: ; preds = %23, %22, %15
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
%struct.iw_context = type { i32 }
%struct.iw_csdescr = type { i32 }
define i32 @iw_process_one_channel(%struct.iw_context* %0, i32 %1, %struct.iw_csdescr* %2, %struct.iw_csdescr* %3) {
%5 = tail call i32 @iw_process_cols_to_intermediate(%struct.iw_context* %0, i32 %1, %struct.iw_csdescr* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @iw_process_rows_intermediate_to_final(%struct.iw_context* %0, i32 %1, %struct.iw_csdescr* %3)
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}