	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_gnu_debuglink
_add_gnu_debuglink:                     ## @add_gnu_debuglink
	.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
	cmpq	$0, 16(%rdi)
	je	LBB0_24
## %bb.1:
	movq	%rdi, %r15
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_strdup
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_5:
	movq	16(%r15), %rdi
	leaq	-48(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movl	-48(%rbp), %r13d
	testl	%r13d, %r13d
	jne	LBB0_9
## %bb.8:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rdx
	leaq	L_.str.4(%rip), %rsi
	callq	_errx
LBB0_9:
	movl	%r13d, %edi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_11:
	movq	16(%r15), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_fopen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_13:
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_16
LBB0_15:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_16:
	movq	%rbx, %rdi
	callq	_fclose
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	$-1, %edx
	callq	_calc_crc32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_free
	movq	16(%r15), %rdi
	callq	_basename
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_18:
	movq	%r13, %rdi
	callq	_strlen
	leaq	1(%rax), %rdi
	movl	$4, %esi
	callq	_roundup
	movl	%eax, %r12d
	leal	4(%r12), %esi
	movl	%esi, (%r14)
	movl	$1, %edi
	callq	_calloc
	movq	%rax, %rbx
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	movq	8(%r14), %rbx
LBB0_20:
	movq	%r13, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	callq	_strncpy
	movq	(%r15), %rcx
	movq	_ELFDATA2LSB@GOTPCREL(%rip), %rdx
	movslq	%r12d, %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_22
## %bb.21:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movzbl	%bl, %edx
	movq	8(%r14), %rcx
	movl	%edx, (%rcx,%rax,4)
	movzbl	%bh, %edx
	movl	%edx, 4(%rcx,%rax,4)
	movl	%ebx, %edx
	shrl	$16, %edx
	movzbl	%dl, %edx
	movl	%edx, 8(%rcx,%rax,4)
	sarl	$24, %ebx
	jmp	LBB0_23
LBB0_22:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	sarl	$24, %edx
	movq	8(%r14), %rcx
	movl	%edx, (%rcx,%rax,4)
	movl	%ebx, %edx
	shrl	$16, %edx
	movzbl	%dl, %edx
	movl	%edx, 4(%rcx,%rax,4)
	movzbl	%bh, %edx
	movl	%edx, 8(%rcx,%rax,4)
	movzbl	%bl, %ebx
LBB0_23:
	movl	%ebx, 12(%rcx,%rax,4)
	leaq	12(%r15), %rdi
	movq	_sadd_list@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_STAILQ_INSERT_TAIL
	movq	_SEC_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r15)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc failed"

L_.str.1:                               ## @.str.1
	.asciz	".gnu_debuglink"

L_.str.2:                               ## @.str.2
	.asciz	"strdup failed"

L_.str.3:                               ## @.str.3
	.asciz	"stat failed"

L_.str.4:                               ## @.str.4
	.asciz	"empty debug link target %s"

L_.str.5:                               ## @.str.5
	.asciz	"r"

L_.str.6:                               ## @.str.6
	.asciz	"can not open %s"

L_.str.7:                               ## @.str.7
	.asciz	"fread failed"

L_.str.8:                               ## @.str.8
	.asciz	"basename failed"

	.comm	_ELFDATA2LSB,8,3                ## @ELFDATA2LSB
	.comm	_sadd_list,4,2                  ## @sadd_list
	.comm	_SEC_ADD,4,2                    ## @SEC_ADD
	.no_dead_strip	_add_gnu_debuglink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_gnu_debuglink
_add_gnu_debuglink:                     ; @add_gnu_debuglink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_22
; %bb.1:
	mov	x19, x0
	mov	w0, #24
	bl	_malloc
	mov	x20, x0
Lloh0:
	adrp	x25, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EXIT_FAILURE@GOTPAGEOFF]
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x25]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_3:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_strdup
	str	x0, [x20, #16]
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x25]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
LBB0_5:
	ldr	x0, [x19, #16]
	add	x1, sp, #8
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_23
; %bb.6:
	ldr	w21, [sp, #8]
	cbz	w21, LBB0_24
LBB0_7:
	mov	x0, x21
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x25]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_9:
	ldr	x0, [x19, #16]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fopen
	mov	x23, x0
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x25]
	ldr	x8, [x19, #16]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_err
LBB0_11:
	mov	x0, x22
	mov	w1, #1
	mov	x2, x21
	mov	x3, x23
	bl	_fread
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x23
	bl	_ferror
	cbz	x0, LBB0_14
LBB0_13:
	ldr	w0, [x25]
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_err
LBB0_14:
	mov	x0, x23
	bl	_fclose
	mov	x0, x22
	mov	x1, x21
	mov	w2, #-1
	bl	_calc_crc32
	mov	x21, x0
	mov	x0, x22
	bl	_free
	ldr	x0, [x19, #16]
	bl	_basename
	mov	x23, x0
	cbnz	x0, LBB0_16
; %bb.15:
	ldr	w0, [x25]
Lloh16:
	adrp	x1, l_.str.8@PAGE
Lloh17:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_err
LBB0_16:
	mov	x0, x23
	bl	_strlen
	add	x0, x0, #1
	mov	w1, #4
	bl	_roundup
	mov	x22, x0
	add	w1, w0, #4
	str	w1, [x20]
	mov	w0, #1
	bl	_calloc
	mov	x24, x0
	str	x0, [x20, #8]
	cbnz	x0, LBB0_18
; %bb.17:
	ldr	w0, [x25]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
	ldr	x24, [x20, #8]
LBB0_18:
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x24
	mov	x1, x23
	bl	_strncpy
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _ELFDATA2LSB@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ELFDATA2LSB@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
	and	w9, w21, #0xff
	ldr	x8, [x20, #8]
	add	x10, x8, w22, sxtw #2
	ubfx	w11, w21, #8, #8
	stp	w9, w11, [x10]
	ubfx	w9, w21, #16, #8
	str	w9, [x10, #8]
	asr	w9, w21, #24
	b	LBB0_21
LBB0_20:
	asr	w9, w21, #24
	ldr	x8, [x20, #8]
	add	x10, x8, w22, sxtw #2
	ubfx	w11, w21, #16, #8
	stp	w9, w11, [x10]
	ubfx	w9, w21, #8, #8
	str	w9, [x10, #8]
	and	w9, w21, #0xff
LBB0_21:
	add	x8, x8, w22, sxtw #2
	str	w9, [x8, #12]
	add	x0, x19, #12
Lloh23:
	adrp	x8, _sadd_list@GOTPAGE
Lloh24:
	ldr	x8, [x8, _sadd_list@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_STAILQ_INSERT_TAIL
Lloh26:
	adrp	x8, _SEC_ADD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SEC_ADD@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_23:
	ldr	w0, [x25]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
	ldr	w21, [sp, #8]
	cbnz	w21, LBB0_7
LBB0_24:
	ldr	w0, [x25]
	ldr	x2, [x19, #16]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_errx
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc failed"

l_.str.1:                               ; @.str.1
	.asciz	".gnu_debuglink"

l_.str.2:                               ; @.str.2
	.asciz	"strdup failed"

l_.str.3:                               ; @.str.3
	.asciz	"stat failed"

l_.str.4:                               ; @.str.4
	.asciz	"empty debug link target %s"

l_.str.5:                               ; @.str.5
	.asciz	"r"

l_.str.6:                               ; @.str.6
	.asciz	"can not open %s"

l_.str.7:                               ; @.str.7
	.asciz	"fread failed"

l_.str.8:                               ; @.str.8
	.asciz	"basename failed"

	.comm	_ELFDATA2LSB,8,3                ; @ELFDATA2LSB
	.comm	_sadd_list,4,2                  ; @sadd_list
	.comm	_SEC_ADD,4,2                    ; @SEC_ADD
	.no_dead_strip	_add_gnu_debuglink
.subsections_via_symbols
