	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_buildid_dir                ## -- Begin function set_buildid_dir
	.p2align	4, 0x90
_set_buildid_dir:                       ## @set_buildid_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_buildid_dir@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movb	$0, (%rax)
	xorl	%eax, %eax
	callq	_check_buildid_dir_config
	movq	(%r14), %rbx
	cmpb	$0, (%rbx)
	jne	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%esi
	movq	_DEBUG_CACHE_DIR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rcx
	callq	_snprintf
	jmp	LBB0_4
LBB0_3:
	movq	_DEBUG_CACHE_DIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	decl	%edx
	movq	%rbx, %rdi
	callq	_strncpy
LBB0_4:
	movq	(%r14), %rax
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movb	$0, -1(%rcx,%rax)
	movq	(%r14), %rbx
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_setenv                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_buildid_dir,8,3                ## @buildid_dir
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HOME"

	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
L_.str.1:                               ## @.str.1
	.asciz	"%s/%s"

	.comm	_DEBUG_CACHE_DIR,8,3            ## @DEBUG_CACHE_DIR
L_.str.2:                               ## @.str.2
	.asciz	"PERF_BUILDID_DIR"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_buildid_dir                ; -- Begin function set_buildid_dir
	.p2align	2
_set_buildid_dir:                       ; @set_buildid_dir
	.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
Lloh0:
	adrp	x20, _buildid_dir@GOTPAGE
Lloh1:
	ldr	x20, [x20, _buildid_dir@GOTPAGEOFF]
	ldr	x8, [x20]
	strb	wzr, [x8]
	bl	_check_buildid_dir_config
	ldr	x19, [x20]
	ldrb	w8, [x19]
	cbnz	w8, LBB0_5
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
Lloh4:
	adrp	x21, _MAXPATHLEN@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MAXPATHLEN@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x3, x0
	ldr	w8, [x21]
	sub	w1, w8, #1
Lloh6:
	adrp	x8, _DEBUG_CACHE_DIR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEBUG_CACHE_DIR@GOTPAGEOFF]
Lloh8:
	ldr	x4, [x8]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _DEBUG_CACHE_DIR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEBUG_CACHE_DIR@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	ldr	w8, [x21]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_strncpy
LBB0_4:
	ldr	x8, [x20]
	ldrsw	x9, [x21]
	add	x8, x9, x8
	sturb	wzr, [x8, #-1]
	ldr	x19, [x20]
LBB0_5:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	w2, #1
	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
	b	_setenv
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_buildid_dir,8,3                ; @buildid_dir
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HOME"

	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
l_.str.1:                               ; @.str.1
	.asciz	"%s/%s"

	.comm	_DEBUG_CACHE_DIR,8,3            ; @DEBUG_CACHE_DIR
l_.str.2:                               ; @.str.2
	.asciz	"PERF_BUILDID_DIR"

.subsections_via_symbols
