	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_tswitch
_alloc_tswitch:                         ## @alloc_tswitch
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	jge	LBB0_3
## %bb.4:
	movq	%rsi, %r15
	movslq	(%rsi), %rax
	movq	_SWITCH_MAX_PORTGRPS@GOTPCREL(%rip), %r12
	movslq	(%r12), %rcx
	movslq	16(%r14), %rdx
	imulq	%rcx, %rdx
	addq	%rax, %rdx
	leaq	48(,%rdx,4), %rsi
	movl	$1, %edi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	addq	$48, %rax
	movq	%rax, 16(%rbx)
	movl	4(%r15), %eax
	movl	%eax, 40(%rbx)
	movslq	(%r15), %rdx
	movq	%rdx, (%rbx)
	movq	%r14, 32(%rbx)
	movq	%r15, 24(%rbx)
	cmpl	$0, (%r12)
	je	LBB0_9
## %bb.7:
	movq	8(%rbx), %rax
	movslq	16(%r14), %rcx
	addq	$16, %rax
	leaq	(%rbx,%rdx,4), %rdx
	addq	$48, %rdx
	shlq	$2, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, -16(%rax)
	movq	%rbx, (%rax)
	movq	%rdx, -8(%rax)
	incq	%rsi
	movl	(%r12), %edi
	addq	$24, %rax
	addq	%rcx, %rdx
	cmpq	%rdi, %rsi
	jb	LBB0_8
LBB0_9:
	movq	(%r14), %rax
	movq	24(%r14), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r14)
	movq	%rbx, (%rcx,%rax,8)
	jmp	LBB0_10
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_3:
	movq	32(%r14), %rdi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_OSM_LOG
	jmp	LBB0_10
LBB0_5:
	movq	32(%r14), %r14
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_OSM_LOG
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERR 4E14: unexpectedly requested too many switch structures!\n"

	.comm	_SWITCH_MAX_PORTGRPS,4,2        ## @SWITCH_MAX_PORTGRPS
L_.str.1:                               ## @.str.1
	.asciz	"ERR 4E15: calloc: %s\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_alloc_tswitch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_tswitch
_alloc_tswitch:                         ; @alloc_tswitch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x1, LBB0_10
; %bb.1:
	mov	x19, x0
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.2:
	mov	x20, x1
Lloh0:
	adrp	x21, _SWITCH_MAX_PORTGRPS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SWITCH_MAX_PORTGRPS@GOTPAGEOFF]
	ldrsw	x8, [x1]
	ldrsw	x9, [x21]
	ldrsw	x10, [x19, #16]
	madd	x8, x10, x9, x8
	lsl	x8, x8, #2
	add	x1, x8, #48
	mov	w0, #1
	bl	_calloc
	cbz	x0, LBB0_8
; %bb.3:
	add	x8, x0, #48
	ldp	w10, w9, [x20]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	str	w9, [x0, #40]
	str	x10, [x0]
	stp	x20, x19, [x0, #24]
	str	x8, [x0, #16]
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x8, #0
	ldr	x9, [x0, #8]
	ldrsw	x11, [x19, #16]
	add	x9, x9, #16
	add	x10, x0, x10, lsl #2
	add	x10, x10, #48
	lsl	x11, x11, #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	stur	w8, [x9, #-16]
	stp	x10, x0, [x9, #-8]
	add	x8, x8, #1
	ldr	w12, [x21]
	add	x9, x9, #24
	add	x10, x10, x11
	cmp	x8, x12
	b.lo	LBB0_5
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x9, [x19]
	add	x10, x9, #1
	str	x10, [x19]
	str	x0, [x8, x9, lsl #3]
	b	LBB0_11
LBB0_7:
	ldr	x0, [x19, #32]
Lloh2:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	x19, [x19, #32]
Lloh7:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
LBB0_9:
	bl	_OSM_LOG
LBB0_10:
	mov	x0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERR 4E14: unexpectedly requested too many switch structures!\n"

	.comm	_SWITCH_MAX_PORTGRPS,4,2        ; @SWITCH_MAX_PORTGRPS
l_.str.1:                               ; @.str.1
	.asciz	"ERR 4E15: calloc: %s\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_alloc_tswitch
.subsections_via_symbols
