	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cafe_smbus_xfer
_cafe_smbus_xfer:                       ## @cafe_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%esi, %r12d
	movq	16(%rbp), %r15
	callq	_i2c_get_adapdata
	movq	_EINVAL@GOTPCREL(%rip), %r8
	xorl	%ebx, %ebx
	movq	_I2C_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_1
## %bb.2:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rdi
	cmpb	%r13b, (%rdi)
	jne	LBB0_3
## %bb.6:
	movl	(%r15), %ecx
	movq	%rax, %rdi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cafe_smbus_write_data          ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movl	%r14d, %edx
	movq	%r8, %r14
	callq	_cam_err
	subl	(%r14), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rdi
	cmpb	%r13b, (%rdi)
	jne	LBB0_4
## %bb.7:
	movq	%rax, %rdi
	movl	%r12d, %esi
	movq	%r15, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cafe_smbus_read_data           ## TAILCALL
LBB0_4:
	subl	(%r8), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_SMBUS_BYTE_DATA,4,2        ## @I2C_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"funky xfer size %d\n"

	.comm	_I2C_SMBUS_WRITE,1,0            ## @I2C_SMBUS_WRITE
	.comm	_I2C_SMBUS_READ,1,0             ## @I2C_SMBUS_READ
	.no_dead_strip	_cafe_smbus_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cafe_smbus_xfer
_cafe_smbus_xfer:                       ; @cafe_smbus_xfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x6
	mov	x22, x5
	mov	x19, x4
	mov	x23, x3
	mov	x21, x1
	bl	_i2c_get_adapdata
Lloh0:
	adrp	x24, _EINVAL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
Lloh2:
	adrp	x8, _I2C_SMBUS_BYTE_DATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.1:
	and	w8, w23, #0xff
Lloh5:
	adrp	x9, _I2C_SMBUS_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_5
; %bb.2:
	ldr	w3, [x20]
	mov	x1, x21
	mov	x2, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_cafe_smbus_write_data
LBB0_3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_cam_err
LBB0_4:
	ldr	w8, [x24]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh9:
	adrp	x9, _I2C_SMBUS_READ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I2C_SMBUS_READ@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_4
; %bb.6:
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_cafe_smbus_read_data
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_SMBUS_BYTE_DATA,4,2        ; @I2C_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"funky xfer size %d\n"

	.comm	_I2C_SMBUS_WRITE,1,0            ; @I2C_SMBUS_WRITE
	.comm	_I2C_SMBUS_READ,1,0             ; @I2C_SMBUS_READ
	.no_dead_strip	_cafe_smbus_xfer
.subsections_via_symbols
