	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_phdr               ## -- Begin function gelf_update_phdr
	.p2align	4, 0x90
_gelf_update_phdr:                      ## @gelf_update_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.2:
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movl	%esi, %r12d
	movl	8(%r13), %r15d
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	movq	_ELFCLASS64@GOTPCREL(%rip), %rcx
	cmpl	(%rax), %r15d
	je	LBB0_5
## %bb.4:
	cmpl	(%rcx), %r15d
	jne	LBB0_6
LBB0_5:
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_elf_getphdrnum
	testq	%rax, %rax
	js	LBB0_6
## %bb.8:
	movq	16(%r13), %rax
	movq	_ELF_C_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	testl	%r12d, %r12d
	js	LBB0_6
## %bb.12:
	movl	%r12d, %ebx
	cmpq	%rbx, -48(%rbp)
	jae	LBB0_13
LBB0_6:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ELF_C_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ELF_F_DIRTY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_elf_flagphdr
	movq	_ELFCLASS64@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_15
## %bb.14:
	movq	32(%r13), %rax
	movq	(%r14), %rcx
	movq	%rcx, (%rax,%rbx,8)
	jmp	LBB0_16
LBB0_15:
	movq	24(%r13), %rax
	leaq	(%rax,%rbx,8), %r15
	movl	4(%r14), %ecx
	movl	%ecx, 4(%rax,%rbx,8)
	movl	(%r14), %ecx
	movl	%ecx, (%rax,%rbx,8)
	movq	_p_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_p_vaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_p_paddr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_p_filesz@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_p_memsz@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_p_align@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
LBB0_16:
	movl	$1, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_K_ELF,8,3                  ## @ELF_K_ELF
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.comm	_ELF_C_READ,8,3                 ## @ELF_C_READ
	.comm	_MODE,4,2                       ## @MODE
	.comm	_ELF_C_SET,4,2                  ## @ELF_C_SET
	.comm	_ELF_F_DIRTY,4,2                ## @ELF_F_DIRTY
	.comm	_p_offset,4,2                   ## @p_offset
	.comm	_p_vaddr,4,2                    ## @p_vaddr
	.comm	_p_paddr,4,2                    ## @p_paddr
	.comm	_p_filesz,4,2                   ## @p_filesz
	.comm	_p_memsz,4,2                    ## @p_memsz
	.comm	_p_align,4,2                    ## @p_align
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_phdr               ; -- Begin function gelf_update_phdr
	.p2align	2
_gelf_update_phdr:                      ; @gelf_update_phdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_10
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ELF_K_ELF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ELF_K_ELF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.3:
	ldr	w21, [x20, #8]
Lloh3:
	adrp	x8, _ELFCLASS32@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ELFCLASS32@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x23, _ELFCLASS64@GOTPAGE
Lloh7:
	ldr	x23, [x23, _ELFCLASS64@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w21, w8
	ccmp	w21, w9, #4, ne
	b.ne	LBB0_10
; %bb.4:
	mov	x22, x1
	add	x1, sp, #8
	mov	x0, x20
	bl	_elf_getphdrnum
	tbnz	x0, #63, LBB0_10
; %bb.5:
	ldr	x8, [x20, #16]
Lloh8:
	adrp	x9, _ELF_C_READ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ELF_C_READ@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	__libelf_ehdr
	cbz	x0, LBB0_12
; %bb.8:
	tbnz	w22, #31, LBB0_10
; %bb.9:
	mov	w22, w22
	ldr	x8, [sp, #8]
	cmp	x8, x22
	b.hs	LBB0_13
LBB0_10:
Lloh13:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
Lloh15:
	adrp	x8, _ELF_C_SET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ELF_C_SET@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _ELF_F_DIRTY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ELF_F_DIRTY@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_elf_flagphdr
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x20, #32]
	ldr	x9, [x19]
	str	x9, [x8, x22, lsl #3]
	b	LBB0_16
LBB0_15:
	ldr	x8, [x20, #24]
	add	x20, x8, x22, lsl #3
	ldr	d0, [x19]
	str	d0, [x20]
Lloh21:
	adrp	x8, _p_offset@GOTPAGE
Lloh22:
	ldr	x8, [x8, _p_offset@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh24:
	adrp	x8, _p_vaddr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _p_vaddr@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh27:
	adrp	x8, _p_paddr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _p_paddr@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh30:
	adrp	x8, _p_filesz@GOTPAGE
Lloh31:
	ldr	x8, [x8, _p_filesz@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh33:
	adrp	x8, _p_memsz@GOTPAGE
Lloh34:
	ldr	x8, [x8, _p_memsz@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh36:
	adrp	x8, _p_align@GOTPAGE
Lloh37:
	ldr	x8, [x8, _p_align@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
LBB0_16:
	mov	w0, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_K_ELF,8,3                  ; @ELF_K_ELF
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.comm	_ELF_C_READ,8,3                 ; @ELF_C_READ
	.comm	_MODE,4,2                       ; @MODE
	.comm	_ELF_C_SET,4,2                  ; @ELF_C_SET
	.comm	_ELF_F_DIRTY,4,2                ; @ELF_F_DIRTY
	.comm	_p_offset,4,2                   ; @p_offset
	.comm	_p_vaddr,4,2                    ; @p_vaddr
	.comm	_p_paddr,4,2                    ; @p_paddr
	.comm	_p_filesz,4,2                   ; @p_filesz
	.comm	_p_memsz,4,2                    ; @p_memsz
	.comm	_p_align,4,2                    ; @p_align
.subsections_via_symbols
