	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_i2c_init                ## -- Begin function mantis_i2c_init
	.p2align	4, 0x90
_mantis_i2c_init:                       ## @mantis_i2c_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movq	16(%rdi), %r15
	addq	$8, %rdi
	callq	_init_waitqueue_head
	leaq	4(%rbx), %rdi
	callq	_mutex_init
	movl	60(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_adapdata
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_mantis_algo@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rbx)
	movq	$0, 40(%rbx)
	movabsq	$12884902388, %rax              ## imm = 0x3000001F4
	movq	%rax, 24(%rbx)
	movq	%r15, 32(%rbx)
	movq	%r14, %rdi
	callq	_i2c_add_adapter
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movq	_MANTIS_INT_STAT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_mmread
	movl	%eax, %r14d
	movq	_MANTIS_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mmread
	movl	(%r12), %esi
	movl	%r14d, %edi
	callq	_mmwrite
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movq	_MANTIS_INT_I2CDONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mantis_mask_ints
	xorl	%eax, %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mantis I2C"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_mantis_algo,4,2                ## @mantis_algo
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Initializing I2C .."

	.comm	_MANTIS_INT_STAT,4,2            ## @MANTIS_INT_STAT
	.comm	_MANTIS_INT_MASK,4,2            ## @MANTIS_INT_MASK
L_.str.2:                               ## @.str.2
	.asciz	"Disabling I2C interrupt"

	.comm	_MANTIS_INT_I2CDONE,4,2         ## @MANTIS_INT_I2CDONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mantis_i2c_init
lCPI0_0:
	.long	500                             ; 0x1f4
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mantis_i2c_init
	.p2align	2
_mantis_i2c_init:                       ; @mantis_i2c_init
	.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
	add	x20, x0, #24
	ldr	x21, [x0, #16]
	add	x0, x0, #8
	bl	_init_waitqueue_head
	add	x0, x19, #4
	bl	_mutex_init
	ldr	w0, [x19, #60]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_set_adapdata
Lloh2:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #56]
Lloh5:
	adrp	x8, _mantis_algo@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mantis_algo@GOTPAGEOFF]
	stp	xzr, x8, [x19, #40]
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #24]
	str	x21, [x19, #32]
	mov	x0, x20
	bl	_i2c_add_adapter
	str	w0, [x19]
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh9:
	adrp	x21, _MANTIS_DEBUG@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MANTIS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh13:
	adrp	x22, _MANTIS_INT_STAT@GOTPAGE
Lloh14:
	ldr	x22, [x22, _MANTIS_INT_STAT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_mmread
	mov	x20, x0
Lloh15:
	adrp	x8, _MANTIS_INT_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MANTIS_INT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_mmread
	ldr	w1, [x22]
	mov	x0, x20
	bl	_mmwrite
	ldr	w0, [x21]
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh20:
	adrp	x8, _MANTIS_INT_I2CDONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MANTIS_INT_I2CDONE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mantis_mask_ints
	mov	w0, #0
LBB0_2:
	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 AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mantis I2C"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_mantis_algo,4,2                ; @mantis_algo
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Initializing I2C .."

	.comm	_MANTIS_INT_STAT,4,2            ; @MANTIS_INT_STAT
	.comm	_MANTIS_INT_MASK,4,2            ; @MANTIS_INT_MASK
l_.str.2:                               ; @.str.2
	.asciz	"Disabling I2C interrupt"

	.comm	_MANTIS_INT_I2CDONE,4,2         ; @MANTIS_INT_I2CDONE
.subsections_via_symbols
