	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em2860_ir_change_protocol
_em2860_ir_change_protocol:             ## @em2860_ir_change_protocol
	.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	%rsi, %rbx
	movq	(%rdi), %r14
	movq	8(%r14), %rdi
	movl	(%rsi), %ecx
	movq	_RC_PROTO_BIT_RC5@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_EM28XX_XCLK_IR_RC5_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rdi)
	jmp	LBB0_2
LBB0_4:
	movq	_RC_PROTO_BIT_NEC@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_EM28XX_XCLK_IR_RC5_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%rdi)
LBB0_2:
	movl	$1, (%r14)
	movl	(%rax), %eax
LBB0_3:
	movl	%eax, (%rbx)
	movq	_EM28XX_R0F_XCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	movq	_EM28XX_XCLK_IR_RC5_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_em28xx_write_reg_bits
	movl	(%rbx), %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_RC_PROTO_BIT_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	jne	LBB0_3
## %bb.7:
	movl	4(%r14), %eax
	movl	%eax, (%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_BIT_RC5,4,2           ## @RC_PROTO_BIT_RC5
	.comm	_EM28XX_XCLK_IR_RC5_MODE,4,2    ## @EM28XX_XCLK_IR_RC5_MODE
	.comm	_RC_PROTO_BIT_NEC,4,2           ## @RC_PROTO_BIT_NEC
	.comm	_RC_PROTO_BIT_UNKNOWN,4,2       ## @RC_PROTO_BIT_UNKNOWN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EM28XX_R0F_XCLK,4,2            ## @EM28XX_R0F_XCLK
	.no_dead_strip	_em2860_ir_change_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em2860_ir_change_protocol
_em2860_ir_change_protocol:             ; @em2860_ir_change_protocol
	.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
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x0, [x20, #8]
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _RC_PROTO_BIT_RC5@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_BIT_RC5@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
Lloh3:
	adrp	x8, _EM28XX_XCLK_IR_RC5_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM28XX_XCLK_IR_RC5_MODE@GOTPAGEOFF]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x8]
	ldr	w10, [x0]
	orr	w9, w10, w9
	str	w9, [x0]
Lloh5:
	adrp	x9, _RC_PROTO_BIT_RC5@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RC_PROTO_BIT_RC5@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh7:
	adrp	x10, _RC_PROTO_BIT_NEC@GOTPAGE
Lloh8:
	ldr	x10, [x10, _RC_PROTO_BIT_NEC@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.3:
	ldr	w9, [x8]
	ldr	w10, [x0]
	bic	w9, w10, w9
	str	w9, [x0]
Lloh10:
	adrp	x9, _RC_PROTO_BIT_NEC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RC_PROTO_BIT_NEC@GOTPAGEOFF]
LBB0_4:
	mov	w10, #1
	str	w10, [x20]
	ldr	w10, [x9]
LBB0_5:
	str	w10, [x19]
Lloh12:
	adrp	x9, _EM28XX_R0F_XCLK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EM28XX_R0F_XCLK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	ldr	w2, [x0]
	ldr	w3, [x8]
	bl	_em28xx_write_reg_bits
	mov	w0, #0
	ldr	w8, [x19]
	str	w8, [x20, #4]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh15:
	adrp	x10, _RC_PROTO_BIT_UNKNOWN@GOTPAGE
Lloh16:
	ldr	x10, [x10, _RC_PROTO_BIT_UNKNOWN@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_5
; %bb.8:
	ldr	w8, [x20, #4]
	str	w8, [x19]
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_BIT_RC5,4,2           ; @RC_PROTO_BIT_RC5
	.comm	_EM28XX_XCLK_IR_RC5_MODE,4,2    ; @EM28XX_XCLK_IR_RC5_MODE
	.comm	_RC_PROTO_BIT_NEC,4,2           ; @RC_PROTO_BIT_NEC
	.comm	_RC_PROTO_BIT_UNKNOWN,4,2       ; @RC_PROTO_BIT_UNKNOWN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EM28XX_R0F_XCLK,4,2            ; @EM28XX_R0F_XCLK
	.no_dead_strip	_em2860_ir_change_protocol
.subsections_via_symbols
