#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 */
unsigned int echo_parameter_marshal_outputs__camkes_ret_fn_361(unsigned int,
                                                               int *);
unsigned int echo_parameter_marshal_outputs_pout(unsigned int, int *);
unsigned int echo_parameter_marshal_outputs(int *_camkes_return_367,
                                            int *pout) {
  unsigned int _camkes_length_368 = 0;
  _camkes_length_368 = echo_parameter_marshal_outputs__camkes_ret_fn_361(
      _camkes_length_368, _camkes_return_367);
  if (_camkes_length_368 == 0xffffffffU) {
    return 0xffffffffU;
  }
  _camkes_length_368 =
      echo_parameter_marshal_outputs_pout(_camkes_length_368, pout);
  if (_camkes_length_368 == 0xffffffffU) {
    return 0xffffffffU;
  }
  (void)0;
  return _camkes_length_368;
}


x86 assembly (clang, -O0):
<echo_parameter_marshal_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <echo_parameter_marshal_outputs__camkes_ret_fn_361@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115c <echo_parameter_marshal_outputs+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1187 <echo_parameter_marshal_outputs+0x67>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <echo_parameter_marshal_outputs_pout@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1181 <echo_parameter_marshal_outputs+0x61>
movl   $0xffffffff,-0x4(%rbp)
jmp    1187 <echo_parameter_marshal_outputs+0x67>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_parameter_marshal_outputs>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
xor    %edi,%edi
call   1040 <echo_parameter_marshal_outputs__camkes_ret_fn_361@plt>
cmp    $0xffffffff,%eax
je     113e <echo_parameter_marshal_outputs+0x1e>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <echo_parameter_marshal_outputs_pout@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @echo_parameter_marshal_outputs(i32* %0, i32* %1) {
%3 = tail call i32 @echo_parameter_marshal_outputs__camkes_ret_fn_361(i32 0, i32* %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @echo_parameter_marshal_outputs_pout(i32 %3, i32* %1)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ -1, %2 ], [ %6, %5 ]
ret i32 %8
}