	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smu_queue_i2c                  ## -- Begin function smu_queue_i2c
	.p2align	4, 0x90
_smu_queue_i2c:                         ## @smu_queue_i2c
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_smu@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movq	_SMU_CMD_I2C_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rdi)
	movq	_smu_i2c_low_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rdi)
	movq	%rdi, 56(%rdi)
	movq	(%rdi), %rax
	movq	%rax, 24(%rdi)
	movabsq	$4294967304, %rcx               ## imm = 0x100000008
	movq	%rcx, 32(%rdi)
	leaq	72(%rdi), %rcx
	movq	%rcx, 48(%rdi)
	movq	$0, 120(%rdi)
	movl	$255, (%rax)
	movabsq	$4294967316, %rax               ## imm = 0x100000014
	movq	%rax, 8(%rdi)
	movl	76(%rdi), %ecx
	movl	80(%rdi), %edx
	movl	%ecx, 72(%rdi)
	movl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, 16(%rdi)
	cmpl	$128, %edx
	je	LBB0_11
## %bb.4:
	cmpl	$130, %edx
	je	LBB0_10
## %bb.5:
	cmpl	$129, %edx
	jne	LBB0_12
## %bb.6:
	leaq	84(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	16(%rbx), %eax
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	andl	$254, %ecx
	movl	%ecx, 76(%rbx)
LBB0_11:
	cmpl	$4, 84(%rbx)
	jge	LBB0_12
LBB0_7:
	movl	88(%rbx), %edx
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movq	_SMU_I2C_READ_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jg	LBB0_12
## %bb.9:
	movq	96(%rbx), %rdi
	movl	$255, %esi
	callq	_memset
	movl	$9, %edx
	jmp	LBB0_15
LBB0_13:
	movq	_SMU_I2C_WRITE_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_14:
	addl	$9, %edx
LBB0_15:
	movl	%edx, 40(%rbx)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINTK
	cmpl	$0, 16(%rbx)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	88(%rbx), %edx
	movl	112(%rbx), %ecx
	movq	104(%rbx), %rax
	movl	(%rax), %r9d
	movl	72(%rbx), %r8d
	movl	80(%rbx), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINTK
	movq	(%r14), %rdi
	callq	_spin_lock_irqsave
	movq	(%r14), %rsi
	cmpq	$0, 24(%rsi)
	je	LBB0_16
## %bb.18:
	addq	$20, %rbx
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	jmp	LBB0_19
LBB0_16:
	movq	%rbx, 24(%rsi)
	addq	$44, %rbx
	addq	$16, %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	(%r14), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_19
## %bb.17:
	xorl	%eax, %eax
	callq	_smu_start_cmd
LBB0_19:
	movq	(%r14), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_smu,8,3                        ## @smu
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SMU_CMD_I2C_COMMAND,4,2        ## @SMU_CMD_I2C_COMMAND
	.comm	_smu_i2c_low_completion,4,2     ## @smu_i2c_low_completion
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU_I2C_READ_MAX,4,2           ## @SMU_I2C_READ_MAX
	.comm	_SMU_I2C_WRITE_MAX,4,2          ## @SMU_I2C_WRITE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMU: i2c enqueuing command\n"

L_.str.1:                               ## @.str.1
	.asciz	"SMU:   %s, len=%d bus=%x addr=%x sub0=%x type=%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"read"

L_.str.3:                               ## @.str.3
	.asciz	"write"

.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 smu_queue_i2c
lCPI0_0:
	.long	8                               ; 0x8
	.long	1                               ; 0x1
lCPI0_1:
	.long	20                              ; 0x14
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_smu_queue_i2c
	.p2align	2
_smu_queue_i2c:                         ; @smu_queue_i2c
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x20, _smu@GOTPAGE
Lloh1:
	ldr	x20, [x20, _smu@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _SMU_CMD_I2C_COMMAND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SMU_CMD_I2C_COMMAND@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _smu_i2c_low_completion@GOTPAGE
Lloh6:
	ldr	x9, [x9, _smu_i2c_low_completion@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #64]
	ldr	x8, [x0]
	str	x8, [x0, #24]
Lloh8:
	adrp	x9, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x0, #32]
	mov	w9, #255
	str	w9, [x8]
	mov	x8, x0
	ldp	w9, w10, [x0, #76]
	str	w9, [x8, #72]!
	stp	x8, x0, [x0, #48]
	str	xzr, [x0, #120]
Lloh10:
	adrp	x8, lCPI0_1@PAGE
Lloh11:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x0, #8]
	and	w8, w9, #0x1
	str	w8, [x0, #16]
	cmp	w10, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w10, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w10, #129
	b.ne	LBB0_12
; %bb.4:
	add	x0, x19, #84
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x19, #16]
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
	and	w9, w9, #0xfe
	str	w9, [x19, #76]
LBB0_7:
	ldr	w9, [x19, #84]
	cmp	w9, #4
	b.ge	LBB0_12
LBB0_8:
	ldr	w2, [x19, #88]
	cbz	w8, LBB0_11
; %bb.9:
Lloh14:
	adrp	x8, _SMU_I2C_READ_MAX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SMU_I2C_READ_MAX@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w2, w8
	b.gt	LBB0_12
; %bb.10:
	ldr	x0, [x19, #96]
	mov	w1, #255
	bl	_memset
	mov	w8, #9
	b	LBB0_16
LBB0_11:
Lloh17:
	adrp	x8, _SMU_I2C_WRITE_MAX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SMU_I2C_WRITE_MAX@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_15
LBB0_12:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	add	w8, w2, #9
LBB0_16:
	str	w8, [x19, #40]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	ldr	w8, [x19, #16]
Lloh24:
	adrp	x9, l_.str.2@PAGE
Lloh25:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh26:
	adrp	x10, l_.str.3@PAGE
Lloh27:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	x9, [x19, #104]
	ldr	w10, [x19, #88]
	ldr	w11, [x19, #112]
	ldr	w12, [x19, #72]
	ldr	w9, [x9]
	ldr	w13, [x19, #80]
	stp	x9, x13, [sp, #32]
	stp	x11, x12, [sp, #16]
	stp	x8, x10, [sp]
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	ldr	x0, [x20]
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_18
; %bb.17:
	add	x0, x19, #20
	add	x1, x8, #4
	bl	_list_add_tail
	b	LBB0_20
LBB0_18:
	str	x19, [x8, #24]
	add	x0, x19, #44
	add	x1, x8, #16
	bl	_list_add_tail
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_20
; %bb.19:
	bl	_smu_start_cmd
LBB0_20:
	ldr	x0, [x20]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_smu,8,3                        ; @smu
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SMU_CMD_I2C_COMMAND,4,2        ; @SMU_CMD_I2C_COMMAND
	.comm	_smu_i2c_low_completion,4,2     ; @smu_i2c_low_completion
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU_I2C_READ_MAX,4,2           ; @SMU_I2C_READ_MAX
	.comm	_SMU_I2C_WRITE_MAX,4,2          ; @SMU_I2C_WRITE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMU: i2c enqueuing command\n"

l_.str.1:                               ; @.str.1
	.asciz	"SMU:   %s, len=%d bus=%x addr=%x sub0=%x type=%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"read"

l_.str.3:                               ; @.str.3
	.asciz	"write"

.subsections_via_symbols
