	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_debugfs_hw_ioread32_write
_carl9170_debugfs_hw_ioread32_write:    ## @carl9170_debugfs_hw_ioread32_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -44(%rbp)
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	cmpq	$33, %rdx
	jb	LBB0_4
## %bb.3:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_4:
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rax
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_sscanf
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.7:
	movl	$1, -44(%rbp)
	movl	$1, %eax
	jmp	LBB0_8
LBB0_5:
	movq	%rcx, %rdx
	jmp	LBB0_18
LBB0_16:
	movl	-44(%rbp), %eax
	cmpl	$15, %eax
	jle	LBB0_8
## %bb.17:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rdx
	jmp	LBB0_18
LBB0_8:
	movl	-48(%rbp), %esi
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rdx
	cmpl	$2621439, %esi                  ## imm = 0x27FFFF
	ja	LBB0_18
## %bb.9:
	leal	(%rsi,%rax,4), %edi
	cmpl	$2621439, %edi                  ## imm = 0x27FFFF
	ja	LBB0_18
## %bb.10:
	movq	%rcx, %rdx
	testb	$3, %sil
	je	LBB0_11
LBB0_18:
	movl	(%rdx), %eax
	testl	%eax, %eax
	je	LBB0_24
## %bb.19:
	negl	%eax
	movq	%rax, %rbx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testl	%eax, %eax
	jle	LBB0_24
## %bb.12:
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_carl9170_read_reg
	testl	%eax, %eax
	jne	LBB0_23
## %bb.13:
	xorl	%ecx, %ecx
	movq	_CARL9170_DEBUG_RING_SIZE@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %edx
	addl	%ecx, %edx
	movq	(%r14), %rax
	movq	8(%r14), %rsi
	movl	%edx, (%rsi,%rax,8)
	movl	-52(%rbp), %edx
	movl	%edx, 4(%rsi,%rax,8)
	incq	%rax
	movq	%rax, (%r14)
	movq	(%r12), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_15
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_21
LBB0_15:                                ##   in Loop: Header=BB0_14 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%rdx, (%r14)
	incl	%r13d
	cmpl	-44(%rbp), %r13d
	jge	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-48(%rbp), %eax
	movl	%ecx, %r15d
	addl	$4, %r15d
	leal	(%rcx,%rax), %esi
	addl	$4, %esi
	movq	%r14, %rdi
	leaq	-52(%rbp), %rdx
	callq	_carl9170_read_reg
	movl	%r15d, %ecx
	testl	%eax, %eax
	je	LBB0_14
LBB0_23:
	movl	%eax, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_E2BIG,4,2                      ## @E2BIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%X %d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_CARL9170_DEBUG_RING_SIZE,8,3   ## @CARL9170_DEBUG_RING_SIZE
	.no_dead_strip	_carl9170_debugfs_hw_ioread32_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_debugfs_hw_ioread32_write
_carl9170_debugfs_hw_ioread32_write:    ; @carl9170_debugfs_hw_ioread32_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	str	wzr, [sp, #12]
	cbz	x2, LBB0_14
; %bb.1:
	cmp	x19, #33
	b.lo	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _E2BIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_3:
	mov	x20, x0
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x1
	mov	x1, x8
	bl	_sscanf
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.4:
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [sp, #12]
	b	LBB0_8
LBB0_6:
	ldr	w8, [sp, #12]
	cmp	w8, #15
	b.le	LBB0_8
; %bb.7:
Lloh5:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbnz	w8, LBB0_13
	b	LBB0_14
LBB0_8:
	ldr	w1, [sp, #8]
	lsr	w9, w1, #19
	cmp	w9, #4
	b.hi	LBB0_10
; %bb.9:
	mov	w9, #2621439
	add	w10, w1, w8, lsl #2
	cmp	w10, w9
	b.ls	LBB0_11
LBB0_10:
Lloh8:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cbnz	w8, LBB0_13
	b	LBB0_14
LBB0_11:
	tst	w1, #0x3
	b.eq	LBB0_15
LBB0_12:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
LBB0_13:
	neg	w19, w8
LBB0_14:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.16:
	add	x2, sp, #4
	mov	x0, x20
	bl	_carl9170_read_reg
	cbnz	w0, LBB0_20
; %bb.17:
	mov	w8, #0
	mov	w21, #0
Lloh14:
	adrp	x22, _CARL9170_DEBUG_RING_SIZE@GOTPAGE
Lloh15:
	ldr	x22, [x22, _CARL9170_DEBUG_RING_SIZE@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #8]
	add	w9, w8, w9
	ldp	x11, x10, [x20]
	add	x10, x10, x11, lsl #3
	str	w9, [x10]
	ldr	w9, [sp, #4]
	str	w9, [x10, #4]
	add	x9, x11, #1
	str	x9, [x20]
	ldr	x10, [x22]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	str	x9, [x20]
	add	w21, w21, #1
	ldr	w9, [sp, #12]
	cmp	w21, w9
	b.ge	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	w23, w8, #4
	ldr	w9, [sp, #8]
	add	w8, w8, w9
	add	w1, w8, #4
	add	x2, sp, #4
	mov	x0, x20
	bl	_carl9170_read_reg
	mov	x8, x23
	cbz	w0, LBB0_18
LBB0_20:
	mov	w19, w0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_E2BIG,4,2                      ; @E2BIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%X %d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_CARL9170_DEBUG_RING_SIZE,8,3   ; @CARL9170_DEBUG_RING_SIZE
	.no_dead_strip	_carl9170_debugfs_hw_ioread32_write
.subsections_via_symbols
