#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*/ _assert_string_equal(char const *, char const *, char *,
                                        int);
char *calloc(int, int);
scalar_t__ disemvowel(char *);
int /*<<< orphan*/ free(char *);
void test_long_string(void) {
  char *str;
  int size;
  int i;
  size = 50000;
  str = calloc(size, sizeof(char));
  str[0] = 'x';
  str[1] = 'y';
  str[2] = 'z';
  for (i = 3; i < size - 1; ++i) {
    str[i] = 'a';
  }
  str[size - 1] = '\0';
  _assert_string_equal(
      (const char *)"xyz", (const char *)disemvowel(str),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/"
      "master/disemvowel/disemvowel_test.c",
      45);
  free(str);
}


x86 assembly (clang, -O0):
<test_long_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc350,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x78,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x79,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x7a,0x2(%rax)
movl   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11a9 <test_long_string+0x69>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x61,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <test_long_string+0x3e>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <disemvowel@plt>
mov    %rax,%rsi
lea    0xe33(%rip),%rdi
lea    0xe30(%rip),%rdx
mov    $0x2d,%ecx
call   1050 <_assert_string_equal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_long_string>:
push   %rbx
mov    $0xc350,%edi
mov    $0x1,%esi
call   1070 <calloc@plt>
mov    %rax,%rbx
movw   $0x7978,(%rax)
movb   $0x7a,0x2(%rax)
lea    0x3(%rax),%rdi
mov    $0xc34c,%edx
mov    $0x61,%esi
call   1060 <memset@plt>
mov    %rbx,%rdi
call   1040 <disemvowel@plt>
lea    0xe72(%rip),%rdi
lea    0xe6f(%rip),%rdx
mov    %rax,%rsi
mov    $0x2d,%ecx
call   1050 <_assert_string_equal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"xyz\00"
@.str.1 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_long_string() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
store i32 50000, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @calloc(i32 %4, i32 1)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 120, i8* %7
%8 = load i8*, i8** %1
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 121, i8* %9
%10 = load i8*, i8** %1
%11 = getelementptr inbounds i8, i8* %10, i64 2
store i8 122, i8* %11
store i32 3, i32* %3
br label %12
12: ; preds = %22, %0
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 1
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %25
17: ; preds = %12
%18 = load i8*, i8** %1
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 97, i8* %21
br label %22
22: ; preds = %17
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %12
25: ; preds = %12
%26 = load i8*, i8** %1
%27 = load i32, i32* %2
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %26, i64 %29
store i8 0, i8* %30
%31 = load i8*, i8** %1
%32 = call i64 @disemvowel(i8* %31)
%33 = inttoptr i64 %32 to i8*
%34 = call i32 @_assert_string_equal(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %33, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.1, i64 0, i64 0), i32 45)
%35 = load i8*, i8** %1
%36 = call i32 @free(i8* %35)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"xyz\00"
@.str.1 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_long_string() {
%1 = tail call dereferenceable_or_null(50000) i8* @calloc(i32 50000, i32 1)
store i8 120, i8* %1
%2 = getelementptr inbounds i8, i8* %1, i64 1
store i8 121, i8* %2
%3 = getelementptr inbounds i8, i8* %1, i64 2
store i8 122, i8* %3
%4 = getelementptr i8, i8* %1, i64 3
%5 = tail call i64 @disemvowel(i8* %1)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @_assert_string_equal(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.1, i64 0, i64 0), i32 45)
%8 = tail call i32 @free(i8* %1)
ret void
}