	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_iom2
_setup_iom2:                            ## @setup_iom2
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	16(%rdi), %edi
	callq	_SET_DPS
	movl	%eax, %r14d
	movq	_IOM_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	$0, -48(%rbp)
	movq	_IOM_P1_TXD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	cmpl	$2, 4(%rbx)
	jne	LBB0_2
## %bb.1:
	movl	$1, -60(%rbp)
	movl	$1, -52(%rbp)
LBB0_2:
	movl	8(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	movq	_IOM_CTRL_RCV@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_6:
	movq	_FLG_DTMFSEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_IOM_CTRL_RCV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	orl	%r15d, %eax
	movq	_IOM_CTRL_ALAW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_4:
	movl	16(%rbx), %eax
	addl	$2, %eax
	movl	%eax, -60(%rbp)
	movl	%eax, -52(%rbp)
	xorl	%r15d, %r15d
LBB0_9:
	movl	(%rbx), %edi
	movq	_ISAR_HIS_IOM2CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r14d, %esi
	leaq	-64(%rbp), %r8
	movl	%r15d, %edx
	movl	$5, %ecx
	callq	_send_mbox
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%rbx), %edi
	movq	_ISAR_HIS_IOM2REQ@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_send_mbox
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_9
	.long	L0_0_set_5
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_IOM_CTRL_ENA,4,2               ## @IOM_CTRL_ENA
	.comm	_IOM_P1_TXD,4,2                 ## @IOM_P1_TXD
	.comm	_IOM_CTRL_RCV,4,2               ## @IOM_CTRL_RCV
	.comm	_FLG_DTMFSEND,4,2               ## @FLG_DTMFSEND
	.comm	_IOM_CTRL_ALAW,4,2              ## @IOM_CTRL_ALAW
	.comm	_ISAR_HIS_IOM2CFG,4,2           ## @ISAR_HIS_IOM2CFG
	.comm	_ISAR_HIS_IOM2REQ,4,2           ## @ISAR_HIS_IOM2REQ
	.no_dead_strip	_setup_iom2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_iom2
_setup_iom2:                            ; @setup_iom2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w0, [x0, #16]
	bl	_SET_DPS
	mov	x20, x0
Lloh3:
	adrp	x8, _IOM_CTRL_ENA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOM_CTRL_ENA@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	stp	xzr, xzr, [sp, #8]
Lloh6:
	adrp	x8, _IOM_P1_TXD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IOM_P1_TXD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	w8, [x19, #4]
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [sp, #8]
	str	w8, [sp, #16]
LBB0_2:
	ldr	w8, [x19, #8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.3:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
Lloh11:
	adrp	x22, _IOM_CTRL_RCV@GOTPAGE
Lloh12:
	ldr	x22, [x22, _IOM_CTRL_RCV@GOTPAGEOFF]
	br	x10
LBB0_4:
	ldr	w8, [x22]
	orr	w21, w8, w21
LBB0_5:
Lloh13:
	adrp	x8, _FLG_DTMFSEND@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FLG_DTMFSEND@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	ldr	w8, [x22]
	cmp	w0, #0
	csel	w8, wzr, w8, eq
	orr	w8, w8, w21
Lloh16:
	adrp	x9, _IOM_CTRL_ALAW@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IOM_CTRL_ALAW@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w21, w8, w9
	b	LBB0_7
LBB0_6:
	mov	w21, #0
	ldr	w8, [x19, #16]
	add	w8, w8, #2
	str	w8, [sp, #8]
	str	w8, [sp, #16]
LBB0_7:
	ldr	w0, [x19]
Lloh19:
	adrp	x8, _ISAR_HIS_IOM2CFG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ISAR_HIS_IOM2CFG@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w1, w8, w20
	add	x4, sp, #4
	mov	x2, x21
	mov	w3, #5
	bl	_send_mbox
	mov	w0, #1000
	bl	_udelay
	ldr	w0, [x19]
Lloh22:
	adrp	x8, _ISAR_HIS_IOM2REQ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ISAR_HIS_IOM2REQ@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w1, w8, w20
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	bl	_send_mbox
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [sp, #24]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
                                        ; -- End function
	.comm	_IOM_CTRL_ENA,4,2               ; @IOM_CTRL_ENA
	.comm	_IOM_P1_TXD,4,2                 ; @IOM_P1_TXD
	.comm	_IOM_CTRL_RCV,4,2               ; @IOM_CTRL_RCV
	.comm	_FLG_DTMFSEND,4,2               ; @FLG_DTMFSEND
	.comm	_IOM_CTRL_ALAW,4,2              ; @IOM_CTRL_ALAW
	.comm	_ISAR_HIS_IOM2CFG,4,2           ; @ISAR_HIS_IOM2CFG
	.comm	_ISAR_HIS_IOM2REQ,4,2           ; @ISAR_HIS_IOM2REQ
	.no_dead_strip	_setup_iom2
.subsections_via_symbols
