	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_write_feat
_do_write_feat:                         ## @do_write_feat
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r13
	movl	%edi, %ebx
	movq	%rsi, %rdi
	movl	%edx, %esi
	callq	_perf_header__has_feat
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_feat_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %r14
	movl	$-1, %r12d
	cmpq	$0, (%rax,%r14,8)
	je	LBB0_6
## %bb.2:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_lseek
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	_feat_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %edi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	*(%rax,%r14,8)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_lseek
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rcx
	subq	(%rcx), %rax
	movq	%rax, 8(%rcx)
	addq	$16, (%rdx)
LBB0_5:
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_debug
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_lseek
LBB0_6:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_feat_ops,8,3                   ## @feat_ops
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write feature %d\n"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_do_write_feat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_write_feat
_do_write_feat:                         ; @do_write_feat
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x4
	mov	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, x2
	bl	_perf_header__has_feat
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x25, _feat_ops@GOTPAGE
Lloh1:
	ldr	x25, [x25, _feat_ops@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x8, [x8, w21, sxtw #3]
	cbz	x8, LBB0_5
; %bb.2:
	sxtw	x26, w21
Lloh2:
	adrp	x24, _SEEK_CUR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SEEK_CUR@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, #0
	bl	_lseek
	ldr	x8, [x19]
	str	x0, [x8]
	ldr	x8, [x25]
	ldr	x8, [x8, x26, lsl #3]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	blr	x8
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, #0
	bl	_lseek
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	ldr	x10, [x9]
	sub	x8, x8, x10
	str	x8, [x9, #8]
	ldr	x8, [x19]
	add	x8, x8, #16
	str	x8, [x19]
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
	ldr	x8, [x19]
	ldr	x1, [x8]
Lloh6:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_lseek
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_feat_ops,8,3                   ; @feat_ops
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write feature %d\n"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_do_write_feat
.subsections_via_symbols
