#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*/ t(int);
int i_can_not_be_propagated_fully(int *a) {
  int i;
  for (i = 0; i < 50; i++) {
    t(a[i]);
    t(a[i + 1]);
    t(a[i + 2]);
    t(a[i + 3]);
  }
}


x86 assembly (clang, -O0):
<i_can_not_be_propagated_fully>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jge    118a <i_can_not_be_propagated_fully+0x7a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <t@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <t@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <t@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <t@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <i_can_not_be_propagated_fully+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_can_not_be_propagated_fully>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x3,%ebx
nopl   0x0(%rax)
mov    -0xc(%r14,%rbx,4),%edi
call   1030 <t@plt>
mov    -0x8(%r14,%rbx,4),%edi
call   1030 <t@plt>
mov    -0x4(%r14,%rbx,4),%edi
call   1030 <t@plt>
mov    (%r14,%rbx,4),%edi
call   1030 <t@plt>
add    $0x1,%rbx
cmp    $0x35,%rbx
jne    1120 <i_can_not_be_propagated_fully+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @i_can_not_be_propagated_fully(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 0, i32* %4
br label %5
5: ; preds = %36, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 50
br i1 %7, label %8, label %39
8: ; preds = %5
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = call i32 @t(i32 %13)
%15 = load i32*, i32** %3
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %15, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @t(i32 %20)
%22 = load i32*, i32** %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %22, i64 %25
%27 = load i32, i32* %26
%28 = call i32 @t(i32 %27)
%29 = load i32*, i32** %3
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %29, i64 %32
%34 = load i32, i32* %33
%35 = call i32 @t(i32 %34)
br label %36
36: ; preds = %8
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %5
39: ; preds = %5
%40 = load i32, i32* %2
ret i32 %40
}

LLVM IR (-O2):
define i32 @i_can_not_be_propagated_fully(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @t(i32 %5)
%7 = add nuw nsw i64 %3, 1
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @t(i32 %9)
%11 = add nuw nsw i64 %3, 2
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 @t(i32 %13)
%15 = add nuw nsw i64 %3, 3
%16 = getelementptr inbounds i32, i32* %0, i64 %15
%17 = load i32, i32* %16
%18 = tail call i32 @t(i32 %17)
%19 = icmp eq i64 %7, 50
br i1 %19, label %20, label %2
20: ; preds = %2
ret i32 undef
}