#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 check_inpos(char *, char const *, int const *);
int /*<<< orphan*/ lou_free();
int main(int argc, char **argv) {
  const char *str1 = "user@example.com";
  const int expected_inpos[] = {0, 0, 0,  1,  2,  3,  4,  5,  6,  7,
                                8, 9, 10, 11, 12, 13, 14, 15, 15, 15};
  int result = check_inpos("compress.cti,en-us-g2.ctb", str1, expected_inpos);
  lou_free();
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    0xe99(%rip),%rdi
call   1030 <check_inpos@plt>
mov    %eax,-0x74(%rbp)
mov    $0x0,%al
call   1040 <lou_free@plt>
mov    -0x74(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movaps 0xf44(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf28(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeaa(%rip),%rdi
lea    0xe92(%rip),%rsi
mov    %rsp,%rdx
call   1030 <check_inpos@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <lou_free@plt>
mov    %ebx,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"user@example.com\00"
@__const.main.expected_inpos = [20 x i32] [i32 0, i32 0, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 15, i32 15]
@.str.1 = [26 x i8] c"compress.cti,en-us-g2.ctb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [20 x i32]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %6
%9 = bitcast [20 x i32]* %7 to i8*
%10 = load i8*, i8** %6
%11 = getelementptr inbounds [20 x i32], [20 x i32]* %7, i64 0, i64 0
%12 = call i32 @check_inpos(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %10, i32* %11)
store i32 %12, i32* %8
%13 = call i32 (...) @lou_free()
%14 = load i32, i32* %8
ret i32 %14
}

LLVM IR (-O2):
@.str = [17 x i8] c"user@example.com\00"
@__const.main.expected_inpos = [20 x i32] [i32 0, i32 0, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 15, i32 15]
@.str.1 = [26 x i8] c"compress.cti,en-us-g2.ctb\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x i32]
%4 = bitcast [20 x i32]* %3 to i8*
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%6 = call i32 @check_inpos(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = call i32 (...) @lou_free()
ret i32 %6
}