	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_resize_to_sections      ## -- Begin function target_resize_to_sections
	.p2align	4, 0x90
_target_resize_to_sections:             ## @target_resize_to_sections
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	(%r15), %r14
	subq	%rbx, %r14
	shrq	$2, %r14
	addl	%r14d, %r12d
	leal	(,%r12,4), %esi
	movq	%rbx, %rdi
	callq	_xrealloc
	movq	%rax, 8(%r15)
	movslq	%r12d, %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, (%r15)
	movq	_target_struct_size@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	testq	%rax, %rax
	jle	LBB0_7
## %bb.3:
	movq	_target_structs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rsi, %rdx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$8, %rdx
	leaq	(%rsi,%rax,8), %rdi
	cmpq	%rdi, %rdx
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rdi
	cmpq	%rbx, 8(%rdi)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15), %rsi
	movq	%rsi, 8(%rdi)
	movq	(%r15), %rsi
	movq	(%rdx), %rdi
	movq	%rsi, (%rdi)
	movq	(%rcx), %rsi
	jmp	LBB0_6
LBB0_7:
	movq	_current_target@GOTPCREL(%rip), %rax
	cmpq	%rbx, 8(%rax)
	jne	LBB0_9
## %bb.8:
	movups	(%r15), %xmm0
	movups	%xmm0, (%rax)
	jmp	LBB0_9
LBB0_1:
	leal	(,%r12,4), %edi
	callq	_xmalloc
	movq	%rax, 8(%r15)
	movslq	%r12d, %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, (%r15)
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_target_structs,8,3             ## @target_structs
	.comm	_target_struct_size,4,2         ## @target_struct_size
	.comm	_current_target,16,3            ## @current_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_target_resize_to_sections      ; -- Begin function target_resize_to_sections
	.p2align	2
_target_resize_to_sections:             ; @target_resize_to_sections
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_8
; %bb.1:
	ldr	x8, [x19]
	sub	x8, x8, x21
	lsr	x20, x8, #2
	add	w22, w20, w22
	lsl	w1, w22, #2
	mov	x0, x21
	bl	_xrealloc
	add	x8, x0, w22, sxtw #2
	stp	x8, x0, [x19]
Lloh0:
	adrp	x8, _target_struct_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _target_struct_size@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
Lloh3:
	adrp	x9, _target_structs@GOTPAGE
Lloh4:
	ldr	x9, [x9, _target_structs@GOTPAGEOFF]
	ldr	x11, [x9]
	mov	x10, x11
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #8
	add	x12, x11, x8, lsl #3
	cmp	x10, x12
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	ldr	x13, [x12, #8]
	cmp	x13, x21
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x13, x11, [x19]
	str	x11, [x12, #8]
	ldr	x11, [x10]
	str	x13, [x11]
	ldr	x11, [x9]
	b	LBB0_3
LBB0_6:
Lloh5:
	adrp	x8, _current_target@GOTPAGE
Lloh6:
	ldr	x8, [x8, _current_target@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	cmp	x9, x21
	b.ne	LBB0_9
; %bb.7:
	ldp	x10, x9, [x19]
	stp	x10, x9, [x8]
	b	LBB0_9
LBB0_8:
	lsl	w0, w22, #2
	bl	_xmalloc
	mov	w20, #0
	add	x8, x0, w22, sxtw #2
	stp	x8, x0, [x19]
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_target_structs,8,3             ; @target_structs
	.comm	_target_struct_size,4,2         ; @target_struct_size
	.comm	_current_target,16,3            ; @current_target
.subsections_via_symbols
