#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 */
int /*<<< orphan*/ call_module(char *);
int /*<<< orphan*/ cut_in_half(char *, char *, float);
int /*<<< orphan*/ end();
int /*<<< orphan*/ mirror(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ onion();
int /*<<< orphan*/ sprintf(char *, char *, char *, int /*<<< orphan*/);
void bilaterally_symmetricalize(char *modulename, float size) {
  char newmodule[100];
  static int modnum = 0;
  sprintf(newmodule, "%s_%d_halved", modulename, modnum++);
  cut_in_half(newmodule, modulename, size);
  onion();
  call_module(newmodule);
  mirror(1, 0, 0);
  call_module(newmodule);
  end();
  end();
}


x86 assembly (clang, -O0):
<bilaterally_symmetricalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    0x2ed5(%rip),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x2eca(%rip)
lea    0xe6f(%rip),%rsi
call   1070 <sprintf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movss  -0xc(%rbp),%xmm0
call   1080 <cut_in_half@plt>
mov    $0x0,%al
call   1040 <onion@plt>
lea    -0x70(%rbp),%rdi
call   1030 <call_module@plt>
mov    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <mirror@plt>
lea    -0x70(%rbp),%rdi
call   1030 <call_module@plt>
mov    $0x0,%al
call   1050 <end@plt>
mov    $0x0,%al
call   1050 <end@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bilaterally_symmetricalize>:
push   %r14
push   %rbx
sub    $0x78,%rsp
movss  %xmm0,0xc(%rsp)
mov    %rdi,%rbx
mov    0x2ede(%rip),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x2ed5(%rip)
lea    0xe7a(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1070 <sprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movss  0xc(%rsp),%xmm0
call   1080 <cut_in_half@plt>
xor    %eax,%eax
call   1040 <onion@plt>
mov    %r14,%rdi
call   1030 <call_module@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <mirror@plt>
mov    %r14,%rdi
call   1030 <call_module@plt>
xor    %eax,%eax
call   1050 <end@plt>
xor    %eax,%eax
call   1050 <end@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@bilaterally_symmetricalize.modnum = internal global i32 0
@.str = [13 x i8] c"%s_%d_halved\00"
define void @bilaterally_symmetricalize(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
%5 = alloca [100 x i8]
store i8* %0, i8** %3
store float %1, float* %4
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* @bilaterally_symmetricalize.modnum
%9 = add nsw i32 %8, 1
store i32 %9, i32* @bilaterally_symmetricalize.modnum
%10 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %3
%13 = load float, float* %4
%14 = call i32 @cut_in_half(i8* %11, i8* %12, float %13)
%15 = call i32 (...) @onion()
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%17 = call i32 @call_module(i8* %16)
%18 = call i32 @mirror(i32 1, i32 0, i32 0)
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%20 = call i32 @call_module(i8* %19)
%21 = call i32 (...) @end()
%22 = call i32 (...) @end()
ret void
}

LLVM IR (-O2):
@bilaterally_symmetricalize.modnum = internal unnamed_addr global i32 0
@.str = [13 x i8] c"%s_%d_halved\00"
define void @bilaterally_symmetricalize(i8* %0, float %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @bilaterally_symmetricalize.modnum
%6 = add nsw i32 %5, 1
store i32 %6, i32* @bilaterally_symmetricalize.modnum
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5)
%8 = call i32 @cut_in_half(i8* %4, i8* %0, float %1)
%9 = call i32 (...) @onion()
%10 = call i32 @call_module(i8* %4)
%11 = call i32 @mirror(i32 1, i32 0, i32 0)
%12 = call i32 @call_module(i8* %4)
%13 = call i32 (...) @end()
%14 = call i32 (...) @end()
ret void
}