	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_powermac_smbus_xfer
_i2c_powermac_smbus_xfer:               ## @i2c_powermac_smbus_xfer
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_i2c_get_adapdata
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rcx
	movb	(%rcx), %sil
	cmpb	%r13b, %sil
	sete	%r9b
	cmpl	$132, %ebx
	je	LBB0_2
## %bb.1:
	cmpl	$129, %ebx
	jne	LBB0_3
LBB0_2:
	movq	_pmac_i2c_mode_std@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_3:
	cmpb	%r13b, %sil
	jne	LBB0_5
## %bb.4:
	movq	_pmac_i2c_mode_combined@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_pmac_i2c_mode_stdsub@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	$1, %edi
LBB0_7:
	leal	-128(%rbx), %edx
	cmpl	$5, %edx
	ja	LBB0_10
## %bb.8:
	movl	%edi, -96(%rbp)                 ## 4-byte Spill
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movl	%r12d, -100(%rbp)               ## 4-byte Spill
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	movq	16(%rbp), %r8
	xorl	%r12d, %r12d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdx,4), %rdx
	addq	%rcx, %rdx
	xorl	%r15d, %r15d
	jmpq	*%rdx
LBB0_9:
	movl	$1, %r12d
	movq	%r8, %r15
	jmp	LBB0_16
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_11:
	cmpb	%r13b, %sil
	je	LBB0_13
## %bb.12:
	movl	(%r8), %edx
	movzbl	%dl, %ecx
	movl	%ecx, -56(%rbp)
	movzbl	%dh, %ecx
	movl	%ecx, -52(%rbp)
LBB0_13:
	movl	$2, %r12d
	leaq	-56(%rbp), %r15
	jmp	LBB0_16
LBB0_14:
	movq	(%r8), %r15
	movl	(%r15), %r12d
	addq	$4, %r15
	jmp	LBB0_16
LBB0_15:
	movq	(%r8), %r15
	movl	(%r15), %r12d
	incl	%r12d
LBB0_16:
	movb	%r9b, -58(%rbp)                 ## 1-byte Spill
	movb	%sil, -57(%rbp)                 ## 1-byte Spill
	movl	%r13d, -92(%rbp)                ## 4-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_pmac_i2c_open
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_18:
	movq	%r13, %rdi
	movl	-72(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_pmac_i2c_setmode
	testl	%eax, %eax
	je	LBB0_23
## %bb.19:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r13, %rdi
LBB0_20:
	callq	_pmac_i2c_close
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.22:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	xorl	%eax, %eax
	movb	-58(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %al
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	leal	(%rax,%rbx,2), %esi
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	-96(%rbp), %edx                 ## 4-byte Reload
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	movq	%r15, %r8
	movl	%r12d, %r9d
	callq	_pmac_i2c_xfer
	testl	%eax, %eax
	je	LBB0_26
## %bb.24:
	movl	%eax, %r14d
	addl	%ebx, %ebx
	movq	_ENXIO@GOTPCREL(%rip), %rax
	sarl	%ebx
	movl	(%rax), %eax
	addl	%r14d, %eax
	movq	%rbx, %rdx
	leaq	L_.str.2(%rip), %rsi
	jne	LBB0_29
## %bb.25:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r14d, %r8d
	callq	_dev_dbg
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_26:
	xorl	%r14d, %r14d
	cmpl	$128, -88(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_30
## %bb.27:
	movb	-57(%rbp), %al                  ## 1-byte Reload
	cmpb	-92(%rbp), %al                  ## 1-byte Folded Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_20
## %bb.28:
	movl	-52(%rbp), %eax
	shll	$8, %eax
	orl	-56(%rbp), %eax
	movq	16(%rbp), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_20
LBB0_29:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
LBB0_30:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_16
	.long	L0_0_set_14
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_I2C_SMBUS_READ,1,0             ## @I2C_SMBUS_READ
	.comm	_pmac_i2c_mode_std,4,2          ## @pmac_i2c_mode_std
	.comm	_pmac_i2c_mode_combined,4,2     ## @pmac_i2c_mode_combined
	.comm	_pmac_i2c_mode_stdsub,4,2       ## @pmac_i2c_mode_stdsub
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to open I2C, err %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to set I2C mode %d, err %d\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"I2C transfer at 0x%02x failed, size %d, err %d\n"

	.no_dead_strip	_i2c_powermac_smbus_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_powermac_smbus_xfer
_i2c_powermac_smbus_xfer:               ; @i2c_powermac_smbus_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x27, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	str	w1, [sp, #36]                   ; 4-byte Folded Spill
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	bl	_i2c_get_adapdata
Lloh3:
	adrp	x8, _I2C_SMBUS_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_SMBUS_READ@GOTPAGEOFF]
	ldrb	w26, [x8]
	cmp	w26, w23, uxtb
	cset	w12, eq
	cmp	w21, #132
	b.eq	LBB0_2
; %bb.1:
	cmp	w21, #129
	b.ne	LBB0_3
LBB0_2:
	mov	w20, #0
	mov	w22, #0
Lloh5:
	adrp	x8, _pmac_i2c_mode_std@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pmac_i2c_mode_std@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _pmac_i2c_mode_combined@GOTPAGE
Lloh9:
	ldr	x8, [x8, _pmac_i2c_mode_combined@GOTPAGEOFF]
Lloh10:
	adrp	x9, _pmac_i2c_mode_stdsub@GOTPAGE
Lloh11:
	ldr	x9, [x9, _pmac_i2c_mode_stdsub@GOTPAGEOFF]
	cmp	w26, w23, uxtb
	csel	x8, x8, x9, eq
	ldr	w25, [x8]
	mov	w20, #1
LBB0_4:
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_7
; %bb.5:
	str	x19, [sp, #40]                  ; 8-byte Folded Spill
	str	w22, [sp, #32]                  ; 4-byte Folded Spill
	mov	w24, #0
	mov	x22, #0
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	mov	w24, #1
	mov	x22, x27
	b	LBB0_13
LBB0_7:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_18
LBB0_8:
	cmp	w26, w23, uxtb
	b.eq	LBB0_10
; %bb.9:
	ldr	w8, [x27]
	and	w9, w8, #0xff
	ubfx	w8, w8, #8, #8
	stp	w9, w8, [sp, #48]
LBB0_10:
	mov	w24, #2
	add	x22, sp, #48
	b	LBB0_13
LBB0_11:
	ldr	x22, [x27]
	ldr	w24, [x22], #4
	b	LBB0_13
LBB0_12:
	ldr	x22, [x27]
	ldr	w8, [x22]
	add	w24, w8, #1
LBB0_13:
	mov	x19, x12
	str	x27, [sp, #24]                  ; 8-byte Folded Spill
	mov	x28, x0
	mov	w1, #0
	bl	_pmac_i2c_open
	cbz	w0, LBB0_15
; %bb.14:
	mov	x27, x0
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x2, x27
	bl	_dev_err
	b	LBB0_18
LBB0_15:
	mov	x0, x28
	mov	x1, x25
	bl	_pmac_i2c_setmode
	cbz	w0, LBB0_20
; %bb.16:
	mov	x27, x0
	str	x27, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x2, x25
	bl	_dev_err
	mov	x0, x28
LBB0_17:
	bl	_pmac_i2c_close
LBB0_18:
	ldr	x8, [sp, #56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.19:
	mov	x0, x27
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_20:
	ldp	w3, w25, [sp, #32]              ; 8-byte Folded Reload
	mov	x1, x19
	bfi	w1, w25, #1, #31
	mov	x19, x28
	mov	x0, x28
	mov	x2, x20
	mov	x4, x22
	mov	x5, x24
	bl	_pmac_i2c_xfer
	mov	x27, x0
	cbz	w0, LBB0_23
; %bb.21:
	lsl	w8, w25, #1
Lloh24:
	adrp	x9, _ENXIO@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ENXIO@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	asr	w2, w8, #1
	cmn	w27, w9
	b.ne	LBB0_26
; %bb.22:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x3, x21
	mov	x4, x27
	bl	_dev_dbg
	mov	x0, x19
	b	LBB0_17
LBB0_23:
	cmp	w21, #128
	b.ne	LBB0_27
; %bb.24:
	cmp	w26, w23, uxtb
	mov	x0, x19
	b.ne	LBB0_17
; %bb.25:
	mov	w27, #0
	ldp	w9, w8, [sp, #48]
	orr	w8, w9, w8, lsl #8
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_17
LBB0_26:
	mov	x8, x27
	stp	x21, x8, [sp]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_dev_err
LBB0_27:
	mov	x0, x19
	b	LBB0_17
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
                                        ; -- End function
	.comm	_I2C_SMBUS_READ,1,0             ; @I2C_SMBUS_READ
	.comm	_pmac_i2c_mode_std,4,2          ; @pmac_i2c_mode_std
	.comm	_pmac_i2c_mode_combined,4,2     ; @pmac_i2c_mode_combined
	.comm	_pmac_i2c_mode_stdsub,4,2       ; @pmac_i2c_mode_stdsub
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to open I2C, err %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to set I2C mode %d, err %d\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"I2C transfer at 0x%02x failed, size %d, err %d\n"

	.no_dead_strip	_i2c_powermac_smbus_xfer
.subsections_via_symbols
