	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib0700_set_i2c_speed          ## -- Begin function dib0700_set_i2c_speed
	.p2align	4, 0x90
_dib0700_set_i2c_speed:                 ## @dib0700_set_i2c_speed
	.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
	testl	%esi, %esi
	je	LBB0_1
## %bb.3:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	_REQUEST_SET_I2C_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movl	$30000, %eax                    ## imm = 0x7530
	xorl	%edx, %edx
	idivl	%ebx
	movl	%eax, %esi
	movl	$0, 4(%rcx)
	sarl	$8, %eax
	movl	%eax, 8(%rcx)
	movzbl	%sil, %eax
	movl	%eax, 12(%rcx)
	movl	$72000, %eax                    ## imm = 0x11940
	xorl	%edx, %edx
	idivl	%ebx
	movl	%eax, %edx
	sarl	$8, %edx
	movl	%edx, 16(%rcx)
	movzbl	%al, %edi
	movl	%edi, 20(%rcx)
	movl	%edx, 24(%rcx)
	movl	%edi, 28(%rcx)
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	movl	%eax, %ecx
	movl	%ebx, %r8d
	callq	_deb_info
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_dib0700_ctrl_wr
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	_EINTR@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not acquire lock"

	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_REQUEST_SET_I2C_PARAM,4,2      ## @REQUEST_SET_I2C_PARAM
L_.str.1:                               ## @.str.1
	.asciz	"setting I2C speed: %04x %04x %04x (%d kHz)."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib0700_set_i2c_speed          ; -- Begin function dib0700_set_i2c_speed
	.p2align	2
_dib0700_set_i2c_speed:                 ; @dib0700_set_i2c_speed
	.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
	cbz	w1, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _REQUEST_SET_I2C_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REQUEST_SET_I2C_PARAM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x21]
	mov	w10, #30000
	sdiv	w1, w10, w20
	stp	w8, wzr, [x9]
	asr	w8, w1, #8
	and	w10, w1, #0xff
	stp	w8, w10, [x9, #8]
	mov	w8, #6464
	movk	w8, #1, lsl #16
	sdiv	w2, w8, w20
	asr	w8, w2, #8
	and	w10, w2, #0xff
	stp	w8, w10, [x9, #16]
	stp	w8, w10, [x9, #24]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x2
	mov	x4, x20
	bl	_deb_info
	ldr	x1, [x21]
	mov	x0, x19
	mov	w2, #8
	bl	_dib0700_ctrl_wr
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
Lloh9:
	adrp	x8, _EINTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not acquire lock"

	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_REQUEST_SET_I2C_PARAM,4,2      ; @REQUEST_SET_I2C_PARAM
l_.str.1:                               ; @.str.1
	.asciz	"setting I2C speed: %04x %04x %04x (%d kHz)."

.subsections_via_symbols
