	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_ehdr               ## -- Begin function gelf_update_ehdr
	.p2align	4, 0x90
_gelf_update_ehdr:                      ## @gelf_update_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
	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:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movl	8(%rbx), %r12d
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	movq	_ELFCLASS64@GOTPCREL(%rip), %rcx
	cmpl	(%rax), %r12d
	je	LBB0_7
## %bb.4:
	cmpl	(%rcx), %r12d
	je	LBB0_7
LBB0_5:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	16(%rbx), %rax
	movq	_ELF_C_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%rax, %r14
	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_flagehdr
	movq	_ELFCLASS64@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_12
## %bb.11:
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	28(%r15), %xmm2
	movups	%xmm2, 28(%r14)
	movups	%xmm1, 16(%r14)
	jmp	LBB0_13
LBB0_12:
	movl	40(%r14), %edi
	movl	40(%r15), %esi
	movl	$4, %edx
	callq	_memcpy
	movl	36(%r15), %eax
	movl	%eax, 36(%r14)
	movl	32(%r15), %eax
	movl	%eax, 32(%r14)
	movl	28(%r15), %eax
	movl	%eax, 28(%r14)
	movq	_e_entry@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_LIBELF_COPY_U32
	movq	_e_phoff@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_LIBELF_COPY_U32
	movq	_e_shoff@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_LIBELF_COPY_U32
	movl	24(%r15), %eax
	movl	%eax, 24(%r14)
	movl	20(%r15), %eax
	movl	%eax, 20(%r14)
	movl	16(%r15), %eax
	movl	%eax, 16(%r14)
	movups	(%r15), %xmm0
LBB0_13:
	movups	%xmm0, (%r14)
	movl	$1, %r13d
	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	_e_entry,4,2                    ## @e_entry
	.comm	_e_phoff,4,2                    ## @e_phoff
	.comm	_e_shoff,4,2                    ## @e_shoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_update_ehdr               ; -- Begin function gelf_update_ehdr
	.p2align	2
_gelf_update_ehdr:                      ; @gelf_update_ehdr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x21, 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_6
; %bb.3:
	ldr	w22, [x21, #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	w22, w8
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x21, #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_9
; %bb.5:
Lloh11:
	adrp	x8, _MODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	w0, #0
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	bl	__libelf_ehdr
	cbz	x0, LBB0_8
; %bb.10:
	mov	x20, x0
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, x21
	bl	_elf_flagehdr
	ldr	w8, [x23]
	cmp	w22, w8
	b.ne	LBB0_12
; %bb.11:
	ldp	q0, q1, [x19]
	ldur	q2, [x19, #28]
	stur	q2, [x20, #28]
	str	q1, [x20, #16]
	b	LBB0_13
LBB0_12:
	ldr	w0, [x20, #40]
	ldr	w1, [x19, #40]
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x19, #36]
	str	w8, [x20, #36]
	ldur	d0, [x19, #28]
	stur	d0, [x20, #28]
Lloh21:
	adrp	x8, _e_entry@GOTPAGE
Lloh22:
	ldr	x8, [x8, _e_entry@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh24:
	adrp	x8, _e_phoff@GOTPAGE
Lloh25:
	ldr	x8, [x8, _e_phoff@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
Lloh27:
	adrp	x8, _e_shoff@GOTPAGE
Lloh28:
	ldr	x8, [x8, _e_shoff@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_LIBELF_COPY_U32
	ldr	w8, [x19, #24]
	str	w8, [x20, #24]
	ldr	d0, [x19, #16]
	str	d0, [x20, #16]
	ldr	q0, [x19]
LBB0_13:
	str	q0, [x20]
	mov	w0, #1
	b	LBB0_8
	.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	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	_e_entry,4,2                    ; @e_entry
	.comm	_e_phoff,4,2                    ; @e_phoff
	.comm	_e_shoff,4,2                    ; @e_shoff
.subsections_via_symbols
