	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _libelf_write_phdr
__libelf_write_phdr:                    ## @_libelf_write_phdr
	.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	$88, %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, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	(%rdx), %rax
	movq	_ELF_EXTENT_PHDR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movl	(%r12), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	movq	%rax, %rbx
	movq	16(%r12), %rax
	xorl	%edi, %edi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	(%rbx), %r13
	movq	%r12, %rdi
	callq	__libelf_elfmachine
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	testq	%r13, %r13
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	cmpq	%r13, 8(%r14)
	sete	%dil
	callq	_assert
	movq	_ELF_T_PHDR@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%r15d, %ebx
	movl	%r15d, %esi
	callq	__libelf_falign
	movq	%rax, %rcx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	xorl	%edi, %edi
	testq	%rdx, %rdx
	sete	%dil
	callq	_assert
	leaq	-128(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	(%r14), %edi
	movl	8(%r12), %edx
	movl	%ebx, %esi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	__libelf_fsize
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	__libelf_getphdr
	movq	%rax, -104(%rbp)
	movl	8(%r12), %edx
	movl	%edx, -108(%rbp)
	movl	%edx, -84(%rbp)
	movq	_ELF_T_PHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -88(%rbp)
	movl	%ebx, %esi
	callq	__libelf_msize
	imulq	%r13, %rax
	movq	%rax, -96(%rbp)
	movq	%r14, -120(%rbp)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	8(%rax), %rcx
	movq	%rcx, -128(%rbp)
	movl	4(%r12), %edx
	movq	_ELF_TOFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-128(%rbp), %rdi
	leaq	-104(%rbp), %rsi
	movl	%ebx, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	__libelf_xlate
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%r14d, %ecx
	cmpq	$1, %rax
	sbbl	%r15d, %r15d
	orl	%ecx, %r15d
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_EXTENT_PHDR,8,3            ## @ELF_EXTENT_PHDR
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELF_T_PHDR,4,2                 ## @ELF_T_PHDR
	.comm	_ELF_TOFILE,4,2                 ## @ELF_TOFILE
	.no_dead_strip	__libelf_write_phdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _libelf_write_phdr
__libelf_write_phdr:                    ; @_libelf_write_phdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _ELF_EXTENT_PHDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ELF_EXTENT_PHDR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	w22, [x19]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	__libelf_ehdr
	mov	x23, x0
	ldr	x24, [x19, #16]
	cmp	x24, #0
	cset	w0, ne
	bl	_assert
	ldr	x26, [x23]
	mov	x0, x19
	bl	__libelf_elfmachine
	mov	x23, x0
	cmp	x26, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x21, #8]
	cmp	x8, x26
	cset	w0, eq
	bl	_assert
Lloh3:
	adrp	x27, _ELF_T_PHDR@GOTPAGE
Lloh4:
	ldr	x27, [x27, _ELF_T_PHDR@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	x1, x22
	bl	__libelf_falign
	udiv	x8, x26, x0
	msub	x8, x8, x0, x26
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	mov	x0, sp
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w0, [x27]
	ldr	w2, [x19, #8]
	mov	x1, x22
	mov	x3, x24
	bl	__libelf_fsize
	mov	x25, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	mov	x1, x22
	bl	__libelf_getphdr
	str	x0, [sp]
	ldr	w2, [x19, #8]
	str	w2, [sp, #44]
	ldr	w0, [x27]
	stp	w0, w2, [sp, #16]
	mov	x1, x22
	bl	__libelf_msize
	mul	x8, x0, x24
	str	x8, [sp, #8]
	ldr	x8, [x21, #8]
	add	x8, x20, x8
	stp	x8, x25, [sp, #24]
	ldr	w2, [x19, #4]
Lloh5:
	adrp	x8, _ELF_TOFILE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELF_TOFILE@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
	add	x0, sp, #24
	mov	x1, sp
	mov	x3, x22
	mov	x4, x23
	bl	__libelf_xlate
	add	w8, w25, w26
	cmp	x0, #0
	csinv	w0, w8, wzr, ne
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_EXTENT_PHDR,8,3            ; @ELF_EXTENT_PHDR
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELF_T_PHDR,4,2                 ; @ELF_T_PHDR
	.comm	_ELF_TOFILE,4,2                 ; @ELF_TOFILE
	.no_dead_strip	__libelf_write_phdr
.subsections_via_symbols
