int baz(void) {
  int a, i;
  for (i = 0; i < 6; i++)
    foo(bar(1.0iF * i), &a);
  return 0;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    120a <baz+0xea>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm1,%xmm1
mulss  %xmm0,%xmm1
movss  0xeae(%rip),%xmm2
mulss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
subss  %xmm0,%xmm1
movss  %xmm1,-0x28(%rbp)
xorps  %xmm0,%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,-0x24(%rbp)
ucomiss %xmm1,%xmm1
movss  %xmm1,-0x20(%rbp)
movss  %xmm0,-0x1c(%rbp)
jnp    11cf <baz+0xaf>
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
ucomiss %xmm0,%xmm0
movss  %xmm1,-0x20(%rbp)
movss  %xmm0,-0x1c(%rbp)
jnp    11cf <baz+0xaf>
movss  -0x2c(%rbp),%xmm2
movss  0xe55(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
call   1220 <__mulsc3>
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x20(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <baz+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<baz>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
lea    0xc(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
movaps 0xeb9(%rip),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
movaps 0xeaf(%rip),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
movaps 0xea5(%rip),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
movaps 0xe9b(%rip),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
movaps 0xe91(%rip),%xmm0
mov    $0x1,%al
call   1030 <bar@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @baz() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca { float, float }
%4 = alloca { float, float }
store i32 0, i32* %2
br label %5
5: ; preds = %34, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %37
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
%11 = fmul float 0.000000e+00, %10
%12 = fmul float 1.000000e+00, %10
%13 = fsub float %11, 0.000000e+00
%14 = fadd float 0.000000e+00, %12
%15 = fcmp uno float %13, %13
br i1 %15, label %16, label %25
16: ; preds = %8
%17 = fcmp uno float %14, %14
br i1 %17, label %18, label %25
18: ; preds = %16
%19 = call <2 x float> @__mulsc3(float 0.000000e+00, float 1.000000e+00, float %10, float 0.000000e+00)
%20 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %19, <2 x float>* %20
%21 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%22 = load float, float* %21
%23 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%24 = load float, float* %23
br label %25
25: ; preds = %18, %16, %8
%26 = phi float [ %13, %8 ], [ %13, %16 ], [ %22, %18 ]
%27 = phi float [ %14, %8 ], [ %14, %16 ], [ %24, %18 ]
%28 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%29 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %26, float* %28
store float %27, float* %29
%30 = bitcast { float, float }* %4 to <2 x float>*
%31 = load <2 x float>, <2 x float>* %30
%32 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> %31)
%33 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %32, i32* %1)
br label %34
34: ; preds = %25
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %5
37: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @baz() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> zeroinitializer)
%4 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %3, i32* %1)
%5 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> <float 0.000000e+00, float 1.000000e+00>)
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %5, i32* %1)
%7 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> <float 0.000000e+00, float 2.000000e+00>)
%8 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %7, i32* %1)
%9 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> <float 0.000000e+00, float 3.000000e+00>)
%10 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %9, i32* %1)
%11 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> <float 0.000000e+00, float 4.000000e+00>)
%12 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %11, i32* %1)
%13 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @bar to i32 (<2 x float>, ...)*)(<2 x float> <float 0.000000e+00, float 5.000000e+00>)
%14 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @foo to i32 (i32, i32*, ...)*)(i32 %13, i32* %1)
ret i32 0
}