	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spu_elf_modify_program_headers
_spu_elf_modify_program_headers:        ## @spu_elf_modify_program_headers
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_get_elf_backend_data
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_elf_tdata
	movq	16(%rax), %r14
	movl	(%rax), %eax
	movq	(%r13), %rcx
	movl	(%rcx), %ecx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	divl	%ecx
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_spu_hash_table
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.2:
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_elf_tdata
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_spu_elf_section_data
	movl	(%rax), %edx
	testl	%edx, %edx
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_PF_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r12d, %ecx
	shlq	$5, %rcx
	orl	%eax, 28(%r14,%rcx)
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	shll	$4, %edx
	addl	$-8, %edx
	movl	8(%rax), %edi
	movl	(%r14,%rcx), %esi
	shlq	$2, %rdx
	addq	16(%rax), %rdx
	callq	_bfd_put_32
	jmp	LBB0_9
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	jbe	LBB0_11
LBB0_27:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_PT_LOAD@GOTPCREL(%rip), %r8
	movq	(%r8), %r9
	xorl	%r11d, %r11d
	movl	%r13d, %eax
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	testl	%ebx, %ebx
	cmovneq	%r10, %r11
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	testq	%rax, %rax
	je	LBB0_23
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	decl	%eax
	movq	%rax, %rsi
	shlq	$5, %rsi
	cmpq	%r9, 8(%r14,%rsi)
	jne	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	(%r14,%rsi), %r10
	movl	16(%r14,%rsi), %ebx
	movl	%ebx, %ecx
	negl	%ecx
	andl	$15, %ecx
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	testq	%r11, %r11
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r10), %edi
	addl	%ebx, %edi
	movl	(%r11), %edx
	subl	%ecx, %edx
	cmpl	%edx, %edi
	ja	LBB0_27
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	20(%r14,%rsi), %edi
	movl	%edi, %ecx
	negl	%ecx
	andl	$15, %ecx
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	testq	%r11, %r11
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	24(%r14,%rsi), %edi
	movl	24(%r11), %esi
	cmpl	%esi, %edi
	ja	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=1
	subl	%ecx, %esi
	cmpl	%esi, %edi
	jbe	LBB0_21
	jmp	LBB0_27
LBB0_23:
	movq	(%r8), %rax
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	testq	%r13, %r13
	je	LBB0_27
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	movq	%r13, %rcx
	shlq	$5, %rcx
	cmpq	%rax, 8(%r14,%rcx)
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	16(%r14,%rcx), %edx
	movl	20(%r14,%rcx), %esi
	movl	%edx, %edi
	negl	%edi
	andl	$15, %edi
	addl	%edx, %edi
	movl	%edi, 16(%r14,%rcx)
	movl	%esi, %edx
	negl	%edx
	andl	$15, %edx
	addl	%esi, %edx
	movl	%edx, 20(%r14,%rcx)
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_PF_OVERLAY,4,2                 ## @PF_OVERLAY
	.comm	_PT_LOAD,8,3                    ## @PT_LOAD
	.no_dead_strip	_spu_elf_modify_program_headers
.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_program_headers
_spu_elf_modify_program_headers:        ; @spu_elf_modify_program_headers
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x1, LBB0_11
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_get_elf_backend_data
	mov	x21, x0
	mov	x0, x20
	bl	_elf_tdata
	ldr	x22, [x0, #16]
	ldr	w23, [x0]
	ldr	x8, [x21]
	ldr	w21, [x8]
	mov	x0, x19
	bl	_spu_hash_table
	ldr	x8, [x0]
	cbz	x8, LBB0_10
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	bl	_elf_tdata
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_10
; %bb.3:
	mov	w24, #0
Lloh0:
	adrp	x25, _PF_OVERLAY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PF_OVERLAY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	ldr	x20, [x20, #16]
	cbz	x20, LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_spu_elf_section_data
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x25]
	mov	w9, w24
	add	x11, x22, x9, lsl #5
	ldr	w12, [x11, #28]
	orr	w10, w12, w10
	str	w10, [x11, #28]
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x10, #16]
	lsl	w8, w8, #4
	sub	w8, w8, #8
	ldr	w0, [x10, #8]
	lsl	x9, x9, #5
	ldr	w1, [x22, x9]
	add	x2, x11, w8, uxtw #2
	bl	_bfd_put_32
	b	LBB0_4
LBB0_10:
	cmp	w21, w23
	b.ls	LBB0_12
LBB0_11:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x9, #0
	udiv	w8, w23, w21
Lloh5:
	adrp	x10, _PT_LOAD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PT_LOAD@GOTPAGEOFF]
	ldr	x11, [x10]
	mov	x12, x8
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	cmp	w14, #0
	csel	x9, x9, x13, eq
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	cbz	w12, LBB0_20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	sub	w12, w12, #1
	add	x13, x22, x12, lsl #5
	ldr	x14, [x13, #8]
	cmp	x14, x11
	b.ne	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w14, [x13, #16]
	neg	w15, w14
	and	w15, w15, #0xf
	cmp	w15, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w16, [x13]
	add	w16, w16, w14
	ldr	w17, [x9]
	sub	w15, w17, w15
	cmp	w16, w15
	b.hi	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x16, x22, x12, lsl #5
	ldr	w15, [x16, #20]
	neg	w17, w15
	and	w17, w17, #0xf
	cmp	w17, #0
	ccmp	x9, #0, #4, ne
	ccmp	w14, #0, #4, ne
	b.eq	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w16, [x16, #24]
	ldr	w0, [x9, #24]
	sub	w17, w0, w17
	add	w15, w16, w15
	cmp	w15, w0
	ccmp	w15, w17, #0, ls
	b.ls	LBB0_13
	b	LBB0_11
LBB0_20:
	ldr	x9, [x10]
	movi.2s	v0, #15
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	cbz	w8, LBB0_11
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #1
	add	x10, x22, x8, lsl #5
	ldr	x11, [x10, #8]
	cmp	x11, x9
	b.ne	LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	d1, [x10, #16]
	neg.2s	v2, v1
	and.8b	v2, v2, v0
	add.2s	v1, v2, v1
	str	d1, [x10, #16]
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_PF_OVERLAY,4,2                 ; @PF_OVERLAY
	.comm	_PT_LOAD,8,3                    ; @PT_LOAD
	.no_dead_strip	_spu_elf_modify_program_headers
.subsections_via_symbols
