	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lirc_prog_attach               ## -- Begin function lirc_prog_attach
	.p2align	4, 0x90
_lirc_prog_attach:                      ## @lirc_prog_attach
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r14
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_rc_dev_get_from_fd
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_lirc_bpf_attach
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_put_device
	movl	%r14d, %eax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lirc_prog_attach               ; -- Begin function lirc_prog_attach
	.p2align	2
_lirc_prog_attach:                      ; @lirc_prog_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	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, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_rc_dev_get_from_fd
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_lirc_bpf_attach
	mov	x19, x0
	mov	x0, x20
	bl	_put_device
	mov	x0, x19
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
