	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spu_elf_modify_segment_map
_spu_elf_modify_segment_map:            ## @spu_elf_modify_segment_map
	.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	_TRUE@GOTPCREL(%rip), %rbx
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.1:
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	callq	_bfd_get_section_by_name
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_elf_tdata
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_23
## %bb.2:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_PT_LOAD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movl	$1, 8(%rax)
	movq	24(%rax), %rcx
	movq	%rbx, (%rcx)
	movq	16(%r13), %rcx
	movq	%rcx, 16(%rax)
	movq	%rax, 16(%r13)
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r13), %r13
	testq	%r13, %r13
	je	LBB0_22
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	(%r13), %rax
	movq	_PT_LOAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r13), %eax
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r13), %rcx
	movq	(%rcx), %rbx
	cmpq	%r15, %rbx
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_spu_elf_section_data
	cmpq	$0, (%rax)
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	incq	%r14
	movl	8(%r13), %eax
	cmpl	%eax, %r14d
	jae	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	24(%r13), %rcx
	movl	%r14d, %edx
	movq	(%rcx,%rdx,8), %rbx
	cmpq	%r15, %rbx
	jne	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %ecx
	movl	%r14d, %r14d
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rbx
	jmp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r13), %eax
	movl	%r14d, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%rcx), %edx
	cmpl	%eax, %edx
	jae	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	subl	%ecx, %eax
	leal	16(,%rax,8), %esi
	movq	%r12, %rdi
	callq	_bfd_zalloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	movl	8(%r13), %edx
	subl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%edx, 8(%rax)
	movq	24(%rax), %rdi
	movq	24(%r13), %rax
	leaq	(%rax,%r14,8), %rsi
	addq	$8, %rsi
	shll	$3, %edx
	callq	_memcpy
	movq	_PT_LOAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	16(%r13), %rax
	movq	%rax, 16(%r12)
	movq	%r12, 16(%r13)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, 8(%r13)
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, 8(%r13)
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_bfd_zalloc
	testq	%rax, %rax
	jne	LBB0_3
LBB0_24:
	movq	_FALSE@GOTPCREL(%rip), %rbx
	jmp	LBB0_23
LBB0_22:
	movq	_TRUE@GOTPCREL(%rip), %rbx
LBB0_23:
	movl	(%rbx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".toe"

	.comm	_PT_LOAD,8,3                    ## @PT_LOAD
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_spu_elf_modify_segment_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spu_elf_modify_segment_map
_spu_elf_modify_segment_map:            ; @spu_elf_modify_segment_map
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x1, LBB0_21
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_bfd_get_section_by_name
	mov	x20, x0
	mov	x0, x19
	bl	_elf_tdata
	ldr	x24, [x0]
	cbz	x24, LBB0_21
; %bb.2:
Lloh2:
	adrp	x25, _PT_LOAD@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PT_LOAD@GOTPAGEOFF]
Lloh4:
	adrp	x23, _FALSE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _FALSE@GOTPAGEOFF]
	mov	w22, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x24, [x24, #16]
	cbz	x24, LBB0_21
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24, #8]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x24, #24]
	ldr	x21, [x9]
	cmp	x21, x20
	b.eq	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_spu_elf_section_data
	ldr	x8, [x0]
	cbnz	x8, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x28, x28, #1
	ldr	w8, [x24, #8]
	cmp	w28, w8
	b.hs	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x9, [x24, #24]
	ldr	x21, [x9, w28, uxtw #3]
	cmp	x21, x20
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x28
	and	x28, x28, #0xffffffff
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
	mov	x28, #0
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x20
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24, #8]
	mov	x26, x28
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w26, #1
	cmp	w27, w8
	b.hs	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w8, w26
	lsl	w8, w8, #3
	add	w1, w8, #16
	mov	x0, x19
	bl	_bfd_zalloc
	cbz	x0, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldr	w8, [x24, #8]
	sub	w8, w8, w27
	str	w8, [x0, #8]
	ldr	x0, [x0, #24]
	ldr	x9, [x24, #24]
	add	x9, x9, x28, lsl #3
	add	x1, x9, #8
	lsl	w2, w8, #3
	bl	_memcpy
	ldr	x8, [x25]
	str	x8, [x22]
	ldr	x8, [x24, #16]
	str	x8, [x22, #16]
	str	x22, [x24, #16]
	mov	w22, #1
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w22, [x24, #8]
	cbz	w26, LBB0_3
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	str	w26, [x24, #8]
	mov	x0, x19
	mov	w1, #32
	bl	_bfd_zalloc
	cbz	x0, LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	str	x8, [x0]
	str	w22, [x0, #8]
	ldr	x8, [x0, #24]
	str	x21, [x8]
	ldr	x8, [x24, #16]
	str	x8, [x0, #16]
	str	x0, [x24, #16]
	b	LBB0_3
LBB0_21:
Lloh6:
	adrp	x23, _TRUE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x23]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".toe"

	.comm	_PT_LOAD,8,3                    ; @PT_LOAD
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_spu_elf_modify_segment_map
.subsections_via_symbols
