	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minmax_by
_minmax_by:                             ## @minmax_by
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movl	%edi, %r13d
	callq	_jv_get_kind
	movq	_JV_KIND_ARRAY@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_1
## %bb.3:
	movl	%r14d, %edi
	callq	_jv_get_kind
	cmpq	(%rbx), %rax
	jne	LBB0_1
## %bb.4:
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_array_length
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_array_length
	cmpl	%eax, %ebx
	jne	LBB0_5
## %bb.6:
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_array_length
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_jv_array_get
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_jv_array_get
	movl	%eax, %r15d
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_array_length
	cmpl	$2, %eax
	jl	LBB0_13
## %bb.8:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	xorl	%eax, %eax
	cmpl	$1, %r12d
	sete	%al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$1, %ebx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdx
LBB0_2:
	movl	%r13d, %edi
	movl	%r14d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_type_error2                    ## TAILCALL
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r15d, %edi
	callq	_jv_free
	movl	%r12d, %r15d
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	incl	%ebx
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	callq	_jv_array_length
	cmpl	%eax, %ebx
	jge	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_jv_array_get
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_jv_copy
	movl	%eax, %r14d
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_jv_copy
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_jv_cmp
	shrl	$31, %eax
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r12d, %edi
	callq	_jv_free
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_jv_free
	movl	%r13d, %edi
	callq	_jv_copy
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_jv_array_get
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_2
LBB0_13:
	movl	%r13d, %edi
	callq	_jv_free
	movl	%r14d, %edi
	callq	_jv_free
	movl	%r15d, %edi
	callq	_jv_free
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%r13d, %edi
	callq	_jv_free
	movl	%r14d, %edi
	callq	_jv_free
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_jv_null                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_JV_KIND_ARRAY,8,3              ## @JV_KIND_ARRAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot be iterated over"

L_.str.1:                               ## @.str.1
	.asciz	"have wrong length"

	.no_dead_strip	_minmax_by
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minmax_by
_minmax_by:                             ; @minmax_by
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_jv_get_kind
Lloh0:
	adrp	x21, _JV_KIND_ARRAY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _JV_KIND_ARRAY@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_jv_get_kind
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_jv_copy
	bl	_jv_array_length
	mov	x21, x0
	mov	x0, x19
	bl	_jv_copy
	bl	_jv_array_length
	cmp	w21, w0
	b.ne	LBB0_12
; %bb.3:
	mov	x0, x20
	bl	_jv_copy
	bl	_jv_array_length
	cbz	w0, LBB0_13
; %bb.4:
	mov	x0, x20
	bl	_jv_copy
	mov	w1, #0
	bl	_jv_array_get
	mov	x21, x0
	mov	x0, x19
	bl	_jv_copy
	mov	w1, #0
	bl	_jv_array_get
	mov	x23, x0
	mov	x0, x20
	bl	_jv_copy
	bl	_jv_array_length
	cmp	w0, #2
	b.lt	LBB0_14
; %bb.5:
	cmp	w22, #1
	cset	w26, eq
	mov	w22, #1
	b	LBB0_10
LBB0_6:
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_type_error2
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x24
	bl	_jv_free
	mov	x24, x23
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w22, w22, #1
	mov	x0, x20
	bl	_jv_copy
	bl	_jv_array_length
	cmp	w22, w0
	b.ge	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_jv_copy
	mov	x1, x22
	bl	_jv_array_get
	mov	x24, x0
	bl	_jv_copy
	mov	x25, x0
	mov	x0, x23
	bl	_jv_copy
	mov	x1, x0
	mov	x0, x25
	bl	_jv_cmp
	cmp	w26, w0, lsr #31
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x23
	bl	_jv_free
	mov	x0, x21
	bl	_jv_free
	mov	x0, x20
	bl	_jv_copy
	mov	x1, x22
	bl	_jv_array_get
	mov	x21, x0
	mov	x23, x24
	b	LBB0_9
LBB0_12:
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_13:
	mov	x0, x20
	bl	_jv_free
	mov	x0, x19
	bl	_jv_free
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_jv_null
LBB0_14:
	mov	x24, x23
LBB0_15:
	mov	x0, x20
	bl	_jv_free
	mov	x0, x19
	bl	_jv_free
	mov	x0, x24
	bl	_jv_free
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_JV_KIND_ARRAY,8,3              ; @JV_KIND_ARRAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot be iterated over"

l_.str.1:                               ; @.str.1
	.asciz	"have wrong length"

	.no_dead_strip	_minmax_by
.subsections_via_symbols
