	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_update                     ## -- Begin function elf_update
	.p2align	4, 0x90
_elf_update:                            ## @elf_update
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	%rsi, %r14
	movq	_ELF_C_NULL@GOTPCREL(%rip), %r12
	movq	_ELF_C_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rsi, (%r12)
	je	LBB0_6
## %bb.3:
	cmpq	%r14, %rax
	je	LBB0_6
LBB0_4:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
	movq	$-1, %rbx
LBB0_20:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%r15), %ecx
	movq	_ELFCLASS32@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.7:
	movq	_ELFCLASS64@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.8:
	movq	_CLASS@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movq	16(%r15), %rcx
	movq	_EV_NONE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.10:
	movq	_EV_CURRENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%r15)
LBB0_11:
	cmpq	%r14, %rax
	jne	LBB0_14
## %bb.12:
	movq	24(%r15), %rax
	movq	_ELF_C_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movq	_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_14:
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_SLIST_INIT
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	__libelf_resync_elf
	movq	%rax, %rbx
	testq	%rax, %rax
	js	LBB0_19
## %bb.15:
	cmpq	%r14, (%r12)
	je	LBB0_19
## %bb.16:
	cmpq	$0, 32(%r15)
	js	LBB0_17
## %bb.18:
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	__libelf_write_elf
	movq	%rax, %rbx
	jmp	LBB0_19
LBB0_17:
	movq	_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
	movq	$-1, %rbx
LBB0_19:
	leaq	-40(%rbp), %rdi
	callq	__libelf_release_extents
	movq	_LIBELF_F_SHDRS_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 40(%r15)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_K_ELF,8,3                  ## @ELF_K_ELF
	.comm	_ELF_C_NULL,8,3                 ## @ELF_C_NULL
	.comm	_ELF_C_WRITE,8,3                ## @ELF_C_WRITE
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
	.comm	_CLASS,4,2                      ## @CLASS
	.comm	_EV_NONE,8,3                    ## @EV_NONE
	.comm	_EV_CURRENT,8,3                 ## @EV_CURRENT
	.comm	_ELF_C_READ,8,3                 ## @ELF_C_READ
	.comm	_MODE,4,2                       ## @MODE
	.comm	_SEQUENCE,4,2                   ## @SEQUENCE
	.comm	_LIBELF_F_SHDRS_LOADED,4,2      ## @LIBELF_F_SHDRS_LOADED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_update                     ; -- Begin function elf_update
	.p2align	2
_elf_update:                            ; @elf_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, 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_9
; %bb.2:
	mov	x20, x1
Lloh3:
	adrp	x22, _ELF_C_NULL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ELF_C_NULL@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh5:
	adrp	x8, _ELF_C_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELF_C_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x9, x1
	ccmp	x8, x1, #4, ne
	b.ne	LBB0_9
; %bb.3:
	ldr	w9, [x19, #8]
Lloh8:
	adrp	x10, _ELFCLASS32@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ELFCLASS32@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _ELFCLASS64@GOTPAGE
Lloh12:
	ldr	x11, [x11, _ELFCLASS64@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_12
; %bb.4:
	ldr	x9, [x19, #16]
Lloh14:
	adrp	x10, _EV_NONE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _EV_NONE@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x9, _EV_CURRENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EV_CURRENT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	str	x9, [x19, #16]
LBB0_6:
	cmp	x8, x20
	b.ne	LBB0_13
; %bb.7:
	ldr	x8, [x19, #24]
Lloh20:
	adrp	x9, _ELF_C_READ@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ELF_C_READ@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:
Lloh23:
	adrp	x8, _MODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MODE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh25:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	x21, #-1
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
Lloh27:
	adrp	x8, _CLASS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CLASS@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
	add	x0, sp, #8
	bl	_SLIST_INIT
	add	x1, sp, #8
	mov	x0, x19
	bl	__libelf_resync_elf
	mov	x21, x0
	tbnz	x0, #63, LBB0_18
; %bb.14:
	ldr	x8, [x22]
	cmp	x8, x20
	b.eq	LBB0_18
; %bb.15:
	ldr	x8, [x19, #32]
	tbnz	x8, #63, LBB0_17
; %bb.16:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	__libelf_write_elf
	mov	x21, x0
	b	LBB0_18
LBB0_17:
Lloh29:
	adrp	x8, _SEQUENCE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SEQUENCE@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	x21, #-1
LBB0_18:
	add	x0, sp, #8
	bl	__libelf_release_extents
Lloh32:
	adrp	x8, _LIBELF_F_SHDRS_LOADED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LIBELF_F_SHDRS_LOADED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	bic	w8, w9, w8
	str	w8, [x19, #40]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_K_ELF,8,3                  ; @ELF_K_ELF
	.comm	_ELF_C_NULL,8,3                 ; @ELF_C_NULL
	.comm	_ELF_C_WRITE,8,3                ; @ELF_C_WRITE
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
	.comm	_CLASS,4,2                      ; @CLASS
	.comm	_EV_NONE,8,3                    ; @EV_NONE
	.comm	_EV_CURRENT,8,3                 ; @EV_CURRENT
	.comm	_ELF_C_READ,8,3                 ; @ELF_C_READ
	.comm	_MODE,4,2                       ; @MODE
	.comm	_SEQUENCE,4,2                   ; @SEQUENCE
	.comm	_LIBELF_F_SHDRS_LOADED,4,2      ; @LIBELF_F_SHDRS_LOADED
.subsections_via_symbols
