	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function devpts_setattr_num
_devpts_setattr_num:                    ## @devpts_setattr_num
	.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
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	_attr_size@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_1:
	movq	__EROFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_4:
	movq	%rdx, %r14
	movl	%edi, %ebx
	movq	_ttys_lock@GOTPCREL(%rip), %rdi
	callq	_lock
	movq	_pty_slave@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	movq	%r15, %rdi
	callq	_lock
	cmpl	$130, %r12d
	je	LBB0_8
## %bb.5:
	cmpl	$129, %r12d
	je	LBB0_9
## %bb.6:
	cmpl	$128, %r12d
	jne	LBB0_10
## %bb.7:
	shrq	$32, %r14
	movl	%r14d, 12(%r15)
	jmp	LBB0_10
LBB0_8:
	movl	%r14d, 8(%r15)
	jmp	LBB0_10
LBB0_9:
	shrq	$32, %r12
	movl	%r12d, 4(%r15)
LBB0_10:
	movq	%r15, %rdi
	callq	_unlock
	movq	_ttys_lock@GOTPCREL(%rip), %rdi
	callq	_unlock
	xorl	%eax, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__EROFS,4,2                     ## @_EROFS
	.comm	_attr_size,4,2                  ## @attr_size
	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_ttys_lock,4,2                  ## @ttys_lock
	.comm	_pty_slave,8,3                  ## @pty_slave
	.no_dead_strip	_devpts_setattr_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function devpts_setattr_num
_devpts_setattr_num:                    ; @devpts_setattr_num
	.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
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _attr_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _attr_size@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, __EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_3:
Lloh6:
	adrp	x8, __EROFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, __EROFS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_4:
	mov	x19, x2
	mov	x21, x0
Lloh9:
	adrp	x0, _ttys_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _ttys_lock@GOTPAGEOFF]
	bl	_lock
Lloh11:
	adrp	x8, _pty_slave@GOTPAGE
Lloh12:
	ldr	x8, [x8, _pty_slave@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x21, [x8, w21, sxtw #3]
	cmp	x21, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x21
	bl	_lock
	cmp	w20, #130
	b.eq	LBB0_8
; %bb.5:
	cmp	w20, #129
	b.eq	LBB0_9
; %bb.6:
	cmp	w20, #128
	b.ne	LBB0_10
; %bb.7:
	lsr	x8, x19, #32
	str	w8, [x21, #12]
	b	LBB0_10
LBB0_8:
	str	w19, [x21, #8]
	b	LBB0_10
LBB0_9:
	lsr	x8, x20, #32
	str	w8, [x21, #4]
LBB0_10:
	mov	x0, x21
	bl	_unlock
Lloh14:
	adrp	x0, _ttys_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ttys_lock@GOTPAGEOFF]
	bl	_unlock
	mov	w0, #0
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	__EROFS,4,2                     ; @_EROFS
	.comm	_attr_size,4,2                  ; @attr_size
	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_ttys_lock,4,2                  ; @ttys_lock
	.comm	_pty_slave,8,3                  ; @pty_slave
	.no_dead_strip	_devpts_setattr_num
.subsections_via_symbols
