	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tgetenv                        ## -- Begin function tgetenv
	.p2align	4, 0x90
_tgetenv:                               ## @tgetenv
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_Strlen
	movq	%rax, %r12
	movq	_STR_environ@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdi
	addq	$8, %rbx
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_Strlen
	cmpq	%r12, %rax
	jb	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	cmpb	$61, (%rax,%r12)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	$0, (%rax,%r12)
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	_StrQcmp
	movq	(%rbx), %rcx
	movb	$61, (%rcx,%r12)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	(%rbx), %rax
	leaq	(%r12,%rax), %r14
	incq	%r14
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STR_environ,8,3                ## @STR_environ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tgetenv                        ; -- Begin function tgetenv
	.p2align	2
_tgetenv:                               ; @tgetenv
	.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
	mov	x19, x0
	bl	_Strlen
Lloh0:
	adrp	x8, _STR_environ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STR_environ@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	cbz	x21, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x0, [x21]
	cbz	x0, LBB0_9
; %bb.2:
	mov	w22, #61
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x21, #8]!
	cbz	x0, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_Strlen
	cmp	x0, x20
	b.lo	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldrb	w9, [x8, x20]
	cmp	w9, #61
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	wzr, [x8, x20]
	ldr	x0, [x21]
	mov	x1, x19
	bl	_StrQcmp
	ldr	x8, [x21]
	strb	w22, [x8, x20]
	cbnz	w0, LBB0_3
; %bb.7:
	ldr	x8, [x21]
	add	x8, x20, x8
	add	x0, x8, #1
	b	LBB0_9
LBB0_8:
	mov	x0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STR_environ,8,3                ; @STR_environ
.subsections_via_symbols
