	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_getehdr                   ## -- Begin function gelf_getehdr
	.p2align	4, 0x90
_gelf_getehdr:                          ## @gelf_getehdr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ELFCLASS64@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%ecx, %esi
	je	LBB0_6
## %bb.3:
	cmpl	%eax, %esi
	je	LBB0_6
LBB0_4:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_5:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	%ecx, %esi
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	%rax, %rbx
	movl	52(%r14), %edi
	movl	52(%rax), %esi
	movl	$4, %edx
	callq	_memcpy
	movl	48(%rbx), %eax
	movl	%eax, 48(%r14)
	movups	32(%rbx), %xmm0
	movups	%xmm0, 32(%r14)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 16(%r14)
	movups	(%rbx), %xmm0
	jmp	LBB0_11
LBB0_9:
	xorl	%edi, %edi
	cmpl	%eax, %esi
	sete	%dil
	callq	_assert
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	48(%rax), %rcx
	movq	%rcx, 48(%r14)
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	32(%rax), %xmm2
	movups	%xmm2, 32(%r14)
	movups	%xmm1, 16(%r14)
LBB0_11:
	movups	%xmm0, (%r14)
	jmp	LBB0_5
LBB0_13:
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gelf_getehdr                   ; -- Begin function gelf_getehdr
	.p2align	2
_gelf_getehdr:                          ; @gelf_getehdr
	.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_6
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	w1, [x0]
Lloh0:
	adrp	x8, _ELFCLASS32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ELFCLASS32@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x21, _ELFCLASS64@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ELFCLASS64@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w1, w9
	ccmp	w1, w8, #4, ne
	b.ne	LBB0_6
; %bb.3:
	cmp	w1, w9
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x20
	mov	w2, #0
	bl	__libelf_ehdr
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
	ldr	w0, [x19, #52]
	ldr	w1, [x20, #52]
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x20, #48]
	str	w8, [x19, #48]
	ldr	q0, [x20, #32]
	str	q0, [x19, #32]
	ldr	q0, [x20, #16]
	str	q0, [x19, #16]
	ldr	q0, [x20]
	b	LBB0_11
LBB0_6:
Lloh5:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
LBB0_7:
	mov	x19, #0
LBB0_8:
	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
LBB0_9:
	cmp	w1, w8
	cset	w0, eq
	bl	_assert
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #0
	bl	__libelf_ehdr
	cbz	x0, LBB0_7
; %bb.10:
	ldp	q0, q1, [x0]
	ldr	q2, [x0, #32]
	ldr	x8, [x0, #48]
	str	x8, [x19, #48]
	stp	q1, q2, [x19, #16]
LBB0_11:
	str	q0, [x19]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
.subsections_via_symbols
