#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 calldoupper(int, char, int, int, int, char *, int *, char);
int dolower(int, int);
float morecalldoupper(int x, char y, float f, int a, int b, char *c, int *d,
                      char e) {
  dolower(dolower(a + b, calldoupper(x, 'c', x * 0.03f, 0xffffffff, 234, "asdf",
                                     &x, 'e')),
          3);
  f = (float)(x / (int)y);
  return f;
}


x86 assembly (clang, -O0):
<morecalldoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %sil,%al
mov    0x10(%rbp),%sil
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
cvtsi2ssl -0x4(%rbp),%xmm0
movss  0xe9f(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%edx
mov    $0x63,%esi
mov    $0xffffffff,%ecx
mov    $0xea,%r8d
lea    0xe84(%rip),%r9
lea    -0x4(%rbp),%rax
mov    %rax,(%rsp)
movl   $0x65,0x8(%rsp)
call   1040 <calldoupper@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
call   1030 <dolower@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1030 <dolower@plt>
mov    -0x4(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morecalldoupper>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,0x4(%rsp)
lea    (%rdx,%rcx,1),%ebp
cvtsi2ss %edi,%xmm0
mulss  0xec8(%rip),%xmm0
cvttss2si %xmm0,%edx
lea    0x4(%rsp),%rax
lea    0xebc(%rip),%r9
mov    $0x63,%esi
mov    $0xffffffff,%ecx
mov    $0xea,%r8d
push   $0x65
push   %rax
call   1040 <calldoupper@plt>
add    $0x10,%rsp
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <dolower@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1030 <dolower@plt>
mov    0x4(%rsp),%eax
cltd
idiv   %ebx
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define float @morecalldoupper(i32 %0, i8 signext %1, float %2, i32 %3, i32 %4, i8* %5, i32* %6, i8 signext %7) {
%9 = alloca i32
%10 = alloca i8
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i8
store i32 %0, i32* %9
store i8 %1, i8* %10
store float %2, float* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i8* %5, i8** %14
store i32* %6, i32** %15
store i8 %7, i8* %16
%17 = load i32, i32* %12
%18 = load i32, i32* %13
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %9
%21 = load i32, i32* %9
%22 = sitofp i32 %21 to float
%23 = fmul float %22, 0x3F9EB851E0000000
%24 = fptosi float %23 to i32
%25 = call i32 @calldoupper(i32 %20, i8 signext 99, i32 %24, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %9, i8 signext 101)
%26 = call i32 @dolower(i32 %19, i32 %25)
%27 = call i32 @dolower(i32 %26, i32 3)
%28 = load i32, i32* %9
%29 = load i8, i8* %10
%30 = sext i8 %29 to i32
%31 = sdiv i32 %28, %30
%32 = sitofp i32 %31 to float
store float %32, float* %11
%33 = load float, float* %11
ret float %33
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define float @morecalldoupper(i32 %0, i8 signext %1, float %2, i32 %3, i32 %4, i8* nocapture readnone %5, i32* nocapture readnone %6, i8 signext %7) {
%9 = alloca i32
store i32 %0, i32* %9
%10 = add nsw i32 %4, %3
%11 = sitofp i32 %0 to float
%12 = fmul float %11, 0x3F9EB851E0000000
%13 = fptosi float %12 to i32
%14 = call i32 @calldoupper(i32 %0, i8 signext 99, i32 %13, i32 -1, i32 234, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %9, i8 signext 101)
%15 = call i32 @dolower(i32 %10, i32 %14)
%16 = call i32 @dolower(i32 %15, i32 3)
%17 = load i32, i32* %9
%18 = sext i8 %1 to i32
%19 = sdiv i32 %17, %18
%20 = sitofp i32 %19 to float
ret float %20
}