sbv-0.9.13: SBVUnitTest/GoldFiles/gcd.gold
== BEGIN: "Makefile" ================
# Makefile for sgcd. Automatically generated by SBV. Do not edit!
CC=gcc
CCFLAGS=-Wall -O3 -DNDEBUG -fomit-frame-pointer
all: sgcd_driver
sgcd.o: sgcd.c sgcd.h
${CC} ${CCFLAGS} -c sgcd.c -o sgcd.o
sgcd_driver.o: sgcd_driver.c
${CC} ${CCFLAGS} -c sgcd_driver.c -o sgcd_driver.o
sgcd_driver: sgcd.o sgcd_driver.o
${CC} ${CCFLAGS} sgcd.o sgcd_driver.o -o sgcd_driver
clean:
rm -f sgcd_driver.o sgcd.o
veryclean: clean
rm -f sgcd_driver
== END: "Makefile" ==================
== BEGIN: "sgcd.h" ================
/* Header file for sgcd. Automatically generated by SBV. Do not edit! */
#ifndef __sgcd__HEADER_INCLUDED__
#define __sgcd__HEADER_INCLUDED__
#include <inttypes.h>
#include <stdint.h>
/* Unsigned bit-vectors */
typedef uint8_t SBool ;
typedef uint8_t SWord8 ;
typedef uint16_t SWord16;
typedef uint32_t SWord32;
typedef uint64_t SWord64;
/* Signed bit-vectors */
typedef int8_t SInt8 ;
typedef int16_t SInt16;
typedef int32_t SInt32;
typedef int64_t SInt64;
/* Entry point prototype: */
SWord8 sgcd(const SWord8 x, const SWord8 y);
#endif /* __sgcd__HEADER_INCLUDED__ */
== END: "sgcd.h" ==================
== BEGIN: "sgcd_driver.c" ================
/* Example driver program for sgcd. */
/* Automatically generated by SBV. Edit as you see fit! */
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include "sgcd.h"
int main(void)
{
const SWord8 out0 = sgcd(55, 154);
printf("sgcd(55, 154) = %"PRIu8"\n", out0);
return 0;
}
== END: "sgcd_driver.c" ==================
== BEGIN: "sgcd.c" ================
/* File: "sgcd.c". Automatically generated by SBV. Do not edit! */
#include <inttypes.h>
#include <stdint.h>
#include "sgcd.h"
SWord8 sgcd(const SWord8 x, const SWord8 y)
{
const SWord8 s0 = x;
const SWord8 s1 = y;
const SBool s3 = s1 == 0;
const SWord8 s4 = s0 % s1;
const SWord8 s5 = s3 ? s0 : s4;
const SBool s6 = 0 == s5;
const SWord8 s7 = s1 % s5;
const SWord8 s8 = s6 ? s1 : s7;
const SBool s9 = 0 == s8;
const SWord8 s10 = s5 % s8;
const SWord8 s11 = s9 ? s5 : s10;
const SBool s12 = 0 == s11;
const SWord8 s13 = s8 % s11;
const SWord8 s14 = s12 ? s8 : s13;
const SBool s15 = 0 == s14;
const SWord8 s16 = s11 % s14;
const SWord8 s17 = s15 ? s11 : s16;
const SBool s18 = 0 == s17;
const SWord8 s19 = s14 % s17;
const SWord8 s20 = s18 ? s14 : s19;
const SBool s21 = 0 == s20;
const SWord8 s22 = s17 % s20;
const SWord8 s23 = s21 ? s17 : s22;
const SBool s24 = 0 == s23;
const SWord8 s25 = s20 % s23;
const SWord8 s26 = s24 ? s20 : s25;
const SBool s27 = 0 == s26;
const SWord8 s28 = s23 % s26;
const SWord8 s29 = s27 ? s23 : s28;
const SBool s30 = 0 == s29;
const SWord8 s31 = s26 % s29;
const SWord8 s32 = s30 ? s26 : s31;
const SBool s33 = 0 == s32;
const SWord8 s34 = s29 % s32;
const SWord8 s35 = s33 ? s29 : s34;
const SBool s36 = 0 == s35;
const SWord8 s37 = s36 ? s32 : s35;
const SWord8 s38 = s33 ? s29 : s37;
const SWord8 s39 = s30 ? s26 : s38;
const SWord8 s40 = s27 ? s23 : s39;
const SWord8 s41 = s24 ? s20 : s40;
const SWord8 s42 = s21 ? s17 : s41;
const SWord8 s43 = s18 ? s14 : s42;
const SWord8 s44 = s15 ? s11 : s43;
const SWord8 s45 = s12 ? s8 : s44;
const SWord8 s46 = s9 ? s5 : s45;
const SWord8 s47 = s6 ? s1 : s46;
const SWord8 s48 = s3 ? s0 : s47;
return s48;
}
== END: "sgcd.c" ==================