	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bms_compare                    ## -- Begin function bms_compare
	.p2align	4, 0x90
_bms_compare:                           ## @bms_compare
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_Min
	movslq	(%rbx), %rcx
	cmpl	%ecx, %eax
	jge	LBB0_8
## %bb.5:
	movq	8(%rbx), %rdx
	movslq	%eax, %rsi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rsi,8)
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_6
LBB0_8:
	movslq	(%r14), %rcx
	cmpl	%ecx, %eax
	jge	LBB0_14
## %bb.9:
	movq	8(%r14), %rdx
	movslq	%eax, %rsi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rsi,8)
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_10
LBB0_14:
	movl	%eax, %eax
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jle	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	8(%r14), %rcx
	movq	-8(%rcx,%rax,8), %rcx
	leaq	-1(%rax), %rdx
	movq	8(%rbx), %rsi
	cmpq	%rcx, -8(%rsi,%rax,8)
	movq	%rdx, %rax
	je	LBB0_15
## %bb.18:
	setg	%al
	movzbl	%al, %eax
	addl	%eax, %eax
	decl	%eax
	jmp	LBB0_19
LBB0_1:
	movq	%r14, %rdi
	callq	_bms_is_empty
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
	jmp	LBB0_19
LBB0_3:
	movq	%rbx, %rdi
	callq	_bms_is_empty
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	sete	%al
	jmp	LBB0_19
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_12:
	movl	$1, %eax
	jmp	LBB0_19
LBB0_11:
	movl	$-1, %eax
LBB0_19:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bms_compare                    ; -- Begin function bms_compare
	.p2align	2
_bms_compare:                           ; @bms_compare
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	cbz	x19, LBB0_15
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [x19]
	bl	_Min
	ldrsw	x9, [x20]
	cmp	w0, w9
	b.ge	LBB0_6
; %bb.3:
	ldr	x8, [x20, #8]
	add	x8, x8, w0, sxtw #3
	sub	x9, x9, w0, sxtw
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	cbnz	x10, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #8
	subs	x9, x9, #1
	b.ne	LBB0_4
LBB0_6:
	ldrsw	x9, [x19]
	cmp	w0, w9
	b.ge	LBB0_10
; %bb.7:
	ldr	x8, [x19, #8]
	add	x8, x8, w0, sxtw #3
	sub	x9, x9, w0, sxtw
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	cbnz	x10, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, #8
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_10:
	mov	w8, w0
	sub	x8, x8, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w9, w8, #1
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x20, #8]
	lsl	x10, x8, #3
	ldr	x9, [x9, x10]
	ldr	x11, [x19, #8]
	ldr	x10, [x11, x10]
	sub	x8, x8, #1
	cmp	x9, x10
	b.eq	LBB0_11
; %bb.13:
	mov	w8, #1
	cneg	w0, w8, le
	b	LBB0_19
LBB0_14:
	mov	x0, x19
	bl	_bms_is_empty
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	bl	_bms_is_empty
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_19
LBB0_16:
	mov	w0, #0
	b	LBB0_19
LBB0_17:
	mov	w0, #1
	b	LBB0_19
LBB0_18:
	mov	w0, #-1
LBB0_19:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
