#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_int_equals(char *, int, unsigned long,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ bc_insn_size(unsigned char *, int /*<<< orphan*/);
void assert_bc_insn_size(unsigned long expected_len, unsigned char opc) {
  unsigned char code[] = {opc, 0x00, 0x00};
  __assert_int_equals("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/headius/jato/refs/"
                      "heads/master/test/unit/vm/bytecodes-test.c",
                      16, (expected_len), (bc_insn_size(code, 0)));
}


x86 assembly (clang, -O0):
<assert_bc_insn_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xc(%rbp)
movb   $0x0,-0xb(%rbp)
movb   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rdi
xor    %esi,%esi
call   1030 <bc_insn_size@plt>
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
lea    0xea0(%rip),%rdi
mov    $0x10,%esi
call   1040 <__assert_int_equals@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_bc_insn_size>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %sil,0xd(%rsp)
movw   $0x0,0xe(%rsp)
lea    0xd(%rsp),%rdi
xor    %esi,%esi
call   1030 <bc_insn_size@plt>
lea    0xeb9(%rip),%rdi
mov    $0x10,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1040 <__assert_int_equals@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/bytecodes-test.c\00"
define void @assert_bc_insn_size(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
%5 = alloca [3 x i8]
store i64 %0, i64* %3
store i8 %1, i8* %4
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %4
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
store i8 0, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 0, i8* %9
%10 = load i64, i64* %3
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%12 = call i32 @bc_insn_size(i8* %11, i32 0)
%13 = call i32 @__assert_int_equals(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 16, i64 %10, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/bytecodes-test.c\00"
define void @assert_bc_insn_size(i64 %0, i8 zeroext %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
store i8 %1, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 0, i8* %5
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %6
%7 = call i32 @bc_insn_size(i8* %4, i32 0)
%8 = call i32 @__assert_int_equals(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 16, i64 %0, i32 %7)
ret void
}