	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcgetattr                      ## -- Begin function tcgetattr
	.p2align	4, 0x90
_tcgetattr:                             ## @tcgetattr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rdx
	movq	_TCGETA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ioctl
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.3:
	negl	%eax
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ecx
LBB0_5:
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_TCGETA,4,2                     ## @TCGETA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcgetattr                      ; -- Begin function tcgetattr
	.p2align	2
_tcgetattr:                             ; @tcgetattr
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cbz	x1, LBB0_3
; %bb.1:
	mov	x2, x1
Lloh0:
	adrp	x8, _TCGETA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCGETA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ioctl
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_5
LBB0_4:
	neg	w8, w0
LBB0_5:
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_TCGETA,4,2                     ; @TCGETA
.subsections_via_symbols
