	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_hal_setupregs
_ath_hal_setupregs:                     ## @ath_hal_setupregs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	_state@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_10
## %bb.1:
	movl	$-1, %r15d
	xorl	%r13d, %r13d
	leaq	16(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$-1, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %eax
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movslq	(%r12), %rcx
	movl	%eax, %r14d
	cmpq	%rcx, %r13
	jge	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r13,8), %rbx
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_match
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	$4, %r15d
	movl	4(%rbx), %eax
	cmpl	%eax, %r15d
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	8(%rdx), %rcx
	cmpl	$-1, %r14d
	cmovneq	%rcx, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_10:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_malloc
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_25
## %bb.12:
	movq	%r14, (%rcx)
	cmpl	$0, (%r12)
	jle	LBB0_24
## %bb.13:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	$-1, %ebx
	xorl	%r15d, %r15d
	leaq	16(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$-1, %r14d
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	%ecx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r15
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jge	LBB0_22
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r15,8), %r13
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, (%r13)
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_match
	testq	%rax, %rax
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	4(%rbx), %ecx
	movl	4(%r13), %eax
	cmpl	%eax, %ecx
	je	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$-1, %r14d
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r14d, -64(%rbp)
	movl	%ebx, -60(%rbp)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	leaq	-64(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	addq	$32, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %eax
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	%eax, %r14d
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_22:
	movl	%r14d, %eax
	cmpl	$-1, %r14d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_24
## %bb.23:
	movl	%eax, -64(%rbp)
	movl	%ebx, -60(%rbp)
	leaq	-64(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
LBB0_24:
	shrq	$2, %r14
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_state,24,3                     ## @state
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot malloc memory for registers!\n"

	.no_dead_strip	_ath_hal_setupregs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_hal_setupregs
_ath_hal_setupregs:                     ; @ath_hal_setupregs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _state@GOTPAGE
Lloh1:
	ldr	x23, [x23, _state@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	mov	x21, #0
	mov	w25, #-1
	mov	w26, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	x20, [x8, x24, lsl #3]
	ldr	w8, [x20]
	tst	w8, w19
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x23, #16
	mov	x0, x20
	bl	_match
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w25, w25, #4
	ldr	w8, [x20, #4]
	cmp	w25, w8
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x21, #8
	cmn	w26, #1
	csel	x21, x21, x9, eq
	mov	x26, x8
	mov	x25, x8
	b	LBB0_2
LBB0_7:
	mov	x21, #0
LBB0_8:
	add	x20, x21, #8
	mov	x0, x20
	bl	_malloc
	str	x0, [x22, #8]
	cbz	x0, LBB0_22
; %bb.9:
	str	x20, [x22]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.10:
	mov	x21, x0
	mov	x24, #0
	mov	w25, #-1
	mov	w26, #-1
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x25, x9
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_19
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	x22, [x8, x24, lsl #3]
	ldr	w8, [x22]
	tst	w8, w19
	b.eq	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x1, x23, #16
	mov	x0, x22
	bl	_match
	cbz	x0, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w9, w25, #4
	ldr	w8, [x22, #4]
	cmp	w9, w8
	b.eq	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	cmn	w26, #1
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	stp	w26, w25, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #8
	bl	_memcpy
	add	x21, x21, #32
	ldr	w26, [x22, #4]
	mov	x25, x26
	b	LBB0_12
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x26, x8
	mov	x25, x8
	b	LBB0_12
LBB0_19:
	cmn	w26, #1
	b.eq	LBB0_21
; %bb.20:
	stp	w26, w25, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #8
	bl	_memcpy
LBB0_21:
	lsr	x0, x20, #2
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_22:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_state,24,3                     ; @state
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot malloc memory for registers!\n"

	.no_dead_strip	_ath_hal_setupregs
.subsections_via_symbols
