	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmasound_setup
_dmasound_setup:                        ## @dmasound_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_get_options
	movl	-48(%rbp), %eax
	cmpq	$3, %rax
	ja	LBB0_13
## %bb.1:
	movl	$1, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	_MAX_CATCH_RADIUS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_4
## %bb.5:
	movq	_catchRadius@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_6
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_14
LBB0_4:
	movq	_catchRadius@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
LBB0_6:
	movl	-44(%rbp), %eax
	movq	_MIN_BUFFERS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_8
## %bb.7:
	movq	_numWriteBufs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_9
LBB0_8:
	movq	_numWriteBufs@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	movl	-40(%rbp), %ecx
	movl	%ecx, %eax
	shll	$10, %eax
	cmpl	$256, %ecx                      ## imm = 0x100
	cmovgel	%ecx, %eax
	movq	_MIN_BUFSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_11
## %bb.10:
	movq	_MAX_BUFSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_11
## %bb.12:
	movq	_writeBufSize@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_14
LBB0_11:
	movq	_writeBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_9
	.long	L0_0_set_6
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_MAX_CATCH_RADIUS,4,2           ## @MAX_CATCH_RADIUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmasound_setup: invalid catch radius, using default = %d\n"

	.comm	_catchRadius,4,2                ## @catchRadius
	.comm	_MIN_BUFFERS,4,2                ## @MIN_BUFFERS
L_.str.1:                               ## @.str.1
	.asciz	"dmasound_setup: invalid number of buffers, using default = %d\n"

	.comm	_numWriteBufs,4,2               ## @numWriteBufs
	.comm	_MIN_BUFSIZE,4,2                ## @MIN_BUFSIZE
	.comm	_MAX_BUFSIZE,4,2                ## @MAX_BUFSIZE
L_.str.2:                               ## @.str.2
	.asciz	"dmasound_setup: invalid write buffer size, using default = %d\n"

	.comm	_writeBufSize,4,2               ## @writeBufSize
L_.str.3:                               ## @.str.3
	.asciz	"dmasound_setup: invalid number of arguments\n"

	.no_dead_strip	_dmasound_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmasound_setup
_dmasound_setup:                        ; @dmasound_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x1, x0
	add	x2, sp, #16
	mov	x0, x19
	bl	_get_options
	ldr	w8, [sp, #16]
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.1:
	mov	w0, #1
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [sp, #28]
	tbnz	w8, #31, LBB0_6
; %bb.3:
Lloh5:
	adrp	x9, _MAX_CATCH_RADIUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_CATCH_RADIUS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_6
; %bb.4:
Lloh8:
	adrp	x9, _catchRadius@GOTPAGE
Lloh9:
	ldr	x9, [x9, _catchRadius@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
	mov	w0, #0
	b	LBB0_14
LBB0_6:
Lloh13:
	adrp	x8, _catchRadius@GOTPAGE
Lloh14:
	ldr	x8, [x8, _catchRadius@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_7:
	ldr	w8, [sp, #20]
Lloh18:
	adrp	x9, _MIN_BUFFERS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MIN_BUFFERS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _numWriteBufs@GOTPAGE
Lloh22:
	ldr	x8, [x8, _numWriteBufs@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	b	LBB0_10
LBB0_9:
Lloh26:
	adrp	x9, _numWriteBufs@GOTPAGE
Lloh27:
	ldr	x9, [x9, _numWriteBufs@GOTPAGEOFF]
Lloh28:
	str	w8, [x9]
LBB0_10:
	ldr	w8, [sp, #24]
	lsl	w9, w8, #10
	cmp	w8, #256
	csel	w8, w9, w8, lt
Lloh29:
	adrp	x9, _MIN_BUFSIZE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MIN_BUFSIZE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _MAX_BUFSIZE@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MAX_BUFSIZE@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_12
; %bb.11:
Lloh35:
	adrp	x8, _writeBufSize@GOTPAGE
Lloh36:
	ldr	x8, [x8, _writeBufSize@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
	b	LBB0_13
LBB0_12:
Lloh40:
	adrp	x9, _writeBufSize@GOTPAGE
Lloh41:
	ldr	x9, [x9, _writeBufSize@GOTPAGEOFF]
Lloh42:
	str	w8, [x9]
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldur	x8, [x29, #-24]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_MAX_CATCH_RADIUS,4,2           ; @MAX_CATCH_RADIUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmasound_setup: invalid catch radius, using default = %d\n"

	.comm	_catchRadius,4,2                ; @catchRadius
	.comm	_MIN_BUFFERS,4,2                ; @MIN_BUFFERS
l_.str.1:                               ; @.str.1
	.asciz	"dmasound_setup: invalid number of buffers, using default = %d\n"

	.comm	_numWriteBufs,4,2               ; @numWriteBufs
	.comm	_MIN_BUFSIZE,4,2                ; @MIN_BUFSIZE
	.comm	_MAX_BUFSIZE,4,2                ; @MAX_BUFSIZE
l_.str.2:                               ; @.str.2
	.asciz	"dmasound_setup: invalid write buffer size, using default = %d\n"

	.comm	_writeBufSize,4,2               ; @writeBufSize
l_.str.3:                               ; @.str.3
	.asciz	"dmasound_setup: invalid number of arguments\n"

	.no_dead_strip	_dmasound_setup
.subsections_via_symbols
