	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc44s803_readreg
_mc44s803_readreg:                      ## @mc44s803_readreg
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, -80(%rbp)
	movl	$3, -72(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_MC44S803_REG_DATAREG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MC44S803_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MC44S803_REG_SM
	movl	%eax, %ebx
	movq	_MC44S803_D@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_MC44S803_REG_SM
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_mc44s803_writereg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	(%r12), %edi
	leaq	-80(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.3:
	movl	-52(%rbp), %eax
	movl	-48(%rbp), %ecx
	shll	$16, %eax
	shll	$8, %ecx
	orl	%eax, %ecx
	orl	-44(%rbp), %ecx
	movl	%ecx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_mc_printk
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_MC44S803_REG_DATAREG,4,2       ## @MC44S803_REG_DATAREG
	.comm	_MC44S803_ADDR,4,2              ## @MC44S803_ADDR
	.comm	_MC44S803_D,4,2                 ## @MC44S803_D
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C read failed\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_mc44s803_readreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc44s803_readreg
_mc44s803_readreg:                      ; @mc44s803_readreg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x8, sp, #28
	str	x8, [sp]
	mov	w8, #3
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh6:
	adrp	x8, _MC44S803_REG_DATAREG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MC44S803_REG_DATAREG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _MC44S803_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MC44S803_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_MC44S803_REG_SM
	mov	x22, x0
Lloh12:
	adrp	x8, _MC44S803_D@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MC44S803_D@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_MC44S803_REG_SM
	orr	w1, w0, w22
	mov	x0, x20
	bl	_mc44s803_writereg
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x20]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	ldp	w8, w9, [sp, #28]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	ldr	w9, [sp, #36]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_4
LBB0_3:
Lloh15:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_mc_printk
Lloh20:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldr	x8, [sp, #40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_MC44S803_REG_DATAREG,4,2       ; @MC44S803_REG_DATAREG
	.comm	_MC44S803_ADDR,4,2              ; @MC44S803_ADDR
	.comm	_MC44S803_D,4,2                 ; @MC44S803_D
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C read failed\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_mc44s803_readreg
.subsections_via_symbols
