	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0070_set_bandwidth
_dib0070_set_bandwidth:                 ## @dib0070_set_bandwidth
	.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), %rbx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_dib0070_read_reg
	andl	$16383, %eax                    ## imm = 0x3FFF
	movq	(%rbx), %rcx
	movl	(%rcx), %ecx
	cmpl	$7000999, %ecx                  ## imm = 0x6AD3A7
	jg	LBB0_6
## %bb.1:
	cmpl	$6001000, %ecx                  ## imm = 0x5B9168
	jl	LBB0_3
## %bb.2:
	orl	$16384, %eax                    ## imm = 0x4000
	jmp	LBB0_6
LBB0_3:
	cmpl	$5001000, %ecx                  ## imm = 0x4C4F28
	jl	LBB0_5
## %bb.4:
	orl	$32768, %eax                    ## imm = 0x8000
	jmp	LBB0_6
LBB0_5:
	orl	$49152, %eax                    ## imm = 0xC000
LBB0_6:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	%eax, %edx
	callq	_dib0070_write_reg
	movq	(%rbx), %rax
	movq	8(%rax), %rax
	movq	_SYS_ISDBT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$23, %esi
	callq	_dib0070_read_reg
	movl	%eax, %r14d
	movl	%eax, %edx
	andl	$65532, %edx                    ## imm = 0xFFFC
	movq	%rbx, %rdi
	movl	$23, %esi
	callq	_dib0070_write_reg
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dib0070_read_reg
                                        ## kill: def $eax killed $eax def $rax
	andl	$511, %eax                      ## imm = 0x1FF
	leal	30720(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dib0070_write_reg
	movq	%rbx, %rdi
	movl	$23, %esi
	movl	%r14d, %edx
	callq	_dib0070_write_reg
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_ISDBT,8,3                  ## @SYS_ISDBT
	.no_dead_strip	_dib0070_set_bandwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0070_set_bandwidth
_dib0070_set_bandwidth:                 ; @dib0070_set_bandwidth
	.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	x19, [x0]
	mov	x0, x19
	mov	w1, #2
	bl	_dib0070_read_reg
	and	w8, w0, #0x3fff
	ldr	x9, [x19]
	ldr	w9, [x9]
	mov	w10, #54183
	movk	w10, #106, lsl #16
	mov	w11, #37224
	movk	w11, #91, lsl #16
	mov	w12, #20264
	movk	w12, #76, lsl #16
	orr	w13, w8, #0xc000
	orr	w14, w8, #0x8000
	cmp	w9, w12
	csel	w12, w13, w14, lt
	orr	w13, w8, #0x4000
	cmp	w9, w11
	csel	w11, w12, w13, lt
	cmp	w9, w10
	csel	w2, w8, w11, gt
	mov	x0, x19
	mov	w1, #2
	bl	_dib0070_write_reg
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x9, _SYS_ISDBT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SYS_ISDBT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #23
	bl	_dib0070_read_reg
	mov	x20, x0
	and	w2, w0, #0xfffc
	mov	x0, x19
	mov	w1, #23
	bl	_dib0070_write_reg
	mov	x0, x19
	mov	w1, #1
	bl	_dib0070_read_reg
	mov	w2, #30720
	bfxil	w2, w0, #0, #9
	mov	x0, x19
	mov	w1, #1
	bl	_dib0070_write_reg
	mov	x0, x19
	mov	w1, #23
	mov	x2, x20
	bl	_dib0070_write_reg
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_ISDBT,8,3                  ; @SYS_ISDBT
	.no_dead_strip	_dib0070_set_bandwidth
.subsections_via_symbols
