#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 eucalyptus_opts {
  int dummy;
};
struct arguments_params {
  int dummy;
};

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ arguments_free(struct eucalyptus_opts *);
int arguments_internal(int, char **, struct eucalyptus_opts *,
                       struct arguments_params *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int arguments_ext(int argc, char **argv, struct eucalyptus_opts *args_info,
                  struct arguments_params *params) {
  int result;
  result = arguments_internal(argc, argv, args_info, params, 0);
  if (result == EXIT_FAILURE) {
    arguments_free(args_info);
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<arguments_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1040 <arguments_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%eax
jne    118a <arguments_ext+0x5a>
mov    -0x18(%rbp),%rdi
call   1030 <arguments_free@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arguments_ext>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
xor    %r8d,%r8d
call   1040 <arguments_internal@plt>
mov    0x2e9a(%rip),%r14
cmp    (%r14),%eax
je     1153 <arguments_ext+0x23>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
call   1030 <arguments_free@plt>
mov    (%r14),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.eucalyptus_opts = type { i32 }
%struct.arguments_params = type { i32 }
@EXIT_FAILURE = global i32 0
define i32 @arguments_ext(i32 %0, i8** %1, %struct.eucalyptus_opts* %2, %struct.arguments_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.eucalyptus_opts*
%8 = alloca %struct.arguments_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.eucalyptus_opts* %2, %struct.eucalyptus_opts** %7
store %struct.arguments_params* %3, %struct.arguments_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.eucalyptus_opts*, %struct.eucalyptus_opts** %7
%13 = load %struct.arguments_params*, %struct.arguments_params** %8
%14 = call i32 @arguments_internal(i32 %10, i8** %11, %struct.eucalyptus_opts* %12, %struct.arguments_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = load i32, i32* @EXIT_FAILURE
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %4
%19 = load %struct.eucalyptus_opts*, %struct.eucalyptus_opts** %7
%20 = call i32 @arguments_free(%struct.eucalyptus_opts* %19)
%21 = load i32, i32* @EXIT_FAILURE
%22 = call i32 @exit(i32 %21)
unreachable
23: ; preds = %4
%24 = load i32, i32* %9
ret i32 %24
}

LLVM IR (-O2):
%struct.eucalyptus_opts = type { i32 }
%struct.arguments_params = type { i32 }
@EXIT_FAILURE = global i32 0
define i32 @arguments_ext(i32 %0, i8** %1, %struct.eucalyptus_opts* %2, %struct.arguments_params* %3) {
%5 = tail call i32 @arguments_internal(i32 %0, i8** %1, %struct.eucalyptus_opts* %2, %struct.arguments_params* %3, i32 0)
%6 = load i32, i32* @EXIT_FAILURE
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i32 @arguments_free(%struct.eucalyptus_opts* %2)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %4
ret i32 %5
}