	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_ir_change_protocol
_img_ir_change_protocol:                ## @img_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	%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	%rsi, %r14
	movq	8(%rdi), %r15
	movq	8(%r15), %r12
	cmpl	$0, (%rsi)
	je	LBB0_1
## %bb.2:
	movq	_img_ir_decoders@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %r13
	testq	%r13, %r13
	je	LBB0_11
## %bb.3:
	addq	$8, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %r13
	addq	$8, %rbx
	testq	%r13, %r13
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_img_ir_decoder_compatible
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %edx
	andl	(%r14), %edx
	je	LBB0_10
## %bb.6:
	movl	%edx, (%r14)
	movq	%r15, %rdi
	movq	%r13, %rsi
	jmp	LBB0_7
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_7:
	callq	_img_ir_set_decoder
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.9:
	movl	(%r14), %eax
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	movl	%eax, (%r12)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_img_ir_decoders,8,3            ## @img_ir_decoders
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_img_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 img_ir_change_protocol
_img_ir_change_protocol:                ; @img_ir_change_protocol
	.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	x19, x1
	ldr	x20, [x0, #8]
	ldr	x22, [x20, #8]
	ldr	w8, [x1]
	cbz	w8, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _img_ir_decoders@GOTPAGE
Lloh1:
	ldr	x8, [x8, _img_ir_decoders@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x21, [x8]
	cbz	x21, LBB0_7
; %bb.2:
	add	x23, x8, #8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x23], #8
	cbz	x21, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_img_ir_decoder_compatible
	cbz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x21]
	ands	w2, w9, w8
	b.eq	LBB0_3
; %bb.6:
	str	w2, [x19]
	mov	x0, x20
	mov	x1, x21
	b	LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_8:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
LBB0_9:
	bl	_img_ir_set_decoder
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.10:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.11:
	ldr	w8, [x19]
	b	LBB0_13
LBB0_12:
	mov	w8, #0
LBB0_13:
	mov	w0, #0
	str	w8, [x22]
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_img_ir_decoders,8,3            ; @img_ir_decoders
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_img_ir_change_protocol
.subsections_via_symbols
