	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpty                        ## -- Begin function openpty
	.p2align	4, 0x90
_openpty:                               ## @openpty
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_strlen
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_strlen
	movl	%ebx, -184(%rbp)                ## 4-byte Spill
	imull	%ebx, %eax
	movl	$-1, %r14d
	movl	%eax, -180(%rbp)                ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	movq	%r15, -208(%rbp)                ## 8-byte Spill
	leaq	-112(%rbp), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %eax
	cltd
	idivl	-184(%rbp)                      ## 4-byte Folded Reload
                                        ## kill: def $edx killed $edx def $rdx
	cltq
	movq	%r13, %r14
	leaq	L_.str(%rip), %rcx
	movsbl	(%rax,%rcx), %r13d
	leaq	L_.str.1(%rip), %rax
	movsbl	(%rdx,%rax), %ebx
	movq	%r12, %rdi
	movl	$64, %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	leaq	-176(%rbp), %rdi
	movl	$64, %esi
	leaq	L_.str.3(%rip), %rdx
	movl	%r13d, %ecx
	movq	%r14, %r13
	movq	_O_RDWR@GOTPCREL(%rip), %r14
	movl	%ebx, %r8d
	movq	_O_NOCTTY@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	callq	_snprintf
	movl	(%rbx), %esi
	orl	(%r14), %esi
	movq	%r12, %rdi
	callq	_open
	movl	%eax, (%r13)
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%r15b, %ebx
	movq	%r12, %rdi
	movl	$64, %esi
	leaq	L_.str.4(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_snprintf
	leaq	-176(%rbp), %rdi
	movl	$64, %esi
	leaq	L_.str.5(%rip), %rdx
	movl	%ebx, %ecx
	movq	_O_NOCTTY@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	callq	_snprintf
	movl	(%rbx), %esi
	orl	(%r14), %esi
	movq	%r12, %rdi
	callq	_open
	movl	%eax, (%r13)
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	%r15d, -180(%rbp)               ## 4-byte Folded Reload
	jne	LBB0_2
	jmp	LBB0_10
LBB0_6:
	movl	(%rbx), %esi
	orl	(%r14), %esi
	leaq	-176(%rbp), %rdi
	callq	_open
	movq	-208(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r13), %edi
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.7:
	leaq	-200(%rbp), %rsi
	callq	_tcgetattr
	xorl	%r14d, %r14d
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.8:
	movq	_ECHO@GOTPCREL(%rip), %rax
	movq	_ISIG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ICANON@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, -200(%rbp)
	movq	_OPOST@GOTPCREL(%rip), %rax
	movq	_ONLCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, -196(%rbp)
	movq	_ICRNL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -192(%rbp)
	movl	(%r13), %edi
	movq	_TCSANOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-200(%rbp), %rdx
	callq	_tcsetattr
	jmp	LBB0_11
LBB0_9:
	callq	_close
LBB0_10:
	movl	$-1, %r14d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r14d, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ"

L_.str.1:                               ## @.str.1
	.asciz	"0123456789abcdef"

L_.str.2:                               ## @.str.2
	.asciz	"/dev/pty%c%c"

L_.str.3:                               ## @.str.3
	.asciz	"/dev/tty%c%c"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_NOCTTY,4,2                   ## @O_NOCTTY
L_.str.4:                               ## @.str.4
	.asciz	"/dev/ptyp%d"

L_.str.5:                               ## @.str.5
	.asciz	"/dev/ttyp%d"

	.comm	_ECHO,4,2                       ## @ECHO
	.comm	_ISIG,4,2                       ## @ISIG
	.comm	_ICANON,4,2                     ## @ICANON
	.comm	_OPOST,4,2                      ## @OPOST
	.comm	_ONLCR,4,2                      ## @ONLCR
	.comm	_ICRNL,4,2                      ## @ICRNL
	.comm	_TCSANOW,4,2                    ## @TCSANOW
	.comm	_I_PUSH,4,2                     ## @I_PUSH
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_SIG_DFL,4,2                    ## @SIG_DFL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpty                        ; -- Begin function openpty
	.p2align	2
_openpty:                               ; @openpty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_strlen
	mov	x22, x0
Lloh5:
	adrp	x23, l_.str@PAGE
Lloh6:
	add	x23, x23, l_.str@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mul	w20, w0, w22
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.1:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	w24, #0
Lloh7:
	adrp	x21, _O_RDWR@GOTPAGE
Lloh8:
	ldr	x21, [x21, _O_RDWR@GOTPAGEOFF]
Lloh9:
	adrp	x25, _O_NOCTTY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _O_NOCTTY@GOTPAGEOFF]
Lloh11:
	adrp	x27, l_.str.5@PAGE
Lloh12:
	add	x27, x27, l_.str.5@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w8, w24, w22
	ldrsb	w28, [x23, w8, sxtw]
	msub	w8, w22, w8, w24
Lloh13:
	adrp	x9, l_.str.1@PAGE
Lloh14:
	add	x9, x9, l_.str.1@PAGEOFF
	ldrsb	x26, [x9, w8, uxtw]
	str	x26, [sp]
	add	x0, sp, #96
	mov	w1, #64
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x28
	bl	_snprintf
	str	x26, [sp]
	add	x0, sp, #32
	mov	w1, #64
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x28
	bl	_snprintf
	ldr	w8, [x21]
	ldr	w9, [x25]
	orr	w1, w9, w8
	add	x0, sp, #96
	bl	_open
	str	w0, [x19]
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtb	w28, w24
	add	x0, sp, #96
	mov	w1, #64
Lloh19:
	adrp	x2, l_.str.4@PAGE
Lloh20:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x3, x28
	bl	_snprintf
	add	x0, sp, #32
	mov	w1, #64
	mov	x2, x27
	mov	x3, x28
	bl	_snprintf
	ldr	w8, [x21]
	ldr	w9, [x25]
	orr	w1, w9, w8
	add	x0, sp, #96
	bl	_open
	str	w0, [x19]
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #1
	cmp	w20, w24
	b.ne	LBB0_2
	b	LBB0_10
LBB0_5:
	ldr	w8, [x21]
	ldr	w9, [x25]
	orr	w1, w9, w8
	add	x0, sp, #32
	bl	_open
	mov	x8, x0
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w0, [x9]
	ldr	w0, [x19]
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.6:
	add	x1, sp, #16
	bl	_tcgetattr
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _ECHO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ECHO@GOTPAGEOFF]
Lloh23:
	adrp	x9, _ISIG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ISIG@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _ICANON@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ICANON@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldp	w9, w10, [sp, #16]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _OPOST@GOTPAGE
Lloh31:
	ldr	x9, [x9, _OPOST@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x11, _ONLCR@GOTPAGE
Lloh34:
	ldr	x11, [x11, _ONLCR@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
	orr	w9, w11, w9
	orr	w9, w9, w10
	stp	w8, w9, [sp, #16]
Lloh36:
	adrp	x8, _ICRNL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ICRNL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	orr	w8, w9, w8
	str	w8, [sp, #24]
	ldr	w0, [x19]
Lloh39:
	adrp	x8, _TCSANOW@GOTPAGE
Lloh40:
	ldr	x8, [x8, _TCSANOW@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_tcsetattr
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	bl	_close
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldur	x8, [x29, #-96]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ"

l_.str.1:                               ; @.str.1
	.asciz	"0123456789abcdef"

l_.str.2:                               ; @.str.2
	.asciz	"/dev/pty%c%c"

l_.str.3:                               ; @.str.3
	.asciz	"/dev/tty%c%c"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_NOCTTY,4,2                   ; @O_NOCTTY
l_.str.4:                               ; @.str.4
	.asciz	"/dev/ptyp%d"

l_.str.5:                               ; @.str.5
	.asciz	"/dev/ttyp%d"

	.comm	_ECHO,4,2                       ; @ECHO
	.comm	_ISIG,4,2                       ; @ISIG
	.comm	_ICANON,4,2                     ; @ICANON
	.comm	_OPOST,4,2                      ; @OPOST
	.comm	_ONLCR,4,2                      ; @ONLCR
	.comm	_ICRNL,4,2                      ; @ICRNL
	.comm	_TCSANOW,4,2                    ; @TCSANOW
	.comm	_I_PUSH,4,2                     ; @I_PUSH
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_SIG_DFL,4,2                    ; @SIG_DFL
.subsections_via_symbols
