	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_section_callback
_load_section_callback:                 ## @load_section_callback
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_bfd_get_section_flags
	movq	_SEC_LOAD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.1:
	movq	%r14, %rdi
	callq	_bfd_get_section_size
	testq	%rax, %rax
	jle	LBB0_17
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bfd_section_lma
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	addq	(%r13), %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bfd_get_section_name
	movq	_download_write_size@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %r15
	movq	%r15, %rdx
	cmovgq	%rcx, %rdx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	cmovleq	%r15, %rdx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_xmalloc
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	_xfree@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_make_cleanup
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_uiout@GOTPCREL(%rip), %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_paddr_nz
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_paddr_nz
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %edi
	movq	%r14, %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, %r8d
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, %r9d
	callq	_ui_out_message
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	movq	%r14, %r8
	callq	_bfd_get_section_contents
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	%r14, %r12
	addq	%r14, %r13
	movl	8(%r15), %ecx
	movl	16(%r15), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_show_load_progress
	cmpq	%r14, %rbx
	jge	LBB0_14
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	subq	%rbx, %r14
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %r14
	cmovgeq	%rax, %r14
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	-44(%rbp), %rcx
	callq	_target_write_memory_partial
	cmpl	$0, -44(%rbp)
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	movq	_validate_download@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	callq	_xmalloc
	movq	%rax, %r15
	movq	_xfree@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_make_cleanup
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_target_read_memory
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_paddr
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_error
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_paddr
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_error
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_do_cleanups
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	addl	%r14d, 8(%r15)
	incl	12(%r15)
	movslq	%r14d, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	%r14, %rbx
	movq	_quit_flag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_ui_load_progress_hook
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_14:
	cmpl	$0, -44(%rbp)
	je	LBB0_16
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_error
LBB0_16:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_do_cleanups
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEC_LOAD,4,2                   ## @SEC_LOAD
	.comm	_download_write_size,8,3        ## @download_write_size
	.comm	_xfree,4,2                      ## @xfree
	.comm	_uiout,4,2                      ## @uiout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading section %s, size 0x%s lma 0x%s\n"

	.comm	_validate_download,8,3          ## @validate_download
L_.str.1:                               ## @.str.1
	.asciz	"Download verify read failed at 0x%s"

L_.str.2:                               ## @.str.2
	.asciz	"Download verify compare failed at 0x%s"

	.comm	_quit_flag,8,3                  ## @quit_flag
L_.str.3:                               ## @.str.3
	.asciz	"Canceled the download"

L_.str.4:                               ## @.str.4
	.asciz	"Memory access error while loading section %s."

	.no_dead_strip	_load_section_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_section_callback
_load_section_callback:                 ; @load_section_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x25, x1
	mov	x28, x0
	bl	_bfd_get_section_flags
Lloh0:
	adrp	x8, _SEC_LOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEC_LOAD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_17
; %bb.1:
	mov	x0, x25
	bl	_bfd_get_section_size
	cmp	x0, #1
	b.lt	LBB0_17
; %bb.2:
	mov	x20, x0
	mov	x0, x28
	mov	x1, x25
	bl	_bfd_section_lma
	ldr	x8, [x19]
	add	x22, x8, x0
	mov	x0, x28
	mov	x1, x25
	bl	_bfd_get_section_name
	mov	x21, x0
Lloh3:
	adrp	x8, _download_write_size@GOTPAGE
Lloh4:
	ldr	x8, [x8, _download_write_size@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x20, x8
	ccmp	x8, #0, #4, gt
	csel	x26, x8, x20, gt
	mov	x0, x20
	bl	_xmalloc
	mov	x24, x0
Lloh6:
	adrp	x8, _xfree@GOTPAGE
Lloh7:
	ldr	x8, [x8, _xfree@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_make_cleanup
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
Lloh9:
	adrp	x8, _uiout@GOTPAGE
Lloh10:
	ldr	x8, [x8, _uiout@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_paddr_nz
	mov	x27, x0
	mov	x0, x22
	bl	_paddr_nz
	mov	x5, x0
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	w1, #0
	mov	x3, x21
	mov	x4, x27
	bl	_ui_out_message
	mov	x0, x28
	mov	x1, x25
	mov	x2, x24
	mov	w3, #0
	mov	x4, x20
	bl	_bfd_get_section_contents
	mov	x25, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_error
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, x27
	add	x24, x24, x27
	ldr	w3, [x19, #8]
	ldr	w4, [x19, #16]
	mov	x0, x21
	mov	x1, x25
	mov	x2, x20
	bl	_show_load_progress
	cmp	x25, x20
	b.ge	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x8, x20, x25
	cmp	x8, x26
	csel	x2, x8, x26, lt
	add	x3, sp, #28
	mov	x0, x22
	mov	x1, x24
	bl	_target_write_memory_partial
	ldr	w8, [sp, #28]
	cbnz	w8, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
Lloh16:
	adrp	x8, _validate_download@GOTPAGE
Lloh17:
	ldr	x8, [x8, _validate_download@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_xmalloc
	mov	x28, x0
Lloh19:
	adrp	x8, _xfree@GOTPAGE
Lloh20:
	ldr	x8, [x8, _xfree@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x28
	bl	_make_cleanup
	mov	x27, x0
	mov	x0, x22
	mov	x1, x28
	mov	x2, x23
	bl	_target_read_memory
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_paddr
	str	x0, [sp]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	mov	x1, x28
	mov	x2, x23
	bl	_memcmp
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_paddr
	str	x0, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_error
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
	bl	_do_cleanups
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x27, w23
	ldr	d0, [x19, #8]
	movi.2s	v1, #1
	mov.s	v1[0], w23
	add.2s	v0, v0, v1
	str	d0, [x19, #8]
	add	x25, x25, x27
Lloh26:
	adrp	x8, _quit_flag@GOTPAGE
Lloh27:
	ldr	x8, [x8, _quit_flag@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x25
	bl	_ui_load_progress_hook
	cbnz	x0, LBB0_3
	b	LBB0_4
LBB0_14:
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_16
LBB0_15:
	str	x21, [sp]
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_error
LBB0_16:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_do_cleanups
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SEC_LOAD,4,2                   ; @SEC_LOAD
	.comm	_download_write_size,8,3        ; @download_write_size
	.comm	_xfree,4,2                      ; @xfree
	.comm	_uiout,4,2                      ; @uiout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading section %s, size 0x%s lma 0x%s\n"

	.comm	_validate_download,8,3          ; @validate_download
l_.str.1:                               ; @.str.1
	.asciz	"Download verify read failed at 0x%s"

l_.str.2:                               ; @.str.2
	.asciz	"Download verify compare failed at 0x%s"

	.comm	_quit_flag,8,3                  ; @quit_flag
l_.str.3:                               ; @.str.3
	.asciz	"Canceled the download"

l_.str.4:                               ; @.str.4
	.asciz	"Memory access error while loading section %s."

	.no_dead_strip	_load_section_callback
.subsections_via_symbols
