	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_rela               ## -- Begin function gelf_update_rela
	.p2align	4, 0x90
_gelf_update_rela:                      ## @gelf_update_rela
	.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_5
## %bb.1:
	movl	%esi, %r15d
	testl	%esi, %esi
	js	LBB0_5
## %bb.2:
	movq	%rdx, %r12
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.3:
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.7:
	movl	(%rdx), %r13d
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	sete	%al
	movq	_ELFCLASS64@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	sete	%cl
	orb	%al, %cl
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movzbl	%cl, %edi
	callq	_assert
	xorl	%eax, %eax
	movq	_ELFCLASS32@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	sete	%al
	movl	(%rbx,%rax,4), %edi
	callq	__libelf_xlate_shtype
	movq	_ELF_T_RELA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.8:
	movq	%r12, %rbx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %edx
	movq	%rax, %rdi
	movl	%r13d, %esi
	callq	__libelf_msize
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movl	$1, %edi
	callq	_assert
	movl	%r15d, %r15d
	imulq	%r15, %r12
	cmpq	(%r14), %r12
	jae	LBB0_5
## %bb.9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%r14), %r14
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_14
## %bb.10:
	leaq	(%r14,%r15,4), %r15
	movq	_r_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %r14
	movq	%rbx, %rsi
	callq	_LIBELF_COPY_U32
	movl	(%rbx), %edi
	callq	_ELF64_R_SYM
	movq	%rax, %rbx
	movq	$-1, %rdi
	callq	_ELF32_R_SYM
	cmpq	%rax, %rbx
	jg	LBB0_12
## %bb.11:
	movl	(%r14), %edi
	callq	_ELF64_R_TYPE
	movq	%rax, %rbx
	movl	$-1, %edi
	callq	_ELF32_R_TYPE
	cmpq	%rax, %rbx
	jle	LBB0_13
LBB0_12:
	movq	_RANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rbx, %r12
	movl	(%rbx), %eax
	movl	%eax, (%r14,%r15,4)
	callq	__libelf_is_mips64el
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	(%r12), %edi
	callq	__libelf_mips64el_r_info_tof
	movl	%eax, (%r14,%r15,4)
	jmp	LBB0_16
LBB0_13:
	movl	(%r14), %edi
	callq	_ELF64_R_SYM
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_ELF64_R_TYPE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ELF32_R_INFO
	movl	%eax, (%r15)
	movq	_r_addend@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_LIBELF_COPY_S32
	movl	$1, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
	.comm	_ELF_T_RELA,8,3                 ## @ELF_T_RELA
	.comm	_r_offset,4,2                   ## @r_offset
	.comm	_RANGE,4,2                      ## @RANGE
	.comm	_r_addend,4,2                   ## @r_addend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_rela               ; -- Begin function gelf_update_rela
	.p2align	2
_gelf_update_rela:                      ; @gelf_update_rela
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_11
; %bb.1:
	mov	x22, x1
	tbnz	w1, #31, LBB0_11
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_11
; %bb.3:
	mov	x20, x0
	ldr	x24, [x0, #16]
	cbz	x24, LBB0_11
; %bb.4:
	ldr	x21, [x24, #8]
	cbz	x21, LBB0_11
; %bb.5:
	ldr	w23, [x21]
Lloh0:
	adrp	x25, _ELFCLASS32@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ELFCLASS32@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w23, w8
Lloh2:
	adrp	x8, _ELFCLASS64@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ELFCLASS64@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ccmp	w23, w8, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	w8, [x25]
	cmp	w23, w8
	cset	w8, eq
	ldr	w0, [x24, w8, uxtw #2]
	bl	__libelf_xlate_shtype
Lloh5:
	adrp	x8, _ELF_T_RELA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELF_T_RELA@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.6:
	ldr	w2, [x21, #4]
	mov	x1, x23
	bl	__libelf_msize
	mov	x24, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	w0, #1
	bl	_assert
	mov	w22, w22
	mul	x8, x24, x22
	ldr	x9, [x20]
	cmp	x8, x9
	b.hs	LBB0_11
; %bb.7:
	ldr	w8, [x25]
	ldr	x20, [x20, #8]
	cmp	w23, w8
	b.ne	LBB0_14
; %bb.8:
	add	x20, x20, x22, lsl #2
Lloh8:
	adrp	x8, _r_offset@GOTPAGE
Lloh9:
	ldr	x8, [x8, _r_offset@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
	ldr	w0, [x19]
	bl	_ELF64_R_SYM
	mov	x21, x0
	mov	x0, #-1
	bl	_ELF32_R_SYM
	cmp	x21, x0
	b.gt	LBB0_10
; %bb.9:
	ldr	w0, [x19]
	bl	_ELF64_R_TYPE
	mov	x21, x0
	mov	w0, #-1
	bl	_ELF32_R_TYPE
	cmp	x21, x0
	b.le	LBB0_16
LBB0_10:
Lloh11:
	adrp	x8, _RANGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RANGE@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh13:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	w0, #0
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	w8, [x19]
	str	w8, [x20, x22, lsl #2]
	mov	x0, x21
	bl	__libelf_is_mips64el
	cbz	x0, LBB0_17
; %bb.15:
	ldr	w0, [x19]
	bl	__libelf_mips64el_r_info_tof
	str	w0, [x20, x22, lsl #2]
	b	LBB0_17
LBB0_16:
	ldr	w0, [x19]
	bl	_ELF64_R_SYM
	mov	x21, x0
	ldr	w0, [x19]
	bl	_ELF64_R_TYPE
	mov	x1, x0
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ELF32_R_INFO
	str	w0, [x20]
Lloh15:
	adrp	x8, _r_addend@GOTPAGE
Lloh16:
	ldr	x8, [x8, _r_addend@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_S32
LBB0_17:
	mov	w0, #1
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
	.comm	_ELF_T_RELA,8,3                 ; @ELF_T_RELA
	.comm	_r_offset,4,2                   ; @r_offset
	.comm	_RANGE,4,2                      ; @RANGE
	.comm	_r_addend,4,2                   ; @r_addend
.subsections_via_symbols
