	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xcoff_relocate_core            ## -- Begin function xcoff_relocate_core
	.p2align	4, 0x90
_xcoff_relocate_core:                   ## @xcoff_relocate_core
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_ARCH64
	xorl	%edi, %edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_LDI_FILENAME
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, %edi
	callq	_xmalloc
	movq	%rax, -64(%rbp)
	movq	_free_current_contents@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_make_cleanup
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	_core_bfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_bfd_get_section_by_name
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	%rax, %r14
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movslq	%r8d, %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r15d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	_core_bfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-64(%rbp), %rdx
	movq	%r14, %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_bfd_get_section_contents
	testq	%rax, %rax
	je	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r15d, %r13d
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	addl	%r15d, %r15d
	movq	-64(%rbp), %rdi
	movl	%r15d, %esi
	callq	_xrealloc
	movq	%rax, %rdx
	movq	%rax, -64(%rbp)
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	-64(%rbp), %rdx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	_core_bfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	%r13, %rdx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r13), %ecx
	movq	%r14, %rsi
	movl	$1, %r8d
	callq	_bfd_get_section_contents
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-64(%rbp), %r12
	cmpb	$1, (%r12,%r13)
	leaq	1(%r13), %r13
	adcl	$0, %ebx
	cmpl	$2, %ebx
	jb	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$-1, (%r12,%rax)
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_vmap@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_LDI_NEXT
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_add_vmap
	movq	%rax, %r13
	movq	%r12, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_LDI_NEXT
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_vmap_secs
	movq	_vmap@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_target_resize_to_sections
	movq	(%rbx), %rbx
	movl	16(%r13), %edi
	movl	%edi, -40(%rbx)
	leaq	L_.str.2(%rip), %rsi
	callq	_bfd_get_section_by_name
	movq	%rax, -32(%rbx)
	movl	24(%r13), %eax
	movl	%eax, -44(%rbx)
	movl	20(%r13), %eax
	movl	%eax, -48(%rbx)
	movl	16(%r13), %edi
	movl	%edi, -16(%rbx)
	leaq	L_.str.3(%rip), %rsi
	callq	_bfd_get_section_by_name
	movq	%rax, -8(%rbx)
	movl	12(%r13), %eax
	movl	%eax, -20(%rbx)
	movl	8(%r13), %eax
	movl	%eax, -24(%rbx)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_vmap_symtab
	movq	_vmap@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_target_new_objfile_hook
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_LDI_NEXT
	testq	%rax, %rax
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	jne	LBB0_2
## %bb.19:
	xorl	%eax, %eax
	callq	_vmap_exec
	xorl	%eax, %eax
	callq	_breakpoint_re_set
	jmp	LBB0_20
LBB0_21:
	movq	_gdb_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_bfd_get_error
	movl	%eax, %edi
	callq	_bfd_errmsg
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_fprintf_filtered
LBB0_20:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_do_cleanups
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_free_current_contents,4,2      ## @free_current_contents
	.comm	_core_bfd,4,2                   ## @core_bfd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".ldinfo"

	.comm	_gdb_stderr,4,2                 ## @gdb_stderr
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't get ldinfo from core file: %s\n"

	.comm	_vmap,8,3                       ## @vmap
L_.str.2:                               ## @.str.2
	.asciz	".text"

L_.str.3:                               ## @.str.3
	.asciz	".data"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xcoff_relocate_core            ; -- Begin function xcoff_relocate_core
	.p2align	2
_xcoff_relocate_core:                   ; @xcoff_relocate_core
	.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
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_ARCH64
	mov	x21, x0
	mov	x0, #0
	mov	x1, x21
	bl	_LDI_FILENAME
	mov	x22, x0
	bl	_xmalloc
	str	x0, [sp, #24]
Lloh0:
	adrp	x8, _free_current_contents@GOTPAGE
Lloh1:
	ldr	x8, [x8, _free_current_contents@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #24
	bl	_make_cleanup
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x26, _core_bfd@GOTPAGE
Lloh4:
	ldr	x26, [x26, _core_bfd@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_bfd_get_section_by_name
	cbz	x0, LBB0_20
; %bb.1:
	mov	x23, x0
	mov	w24, #0
	cmp	w21, #0
	cset	w8, ne
	sxtw	x19, w22
	lsl	x8, x8, #2
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	x27, x22
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	w0, [x26]
	ldr	x2, [sp, #24]
	mov	x1, x23
	mov	x3, x24
	mov	x4, x22
	bl	_bfd_get_section_contents
	cbz	x0, LBB0_20
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w25, #0
	mov	x20, x19
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w20, w27
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	lsl	w27, w27, #1
	ldr	x0, [sp, #24]
	mov	x1, x27
	bl	_xrealloc
	str	x0, [sp, #24]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=2
	ldr	x0, [sp, #24]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=2
	ldr	w8, [x26]
	add	x2, x0, x20
	add	w3, w24, w20
	mov	x0, x8
	mov	x1, x23
	mov	w4, #1
	bl	_bfd_get_section_contents
	cbz	x0, LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	x28, [sp, #24]
	ldrb	w8, [x28, x20]
	add	x20, x20, #1
	cmp	w8, #0
	cinc	w25, w25, eq
	cmp	w25, #2
	b.lo	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	mov	w9, #-1
	str	w9, [x28, x8]
	cbnz	w24, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh7:
	adrp	x8, _vmap@GOTPAGE
Lloh8:
	ldr	x8, [x8, _vmap@GOTPAGEOFF]
Lloh9:
	ldr	x25, [x8]
	cbz	x25, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x28
	mov	x1, x21
	bl	_LDI_NEXT
	mov	x24, x0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x28
	bl	_add_vmap
	mov	x25, x0
	mov	x0, x28
	mov	x1, x21
	bl	_LDI_NEXT
	add	w24, w24, w0
	cbz	x25, LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x28
	mov	x2, x21
	bl	_vmap_secs
Lloh10:
	adrp	x8, _vmap@GOTPAGE
Lloh11:
	ldr	x8, [x8, _vmap@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x25, x8
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x20
	mov	w1, #2
	bl	_target_resize_to_sections
	ldr	x20, [x20]
	ldr	w0, [x25, #16]
	stur	w0, [x20, #-40]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_bfd_get_section_by_name
	stur	x0, [x20, #-32]
	ldur	d0, [x25, #20]
	stur	d0, [x20, #-48]
	ldr	w0, [x25, #16]
	stur	w0, [x20, #-16]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_bfd_get_section_by_name
	stur	x0, [x20, #-8]
	ldr	d0, [x25, #8]
	stur	d0, [x20, #-24]
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	bl	_vmap_symtab
Lloh17:
	adrp	x8, _vmap@GOTPAGE
Lloh18:
	ldr	x8, [x8, _vmap@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x25, x8
	b.eq	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x25]
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_target_new_objfile_hook
LBB0_18:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x28
	mov	x1, x21
	bl	_LDI_NEXT
	cbnz	x0, LBB0_2
; %bb.19:
	bl	_vmap_exec
	bl	_breakpoint_re_set
	b	LBB0_21
LBB0_20:
Lloh20:
	adrp	x8, _gdb_stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _gdb_stderr@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	bl	_bfd_get_error
	bl	_bfd_errmsg
	mov	x2, x0
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf_filtered
LBB0_21:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_do_cleanups
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_free_current_contents,4,2      ; @free_current_contents
	.comm	_core_bfd,4,2                   ; @core_bfd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".ldinfo"

	.comm	_gdb_stderr,4,2                 ; @gdb_stderr
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't get ldinfo from core file: %s\n"

	.comm	_vmap,8,3                       ; @vmap
l_.str.2:                               ; @.str.2
	.asciz	".text"

l_.str.3:                               ; @.str.3
	.asciz	".data"

.subsections_via_symbols
