	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_getshdr                   ## -- Begin function gelf_getshdr
	.p2align	4, 0x90
_gelf_getshdr:                          ## @gelf_getshdr
	.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	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_ELFCLASSNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	__libelf_getshdr
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	(%r15), %rax
	movl	(%rax), %r15d
	movq	_ELFCLASS32@GOTPCREL(%rip), %r12
	cmpl	(%r12), %r15d
	sete	%al
	movq	_ELFCLASS64@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	cmpl	(%r12), %r15d
	jne	LBB0_6
## %bb.5:
	movl	60(%r14), %eax
	movl	%eax, 60(%rbx)
	movl	56(%r14), %eax
	movl	%eax, 56(%rbx)
	movq	48(%r14), %rax
	movq	%rax, 48(%rbx)
	movups	32(%r14), %xmm0
	movups	%xmm0, 32(%rbx)
	movq	24(%r14), %rax
	movq	%rax, 24(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 16(%rbx)
	movups	(%r14), %xmm0
	jmp	LBB0_7
LBB0_1:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movups	32(%r14), %xmm2
	movups	48(%r14), %xmm3
	movups	%xmm3, 48(%rbx)
	movups	%xmm2, 32(%rbx)
	movups	%xmm1, 16(%rbx)
LBB0_7:
	movups	%xmm0, (%rbx)
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.comm	_ELFCLASSNONE,4,2               ## @ELFCLASSNONE
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_getshdr                   ; -- Begin function gelf_getshdr
	.p2align	2
_gelf_getshdr:                          ; @gelf_getshdr
	.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
	mov	x19, x1
	cbz	x1, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _ELFCLASSNONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ELFCLASSNONE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	__libelf_getshdr
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w21, [x8]
Lloh3:
	adrp	x22, _ELFCLASS32@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ELFCLASS32@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w21, w8
Lloh5:
	adrp	x8, _ELFCLASS64@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELFCLASS64@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ccmp	w21, w8, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_6
; %bb.3:
	ldr	d0, [x20, #56]
	str	d0, [x19, #56]
	ldr	x8, [x20, #48]
	str	x8, [x19, #48]
	ldr	q0, [x20, #32]
	str	q0, [x19, #32]
	ldr	x8, [x20, #24]
	str	x8, [x19, #24]
	ldr	d0, [x20, #16]
	str	d0, [x19, #16]
	ldp	x9, x8, [x20]
	stp	x9, x8, [x19]
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_LIBELF_SET_ERROR
	b	LBB0_7
LBB0_5:
	mov	x19, #0
	b	LBB0_7
LBB0_6:
	ldp	q0, q1, [x20]
	ldp	q2, q3, [x20, #32]
	stp	q2, q3, [x19, #32]
	stp	q0, q1, [x19]
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.comm	_ELFCLASSNONE,4,2               ; @ELFCLASSNONE
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
.subsections_via_symbols
