	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WriteToSMBus
_WriteToSMBus:                          ## @WriteToSMBus
	.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	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	%edi, %r15d
	movq	_I2C_IO_BASE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_READ_PORT_USHORT
	testl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_1
## %bb.2:
	addl	%r15d, %r15d
	movl	%r14d, %ecx
	movzwl	%cx, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movzbl	%cl, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movzbl	%ch, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, %eax
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	shrl	$24, %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	$49, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	(%r12), %edi
	addl	$4, %edi
	movl	%r15d, %esi
	callq	_WRITE_PORT_UCHAR
	movl	(%r12), %edi
	addl	$8, %edi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_PORT_UCHAR
	cmpl	$2, %ebx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, %ebx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %edi
	addl	$9, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_PORT_UCHAR
	movl	(%r12), %edi
	addl	$9, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_PORT_UCHAR
	movl	(%r12), %edi
	addl	$9, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_PORT_UCHAR
	movl	(%r12), %edi
	addl	$9, %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_PORT_UCHAR
	movl	$29, %r13d
	movl	$4, %esi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$27, %r13d
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$26, %r13d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %edi
	addl	$6, %edi
	callq	_WRITE_PORT_USHORT
	movl	(%r12), %edi
	callq	_READ_PORT_USHORT
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_WRITE_PORT_USHORT
	movl	(%r12), %edi
	addl	$2, %edi
	movl	%r13d, %esi
	callq	_WRITE_PORT_UCHAR
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edi
	callq	_READ_PORT_UCHAR
	testb	$54, %al
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$16, %al
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_StallExecutionProcessor
	subl	$1, %r14d
	jae	LBB0_3
## %bb.13:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	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	_WriteToSMBus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WriteToSMBus
_WriteToSMBus:                          ; @WriteToSMBus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x27, _I2C_IO_BASE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _I2C_IO_BASE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	bl	_READ_PORT_USHORT
	tbnz	w0, #11, LBB0_1
; %bb.2:
	lsl	w21, w21, #1
	and	w9, w25, #0xffff
	and	w22, w25, #0xff
	ubfx	w8, w25, #8, #8
	stp	w8, w9, [sp, #8]                ; 8-byte Folded Spill
	ubfx	w24, w25, #16, #8
	mov	w8, #49
	lsr	w25, w25, #24
	mov	w28, #54
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x23, x8
	ldr	w8, [x27]
	add	w0, w8, #4
	mov	x1, x21
	bl	_WRITE_PORT_UCHAR
	ldr	w8, [x27]
	add	w0, w8, #8
	mov	x1, x20
	bl	_WRITE_PORT_UCHAR
	cmp	w19, #2
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w19, #4
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	add	w0, w8, #9
	mov	x1, x22
	bl	_WRITE_PORT_UCHAR
	ldr	w8, [x27]
	add	w0, w8, #9
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	_WRITE_PORT_UCHAR
	ldr	w8, [x27]
	add	w0, w8, #9
	mov	x1, x24
	bl	_WRITE_PORT_UCHAR
	ldr	w8, [x27]
	add	w0, w8, #9
	mov	x1, x25
	bl	_WRITE_PORT_UCHAR
	mov	w26, #29
	mov	w1, #4
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #27
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #26
	mov	x1, x22
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	add	w0, w8, #6
	bl	_WRITE_PORT_USHORT
	ldr	w0, [x27]
	bl	_READ_PORT_USHORT
	mov	x1, x0
	ldr	w0, [x27]
	bl	_WRITE_PORT_USHORT
	ldr	w8, [x27]
	add	w0, w8, #2
	mov	x1, x26
	bl	_WRITE_PORT_UCHAR
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x27]
	bl	_READ_PORT_UCHAR
	tst	w0, w28
	b.eq	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w0, #4, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_StallExecutionProcessor
	sub	w8, w23, #1
	cbnz	w23, LBB0_3
; %bb.12:
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh4:
	adrp	x8, _TRUE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	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	_WriteToSMBus
.subsections_via_symbols
