	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wxh_to_nearest_mode
_wxh_to_nearest_mode:                   ## @wxh_to_nearest_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	cmpl	$1, %eax
	jle	LBB0_7
## %bb.1:
	movq	8(%rdi), %r8
	movq	%rax, %r9
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%r9), %r10
	cmpq	$2, %r10
	jbe	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r9, %r10
	decq	%r9
	movl	%r9d, %r11d
	shlq	$4, %r11
	cmpl	%esi, (%r8,%r11)
	jg	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%edx, 4(%r8,%r11)
	jg	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rcx, 8(%r8,%r11)
	jne	LBB0_2
## %bb.6:
	decl	%r10d
	movl	%r10d, %eax
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	decl	%eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_8:
	decl	%eax
	movq	8(%rdi), %rcx
	movq	%rax, %rdi
	shlq	$4, %rdi
	addq	%rdi, %rcx
	addq	$4, %rcx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	leaq	-1(%rax), %rdi
	addq	$-16, %rcx
	cmpq	$1, %rax
	movq	%rdi, %rax
	jle	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, -4(%rcx)
	jg	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%edx, (%rcx)
	jg	LBB0_9
	jmp	LBB0_12
LBB0_13:
	xorl	%eax, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wxh_to_nearest_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wxh_to_nearest_mode
_wxh_to_nearest_mode:                   ; @wxh_to_nearest_mode
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	cmp	w9, #1
	b.le	LBB0_7
; %bb.1:
	mov	x8, x0
	ldr	x10, [x0, #8]
	mov	x11, x9
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x13, x12, #1
	mov	x11, x12
	cmp	x13, #2
	b.ls	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x12, x11, #1
	and	x13, x12, #0xffffffff
	lsl	x14, x13, #4
	ldr	w14, [x10, x14]
	cmp	w14, w1
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x13, x10, x13, lsl #4
	ldr	w14, [x13, #4]
	cmp	w14, w2
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x13, #8]
	cmp	x13, x3
	b.ne	LBB0_2
; %bb.6:
	sub	w0, w11, #1
	b	LBB0_12
LBB0_7:
	sub	w0, w9, #1
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_8:
	sub	w0, w9, #1
	ldr	x8, [x8, #8]
	add	x8, x8, w0, uxtw #4
	add	x8, x8, #4
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	sub	x8, x8, #16
	subs	x0, x0, #1
	b.le	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x8, #-4]
	cmp	w9, w1
	b.gt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w9, [x8]
	cmp	w9, w2
	b.gt	LBB0_9
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_13:
	mov	w0, #0
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wxh_to_nearest_mode
.subsections_via_symbols
