	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_shdr               ## -- Begin function gelf_update_shdr
	.p2align	4, 0x90
_gelf_update_shdr:                      ## @gelf_update_shdr
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	(%rax), %rcx
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.4:
	movl	8(%rax), %r15d
	movq	_ELFCLASS32@GOTPCREL(%rip), %rcx
	movq	_ELFCLASS64@GOTPCREL(%rip), %r12
	cmpl	(%rcx), %r15d
	je	LBB0_8
## %bb.5:
	cmpl	(%r12), %r15d
	je	LBB0_8
LBB0_6:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	16(%rax), %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:
	movq	_ELF_C_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ELF_F_DIRTY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_elf_flagscn
	cmpl	(%r12), %r15d
	jne	LBB0_12
## %bb.11:
	movups	(%r14), %xmm0
	movups	%xmm0, 16(%rbx)
	jmp	LBB0_13
LBB0_12:
	movl	12(%r14), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	_sh_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_sh_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_sh_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_sh_size@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movl	4(%r14), %eax
	movl	%eax, 4(%rbx)
	movl	(%r14), %eax
	movl	%eax, (%rbx)
	movq	_sh_addralign@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
	movq	_sh_entsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_U32
LBB0_13:
	movl	$1, %ebx
	jmp	LBB0_14
	.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	_sh_flags,4,2                   ## @sh_flags
	.comm	_sh_addr,4,2                    ## @sh_addr
	.comm	_sh_offset,4,2                  ## @sh_offset
	.comm	_sh_size,4,2                    ## @sh_size
	.comm	_sh_addralign,4,2               ## @sh_addralign
	.comm	_sh_entsize,4,2                 ## @sh_entsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_shdr               ; -- Begin function gelf_update_shdr
	.p2align	2
_gelf_update_shdr:                      ; @gelf_update_shdr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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_7
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_7
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _ELF_K_ELF@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ELF_K_ELF@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.4:
	ldr	w21, [x8, #8]
Lloh3:
	adrp	x9, _ELFCLASS32@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ELFCLASS32@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x22, _ELFCLASS64@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ELFCLASS64@GOTPAGEOFF]
	ldr	w10, [x22]
	cmp	w21, w9
	ccmp	w21, w10, #4, ne
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x8, #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_10
; %bb.6:
Lloh11:
	adrp	x8, _MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
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_flagscn
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_12
; %bb.11:
	ldr	q0, [x19]
	str	q0, [x20, #16]
	b	LBB0_13
LBB0_12:
	ldr	d0, [x19, #8]
	str	d0, [x20, #8]
Lloh21:
	adrp	x8, _sh_flags@GOTPAGE
Lloh22:
	ldr	x8, [x8, _sh_flags@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh24:
	adrp	x8, _sh_addr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sh_addr@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh27:
	adrp	x8, _sh_offset@GOTPAGE
Lloh28:
	ldr	x8, [x8, _sh_offset@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh30:
	adrp	x8, _sh_size@GOTPAGE
Lloh31:
	ldr	x8, [x8, _sh_size@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
	ldr	d0, [x19]
	str	d0, [x20]
Lloh33:
	adrp	x8, _sh_addralign@GOTPAGE
Lloh34:
	ldr	x8, [x8, _sh_addralign@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh36:
	adrp	x8, _sh_entsize@GOTPAGE
Lloh37:
	ldr	x8, [x8, _sh_entsize@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
LBB0_13:
	mov	w0, #1
	b	LBB0_9
	.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	_sh_flags,4,2                   ; @sh_flags
	.comm	_sh_addr,4,2                    ; @sh_addr
	.comm	_sh_offset,4,2                  ; @sh_offset
	.comm	_sh_size,4,2                    ; @sh_size
	.comm	_sh_addralign,4,2               ; @sh_addralign
	.comm	_sh_entsize,4,2                 ; @sh_entsize
.subsections_via_symbols
