	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function derive_heap_segment
_derive_heap_segment:                   ## @derive_heap_segment
	.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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_gdb_assert
	movq	%r14, %rdi
	callq	_gdb_assert
	movq	_target_has_execution@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rbx
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.3:
	movq	_SEC_DATA@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bfd_get_section_vma
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_bfd_get_section_size
	addq	%r14, %rax
	cmpq	%r15, %rax
	cmovgq	%rax, %r15
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bfd_get_section_flags
	testl	%eax, (%r13)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bfd_section_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_lookup_minimal_symbol
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_lookup_minimal_symbol
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
LBB0_12:
	callq	_find_function_in_inferior
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	_builtin_type_int@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_value_from_longest
	movq	%rax, -64(%rbp)
	movq	%rax, %rdi
	callq	_gdb_assert
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_call_function_by_hand
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	%rax, %rdi
	callq	_value_as_long
	cmpq	%r15, %rax
	jle	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, (%rcx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	$1, %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_target_has_execution,4,2       ## @target_has_execution
	.comm	_SEC_DATA,4,2                   ## @SEC_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".bss"

L_.str.1:                               ## @.str.1
	.asciz	"sbrk"

L_.str.2:                               ## @.str.2
	.asciz	"_sbrk"

	.comm	_builtin_type_int,4,2           ## @builtin_type_int
	.no_dead_strip	_derive_heap_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function derive_heap_segment
_derive_heap_segment:                   ; @derive_heap_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_gdb_assert
	mov	x0, x19
	bl	_gdb_assert
Lloh0:
	adrp	x8, _target_has_execution@GOTPAGE
Lloh1:
	ldr	x8, [x8, _target_has_execution@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.1:
	ldr	x22, [x21]
	cbz	x22, LBB0_7
; %bb.2:
	mov	x25, #0
Lloh3:
	adrp	x26, _SEC_DATA@GOTPAGE
Lloh4:
	ldr	x26, [x26, _SEC_DATA@GOTPAGEOFF]
Lloh5:
	adrp	x23, l_.str@PAGE
Lloh6:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_bfd_get_section_vma
	mov	x24, x0
	mov	x0, x22
	bl	_bfd_get_section_size
	add	x8, x0, x24
	cmp	x8, x25
	csel	x25, x8, x25, gt
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x22, [x22]
	cbz	x22, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_bfd_get_section_flags
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_bfd_section_name
	mov	x1, x0
	mov	x0, x23
	bl	_strcmp
	cbnz	x0, LBB0_4
	b	LBB0_3
LBB0_7:
	mov	x25, #0
LBB0_8:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	bl	_lookup_minimal_symbol
	cbz	x0, LBB0_10
; %bb.9:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	bl	_lookup_minimal_symbol
	cbz	x0, LBB0_17
; %bb.11:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_find_function_in_inferior
	mov	x21, x0
	cbz	x0, LBB0_17
; %bb.13:
Lloh15:
	adrp	x8, _builtin_type_int@GOTPAGE
Lloh16:
	ldr	x8, [x8, _builtin_type_int@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_value_from_longest
	str	x0, [sp, #8]
	bl	_gdb_assert
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #1
	bl	_call_function_by_hand
	cbz	x0, LBB0_17
; %bb.14:
	bl	_value_as_long
	cmp	x0, x25
	b.le	LBB0_16
; %bb.15:
	str	x25, [x20]
	str	x0, [x19]
	mov	w0, #1
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_target_has_execution,4,2       ; @target_has_execution
	.comm	_SEC_DATA,4,2                   ; @SEC_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".bss"

l_.str.1:                               ; @.str.1
	.asciz	"sbrk"

l_.str.2:                               ; @.str.2
	.asciz	"_sbrk"

	.comm	_builtin_type_int,4,2           ; @builtin_type_int
	.no_dead_strip	_derive_heap_segment
.subsections_via_symbols
