	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setcontrast
_setcontrast:                           ## @setcontrast
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	(%rdi), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,8), %ecx
	leal	(%rax,%rcx,4), %eax
	movq	_CONTRAST_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	37(%rax), %ecx
	movl	%eax, %edx
	addl	$38, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	addl	$38, %eax
	sarl	%eax
	movl	%eax, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	%ecx, -24(%rbp)
	movl	$0, -20(%rbp)
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$33, %rax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	$0, -12(%rbp)
	leaq	-32(%rbp), %rdx
	movl	$132, %esi
	movl	$24, %ecx
	callq	_reg_w
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-8(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$32, %rsp
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTRAST_MAX,4,2               ## @CONTRAST_MAX
	.no_dead_strip	_setcontrast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setcontrast
_setcontrast:                           ; @setcontrast
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	ldr	x8, [x0]
	ldr	w8, [x8]
	mov	w9, #37
	mul	w8, w8, w9
Lloh3:
	adrp	x9, _CONTRAST_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CONTRAST_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w9, w9, #1
	sdiv	w8, w8, w9
	add	w9, w8, #37
	add	w10, w8, #38
	add	w8, w8, #39
	cmp	w10, #0
	csel	w8, w8, w10, lt
	asr	w8, w8, #1
	stp	w8, wzr, [sp]
	stp	w9, wzr, [sp, #8]
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	smull	x8, w9, w8
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	stp	w8, wzr, [sp, #16]
	mov	x2, sp
	mov	w1, #132
	mov	w3, #24
	bl	_reg_w
	ldur	x8, [x29, #-8]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTRAST_MAX,4,2               ; @CONTRAST_MAX
	.no_dead_strip	_setcontrast
.subsections_via_symbols
