	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iio_scan_mask_set
_iio_scan_mask_set:                     ## @iio_scan_mask_set
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_BITS_TO_LONGS
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r14), %edx
	testl	%edx, %edx
	je	LBB0_3
## %bb.6:
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_bitmap_copy
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_iio_validate_scan_mask
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movl	(%r14), %esi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_iio_scan_mask_match
	testq	%rax, %rax
	je	LBB0_4
LBB0_9:
	movq	(%r15), %rdi
	movl	(%r14), %edx
	movq	%rbx, %rsi
	callq	_bitmap_copy
	movq	%rbx, %rdi
	callq	_bitmap_free
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
LBB0_4:
	movq	%rbx, %rdi
	callq	_bitmap_free
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to set scanmask prior to registering buffer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iio_scan_mask_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iio_scan_mask_set
_iio_scan_mask_set:                     ; @iio_scan_mask_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_BITS_TO_LONGS
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w2, [x20]
	cbz	w2, LBB0_7
; %bb.2:
	ldr	x1, [x21]
	mov	x0, x19
	bl	_bitmap_copy
	mov	x0, x22
	mov	x1, x19
	bl	_set_bit
	mov	x0, x20
	mov	x1, x19
	bl	_iio_validate_scan_mask
	cbz	w0, LBB0_8
; %bb.3:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x20]
	mov	x2, x19
	mov	w3, #0
	bl	_iio_scan_mask_match
	cbz	x0, LBB0_8
LBB0_5:
	ldr	x0, [x21]
	ldr	w2, [x20]
	mov	x1, x19
	bl	_bitmap_copy
	mov	x0, x19
	bl	_bitmap_free
	mov	w0, #0
	b	LBB0_10
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
LBB0_8:
	mov	x0, x19
	bl	_bitmap_free
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to set scanmask prior to registering buffer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iio_scan_mask_set
.subsections_via_symbols
