	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_device
_reset_device:                          ## @reset_device
	.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
	movq	%rdi, %rbx
	movq	_CHA@GOTPCREL(%rip), %r14
	movq	_CCR0@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	movl	$128, %edx
	callq	_write_reg
	movq	_CHB@GOTPCREL(%rip), %r15
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_write_reg
	movq	_MODE@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_irq_disable
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_irq_disable
	movq	%rbx, %rdi
	movl	$255, %esi
	callq	_port_irq_disable
	movq	_PCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$6, %edx
	callq	_write_reg
	movq	_IPC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$5, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_reg                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHA,8,3                        ## @CHA
	.comm	_CCR0,8,3                       ## @CCR0
	.comm	_CHB,8,3                        ## @CHB
	.comm	_MODE,8,3                       ## @MODE
	.comm	_PCR,8,3                        ## @PCR
	.comm	_IPC,8,3                        ## @IPC
	.no_dead_strip	_reset_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_device
_reset_device:                          ; @reset_device
	.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
Lloh0:
	adrp	x20, _CHA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CHA@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _CCR0@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CCR0@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w2, #128
	bl	_write_reg
Lloh4:
	adrp	x22, _CHB@GOTPAGE
Lloh5:
	ldr	x22, [x22, _CHB@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #128
	bl	_write_reg
	ldr	x8, [x20]
Lloh6:
	adrp	x21, _MODE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MODE@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
	ldr	x8, [x22]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #65535
	bl	_irq_disable
	ldr	x1, [x22]
	mov	x0, x19
	mov	w2, #65535
	bl	_irq_disable
	mov	x0, x19
	mov	w1, #255
	bl	_port_irq_disable
Lloh8:
	adrp	x8, _PCR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCR@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #6
	bl	_write_reg
Lloh11:
	adrp	x8, _IPC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IPC@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #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
	b	_write_reg
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CHA,8,3                        ; @CHA
	.comm	_CCR0,8,3                       ; @CCR0
	.comm	_CHB,8,3                        ; @CHB
	.comm	_MODE,8,3                       ; @MODE
	.comm	_PCR,8,3                        ; @PCR
	.comm	_IPC,8,3                        ; @IPC
	.no_dead_strip	_reset_device
.subsections_via_symbols
