#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 */
char *_s2_f2cstr(char *, long);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ s2box(char *, float, int, char *, float, int, char *, float,
                         int);
void s2box_(char *xopt, float *xtick, int *nxsub, char *yopt, float *ytick,
            int *nysub, char *zopt, float *ztick, int *nzsub, long int xoptlen,
            long int yoptlen, long int zoptlen) {
  char *cxopt = _s2_f2cstr(xopt, xoptlen);
  char *cyopt = _s2_f2cstr(yopt, yoptlen);
  char *czopt = _s2_f2cstr(zopt, zoptlen);
  s2box(cxopt, *xtick, *nxsub, cyopt, *ytick, *nysub, czopt, *ztick, *nzsub);
  free(czopt);
  free(cyopt);
  free(cxopt);
}


x86 assembly (clang, -O0):
<s2box_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x28(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x30(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x40(%rbp)
mov    0x10(%rbp),%rdi
mov    0x38(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x48(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
mov    -0x48(%rbp),%r8
mov    0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    0x20(%rbp),%rax
mov    (%rax),%r9d
call   1040 <s2box@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2box_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,0x28(%rsp)
mov    %rcx,%rbx
mov    %rdx,0x18(%rsp)
mov    %rsi,0x8(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x78(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x70(%rsp),%r14
mov    0x98(%rsp),%r15
mov    0x90(%rsp),%r13
mov    0x88(%rsp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%r12
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%rbp
mov    0x8(%rsp),%rax
movss  (%rax),%xmm0
mov    0x18(%rsp),%rax
mov    (%rax),%esi
mov    0x28(%rsp),%rax
movss  (%rax),%xmm1
mov    0x30(%rsp),%rax
mov    (%rax),%ecx
mov    0x10(%rsp),%rax
movss  (%rax),%xmm2
mov    0x20(%rsp),%rax
mov    (%rax),%r9d
mov    %r12,%rdi
mov    %rbx,%rdx
mov    %rbp,%r8
call   1040 <s2box@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @s2box_(i8* %0, float* %1, i32* %2, i8* %3, float* %4, i32* %5, i8* %6, float* %7, i32* %8, i64 %9, i64 %10, i64 %11) {
%13 = alloca i8*
%14 = alloca float*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca float*
%18 = alloca i32*
%19 = alloca i8*
%20 = alloca float*
%21 = alloca i32*
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i8*
store i8* %0, i8** %13
store float* %1, float** %14
store i32* %2, i32** %15
store i8* %3, i8** %16
store float* %4, float** %17
store i32* %5, i32** %18
store i8* %6, i8** %19
store float* %7, float** %20
store i32* %8, i32** %21
store i64 %9, i64* %22
store i64 %10, i64* %23
store i64 %11, i64* %24
%28 = load i8*, i8** %13
%29 = load i64, i64* %22
%30 = call i8* @_s2_f2cstr(i8* %28, i64 %29)
store i8* %30, i8** %25
%31 = load i8*, i8** %16
%32 = load i64, i64* %23
%33 = call i8* @_s2_f2cstr(i8* %31, i64 %32)
store i8* %33, i8** %26
%34 = load i8*, i8** %19
%35 = load i64, i64* %24
%36 = call i8* @_s2_f2cstr(i8* %34, i64 %35)
store i8* %36, i8** %27
%37 = load i8*, i8** %25
%38 = load float*, float** %14
%39 = load float, float* %38
%40 = load i32*, i32** %15
%41 = load i32, i32* %40
%42 = load i8*, i8** %26
%43 = load float*, float** %17
%44 = load float, float* %43
%45 = load i32*, i32** %18
%46 = load i32, i32* %45
%47 = load i8*, i8** %27
%48 = load float*, float** %20
%49 = load float, float* %48
%50 = load i32*, i32** %21
%51 = load i32, i32* %50
%52 = call i32 @s2box(i8* %37, float %39, i32 %41, i8* %42, float %44, i32 %46, i8* %47, float %49, i32 %51)
%53 = load i8*, i8** %27
%54 = call i32 @free(i8* %53)
%55 = load i8*, i8** %26
%56 = call i32 @free(i8* %55)
%57 = load i8*, i8** %25
%58 = call i32 @free(i8* %57)
ret void
}

LLVM IR (-O2):
define void @s2box_(i8* %0, float* nocapture %1, i32* nocapture %2, i8* %3, float* nocapture %4, i32* nocapture %5, i8* %6, float* nocapture %7, i32* nocapture %8, i64 %9, i64 %10, i64 %11) {
%13 = tail call i8* @_s2_f2cstr(i8* %0, i64 %9)
%14 = tail call i8* @_s2_f2cstr(i8* %3, i64 %10)
%15 = tail call i8* @_s2_f2cstr(i8* %6, i64 %11)
%16 = load float, float* %1
%17 = load i32, i32* %2
%18 = load float, float* %4
%19 = load i32, i32* %5
%20 = load float, float* %7
%21 = load i32, i32* %8
%22 = tail call i32 @s2box(i8* %13, float %16, i32 %17, i8* %14, float %18, i32 %19, i8* %15, float %20, i32 %21)
%23 = tail call i32 @free(i8* %15)
%24 = tail call i32 @free(i8* %14)
%25 = tail call i32 @free(i8* %13)
ret void
}