	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psmouse_smbus_init             ## -- Begin function psmouse_smbus_init
	.p2align	4, 0x90
_psmouse_smbus_init:                    ## @psmouse_smbus_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, %r15d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	movq	%rbx, 24(%rax)
	movq	(%r13), %rax
	movq	%rax, 8(%r12)
	movl	%r15d, (%r12)
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_kmemdup
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_psmouse_deactivate
LBB0_7:
	movq	%r12, 40(%rbx)
	movq	_psmouse_smbus_process_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_psmouse_smbus_reconnect@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	%rax, 16(%rbx)
	movq	_psmouse_smbus_disconnect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	$0, (%rbx)
	movq	_psmouse_smbus_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	$4, %rbx
	movq	_psmouse_smbus_list@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_psmouse_smbus_create_companion@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_for_each_dev
	movl	%eax, %r15d
	xorl	%eax, %eax
	cmpq	$0, 16(%r12)
	jne	LBB0_12
## %bb.8:
	movq	8(%r12), %rdi
	callq	_kfree
	movq	$0, 8(%r12)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	testl	%r15d, %r15d
	jns	LBB0_11
LBB0_10:
	movq	_psmouse_smbus_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	callq	_kfree
LBB0_11:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r15d, %r15d
	cmovsl	%r15d, %eax
	jmp	LBB0_12
LBB0_4:
	movq	%r12, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_psmouse_smbus_process_byte,4,2 ## @psmouse_smbus_process_byte
	.comm	_psmouse_smbus_reconnect,8,3    ## @psmouse_smbus_reconnect
	.comm	_psmouse_smbus_disconnect,4,2   ## @psmouse_smbus_disconnect
	.comm	_psmouse_smbus_mutex,4,2        ## @psmouse_smbus_mutex
	.comm	_psmouse_smbus_list,4,2         ## @psmouse_smbus_list
	.comm	_psmouse_smbus_create_companion,4,2 ## @psmouse_smbus_create_companion
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psmouse_smbus_init             ; -- Begin function psmouse_smbus_init
	.p2align	2
_psmouse_smbus_init:                    ; @psmouse_smbus_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x21, x0
Lloh0:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	str	x21, [x0, #24]
	ldr	x8, [x25]
	str	x8, [x0, #8]
	str	w22, [x0]
	cbz	x24, LBB0_3
; %bb.2:
	ldr	w2, [x26]
	mov	x0, x24
	mov	x1, x23
	bl	_kmemdup
	str	x0, [x19, #8]
	cbz	x0, LBB0_11
LBB0_3:
	cbz	w22, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_psmouse_deactivate
LBB0_5:
	str	x19, [x21, #40]
Lloh2:
	adrp	x8, _psmouse_smbus_process_byte@GOTPAGE
Lloh3:
	ldr	x8, [x8, _psmouse_smbus_process_byte@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x21, #32]
Lloh5:
	adrp	x8, _psmouse_smbus_reconnect@GOTPAGE
Lloh6:
	ldr	x8, [x8, _psmouse_smbus_reconnect@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	stp	x8, x8, [x21, #16]
Lloh8:
	adrp	x8, _psmouse_smbus_disconnect@GOTPAGE
Lloh9:
	ldr	x8, [x8, _psmouse_smbus_disconnect@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	str	xzr, [x21]
Lloh11:
	adrp	x22, _psmouse_smbus_mutex@GOTPAGE
Lloh12:
	ldr	x22, [x22, _psmouse_smbus_mutex@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
	add	x21, x19, #4
Lloh13:
	adrp	x1, _psmouse_smbus_list@GOTPAGE
Lloh14:
	ldr	x1, [x1, _psmouse_smbus_list@GOTPAGEOFF]
	mov	x0, x21
	bl	_list_add_tail
	mov	x0, x22
	bl	_mutex_unlock
Lloh15:
	adrp	x8, _psmouse_smbus_create_companion@GOTPAGE
Lloh16:
	ldr	x8, [x8, _psmouse_smbus_create_companion@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_for_each_dev
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	cbz	w20, LBB0_9
; %bb.8:
	tbz	w22, #31, LBB0_10
LBB0_9:
Lloh18:
	adrp	x20, _psmouse_smbus_mutex@GOTPAGE
Lloh19:
	ldr	x20, [x20, _psmouse_smbus_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x21
	bl	_list_del
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_kfree
LBB0_10:
Lloh20:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w22, #0
	csneg	w0, w22, w8, lt
	b	LBB0_13
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_psmouse_smbus_process_byte,4,2 ; @psmouse_smbus_process_byte
	.comm	_psmouse_smbus_reconnect,8,3    ; @psmouse_smbus_reconnect
	.comm	_psmouse_smbus_disconnect,4,2   ; @psmouse_smbus_disconnect
	.comm	_psmouse_smbus_mutex,4,2        ; @psmouse_smbus_mutex
	.comm	_psmouse_smbus_list,4,2         ; @psmouse_smbus_list
	.comm	_psmouse_smbus_create_companion,4,2 ; @psmouse_smbus_create_companion
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
