	.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)
	movq	16(%rdi), %r14
	movl	4(%rdi), %edi
	callq	_SET_DPS
	movl	%eax, %r15d
	movq	_IOM_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	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)
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movl	$1, -52(%rbp)
	movl	$1, -60(%rbp)
LBB0_2:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$132, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.5:
	movl	4(%rbx), %eax
	addl	$2, %eax
	movl	%eax, -52(%rbp)
	movl	%eax, -60(%rbp)
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_6:
	movq	_IOM_CTRL_ALAW@GOTPCREL(%rip), %rax
	movq	_IOM_CTRL_RCV@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
LBB0_7:
	movq	_ISAR_HIS_IOM2CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r15d, %esi
	leaq	-64(%rbp), %r8
	movq	%r14, %rdi
	movl	$5, %ecx
	callq	_sendmsg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	_ISAR_HIS_IOM2REQ@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sendmsg
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IOM_CTRL_ENA,4,2               ## @IOM_CTRL_ENA
	.comm	_IOM_P1_TXD,4,2                 ## @IOM_P1_TXD
	.comm	_IOM_CTRL_ALAW,4,2              ## @IOM_CTRL_ALAW
	.comm	_IOM_CTRL_RCV,4,2               ## @IOM_CTRL_RCV
	.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	x21, 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	x19, [x0, #16]
	ldr	w0, [x0, #4]
	bl	_SET_DPS
	mov	x20, x0
Lloh3:
	adrp	x8, _IOM_CTRL_ENA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOM_CTRL_ENA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [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	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [sp, #16]
	str	w8, [sp, #8]
LBB0_2:
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #132
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.5:
	mov	w2, #0
	ldr	w8, [x21, #4]
	add	w8, w8, #2
	str	w8, [sp, #16]
	str	w8, [sp, #8]
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _IOM_CTRL_ALAW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IOM_CTRL_ALAW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _IOM_CTRL_RCV@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IOM_CTRL_RCV@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w2
	orr	w2, w8, w9
LBB0_7:
Lloh15:
	adrp	x8, _ISAR_HIS_IOM2CFG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ISAR_HIS_IOM2CFG@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w1, w8, w20
	add	x4, sp, #4
	mov	x0, x19
	mov	w3, #5
	bl	_sendmsg
	mov	w0, #1000
	bl	_udelay
Lloh18:
	adrp	x8, _ISAR_HIS_IOM2REQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ISAR_HIS_IOM2REQ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w1, w8, w20
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	bl	_sendmsg
	mov	w0, #1000
	bl	_udelay
	ldr	x8, [sp, #24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IOM_CTRL_ENA,4,2               ; @IOM_CTRL_ENA
	.comm	_IOM_P1_TXD,4,2                 ; @IOM_P1_TXD
	.comm	_IOM_CTRL_ALAW,4,2              ; @IOM_CTRL_ALAW
	.comm	_IOM_CTRL_RCV,4,2               ; @IOM_CTRL_RCV
	.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
