	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset                          ## -- Begin function reset
	.p2align	4, 0x90
_reset:                                 ## @reset
	.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
	movl	%edi, %r12d
	callq	_IS_VALID_CARD
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_ISDN_STAT_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movl	%r12d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_indicate_status
	movq	_sc_adapter@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	%r12d, %rbx
	movq	(%rax,%rbx,8), %rdi
	cmpq	$0, 48(%rdi)
	je	LBB0_4
## %bb.3:
	addq	$56, %rdi
	callq	_del_timer
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
LBB0_4:
	movq	$0, 48(%rdi)
	addq	$16, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$24, %rdi
	callq	_init_timer
	movq	_sc_check_reset@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	leaq	24(%rcx), %rdi
	movl	%eax, 40(%rcx)
	movl	%r12d, 24(%rcx)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_CHECKRESET_TIME@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rax), %rdx
	movq	%rdx, 32(%rcx)
	callq	_add_timer
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$16, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movq	8(%rax), %rax
	movq	_SFT_RESET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	$1, %edi
	callq	_outb
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_debug
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid param: %d is not a valid card id\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ISDN_STAT_STOP,4,2             ## @ISDN_STAT_STOP
	.comm	_sc_adapter,8,3                 ## @sc_adapter
	.comm	_sc_check_reset,4,2             ## @sc_check_reset
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CHECKRESET_TIME,8,3            ## @CHECKRESET_TIME
	.comm	_SFT_RESET,8,3                  ## @SFT_RESET
L_.str.1:                               ## @.str.1
	.asciz	"%s: Adapter Reset\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset                          ; -- Begin function reset
	.p2align	2
_reset:                                 ; @reset
	.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	_IS_VALID_CARD
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ISDN_STAT_STOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISDN_STAT_STOP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x3, #0
	bl	_indicate_status
Lloh3:
	adrp	x20, _sc_adapter@GOTPAGE
Lloh4:
	ldr	x20, [x20, _sc_adapter@GOTPAGEOFF]
	ldr	x8, [x20]
	sxtw	x21, w19
	ldr	x8, [x8, w19, sxtw #3]
	ldr	x9, [x8, #48]
	cbz	x9, LBB0_3
; %bb.2:
	add	x0, x8, #56
	bl	_del_timer
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
LBB0_3:
	str	xzr, [x8, #48]
	add	x0, x8, #16
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
	lsl	x21, x21, #3
	ldr	x8, [x8, x21]
	add	x0, x8, #24
	bl	_init_timer
Lloh5:
	adrp	x8, _sc_check_reset@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sc_check_reset@GOTPAGEOFF]
	ldr	x9, [x20]
	ldr	x0, [x9, x21]
Lloh7:
	ldr	w8, [x8]
	str	w19, [x0, #24]!
	str	w8, [x0, #16]
Lloh8:
	adrp	x8, _jiffies@GOTPAGE
Lloh9:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _CHECKRESET_TIME@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHECKRESET_TIME@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x0, #8]
	bl	_add_timer
	ldr	x8, [x20]
	ldr	x8, [x8, x21]
	add	x0, x8, #16
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20]
	ldr	x8, [x8, x21]
	ldr	x8, [x8, #8]
Lloh14:
	adrp	x9, _SFT_RESET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SFT_RESET@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	w0, #1
	bl	_outb
	ldr	x8, [x20]
	ldr	x8, [x8, x21]
	ldr	w1, [x8]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid param: %d is not a valid card id\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ISDN_STAT_STOP,4,2             ; @ISDN_STAT_STOP
	.comm	_sc_adapter,8,3                 ; @sc_adapter
	.comm	_sc_check_reset,4,2             ; @sc_check_reset
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CHECKRESET_TIME,8,3            ; @CHECKRESET_TIME
	.comm	_SFT_RESET,8,3                  ; @SFT_RESET
l_.str.1:                               ; @.str.1
	.asciz	"%s: Adapter Reset\n"

.subsections_via_symbols
