	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipwireless_tty_create          ## -- Begin function ipwireless_tty_create
	.p2align	4, 0x90
_ipwireless_tty_create:                 ## @ipwireless_tty_create
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IPWIRELESS_PCMCIA_MINOR_RANGE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r10
	movq	%rdi, %r12
	movq	_IPWIRELESS_PCMCIA_MINORS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_ttys@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testl	%ecx, %ecx
	movl	$0, %ebx
	cmovgl	%ecx, %ebx
	xorl	%esi, %esi
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%rsi, %rdi
	cmpq	%rbx, %rsi
	je	LBB0_7
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, (%rdx,%rdi,8)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	addq	%rax, %rdi
	cmpq	%rcx, %rdi
	jl	LBB0_3
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	cmpq	%rax, %rsi
	jne	LBB0_2
	jmp	LBB0_13
LBB0_6:
	movl	%esi, %ebx
LBB0_7:
	movq	_IPW_CHANNEL_DIALLER@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	_IPW_CHANNEL_RAS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_TTYTYPE_MODEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movq	%r10, %rcx
	movq	%r10, -48(%rbp)                 ## 8-byte Spill
	callq	_add_tty
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movq	%r14, %rax
	movl	(%r15), %r14d
	addl	%ebx, %r14d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movl	(%r13), %r8d
	movq	%rax, %r13
	movq	_TTYTYPE_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$-1, %r9d
	callq	_add_tty
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:
	xorl	%r13d, %r13d
LBB0_13:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	addl	(%r15), %r14d
	movq	_IPW_CHANNEL_RAS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_TTYTYPE_RAS_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$-1, %r9d
	callq	_add_tty
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	$0, 8(%rax)
	movq	_ttys@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %r13
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IPWIRELESS_PCMCIA_MINOR_RANGE,4,2 ## @IPWIRELESS_PCMCIA_MINOR_RANGE
	.comm	_IPWIRELESS_PCMCIA_MINORS,4,2   ## @IPWIRELESS_PCMCIA_MINORS
	.comm	_ttys,8,3                       ## @ttys
	.comm	_IPW_CHANNEL_DIALLER,4,2        ## @IPW_CHANNEL_DIALLER
	.comm	_IPW_CHANNEL_RAS,4,2            ## @IPW_CHANNEL_RAS
	.comm	_TTYTYPE_MODEM,4,2              ## @TTYTYPE_MODEM
	.comm	_TTYTYPE_MONITOR,4,2            ## @TTYTYPE_MONITOR
	.comm	_TTYTYPE_RAS_RAW,4,2            ## @TTYTYPE_RAS_RAW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipwireless_tty_create          ; -- Begin function ipwireless_tty_create
	.p2align	2
_ipwireless_tty_create:                 ; @ipwireless_tty_create
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x26, _IPWIRELESS_PCMCIA_MINOR_RANGE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IPWIRELESS_PCMCIA_MINOR_RANGE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x9, #0
Lloh2:
	adrp	x10, _IPWIRELESS_PCMCIA_MINORS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IPWIRELESS_PCMCIA_MINORS@GOTPAGEOFF]
Lloh4:
	ldrsw	x10, [x10]
Lloh5:
	adrp	x25, _ttys@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ttys@GOTPAGEOFF]
	ldr	x11, [x25]
	cmp	w10, #0
	csel	w22, w10, wzr, gt
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x12, x9
	cmp	x9, x22
	b.eq	LBB0_7
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x11, x12, lsl #3]
	cbnz	x13, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x12, x12, x8
	cmp	x12, x10
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x9, x8
	b.ne	LBB0_2
	b	LBB0_9
LBB0_6:
	mov	x22, x9
LBB0_7:
Lloh7:
	adrp	x28, _IPW_CHANNEL_DIALLER@GOTPAGE
Lloh8:
	ldr	x28, [x28, _IPW_CHANNEL_DIALLER@GOTPAGEOFF]
	ldr	w4, [x28]
Lloh9:
	adrp	x27, _IPW_CHANNEL_RAS@GOTPAGE
Lloh10:
	ldr	x27, [x27, _IPW_CHANNEL_RAS@GOTPAGEOFF]
	ldr	w5, [x27]
Lloh11:
	adrp	x8, _TTYTYPE_MODEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TTYTYPE_MODEM@GOTPAGEOFF]
Lloh13:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_add_tty
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w8, [x26]
	add	w24, w8, w22
	add	x23, x19, #8
	ldr	w4, [x28]
Lloh14:
	adrp	x8, _TTYTYPE_MONITOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TTYTYPE_MONITOR@GOTPAGEOFF]
Lloh16:
	ldr	w6, [x8]
	mov	x0, x23
	mov	x1, x24
	mov	x2, x21
	mov	x3, x20
	mov	w5, #-1
	bl	_add_tty
	cbz	x0, LBB0_11
LBB0_9:
	mov	x0, #0
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w8, [x26]
	add	w1, w8, w24
	ldr	w4, [x27]
Lloh17:
	adrp	x8, _TTYTYPE_RAS_RAW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TTYTYPE_RAS_RAW@GOTPAGEOFF]
Lloh19:
	ldr	w6, [x8]
	mov	x2, x21
	mov	x3, x20
	mov	w5, #-1
	bl	_add_tty
	mov	x8, x0
	mov	x0, #0
	cbnz	x8, LBB0_10
; %bb.12:
	stp	x23, xzr, [x19]
	ldr	x8, [x25]
	ldr	x0, [x8, w22, uxtw #3]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IPWIRELESS_PCMCIA_MINOR_RANGE,4,2 ; @IPWIRELESS_PCMCIA_MINOR_RANGE
	.comm	_IPWIRELESS_PCMCIA_MINORS,4,2   ; @IPWIRELESS_PCMCIA_MINORS
	.comm	_ttys,8,3                       ; @ttys
	.comm	_IPW_CHANNEL_DIALLER,4,2        ; @IPW_CHANNEL_DIALLER
	.comm	_IPW_CHANNEL_RAS,4,2            ; @IPW_CHANNEL_RAS
	.comm	_TTYTYPE_MODEM,4,2              ; @TTYTYPE_MODEM
	.comm	_TTYTYPE_MONITOR,4,2            ; @TTYTYPE_MONITOR
	.comm	_TTYTYPE_RAS_RAW,4,2            ; @TTYTYPE_RAS_RAW
.subsections_via_symbols
