	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c24xx_i2c_doxfer
_s3c24xx_i2c_doxfer:                    ## @s3c24xx_i2c_doxfer
	.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
	cmpq	$0, 40(%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_s3c24xx_i2c_set_master
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	16(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	%rbx, 32(%r15)
	movl	%r14d, (%r15)
	movq	$0, 24(%r15)
	movl	$0, 4(%r15)
	movq	_STATE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	%r15, %rdi
	callq	_s3c24xx_i2c_enable_irq
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_s3c24xx_i2c_message_start
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movl	12(%r15), %edi
	xorl	%esi, %esi
	cmpl	$0, (%r15)
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_timeout
	movl	4(%r15), %ebx
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	cmpl	%r14d, %ebx
	je	LBB0_9
## %bb.8:
	movl	8(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_6:
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_9:
	movl	$1, %edi
	callq	_msleep
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot get bus (error %d)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_STATE_START,4,2                ## @STATE_START
	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"timeout\n"

L_.str.2:                               ## @.str.2
	.asciz	"incomplete xfer (%d)\n"

	.no_dead_strip	_s3c24xx_i2c_doxfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c24xx_i2c_doxfer
_s3c24xx_i2c_doxfer:                    ; @s3c24xx_i2c_doxfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_s3c24xx_i2c_set_master
	cbz	w0, LBB0_6
; %bb.3:
	mov	x2, x0
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_6:
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock_irq
	stp	xzr, x21, [x19, #24]
	stp	w20, wzr, [x19]
Lloh6:
	adrp	x8, _STATE_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STATE_START@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_s3c24xx_i2c_enable_irq
	mov	x0, x19
	mov	x1, x21
	bl	_s3c24xx_i2c_message_start
	mov	x0, x22
	bl	_spin_unlock_irq
	ldr	w0, [x19, #12]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w1, eq
Lloh9:
	adrp	x8, _HZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w2, w8, w8, lsl #2
	bl	_wait_event_timeout
	ldr	w21, [x19, #4]
	cbz	x0, LBB0_9
; %bb.7:
	cmp	w21, w20
	b.eq	LBB0_11
; %bb.8:
	ldr	w0, [x19, #8]
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	bl	_dev_dbg
LBB0_11:
	mov	w0, #1
	bl	_msleep
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot get bus (error %d)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_STATE_START,4,2                ; @STATE_START
	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"timeout\n"

l_.str.2:                               ; @.str.2
	.asciz	"incomplete xfer (%d)\n"

	.no_dead_strip	_s3c24xx_i2c_doxfer
.subsections_via_symbols
