	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_s3c24xx_i2c_set_master
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	movq	%r15, 32(%r14)
	movl	%ebx, (%r14)
	movq	$0, 24(%r14)
	movl	$0, 4(%r14)
	movq	_STATE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%r14, %rdi
	callq	_s3c24xx_i2c_enable_irq
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_s3c24xx_i2c_message_start
	movq	_QUIRK_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_5
## %bb.3:
	movl	4(%r14), %r15d
	cmpl	%ebx, %r15d
	je	LBB0_12
## %bb.4:
	movl	16(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_11
LBB0_5:
	movl	20(%r14), %edi
	xorl	%esi, %esi
	cmpl	$0, (%r14)
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_timeout
	movl	4(%r14), %r15d
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	cmpl	%ebx, %r15d
	je	LBB0_9
## %bb.8:
	movl	16(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_6:
	movl	16(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_9:
	movq	_QUIRK_HDMIPHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_s3c24xx_i2c_wait_idle
	movq	%r14, %rdi
	callq	_s3c24xx_i2c_disable_bus
LBB0_11:
	movl	%r15d, %ebx
LBB0_12:
	movq	_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	_QUIRK_POLL,4,2                 ## @QUIRK_POLL
L_.str.1:                               ## @.str.1
	.asciz	"incomplete xfer (%d)\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"timeout\n"

	.comm	_QUIRK_HDMIPHY,4,2              ## @QUIRK_HDMIPHY
	.comm	_STATE_IDLE,4,2                 ## @STATE_IDLE
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_s3c24xx_i2c_set_master
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_2:
	stp	xzr, x21, [x19, #24]
	stp	w20, wzr, [x19]
Lloh5:
	adrp	x8, _STATE_START@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STATE_START@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_s3c24xx_i2c_enable_irq
	mov	x0, x19
	mov	x1, x21
	bl	_s3c24xx_i2c_message_start
	ldr	w8, [x19, #8]
Lloh8:
	adrp	x9, _QUIRK_POLL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _QUIRK_POLL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	w21, [x19, #4]
	cmp	w21, w20
	b.eq	LBB0_13
; %bb.4:
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	b	LBB0_12
LBB0_5:
	ldr	w0, [x19, #20]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w1, eq
Lloh13:
	adrp	x8, _HZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	add	w2, w8, w8, lsl #2
	bl	_wait_event_timeout
	ldr	w21, [x19, #4]
	cbz	x0, LBB0_8
; %bb.6:
	cmp	w21, w20
	b.eq	LBB0_10
; %bb.7:
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #16]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_dev_dbg
LBB0_10:
	ldr	w8, [x19, #8]
Lloh20:
	adrp	x9, _QUIRK_HDMIPHY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _QUIRK_HDMIPHY@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_s3c24xx_i2c_wait_idle
	mov	x0, x19
	bl	_s3c24xx_i2c_disable_bus
LBB0_12:
	mov	x20, x21
LBB0_13:
Lloh23:
	adrp	x8, _STATE_IDLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _STATE_IDLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, 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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.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	_QUIRK_POLL,4,2                 ; @QUIRK_POLL
l_.str.1:                               ; @.str.1
	.asciz	"incomplete xfer (%d)\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"timeout\n"

	.comm	_QUIRK_HDMIPHY,4,2              ; @QUIRK_HDMIPHY
	.comm	_STATE_IDLE,4,2                 ; @STATE_IDLE
	.no_dead_strip	_s3c24xx_i2c_doxfer
.subsections_via_symbols
