	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_uvis25_allocate_trigger
_st_uvis25_allocate_trigger:            ## @st_uvis25_allocate_trigger
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_iio_priv
	movq	%rax, %r12
	movl	12(%rax), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movl	8(%r12), %edi
	callq	_irq_get_irq_data
	movl	%eax, %edi
	callq	_irqd_get_trigger_type
	movq	%rax, %r13
	addq	$-128, %rax
	cmpq	$4, %rax
	jae	LBB0_1
## %bb.2:
	leaq	L_switch.table.st_uvis25_allocate_trigger(%rip), %rax
	movl	-512(%rax,%r13,4), %ecx
	movl	12(%r12), %edi
	movq	_ST_UVIS25_REG_CTRL3_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ST_UVIS25_REG_HL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	8(%r12), %esi
	movq	_st_uvis25_trigger_handler_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	orq	%r13, %r8
	movl	(%r15), %r9d
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	8(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_dev_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_iio_trigger_alloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_iio_trigger_set_drvdata
	movq	(%r12), %rsi
	movq	%r14, (%rsi)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_iio_trigger_register      ## TAILCALL
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode %lx unsupported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ST_UVIS25_REG_CTRL3_ADDR,4,2   ## @ST_UVIS25_REG_CTRL3_ADDR
	.comm	_ST_UVIS25_REG_HL_MASK,4,2      ## @ST_UVIS25_REG_HL_MASK
	.comm	_st_uvis25_trigger_handler_thread,4,2 ## @st_uvis25_trigger_handler_thread
	.comm	_IRQF_ONESHOT,8,3               ## @IRQF_ONESHOT
L_.str.1:                               ## @.str.1
	.asciz	"failed to request trigger irq %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s-trigger"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_st_uvis25_allocate_trigger
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.st_uvis25_allocate_trigger
L_switch.table.st_uvis25_allocate_trigger:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_uvis25_allocate_trigger
_st_uvis25_allocate_trigger:            ; @st_uvis25_allocate_trigger
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	bl	_iio_priv
	mov	x20, x0
	ldr	w0, [x0, #12]
	bl	_regmap_get_device
	mov	x19, x0
	ldr	w0, [x20, #8]
	bl	_irq_get_irq_data
	bl	_irqd_get_trigger_type
	mov	x22, x0
	sub	x8, x0, #128
	cmp	x8, #4
	b.hs	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.st_uvis25_allocate_trigger@PAGE
Lloh1:
	add	x9, x9, l_switch.table.st_uvis25_allocate_trigger@PAGEOFF
	ldr	w3, [x9, x8, lsl #2]
	ldr	w0, [x20, #12]
Lloh2:
	adrp	x8, _ST_UVIS25_REG_CTRL3_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ST_UVIS25_REG_CTRL3_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _ST_UVIS25_REG_HL_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_UVIS25_REG_HL_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w1, [x20, #8]
Lloh8:
	adrp	x8, _st_uvis25_trigger_handler_thread@GOTPAGE
Lloh9:
	ldr	x8, [x8, _st_uvis25_trigger_handler_thread@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	orr	x4, x8, x22
	ldr	w5, [x21]
	mov	x0, x19
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_8
; %bb.3:
	mov	x23, x0
	ldr	w2, [x20, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_4:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_info
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_6:
	mov	x23, x0
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w2, [x21]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_iio_trigger_alloc
	str	x0, [x20]
	cbz	x0, LBB0_10
; %bb.9:
	mov	x1, x21
	bl	_iio_trigger_set_drvdata
	ldr	x1, [x20]
	str	x19, [x1]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_devm_iio_trigger_register
LBB0_10:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode %lx unsupported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ST_UVIS25_REG_CTRL3_ADDR,4,2   ; @ST_UVIS25_REG_CTRL3_ADDR
	.comm	_ST_UVIS25_REG_HL_MASK,4,2      ; @ST_UVIS25_REG_HL_MASK
	.comm	_st_uvis25_trigger_handler_thread,4,2 ; @st_uvis25_trigger_handler_thread
	.comm	_IRQF_ONESHOT,8,3               ; @IRQF_ONESHOT
l_.str.1:                               ; @.str.1
	.asciz	"failed to request trigger irq %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s-trigger"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_st_uvis25_allocate_trigger
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.st_uvis25_allocate_trigger
l_switch.table.st_uvis25_allocate_trigger:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	1                               ; 0x1

.subsections_via_symbols
