	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _libelf_write_ehdr
__libelf_write_ehdr:                    ## @_libelf_write_ehdr
	.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	%rdx, %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	(%rdx), %rax
	movq	_ELF_EXTENT_EHDR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_assert
	movl	(%r13), %r12d
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	_ELF_T_EHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rax, %rbx
	movl	8(%r13), %edx
	movl	$1, %ecx
	movl	%r12d, %esi
	callq	__libelf_fsize
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movl	8(%r13), %edx
	movl	%r12d, %esi
	callq	__libelf_msize
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	__libelf_elfmachine
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r14, -88(%rbp)
	movq	%rbx, -80(%rbp)
	movq	_ELF_T_EHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movl	8(%r13), %eax
	movl	%eax, -96(%rbp)
	movl	%eax, -72(%rbp)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -112(%rbp)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, -104(%rbp)
	movl	4(%r13), %edx
	movq	_ELF_TOFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-112(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	__libelf_xlate
	cmpq	$1, %rax
	sbbl	%r15d, %r15d
	orl	%ebx, %r15d
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_EXTENT_EHDR,8,3            ## @ELF_EXTENT_EHDR
	.comm	_ELF_T_EHDR,4,2                 ## @ELF_T_EHDR
	.comm	_ELF_TOFILE,4,2                 ## @ELF_TOFILE
	.no_dead_strip	__libelf_write_ehdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _libelf_write_ehdr
__libelf_write_ehdr:                    ; @_libelf_write_ehdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _ELF_EXTENT_EHDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ELF_EXTENT_EHDR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w21, [x20]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	__libelf_ehdr
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
Lloh3:
	adrp	x26, _ELF_T_EHDR@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ELF_T_EHDR@GOTPAGEOFF]
	ldr	w0, [x26]
	ldr	w2, [x20, #8]
	mov	x1, x21
	mov	w3, #1
	bl	__libelf_fsize
	mov	x23, x0
	ldr	w0, [x26]
	ldr	w2, [x20, #8]
	mov	x1, x21
	bl	__libelf_msize
	mov	x24, x0
	mov	x0, x20
	bl	__libelf_elfmachine
	mov	x25, x0
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	mov	x0, sp
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	stp	x22, x24, [sp]
	ldr	w8, [x26]
	ldp	w2, w9, [x20, #4]
	str	w9, [sp, #40]
	stp	w9, w8, [sp, #16]
	stp	x19, x23, [sp, #24]
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, x21
	mov	x4, x25
	bl	__libelf_xlate
	cmp	x0, #0
	csinv	w0, w23, wzr, ne
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_EXTENT_EHDR,8,3            ; @ELF_EXTENT_EHDR
	.comm	_ELF_T_EHDR,4,2                 ; @ELF_T_EHDR
	.comm	_ELF_TOFILE,4,2                 ; @ELF_TOFILE
	.no_dead_strip	__libelf_write_ehdr
.subsections_via_symbols
