	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReadfromSMBus
_ReadfromSMBus:                         ## @ReadfromSMBus
	.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
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r12d
	movl	%edi, %r15d
	movq	_I2C_IO_BASE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	callq	_READ_PORT_USHORT
	testl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_1
## %bb.2:
	leal	(%r15,%r15), %r13d
	incl	%r13d
	xorl	%eax, %eax
	cmpl	$2, %ebx
	sete	%al
	orl	$10, %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmpl	$4, %ebx
	movl	$13, %ebx
	cmovnel	%eax, %ebx
	movl	$50, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	subl	$1, %r15d
	jb	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	addl	$4, %edi
	movl	%r13d, %esi
	callq	_WRITE_PORT_UCHAR
	movl	(%r14), %edi
	addl	$8, %edi
	movl	%r12d, %esi
	callq	_WRITE_PORT_UCHAR
	movq	(%r14), %rdi
	callq	_READ_PORT_USHORT
	movq	(%r14), %rdi
	movl	%eax, %esi
	callq	_WRITE_PORT_USHORT
	movl	(%r14), %edi
	addl	$2, %edi
	movl	%ebx, %esi
	callq	_WRITE_PORT_UCHAR
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edi
	callq	_READ_PORT_UCHAR
	testb	$54, %al
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$16, %al
	je	LBB0_3
## %bb.8:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$2, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$4, %eax
	jne	LBB0_12
## %bb.10:
	movl	(%r14), %edi
	addl	$6, %edi
	callq	_READ_PORT_UCHAR
	movl	(%r14), %edi
	addl	$9, %edi
	callq	_READ_PORT_UCHAR
	movl	(%r14), %edi
	addl	$9, %edi
	callq	_READ_PORT_UCHAR
	movl	(%r14), %edi
	addl	$9, %edi
	callq	_READ_PORT_UCHAR
	movl	(%r14), %edi
	addl	$9, %edi
	callq	_READ_PORT_UCHAR
	jmp	LBB0_13
LBB0_4:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	(%r14), %rdi
	addq	$6, %rdi
	callq	_READ_PORT_USHORT
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_13
LBB0_12:
	movl	(%r14), %edi
	addl	$6, %edi
	callq	_READ_PORT_UCHAR
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_13:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_IO_BASE,8,3                ## @I2C_IO_BASE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_ReadfromSMBus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReadfromSMBus
_ReadfromSMBus:                         ; @ReadfromSMBus
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x24, _I2C_IO_BASE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I2C_IO_BASE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	bl	_READ_PORT_USHORT
	tbnz	w0, #11, LBB0_1
; %bb.2:
	mov	w22, #1
	bfi	w22, w23, #1, #31
	cmp	w20, #2
	mov	w8, #10
	cinc	w8, w8, eq
	mov	w9, #13
	cmp	w20, #4
	csel	w23, w9, w8, eq
	mov	w26, #50
Lloh2:
	adrp	x25, _FALSE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _FALSE@GOTPAGEOFF]
	mov	w27, #54
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cbz	w26, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w26, w26, #1
	ldr	w8, [x24]
	add	w0, w8, #4
	mov	x1, x22
	bl	_WRITE_PORT_UCHAR
	ldr	w8, [x24]
	add	w0, w8, #8
	mov	x1, x21
	bl	_WRITE_PORT_UCHAR
	ldr	x0, [x24]
	bl	_READ_PORT_USHORT
	mov	x1, x0
	ldr	x0, [x24]
	bl	_WRITE_PORT_USHORT
	ldr	w8, [x24]
	add	w0, w8, #2
	mov	x1, x23
	bl	_WRITE_PORT_UCHAR
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24]
	bl	_READ_PORT_UCHAR
	tst	x0, x27
	b.eq	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	tbz	w0, #4, LBB0_3
; %bb.7:
	cmp	w20, #2
	b.eq	LBB0_10
; %bb.8:
	cmp	w20, #4
	b.ne	LBB0_11
; %bb.9:
	ldr	w8, [x24]
	add	w0, w8, #6
	bl	_READ_PORT_UCHAR
	ldr	w8, [x24]
	add	w0, w8, #9
	bl	_READ_PORT_UCHAR
	ldr	w8, [x24]
	add	w0, w8, #9
	bl	_READ_PORT_UCHAR
	ldr	w8, [x24]
	add	w0, w8, #9
	bl	_READ_PORT_UCHAR
	ldr	w8, [x24]
	add	w0, w8, #9
	bl	_READ_PORT_UCHAR
	b	LBB0_12
LBB0_10:
	ldr	x8, [x24]
	add	x0, x8, #6
	bl	_READ_PORT_USHORT
	str	w0, [x19]
	b	LBB0_12
LBB0_11:
	ldr	w8, [x24]
	add	w0, w8, #6
	bl	_READ_PORT_UCHAR
	str	w0, [x19]
LBB0_12:
Lloh4:
	adrp	x25, _TRUE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TRUE@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x25]
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_IO_BASE,8,3                ; @I2C_IO_BASE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_ReadfromSMBus
.subsections_via_symbols
