#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*/ printf(char *, int, double);
void titi() {
  int pouet;
  for (
      struct {
        int i;
        double d;
      } t = {.i = 0, .d = 4.0};
      t.i < 20; ++t.i, ++t.d) {
    printf("i:%d d:%f\n", t.i, t.d);
  }
}


x86 assembly (clang, -O0):
<titi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x14,-0x18(%rbp)
jge    116c <titi+0x5c>
mov    -0x18(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movsd  0xea3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    112e <titi+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<titi>:
push   %rbx
lea    0xf88(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
movsd  0xed6(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
movsd  0xec9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
movsd  0xebc(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
movsd  0xeaf(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
movsd  0xea2(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
movsd  0xe95(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
movsd  0xe88(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
movsd  0xe7b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
movsd  0xe6e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
movsd  0xe61(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
movsd  0xe54(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
movsd  0xe47(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
movsd  0xe3a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
movsd  0xe2d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
movsd  0xe20(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
movsd  0xe13(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
movsd  0xe06(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
movsd  0xdf9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
movsd  0xdec(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x13,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.anon = type { i32, double }
@__const.titi.t = %struct.anon { i32 0, double 4.000000e+00 }
@.str = [11 x i8] c"i:%d d:%f\0A\00"
define void @titi() {
%1 = alloca i32
%2 = alloca %struct.anon
%3 = bitcast %struct.anon* %2 to i8*
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%6 = load i32, i32* %5
%7 = icmp slt i32 %6, 20
br i1 %7, label %8, label %21
8: ; preds = %4
%9 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%12 = load double, double* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10, double %12)
br label %14
14: ; preds = %8
%15 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %15
%18 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%19 = load double, double* %18
%20 = fadd double %19, 1.000000e+00
store double %20, double* %18
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"i:%d d:%f\0A\00"
define void @titi() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0, double 4.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, double 5.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 2, double 6.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3, double 7.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, double 8.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, double 9.000000e+00)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 6, double 1.000000e+01)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 7, double 1.100000e+01)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 8, double 1.200000e+01)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 9, double 1.300000e+01)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10, double 1.400000e+01)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 11, double 1.500000e+01)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 12, double 1.600000e+01)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 13, double 1.700000e+01)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 14, double 1.800000e+01)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 15, double 1.900000e+01)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 16, double 2.000000e+01)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 17, double 2.100000e+01)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 18, double 2.200000e+01)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 19, double 2.300000e+01)
ret void
}