	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___iio_trigger_register         ## -- Begin function __iio_trigger_register
	.p2align	4, 0x90
___iio_trigger_register:                ## @__iio_trigger_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsi, 24(%rdi)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_iio_trigger_ida@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ida_simple_get
	movq	%rax, %rbx
	movq	%rax, (%r15)
	testq	%rax, %rax
	js	LBB0_5
## %bb.1:
	leaq	8(%r15), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_dev_set_name
	movq	%r14, %rdi
	callq	_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	_iio_trigger_list_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	16(%r15), %edi
	callq	___iio_trigger_find_by_name
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	16(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_iio_trigger_list_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_device_del
LBB0_4:
	movl	(%r15), %esi
	movq	_iio_trigger_ida@GOTPCREL(%rip), %rdi
	callq	_ida_simple_remove
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	addq	$12, %r15
	movq	_iio_trigger_list@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	_iio_trigger_list_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_iio_trigger_ida,4,2            ## @iio_trigger_ida
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trigger%ld"

	.comm	_iio_trigger_list_lock,4,2      ## @iio_trigger_list_lock
L_.str.1:                               ## @.str.1
	.asciz	"Duplicate trigger name '%s'\n"

	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_iio_trigger_list,4,2           ## @iio_trigger_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___iio_trigger_register         ; -- Begin function __iio_trigger_register
	.p2align	2
___iio_trigger_register:                ; @__iio_trigger_register
	.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	x19, x0
	str	x1, [x0, #24]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x0, _iio_trigger_ida@GOTPAGE
Lloh4:
	ldr	x0, [x0, _iio_trigger_ida@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #0
	bl	_ida_simple_get
	mov	x21, x0
	str	x0, [x19]
	tbnz	x0, #63, LBB0_5
; %bb.1:
	add	x20, x19, #8
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_set_name
	mov	x0, x20
	bl	_device_add
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.2:
Lloh7:
	adrp	x0, _iio_trigger_list_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _iio_trigger_list_lock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w0, [x19, #16]
	bl	___iio_trigger_find_by_name
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w1, [x19, #16]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _EEXIST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
Lloh14:
	adrp	x0, _iio_trigger_list_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _iio_trigger_list_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x20
	bl	_device_del
LBB0_4:
	ldr	w1, [x19]
Lloh16:
	adrp	x0, _iio_trigger_ida@GOTPAGE
Lloh17:
	ldr	x0, [x0, _iio_trigger_ida@GOTPAGEOFF]
	bl	_ida_simple_remove
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	add	x0, x19, #12
Lloh18:
	adrp	x1, _iio_trigger_list@GOTPAGE
Lloh19:
	ldr	x1, [x1, _iio_trigger_list@GOTPAGEOFF]
	bl	_list_add_tail
Lloh20:
	adrp	x0, _iio_trigger_list_lock@GOTPAGE
Lloh21:
	ldr	x0, [x0, _iio_trigger_list_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_iio_trigger_ida,4,2            ; @iio_trigger_ida
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trigger%ld"

	.comm	_iio_trigger_list_lock,4,2      ; @iio_trigger_list_lock
l_.str.1:                               ; @.str.1
	.asciz	"Duplicate trigger name '%s'\n"

	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_iio_trigger_list,4,2           ; @iio_trigger_list
.subsections_via_symbols
