#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 */
char *malloc(int);
int /*<<< orphan*/ memset(char *, float, int);
void EE_trick(char *list[], int pos) {
  for (int i = 0; i < 4; i++) {
    list[i] = malloc(3);
    if (i == pos)
      memset(list[i], 'E', 2);
    else
      memset(list[i], 'F', 2);
    list[i][2] = '\0';
  }
}


x86 assembly (clang, -O0):
<EE_trick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    11c4 <EE_trick+0xa4>
mov    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1188 <EE_trick+0x68>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movss  0xe8b(%rip),%xmm0
mov    $0x2,%esi
call   1030 <memset@plt>
jmp    11a6 <EE_trick+0x86>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movss  0xe64(%rip),%xmm0
mov    $0x2,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movb   $0x0,0x2(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <EE_trick+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EE_trick>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,(%rbx)
movss  0xec3(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
test   %ebp,%ebp
je     114f <EE_trick+0x2f>
movss  0xeb5(%rip),%xmm0
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <memset@plt>
mov    (%rbx),%rax
movb   $0x0,0x2(%rax)
mov    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rbx)
movss  0xe87(%rip),%xmm0
cmp    $0x1,%ebp
je     1186 <EE_trick+0x66>
movss  0xe7e(%rip),%xmm0
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <memset@plt>
mov    0x8(%rbx),%rax
movb   $0x0,0x2(%rax)
mov    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,0x10(%rbx)
movss  0xe4f(%rip),%xmm0
cmp    $0x2,%ebp
je     11be <EE_trick+0x9e>
movss  0xe46(%rip),%xmm0
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <memset@plt>
mov    0x10(%rbx),%rax
movb   $0x0,0x2(%rax)
mov    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,0x18(%rbx)
cmp    $0x3,%ebp
je     11f4 <EE_trick+0xd4>
movss  0xe16(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rax,%rdi
movss  0x4(%rsp),%xmm0
mov    $0x2,%esi
call   1030 <memset@plt>
mov    0x18(%rbx),%rax
movb   $0x0,0x2(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @EE_trick(i8** nocapture %0, i32 %1) {
%3 = tail call dereferenceable_or_null(3) i8* @malloc(i32 3)
store i8* %3, i8** %0
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, float 6.900000e+01, float 7.000000e+01
%6 = tail call i32 @memset(i8* %3, float %5, i32 2)
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8 0, i8* %8
%9 = tail call dereferenceable_or_null(3) i8* @malloc(i32 3)
%10 = getelementptr inbounds i8*, i8** %0, i64 1
store i8* %9, i8** %10
%11 = icmp eq i32 %1, 1
%12 = select i1 %11, float 6.900000e+01, float 7.000000e+01
%13 = tail call i32 @memset(i8* %9, float %12, i32 2)
%14 = load i8*, i8** %10
%15 = getelementptr inbounds i8, i8* %14, i64 2
store i8 0, i8* %15
%16 = tail call dereferenceable_or_null(3) i8* @malloc(i32 3)
%17 = getelementptr inbounds i8*, i8** %0, i64 2
store i8* %16, i8** %17
%18 = icmp eq i32 %1, 2
%19 = select i1 %18, float 6.900000e+01, float 7.000000e+01
%20 = tail call i32 @memset(i8* %16, float %19, i32 2)
%21 = load i8*, i8** %17
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 0, i8* %22
%23 = tail call dereferenceable_or_null(3) i8* @malloc(i32 3)
%24 = getelementptr inbounds i8*, i8** %0, i64 3
store i8* %23, i8** %24
%25 = icmp eq i32 %1, 3
%26 = select i1 %25, float 6.900000e+01, float 7.000000e+01
%27 = tail call i32 @memset(i8* %23, float %26, i32 2)
%28 = load i8*, i8** %24
%29 = getelementptr inbounds i8, i8* %28, i64 2
store i8 0, i8* %29
ret void
}