	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lirc_prog_detach               ## -- Begin function lirc_prog_detach
	.p2align	4, 0x90
_lirc_prog_detach:                      ## @lirc_prog_detach
	.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, %rbx
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_BPF_PROG_TYPE_LIRC_MODE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_bpf_prog_get_type
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	jmp	LBB0_5
LBB0_6:
	movl	(%rbx), %edi
	callq	_rc_dev_get_from_fd
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_bpf_prog_put
	movq	%r14, %rdi
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_lirc_bpf_detach
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_bpf_prog_put
	movq	%r14, %rdi
	callq	_put_device
	movl	%ebx, %eax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BPF_PROG_TYPE_LIRC_MODE2,4,2   ## @BPF_PROG_TYPE_LIRC_MODE2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lirc_prog_detach               ; -- Begin function lirc_prog_detach
	.p2align	2
_lirc_prog_detach:                      ; @lirc_prog_detach
	.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	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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_3:
Lloh3:
	adrp	x8, _BPF_PROG_TYPE_LIRC_MODE2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BPF_PROG_TYPE_LIRC_MODE2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_bpf_prog_get_type
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20]
	bl	_rc_dev_get_from_fd
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_bpf_prog_put
	mov	x0, x20
LBB0_7:
	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
	b	_PTR_ERR
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_lirc_bpf_detach
	mov	x21, x0
	mov	x0, x19
	bl	_bpf_prog_put
	mov	x0, x20
	bl	_put_device
	mov	x0, x21
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BPF_PROG_TYPE_LIRC_MODE2,4,2   ; @BPF_PROG_TYPE_LIRC_MODE2
.subsections_via_symbols
