	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function friio_ext_ctl
_friio_ext_ctl:                         ## @friio_ext_ctl
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_FRIIO_CTL_LNB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_kmalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movabsq	$8589934592, %rax               ## imm = 0x200000000
	movq	%rax, -96(%rbp)
	movq	$0, -80(%rbp)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, -88(%rbp)
	movl	$0, (%r13)
	movq	_FRIIO_CTL_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	orl	%r12d, %eax
	movq	_FRIIO_CTL_STROBE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%r13)
	leaq	-96(%rbp), %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	_FRIIO_CTL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r15d
	addl	-68(%rbp), %r15d                ## 4-byte Folded Reload
	movq	_FRIIO_CTL_STROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r12d, %eax
	movl	%eax, 4(%r13)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %r12
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	addl	%r15d, %ebx
	movq	_FRIIO_CTL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r15d
	addl	%ebx, %r15d
	movl	$-2147483648, %r12d             ## imm = 0x80000000
	movl	$32, %r13d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	leaq	-96(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%r15d, %r14d
	addl	%eax, %r14d
	movq	_FRIIO_CTL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, 4(%rcx)
	movq	%rbx, %rdi
	leaq	-96(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r15d
	addl	%r14d, %r15d
	sarl	%r12d
	decl	%r13d
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FRIIO_CTL_STROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	testl	%r12d, -72(%rbp)                ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_FRIIO_CTL_LED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	jmp	LBB0_7
LBB0_8:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
	leaq	-96(%rbp), %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r13d
	addl	%r15d, %r13d
	movq	_FRIIO_CTL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r12)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r14d
	addl	%r13d, %r14d
	movq	%r12, %rdi
	callq	_kfree
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	cmpl	$70, %r14d
	cmovel	%ecx, %eax
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRIIO_CTL_LNB,4,2              ## @FRIIO_CTL_LNB
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_FRIIO_CTL_LED,4,2              ## @FRIIO_CTL_LED
	.comm	_FRIIO_CTL_STROBE,4,2           ## @FRIIO_CTL_STROBE
	.comm	_FRIIO_CTL_CLK,4,2              ## @FRIIO_CTL_CLK
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_friio_ext_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function friio_ext_ctl
lCPI0_0:
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_friio_ext_ctl:                         ; @friio_ext_ctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _FRIIO_CTL_LNB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FRIIO_CTL_LNB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w23, wzr, w8, eq
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	stp	x0, xzr, [sp, #16]
	str	wzr, [x0]
Lloh8:
	adrp	x24, _FRIIO_CTL_LED@GOTPAGE
Lloh9:
	ldr	x24, [x24, _FRIIO_CTL_LED@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w8, w8, w23
Lloh10:
	adrp	x25, _FRIIO_CTL_STROBE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _FRIIO_CTL_STROBE@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w8, w9
	str	w8, [x0, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	mov	x22, x0
Lloh12:
	adrp	x26, _FRIIO_CTL_CLK@GOTPAGE
Lloh13:
	ldr	x26, [x26, _FRIIO_CTL_CLK@GOTPAGEOFF]
	ldr	w8, [x26]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w22, w0, w22
	ldr	w8, [x25]
	orr	w8, w8, w23
	str	w8, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w22, w22, w0
	ldr	w8, [x26]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w22, w22, w0
	mov	w27, #-2147483648
	mov	w28, #32
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w22, w0, w22
	ldr	w8, [x26]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w22, w22, w0
	asr	w27, w27, #1
	subs	w28, w28, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	orr	w8, w8, w23
	str	w8, [x20, #4]
	tst	w27, w21
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	b	LBB0_2
LBB0_5:
	str	w23, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w21, w0, w22
	ldr	w8, [x26]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	add	w19, w21, w0
	mov	x0, x20
	bl	_kfree
Lloh14:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w19, #70
	csneg	w0, wzr, w8, eq
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FRIIO_CTL_LNB,4,2              ; @FRIIO_CTL_LNB
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_FRIIO_CTL_LED,4,2              ; @FRIIO_CTL_LED
	.comm	_FRIIO_CTL_STROBE,4,2           ; @FRIIO_CTL_STROBE
	.comm	_FRIIO_CTL_CLK,4,2              ; @FRIIO_CTL_CLK
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_friio_ext_ctl
.subsections_via_symbols
