	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_i2c_resize_fifo
_omap_i2c_resize_fifo:                  ## @omap_i2c_resize_fifo
	.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
	movq	_OMAP_I2C_FLAG_NO_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_8
## %bb.1:
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movl	40(%rdi), %edx
	movl	%esi, %edi
	movl	$1, %esi
	callq	_clamp
	movl	%eax, 4(%rbx)
	movq	_OMAP_I2C_BUF_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_omap_i2c_read_reg
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	andl	$-16129, %eax                   ## imm = 0xC0FF
	movl	4(%rbx), %ecx
	shll	$8, %ecx
	addl	$-256, %ecx
	movq	_OMAP_I2C_BUF_RXFIF_CLR@GOTPCREL(%rip), %rdx
	jmp	LBB0_4
LBB0_3:
	andl	$-64, %eax
	movl	4(%rbx), %ecx
	decl	%ecx
	movq	_OMAP_I2C_BUF_TXFIF_CLR@GOTPCREL(%rip), %rdx
LBB0_4:
	orl	(%rdx), %eax
	orl	%ecx, %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_omap_i2c_write_reg
	movq	8(%rbx), %rax
	movq	_OMAP_I2C_REV_ON_3630@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.5:
	movl	$1, 16(%rbx)
LBB0_6:
	cmpq	$0, 32(%rbx)
	je	LBB0_8
## %bb.7:
	imull	$1000000, 4(%rbx), %eax         ## imm = 0xF4240
	imull	$125, 24(%rbx), %ecx
	cltd
	idivl	%ecx
	movl	%eax, 20(%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_I2C_FLAG_NO_FIFO,4,2      ## @OMAP_I2C_FLAG_NO_FIFO
	.comm	_OMAP_I2C_BUF_REG,4,2           ## @OMAP_I2C_BUF_REG
	.comm	_OMAP_I2C_BUF_RXFIF_CLR,4,2     ## @OMAP_I2C_BUF_RXFIF_CLR
	.comm	_OMAP_I2C_BUF_TXFIF_CLR,4,2     ## @OMAP_I2C_BUF_TXFIF_CLR
	.comm	_OMAP_I2C_REV_ON_3630,8,3       ## @OMAP_I2C_REV_ON_3630
	.no_dead_strip	_omap_i2c_resize_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_i2c_resize_fifo
_omap_i2c_resize_fifo:                  ; @omap_i2c_resize_fifo
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _OMAP_I2C_FLAG_NO_FIFO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_I2C_FLAG_NO_FIFO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.1:
	mov	x20, x2
	mov	x19, x0
	ldr	w2, [x0, #40]
	mov	x0, x1
	mov	w1, #1
	bl	_clamp
	str	w0, [x19, #4]
Lloh3:
	adrp	x21, _OMAP_I2C_BUF_REG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _OMAP_I2C_BUF_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_omap_i2c_read_reg
	cbz	w20, LBB0_3
; %bb.2:
	and	w8, w0, #0xffffc0ff
	ldr	w9, [x19, #4]
	lsl	w9, w9, #8
	sub	w9, w9, #256
Lloh5:
	adrp	x10, _OMAP_I2C_BUF_RXFIF_CLR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _OMAP_I2C_BUF_RXFIF_CLR@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	and	w8, w0, #0xffffffc0
	ldr	w9, [x19, #4]
	sub	w9, w9, #1
Lloh7:
	adrp	x10, _OMAP_I2C_BUF_TXFIF_CLR@GOTPAGE
Lloh8:
	ldr	x10, [x10, _OMAP_I2C_BUF_TXFIF_CLR@GOTPAGEOFF]
LBB0_4:
	ldr	w10, [x10]
	orr	w8, w10, w8
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_omap_i2c_write_reg
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _OMAP_I2C_REV_ON_3630@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OMAP_I2C_REV_ON_3630@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_6:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w8, [x19, #4]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	mul	w8, w8, w9
	ldr	w9, [x19, #24]
	mov	w10, #125
	mul	w9, w9, w10
	sdiv	w8, w8, w9
	str	w8, [x19, #20]
LBB0_8:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_I2C_FLAG_NO_FIFO,4,2      ; @OMAP_I2C_FLAG_NO_FIFO
	.comm	_OMAP_I2C_BUF_REG,4,2           ; @OMAP_I2C_BUF_REG
	.comm	_OMAP_I2C_BUF_RXFIF_CLR,4,2     ; @OMAP_I2C_BUF_RXFIF_CLR
	.comm	_OMAP_I2C_BUF_TXFIF_CLR,4,2     ; @OMAP_I2C_BUF_TXFIF_CLR
	.comm	_OMAP_I2C_REV_ON_3630,8,3       ; @OMAP_I2C_REV_ON_3630
	.no_dead_strip	_omap_i2c_resize_fifo
.subsections_via_symbols
