#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*/ calldoupper(float, char, float, int, int, char *, float *,
                               char);
int dolower(float, int /*<<< orphan*/);
int doupper(int, int);
int /*<<< orphan*/ printf(char *, float);
void morecalldolower() {
  int y = doupper(7, 233);
  float x = y * 0.066;
  doupper(dolower(x + y, calldoupper(x, 'c', x * 0.03f, 0xffffffff, 234, "asdf",
                                     &x, 'e')),
          doupper(dolower(x + y, calldoupper(x, 'c', x * 0.03f, 0xffffffff, 234,
                                             "asdf", &x, 'e')),
                  3));
  printf("Doing things %d", y);
  printf("Other things %f", x);
}


x86 assembly (clang, -O0):
<morecalldolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x7,%edi
mov    $0xe9,%esi
call   1060 <doupper@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe6c(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mov    $0x63,%edi
mov    $0xffffffff,%esi
mov    $0xea,%edx
lea    0xe61(%rip),%rcx
lea    -0x8(%rbp),%r8
mov    $0x65,%r9d
call   1050 <calldoupper@plt>
movss  -0x14(%rbp),%xmm0
mov    %eax,%edi
call   1030 <dolower@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe13(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mov    $0x63,%edi
mov    $0xffffffff,%esi
mov    $0xea,%edx
lea    0xe08(%rip),%rcx
lea    -0x8(%rbp),%r8
mov    $0x65,%r9d
call   1050 <calldoupper@plt>
movss  -0x10(%rbp),%xmm0
mov    %eax,%edi
call   1030 <dolower@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1060 <doupper@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1060 <doupper@plt>
cvtsi2ssl -0x4(%rbp),%xmm0
lea    0xdd0(%rip),%rdi
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xdcf(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morecalldolower>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x7,%edi
mov    $0xe9,%esi
call   1060 <doupper@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xe9d(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsi2ss %eax,%xmm1
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
movaps %xmm0,%xmm1
mulss  0xe7c(%rip),%xmm1
lea    0xe79(%rip),%r14
lea    0x8(%rsp),%rbx
mov    $0x63,%edi
mov    $0xffffffff,%esi
mov    $0xea,%edx
mov    %r14,%rcx
mov    %rbx,%r8
mov    $0x65,%r9d
call   1050 <calldoupper@plt>
movss  0x4(%rsp),%xmm0
mov    %eax,%edi
call   1030 <dolower@plt>
mov    %eax,%ebp
movss  0x8(%rsp),%xmm0
movaps %xmm0,%xmm1
addss  0xc(%rsp),%xmm1
movss  %xmm1,0x4(%rsp)
movss  0xe24(%rip),%xmm1
mulss  %xmm0,%xmm1
mov    $0x63,%edi
mov    $0xffffffff,%esi
mov    $0xea,%edx
mov    %r14,%rcx
mov    %rbx,%r8
mov    $0x65,%r9d
call   1050 <calldoupper@plt>
movss  0x4(%rsp),%xmm0
mov    %eax,%edi
call   1030 <dolower@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1060 <doupper@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <doupper@plt>
lea    0xde0(%rip),%rdi
movss  0xc(%rsp),%xmm0
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
lea    0xdd8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
@.str.1 = [16 x i8] c"Doing things %d\00"
@.str.2 = [16 x i8] c"Other things %f\00"
define void @morecalldolower() {
%1 = alloca i32
%2 = alloca float
%3 = call i32 @doupper(i32 7, i32 233)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 6.600000e-02
%7 = fptrunc double %6 to float
store float %7, float* %2
%8 = load float, float* %2
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to float
%11 = fadd float %8, %10
%12 = load float, float* %2
%13 = load float, float* %2
%14 = fmul float %13, 0x3F9EB851E0000000
%15 = call i32 @calldoupper(float %12, i8 signext 99, float %14, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, i8 signext 101)
%16 = call i32 @dolower(float %11, i32 %15)
%17 = load float, float* %2
%18 = load i32, i32* %1
%19 = sitofp i32 %18 to float
%20 = fadd float %17, %19
%21 = load float, float* %2
%22 = load float, float* %2
%23 = fmul float %22, 0x3F9EB851E0000000
%24 = call i32 @calldoupper(float %21, i8 signext 99, float %23, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, i8 signext 101)
%25 = call i32 @dolower(float %20, i32 %24)
%26 = call i32 @doupper(i32 %25, i32 3)
%27 = call i32 @doupper(i32 %16, i32 %26)
%28 = load i32, i32* %1
%29 = sitofp i32 %28 to float
%30 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %29)
%31 = load float, float* %2
%32 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), float %31)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
@.str.1 = [16 x i8] c"Doing things %d\00"
@.str.2 = [16 x i8] c"Other things %f\00"
define void @morecalldolower() {
%1 = alloca float
%2 = tail call i32 @doupper(i32 7, i32 233)
%3 = bitcast float* %1 to i8*
%4 = sitofp i32 %2 to double
%5 = fmul double %4, 6.600000e-02
%6 = fptrunc double %5 to float
store float %6, float* %1
%7 = sitofp i32 %2 to float
%8 = fadd float %7, %6
%9 = fmul float %6, 0x3F9EB851E0000000
%10 = call i32 @calldoupper(float %6, i8 signext 99, float %9, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, i8 signext 101)
%11 = call i32 @dolower(float %8, i32 %10)
%12 = load float, float* %1
%13 = fadd float %12, %7
%14 = fmul float %12, 0x3F9EB851E0000000
%15 = call i32 @calldoupper(float %12, i8 signext 99, float %14, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, i8 signext 101)
%16 = call i32 @dolower(float %13, i32 %15)
%17 = call i32 @doupper(i32 %16, i32 3)
%18 = call i32 @doupper(i32 %11, i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %7)
%20 = load float, float* %1
%21 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), float %20)
ret void
}