void test_string_insertions() {
  char test_s1[] = "ADGATDGATDGATGDGATTG";
  char test_s2[] = "ADAATDGATGGATGDGATTG";
  ((bioseq_string_insertions(test_s1, test_s2) == 2)
       ? _gen_result(1, __func__,
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/modulated/uti-c/refs/"
                     "heads/master/tests/bioseq.test.c",
                     507, "string_insertions returns expected value.")
       : _gen_result(0, __func__,
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/modulated/uti-c/refs/"
                     "heads/master/tests/bioseq.test.c",
                     507, "string_insertions returns expected value."));
}


x86 assembly (clang, -O0):
<test_string_insertions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec7(%rip),%al
mov    %al,-0xc(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <bioseq_string_insertions@plt>
cmp    $0x2,%eax
jne    11bb <test_string_insertions+0x9b>
mov    $0x1,%edi
lea    0xe99(%rip),%rsi
lea    0xea9(%rip),%rdx
mov    $0x1fb,%ecx
lea    0xf2d(%rip),%r8
mov    $0x0,%al
call   1040 <_gen_result@plt>
jmp    11de <test_string_insertions+0xbe>
xor    %edi,%edi
lea    0xe71(%rip),%rsi
lea    0xe81(%rip),%rdx
mov    $0x1fb,%ecx
lea    0xf05(%rip),%r8
mov    $0x0,%al
call   1040 <_gen_result@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_string_insertions>:
sub    $0x38,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movabs $0x47545441474447,%rax
mov    %rax,0x2d(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rax,0xd(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <bioseq_string_insertions@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
lea    0xec7(%rip),%rsi
lea    0xed7(%rip),%rdx
lea    0xf60(%rip),%r8
mov    $0x1fb,%ecx
xor    %eax,%eax
call   1040 <_gen_result@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.test_string_insertions.test_s1 = [21 x i8] c"ADGATDGATDGATGDGATTG\00"
@__const.test_string_insertions.test_s2 = [21 x i8] c"ADAATDGATGGATGDGATTG\00"
@__func__.test_string_insertions = [23 x i8] c"test_string_insertions\00"
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/modulated/uti-c/refs/heads/master/tests/bioseq.test.c\00"
@.str.1 = [42 x i8] c"string_insertions returns expected value.\00"
define void @test_string_insertions() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = bitcast [21 x i8]* %1 to i8*
%4 = bitcast [21 x i8]* %2 to i8*
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @bioseq_string_insertions to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.test_string_insertions, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 507, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.test_string_insertions, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 507, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret void
}

LLVM IR (-O2):
@__const.test_string_insertions.test_s1 = [21 x i8] c"ADGATDGATDGATGDGATTG\00"
@__const.test_string_insertions.test_s2 = [21 x i8] c"ADAATDGATGGATGDGATTG\00"
@__func__.test_string_insertions = [23 x i8] c"test_string_insertions\00"
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/modulated/uti-c/refs/heads/master/tests/bioseq.test.c\00"
@.str.1 = [42 x i8] c"string_insertions returns expected value.\00"
define void @test_string_insertions() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @bioseq_string_insertions to i32 (i8*, i8*, ...)*)(i8* %3, i8* %4)
%6 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
%8 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_gen_result to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.test_string_insertions, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 507, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
ret void
}