(fn vref-mm4 (x n) (if (< n (vlen x)) (unsafe_vref-mm5 x n) 0)) (fn env_parent_denom () PARENT-DENOM) (fn unsafe_vref-mm1 (x i) (v-get x i)) (fn denom_eq (a b) (if (if (let (@if17 (blen a) @if18 1) (= @if17 @if18)) (let (@if19 (blen b) @if20 1) (= @if19 @if20)) 0) (let (@if21 (b-get a 0) @if22 (b-get b 0)) (= @if21 @if22)) (if (if (let (@if23 (blen a) @if24 32) (= @if23 @if24)) (let (@if25 (blen b) @if26 32) (= @if25 @if26)) 0) (let (@if27 (b2n a) @if28 (b2n b)) (= @if27 @if28)) 0))) (fn b2n (b) (bytes->u256 b)) (fn vref-mm0 (x n) (if (< n (vlen x)) (unsafe_vref-mm1 x n) 0)) (fn vref-mm2 (x n) (if (< n (vlen x)) (unsafe_vref-mm3 x n) 0)) (fn unsafe_vref-mm3 (x i) (v-get x i)) (fn blen (bytes) (b-len bytes)) (fn unsafe_vref-mm5 (x i) (v-get x i)) (fn vlen (vec) (v-len vec)) (fn get_proof () 0) (fn env_self_hash () SELF-HASH) (fn env_parent_value () PARENT-VALUE) (fn env_spender_tx () SPENDER-TX) (let (proof (get_proof)) (if proof (if (< (v-get proof 0) (env_parent_value)) (let (output_0 (vref-mm0 (v-get (env_spender_tx) 2) 0)) (let (output_1 (vref-mm2 (v-get (env_spender_tx) 2) 1)) (if (if (if (if (if (if (if output_0 (let (@if3 (v-get output_0 1) @if4 (- (env_parent_value) (v-get proof 0))) (= @if3 @if4)) 0) (denom_eq (v-get output_0 2) (env_parent_denom)) 0) (let (@if5 (b2n (v-get output_0 0)) @if6 (b2n (env_self_hash))) (= @if5 @if6)) 0) output_1 0) (let (@if7 (v-get output_1 1) @if8 (v-get proof 0)) (= @if7 @if8)) 0) (denom_eq (v-get output_1 2) (env_parent_denom)) 0) (let (@if9 (b2n (v-get output_1 0)) @if10 (b2n (v-get proof 2))) (= @if9 @if10)) 0))) (if (let (@if11 (v-get proof 0) @if12 (env_parent_value)) (= @if11 @if12)) (let (output_0 (vref-mm4 (v-get (env_spender_tx) 2) 0)) (if (if (if output_0 (let (@if13 (v-get output_0 1) @if14 (env_parent_value)) (= @if13 @if14)) 0) (denom_eq (v-get output_0 2) (env_parent_denom)) 0) (let (@if15 (b2n (v-get output_0 0)) @if16 (b2n (v-get proof 2))) (= @if15 @if16)) 0)) 0)) 0))