	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_shdr                      ## -- Begin function copy_shdr
	.p2align	4, 0x90
_copy_shdr:                             ## @copy_shdr
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	60(%rsi), %edi
	leaq	-144(%rbp), %rsi
	callq	_gelf_getshdr
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movq	%r14, %r15
	movl	(%rax), %r14d
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%r15, %r14
	movl	%eax, %edx
	callq	_errx
LBB0_2:
	movl	32(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_gelf_getshdr
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	testl	%r13d, %r13d
	je	LBB0_6
LBB0_5:
	leaq	-96(%rbp), %rdi
	leaq	-144(%rbp), %rsi
	movl	$48, %edx
	callq	_memcpy
LBB0_23:
	testq	%r12, %r12
	je	LBB0_24
## %bb.25:
	movq	%r14, %rdi
	movq	%r12, %rsi
	jmp	LBB0_26
LBB0_3:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movq	%r14, %r15
	movl	(%rax), %r14d
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%r15, %r14
	movl	%eax, %edx
	callq	_errx
	testl	%r13d, %r13d
	jne	LBB0_5
LBB0_6:
	movq	(%rbx), %rax
	movq	%rax, -96(%rbp)
	movl	56(%rbx), %ecx
	movl	%ecx, -56(%rbp)
	movl	52(%rbx), %ecx
	movl	%ecx, -60(%rbp)
	movq	8(%rbx), %rsi
	movq	%rsi, -88(%rbp)
	movq	-116(%rbp), %rcx
	movq	%rcx, -68(%rbp)
	movl	48(%rbx), %ecx
	movl	%ecx, -72(%rbp)
	movl	-124(%rbp), %ecx
	movl	%ecx, -76(%rbp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	testl	%edi, %edi
	je	LBB0_20
## %bb.7:
	movl	$0, -80(%rbp)
	movq	_SF_ALLOC@GOTPCREL(%rip), %rcx
	testl	%edi, (%rcx)
	je	LBB0_8
## %bb.9:
	movq	_SHF_ALLOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -80(%rbp)
	jmp	LBB0_10
LBB0_24:
	movq	24(%rbx), %rsi
	movq	%r14, %rdi
LBB0_26:
	callq	_add_to_shstrtab
	movl	32(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_gelf_update_shdr
	testl	%eax, %eax
	jne	LBB0_28
## %bb.27:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_errx
LBB0_28:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	-128(%rbp), %eax
	movl	%eax, -80(%rbp)
	movq	-144(%rbp), %rcx
	movq	_SHT_REL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_22
## %bb.21:
	movq	_SHT_RELA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_23
LBB0_22:
	movq	_SHF_INFO_LINK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -80(%rbp)
	jmp	LBB0_23
LBB0_8:
	xorl	%ecx, %ecx
LBB0_10:
	movq	_SF_READONLY@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	jne	LBB0_12
## %bb.11:
	movq	_SHF_WRITE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, -80(%rbp)
LBB0_12:
	movq	_SF_CODE@GOTPCREL(%rip), %rdx
	testl	%edi, (%rdx)
	je	LBB0_14
## %bb.13:
	movq	_SHF_EXECINSTR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, -80(%rbp)
LBB0_14:
	movq	_SF_CONTENTS@GOTPCREL(%rip), %rcx
	testl	%edi, (%rcx)
	je	LBB0_23
## %bb.15:
	movq	_SHT_NOBITS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.16:
	testq	%rsi, %rsi
	jle	LBB0_23
## %bb.17:
	movq	_SHT_PROGBITS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%rax, -96(%rbp)
	movl	$1, %edi
	callq	_calloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_19:
	movl	$1, 16(%rbx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gelf_getshdr() failed: %s"

	.comm	_SF_ALLOC,4,2                   ## @SF_ALLOC
	.comm	_SHF_ALLOC,4,2                  ## @SHF_ALLOC
	.comm	_SF_READONLY,4,2                ## @SF_READONLY
	.comm	_SHF_WRITE,4,2                  ## @SHF_WRITE
	.comm	_SF_CODE,4,2                    ## @SF_CODE
	.comm	_SHF_EXECINSTR,4,2              ## @SHF_EXECINSTR
	.comm	_SF_CONTENTS,4,2                ## @SF_CONTENTS
	.comm	_SHT_NOBITS,8,3                 ## @SHT_NOBITS
	.comm	_SHT_PROGBITS,8,3               ## @SHT_PROGBITS
L_.str.1:                               ## @.str.1
	.asciz	"malloc failed"

	.comm	_SHT_REL,8,3                    ## @SHT_REL
	.comm	_SHT_RELA,8,3                   ## @SHT_RELA
	.comm	_SHF_INFO_LINK,4,2              ## @SHF_INFO_LINK
L_.str.2:                               ## @.str.2
	.asciz	"elf_update_shdr failed: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_shdr                      ; -- Begin function copy_shdr
	.p2align	2
_copy_shdr:                             ; @copy_shdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x22, x4
	mov	x23, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #60]
	add	x1, sp, #48
	bl	_gelf_getshdr
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_errx
LBB0_2:
	ldr	w0, [x19, #32]
	mov	x1, sp
	bl	_gelf_getshdr
	cbz	x0, LBB0_7
; %bb.3:
	cbz	w23, LBB0_8
LBB0_4:
	mov	x0, sp
	add	x1, sp, #48
	mov	w2, #48
	bl	_memcpy
LBB0_5:
	cbz	x21, LBB0_11
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	b	LBB0_12
LBB0_7:
Lloh5:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_errx
	cbnz	w23, LBB0_4
LBB0_8:
	ldur	d0, [x19, #52]
	stur	d0, [sp, #36]
	ldp	x8, x1, [x19]
	stp	x8, x1, [sp]
	ldur	d0, [sp, #76]
	stur	d0, [sp, #28]
	ldr	w9, [x19, #48]
	ldr	w10, [sp, #68]
	stp	w10, w9, [sp, #20]
	cbz	w22, LBB0_15
; %bb.9:
	str	wzr, [sp, #16]
Lloh10:
	adrp	x9, _SF_ALLOC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SF_ALLOC@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w22
	b.eq	LBB0_18
; %bb.10:
Lloh13:
	adrp	x9, _SHF_ALLOC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SHF_ALLOC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [sp, #16]
	b	LBB0_19
LBB0_11:
	ldr	x1, [x19, #24]
	mov	x0, x20
LBB0_12:
	bl	_add_to_shstrtab
	ldr	w0, [x19, #32]
	mov	x1, sp
	bl	_gelf_update_shdr
	cbnz	w0, LBB0_14
; %bb.13:
Lloh16:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh18:
	ldr	w19, [x8]
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_errx
LBB0_14:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_15:
	ldr	w8, [sp, #64]
	str	w8, [sp, #16]
	ldr	x9, [sp, #48]
Lloh21:
	adrp	x10, _SHT_REL@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SHT_REL@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_17
; %bb.16:
Lloh24:
	adrp	x10, _SHT_RELA@GOTPAGE
Lloh25:
	ldr	x10, [x10, _SHT_RELA@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
LBB0_17:
Lloh27:
	adrp	x9, _SHF_INFO_LINK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SHF_INFO_LINK@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #16]
	b	LBB0_5
LBB0_18:
	mov	w9, #0
LBB0_19:
Lloh30:
	adrp	x10, _SF_READONLY@GOTPAGE
Lloh31:
	ldr	x10, [x10, _SF_READONLY@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	tst	w10, w22
	b.ne	LBB0_21
; %bb.20:
Lloh33:
	adrp	x10, _SHF_WRITE@GOTPAGE
Lloh34:
	ldr	x10, [x10, _SHF_WRITE@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [sp, #16]
LBB0_21:
Lloh36:
	adrp	x10, _SF_CODE@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SF_CODE@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_23
; %bb.22:
Lloh39:
	adrp	x10, _SHF_EXECINSTR@GOTPAGE
Lloh40:
	ldr	x10, [x10, _SHF_EXECINSTR@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [sp, #16]
LBB0_23:
Lloh42:
	adrp	x9, _SF_CONTENTS@GOTPAGE
Lloh43:
	ldr	x9, [x9, _SF_CONTENTS@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w22
	b.eq	LBB0_5
; %bb.24:
Lloh45:
	adrp	x9, _SHT_NOBITS@GOTPAGE
Lloh46:
	ldr	x9, [x9, _SHT_NOBITS@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.25:
	cmp	x1, #1
	b.lt	LBB0_5
; %bb.26:
Lloh48:
	adrp	x8, _SHT_PROGBITS@GOTPAGE
Lloh49:
	ldr	x8, [x8, _SHT_PROGBITS@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	str	x8, [x19]
	str	x8, [sp]
	mov	w22, #1
	mov	w0, #1
	bl	_calloc
	str	x0, [x19, #40]
	cbnz	x0, LBB0_28
; %bb.27:
Lloh51:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh52:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
Lloh54:
	adrp	x1, l_.str.1@PAGE
Lloh55:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_28:
	str	w22, [x19, #16]
	b	LBB0_5
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gelf_getshdr() failed: %s"

	.comm	_SF_ALLOC,4,2                   ; @SF_ALLOC
	.comm	_SHF_ALLOC,4,2                  ; @SHF_ALLOC
	.comm	_SF_READONLY,4,2                ; @SF_READONLY
	.comm	_SHF_WRITE,4,2                  ; @SHF_WRITE
	.comm	_SF_CODE,4,2                    ; @SF_CODE
	.comm	_SHF_EXECINSTR,4,2              ; @SHF_EXECINSTR
	.comm	_SF_CONTENTS,4,2                ; @SF_CONTENTS
	.comm	_SHT_NOBITS,8,3                 ; @SHT_NOBITS
	.comm	_SHT_PROGBITS,8,3               ; @SHT_PROGBITS
l_.str.1:                               ; @.str.1
	.asciz	"malloc failed"

	.comm	_SHT_REL,8,3                    ; @SHT_REL
	.comm	_SHT_RELA,8,3                   ; @SHT_RELA
	.comm	_SHF_INFO_LINK,4,2              ; @SHF_INFO_LINK
l_.str.2:                               ; @.str.2
	.asciz	"elf_update_shdr failed: %s"

.subsections_via_symbols
