	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__libelf_setphnum               ## -- Begin function _libelf_setphnum
	.p2align	4, 0x90
__libelf_setphnum:                      ## @_libelf_setphnum
	.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
	movq	%rcx, %rbx
	movq	%rsi, %r14
	movq	_PN_XNUM@GOTPCREL(%rip), %r13
	cmpq	%rcx, (%r13)
	ja	LBB0_4
## %bb.1:
	movl	%edx, %r15d
	callq	__libelf_getscn0
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_SHN_UNDEF@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r15d, (%rax)
	sete	%cl
	movq	%rbx, 8(%r12,%rcx,8)
	movq	_ELF_C_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ELF_F_DIRTY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_elf_flagshdr
	movzwl	(%r13), %ebx
LBB0_4:
	movzwl	%bx, %eax
	movq	%rax, (%r14)
	movl	$1, %eax
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PN_XNUM,8,3                    ## @PN_XNUM
	.comm	_SHN_UNDEF,8,3                  ## @SHN_UNDEF
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELF_C_SET,4,2                  ## @ELF_C_SET
	.comm	_ELF_F_DIRTY,4,2                ## @ELF_F_DIRTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__libelf_setphnum               ; -- Begin function _libelf_setphnum
	.p2align	2
__libelf_setphnum:                      ; @_libelf_setphnum
	.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
	mov	x20, x3
	mov	x19, x1
Lloh0:
	adrp	x23, _PN_XNUM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PN_XNUM@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x3
	b.hi	LBB0_3
; %bb.1:
	mov	x21, x2
	bl	__libelf_getscn0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x22, x0
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _SHN_UNDEF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SHN_UNDEF@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
Lloh5:
	adrp	x8, _ELFCLASS32@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELFCLASS32@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w21
	mov	w8, #8
	mov	w9, #16
	csel	x8, x9, x8, eq
	str	x20, [x22, x8]
Lloh8:
	adrp	x8, _ELF_C_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ELF_C_SET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ELF_F_DIRTY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ELF_F_DIRTY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_elf_flagshdr
	ldrh	w20, [x23]
LBB0_3:
	and	x8, x20, #0xffff
	str	x8, [x19]
	mov	w0, #1
LBB0_4:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PN_XNUM,8,3                    ; @PN_XNUM
	.comm	_SHN_UNDEF,8,3                  ; @SHN_UNDEF
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELF_C_SET,4,2                  ; @ELF_C_SET
	.comm	_ELF_F_DIRTY,4,2                ; @ELF_F_DIRTY
.subsections_via_symbols
