	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda998x_cec_calibration
_tda998x_cec_calibration:               ## @tda998x_cec_calibration
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	callq	_mutex_lock
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jle	LBB0_2
## %bb.1:
	callq	_disable_irq
LBB0_2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_gpiod_direction_output
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_tda998x_cec_set_calibration
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	movl	$10, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_gpiod_set_value
	xorl	%eax, %eax
	callq	_local_irq_enable
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tda998x_cec_set_calibration
	movq	%r14, %rdi
	callq	_gpiod_direction_input
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jle	LBB0_4
## %bb.3:
	callq	_enable_irq
LBB0_4:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tda998x_cec_calibration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda998x_cec_calibration
_tda998x_cec_calibration:               ; @tda998x_cec_calibration
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #16]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	bl	_disable_irq
LBB0_2:
	mov	x0, x20
	mov	w1, #1
	bl	_gpiod_direction_output
	mov	x0, x19
	mov	w1, #1
	bl	_tda998x_cec_set_calibration
	bl	_local_irq_disable
	mov	x0, x20
	mov	w1, #0
	bl	_gpiod_set_value
	mov	w0, #10
	bl	_mdelay
	mov	x0, x20
	mov	w1, #1
	bl	_gpiod_set_value
	bl	_local_irq_enable
	mov	x0, x19
	mov	w1, #0
	bl	_tda998x_cec_set_calibration
	mov	x0, x20
	bl	_gpiod_direction_input
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.3:
	bl	_enable_irq
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tda998x_cec_calibration
.subsections_via_symbols
