	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efm32_i2c_master_xfer
_efm32_i2c_master_xfer:                 ## @efm32_i2c_master_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	callq	_i2c_get_adapdata
	cmpq	$0, 32(%rax)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movq	%rax, %rbx
	movq	%r15, 32(%rax)
	movl	%r14d, (%rax)
	movq	$0, 24(%rax)
	movl	$0, 4(%rax)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_reinit_completion
	movq	%rbx, %r15
	addq	$16, %r15
	movq	_REG_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_efm32_i2c_read32
	movl	%eax, %r12d
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_efm32_i2c_read32
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_efm32_i2c_send_next_msg
	movq	%r14, %rdi
	callq	_wait_for_completion
	movl	(%rbx), %eax
	cmpl	%eax, 4(%rbx)
	jge	LBB0_4
## %bb.3:
	movl	8(%rbx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"state: %08x, status: %08x\n"

	.comm	_REG_STATE,4,2                  ## @REG_STATE
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.no_dead_strip	_efm32_i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efm32_i2c_master_xfer
_efm32_i2c_master_xfer:                 ; @efm32_i2c_master_xfer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x19, x0
	stp	xzr, x21, [x0, #24]
	stp	w20, wzr, [x0]
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x0, #8]
	add	x20, x0, #12
	mov	x0, x20
	bl	_reinit_completion
	add	x21, x19, #16
Lloh6:
	adrp	x8, _REG_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_efm32_i2c_read32
	mov	x22, x0
Lloh9:
	adrp	x8, _REG_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_efm32_i2c_read32
	mov	x3, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_dbg
	mov	x0, x19
	bl	_efm32_i2c_send_next_msg
	mov	x0, x20
	bl	_wait_for_completion
	ldp	w0, w8, [x19]
	cmp	w8, w0
	b.ge	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"state: %08x, status: %08x\n"

	.comm	_REG_STATE,4,2                  ; @REG_STATE
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.no_dead_strip	_efm32_i2c_master_xfer
.subsections_via_symbols
